From c808c9bd005081b0fe04ddf3b4751a77ebfd8633 Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Tue, 27 Sep 2022 21:23:59 +0200 Subject: [PATCH 1/9] refactor!: init dove (#691) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Updated @feathersjs dependencies to ^5.0.0-pre.3 * Added @feathersjs/adapter-commons to import `Paginated` * Updated Typescript to 4.2.4 * Set minimum Typescript to 4.0 for dslint * Re-import Paginated * Updated `combine` to work with Dove Re-implemented `processHooks` inside, since that’s all it was calling. * Updated dslint tests - all project tests passing Changed `feathers` import Added required properties for `HookContext` Updated typeexpectations for dslint since `Hook` is now an alias * Updated @feathersjs dependencies to ^5.0.0-pre.4 * Re-import Paginated * Removed @feathersjs/adapter-commons from dependencies * Updated @feathersjs dependencies to ^5.0.0-pre.9 All tests passing * refactor!: move to feathers v5 * chore: update package-lock * fix: use generics for hooks - @see docs link - correct utils docs link - export * from - move types to individual files - use prettier * refactor: move to generic HookContext * refactor: make tests run again * refactor: pass tests * chore: add prettier Co-authored-by: Jesse Cox --- .eslintrc | 41 +- .prettierrc | 11 + docs/guides.md | 410 ++-- docs/hooks.md | 676 +++--- docs/migrating.md | 10 +- docs/utilities.md | 167 +- package-lock.json | 2582 ++++++++++------------ package.json | 42 +- src/common/clone.ts | 3 + src/common/index.ts | 5 +- src/common/pluck.ts | 15 +- src/common/set-fields.ts | 2 +- src/common/transform-items.ts | 2 +- src/common/traverse.ts | 2 +- src/hooks/act-on-dispatch.ts | 29 +- src/hooks/alter-items.ts | 26 +- src/hooks/cache.ts | 83 +- src/hooks/check-context-if.ts | 19 - src/hooks/de-populate.ts | 8 +- src/hooks/debug.ts | 25 +- src/hooks/disable-pagination.ts | 9 +- src/hooks/disallow.ts | 22 +- src/hooks/discard-query.ts | 10 +- src/hooks/discard.ts | 10 +- src/hooks/fast-join.ts | 95 +- src/hooks/fgraphql.ts | 281 ++- src/hooks/iff-else.ts | 50 +- src/hooks/iff.ts | 34 +- src/hooks/keep-in-array.ts | 30 +- src/hooks/keep-query-in-array.ts | 30 +- src/hooks/keep-query.ts | 10 +- src/hooks/keep.ts | 19 +- src/hooks/lower-case.ts | 13 +- src/hooks/mongo-keys.ts | 13 +- src/hooks/params-from-client.ts | 11 +- src/hooks/populate.ts | 198 +- src/hooks/prevent-changes.ts | 16 +- src/hooks/required.ts | 14 +- src/hooks/run-parallel.ts | 25 +- src/hooks/sequelize-convert.ts | 38 +- src/hooks/serialize.ts | 36 +- src/hooks/set-field.ts | 30 +- src/hooks/set-now.ts | 12 +- src/hooks/set-slug.ts | 12 +- src/hooks/sifter.ts | 13 +- src/hooks/soft-delete.ts | 23 +- src/hooks/stash-before.ts | 43 +- src/hooks/traverse.ts | 17 +- src/hooks/unless.ts | 16 +- src/hooks/validate-schema.ts | 35 +- src/hooks/validate.ts | 46 +- src/index.ts | 97 +- src/types.ts | 238 +- src/utils/calling-params.ts | 107 +- src/utils/check-context-if.ts | 23 + src/utils/check-context.ts | 23 +- src/utils/combine.ts | 59 +- src/utils/every.ts | 9 +- src/utils/get-items.ts | 7 +- src/utils/is-not.ts | 15 +- src/utils/is-provider.ts | 26 +- src/utils/params-for-server.ts | 8 +- src/utils/replace-items.ts | 5 +- src/utils/run-hook.ts | 39 +- src/utils/some.ts | 10 +- test/common/traverse.test.ts | 17 +- test/helpers/config-app.ts | 17 +- test/helpers/get-init-db.ts | 46 +- test/helpers/make-services.ts | 50 +- test/hooks/act-on-dispatch.test.ts | 32 +- test/hooks/alter-items.test.ts | 103 +- test/hooks/cache.test.ts | 36 +- test/hooks/de-populate.test.ts | 147 +- test/hooks/debug.test.ts | 4 +- test/hooks/disable-pagination.test.ts | 10 +- test/hooks/disallow.test.ts | 58 +- test/hooks/discard-1.test.ts | 128 +- test/hooks/discard-2.test.ts | 195 +- test/hooks/discard-query.test.ts | 44 +- test/hooks/discard.test.ts | 77 +- test/hooks/fast-join-cache.test.ts | 229 +- test/hooks/fast-join.test.ts | 825 ++++--- test/hooks/fgraphql.test.ts | 516 ++--- test/hooks/get-replace-items.test.ts | 41 +- test/hooks/iff-else.test.ts | 731 +++--- test/hooks/iff.test.ts | 77 +- test/hooks/iffelse.test.ts | 219 +- test/hooks/is-provider.test.ts | 18 +- test/hooks/keep-in-array.test.ts | 109 +- test/hooks/keep-query-in-array.test.ts | 62 +- test/hooks/keep-query.test.ts | 46 +- test/hooks/keep.test.ts | 85 +- test/hooks/lowercase.test.ts | 62 +- test/hooks/mongo-keys.test.ts | 48 +- test/hooks/params-from-client.test.ts | 86 +- test/hooks/populate-1deep-1child.test.ts | 487 ++-- test/hooks/populate-basics.test.ts | 98 +- test/hooks/populate-misc.test.ts | 282 +-- test/hooks/populate-relations.test.ts | 417 ++-- test/hooks/populate-scaffolding.test.ts | 4 +- test/hooks/prevent-changes.test.ts | 48 +- test/hooks/required.test.ts | 3 +- test/hooks/run-parallel.test.ts | 18 +- test/hooks/sequelize-convert.test.ts | 298 +-- test/hooks/serialize.test.ts | 149 +- test/hooks/set-field.test.ts | 133 +- test/hooks/set-now.test.ts | 63 +- test/hooks/set-slug.test.ts | 1 - test/hooks/sifter.test.ts | 11 +- test/hooks/soft-delete.test.ts | 133 +- test/hooks/stash-before.test.ts | 84 +- test/hooks/unless.test.ts | 54 +- test/hooks/validate-schema.test.ts | 123 +- test/hooks/validate.test.ts | 28 +- test/hooks/when.test.ts | 73 +- test/index.test.ts | 12 +- test/utils/calling-params-1.test.ts | 141 +- test/utils/calling-params-2.test.ts | 43 +- test/utils/check-context.test.ts | 25 +- test/utils/combine.test.ts | 105 +- test/utils/every.test.ts | 65 +- test/utils/is-not.test.ts | 35 +- test/utils/params-for-server.test.ts | 13 +- test/utils/run-hook.test.ts | 49 +- test/utils/some.test.ts | 66 +- 125 files changed, 6984 insertions(+), 6230 deletions(-) create mode 100644 .prettierrc create mode 100644 src/common/clone.ts delete mode 100755 src/hooks/check-context-if.ts create mode 100755 src/utils/check-context-if.ts diff --git a/.eslintrc b/.eslintrc index 1b32f407..a490dc9e 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,7 +7,8 @@ }, "extends": [ "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking" + "plugin:@typescript-eslint/recommended-requiring-type-checking", + "plugin:prettier/recommended" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -17,10 +18,11 @@ "plugins": [ "eslint-plugin-import", "eslint-plugin-prefer-arrow", - "@typescript-eslint" + "@typescript-eslint", + "prettier" ], "rules": { - "indent": ["warn", 2], + // "indent": ["warn", 2], "prefer-rest-params": "off", "prefer-spread": "off", "@typescript-eslint/no-unsafe-member-access": "off", @@ -52,7 +54,7 @@ "@typescript-eslint/explicit-member-accessibility": [ "error", { - "accessibility": "no-public" + "accessibility": "no-public" } ], "@typescript-eslint/naming-convention": "off", @@ -68,10 +70,6 @@ "@typescript-eslint/prefer-for-of": "error", "@typescript-eslint/prefer-function-type": "error", "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/quotes": [ - "error", - "single" - ], "@typescript-eslint/triple-slash-reference": [ "error", { @@ -82,28 +80,16 @@ ], "@typescript-eslint/unified-signatures": "error", "@typescript-eslint/consistent-type-imports": ["warn", { "prefer": "type-imports" }], - "@typescript-eslint/object-curly-spacing": ["warn", "always"], - "arrow-parens": [ - "off", - "always" - ], - "comma-dangle": "error", + "arrow-parens": ["off", "always"], "complexity": "off", "constructor-super": "error", - "eqeqeq": [ - "error", - "smart" - ], + "eqeqeq": ["error", "smart"], "guard-for-in": "error", "id-blacklist": "off", "id-match": "off", "import/order": "off", - // "jsdoc/check-alignment": "error", - // "jsdoc/check-indentation": "error", - // "jsdoc/newline-after-description": "error", "max-classes-per-file": "off", "max-len": "off", - "new-parens": "error", "no-bitwise": "error", "no-caller": "error", "no-cond-assign": "error", @@ -121,28 +107,21 @@ } ], "no-throw-literal": "error", - "no-trailing-spaces": "error", "no-undef-init": "error", "no-underscore-dangle": "off", "no-unsafe-finally": "error", "no-unused-labels": "error", "no-var": "error", "object-shorthand": "error", - "one-var": [ - "error", - "never" - ], + "one-var": ["error", "never"], "prefer-arrow/prefer-arrow-functions": "off", "prefer-const": "error", "radix": "error", - "space-before-function-paren": "error", "spaced-comment": [ "error", "always", { - "markers": [ - "/" - ] + "markers": ["/"] } ], "use-isnan": "error", diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..e4d24e28 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "$schema": "http://json.schemastore.org/prettierrc", + "arrowParens": "avoid", + "bracketSpacing": true, + "printWidth": 100, + "semi": true, + "singleQuote": true, + "tabWidth": 2, + "bracketSameLine": false, + "htmlWhitespaceSensitivity": "ignore" +} diff --git a/docs/guides.md b/docs/guides.md index c3cbbde5..d9b6527c 100755 --- a/docs/guides.md +++ b/docs/guides.md @@ -6,13 +6,13 @@ This code will **not work** as hoped, as `disallowWhat` is evaluated when the mo ```js function disallowWhat() { - return someVariableCircumstance() ? "rest" : "external"; + return someVariableCircumstance() ? 'rest' : 'external'; } // ... module.exports = { before: { - all: disallow(disallowWhat()), - }, + all: disallow(disallowWhat()) + } }; ``` @@ -20,13 +20,13 @@ This code will also **not do**, as most parameters do not permit functions, and ```js function disallowWhat() { - return someVariableCircumstance() ? "rest" : "external"; + return someVariableCircumstance() ? 'rest' : 'external'; } // ... module.exports = { before: { - all: disallow(disallowWhat), - }, + all: disallow(disallowWhat) + } }; ``` @@ -34,13 +34,13 @@ You are able to call `disallowWhat` for each service call as follows. ```js function disallowWhat() { - return someVariableCircumstance() ? "rest" : "external"; + return someVariableCircumstance() ? 'rest' : 'external'; } // ... module.exports = { before: { - all: (context) => disallow(disallowWhat())(context), - }, + all: context => disallow(disallowWhat())(context) + } }; ``` @@ -51,8 +51,8 @@ Let's look at another example. The `user` record identifies information the user ```js module.exports = { after: { - get: (context) => keep(...context.params.user.public)(context), - }, + get: context => keep(...context.params.user.public)(context) + } }; ``` @@ -101,7 +101,7 @@ It also takes an optional query with which you can customise the current operati ```js // project/src/services/posts/posts.hooks.js -const { fastJoin } = require("feathers-hooks-common"); +const { fastJoin } = require('feathers-hooks-common'); const postResolvers = { joins: { @@ -109,31 +109,31 @@ const postResolvers = { (...args) => async (post, { app }) => { post.author = ( - await app.service("users").find({ + await app.service('users').find({ query: { - id: post.userId, - }, + id: post.userId + } }) )[0]; }, starers: - ($select) => + $select => async (post, { app }) => { - post.starers = await app.service("users").find({ + post.starers = await app.service('users').find({ query: { id: { $in: post.starIds }, - $select: $select || ["name"], - }, + $select: $select || ['name'] + } }); - }, - }, + } + } }; module.exports = { after: { - all: [fastJoin(postResolvers)], - }, + all: [fastJoin(postResolvers)] + } }; ``` @@ -153,15 +153,15 @@ The result would look like: ```js // Original record -[{ id: 1, body: "John post", userId: 101, starIds: [102, 103, 104] }][ +[{ id: 1, body: 'John post', userId: 101, starIds: [102, 103, 104] }][ // Result { id: 1, - body: "John post", + body: 'John post', userId: 101, starIds: [102, 103, 104], - author: { id: 101, name: "John" }, - starers: [{ name: "Marshall" }, { name: "Barbara" }, { name: "Aubree" }], + author: { id: 101, name: 'John' }, + starers: [{ name: 'Marshall' }, { name: 'Barbara' }, { name: 'Aubree' }] } ]; ``` @@ -170,13 +170,13 @@ The result would look like: ```js const query = { - author: true, + author: true }; module.exports = { after: { - all: [fastJoin(postResolvers, query)], - }, + all: [fastJoin(postResolvers, query)] + } }; ``` @@ -189,11 +189,11 @@ The above query requests the author resolver be run, but not the starers resolve [ { id: 1, - body: "John post", + body: 'John post', userId: 101, starIds: [102, 103, 104], - author: { id: 101, name: "John" }, - }, + author: { id: 101, name: 'John' } + } ]; ``` @@ -234,16 +234,16 @@ The `paginate:false` suppress pagination for this call, ensuring all the matchin [ { id: 1, - body: "John post", + body: 'John post', userId: 101, starIds: [102, 103, 104], - author: { id: 101, name: "John" }, + author: { id: 101, name: 'John' }, starers: [ - { id: 102, name: "Marshall" }, - { id: 103, name: "Barbara" }, - { id: 104, name: "Aubree" }, - ], - }, + { id: 102, name: 'Marshall' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' } + ] + } ]; ``` @@ -267,13 +267,13 @@ Here, the starerCount resolver adds the field `starerCount` containing a count o [ { id: 1, - body: "John post", + body: 'John post', userId: 101, starIds: [102, 103, 104], starerCount: 3, - author: { id: 101, name: "John" }, - starers: [{ name: "Marshall" }, { name: "Barbara" }, { name: "Aubree" }], - }, + author: { id: 101, name: 'John' }, + starers: [{ name: 'Marshall' }, { name: 'Barbara' }, { name: 'Aubree' }] + } ]; ``` @@ -335,36 +335,36 @@ const query = { ```js // Original record -[{ id: 1, body: "John post", userId: 101, starIds: [102, 103, 104] }][ +[{ id: 1, body: 'John post', userId: 101, starIds: [102, 103, 104] }][ // Result { id: 1, - body: "John post", + body: 'John post', userId: 101, starIds: [102, 103, 104], comments: [ { id: 11, - text: "John post Marshall comment 11", + text: 'John post Marshall comment 11', postId: 1, userId: 102, - author: { id: 102, name: "Marshall" }, + author: { id: 102, name: 'Marshall' } }, { id: 12, - text: "John post Marshall comment 12", + text: 'John post Marshall comment 12', postId: 1, userId: 102, - author: { id: 102, name: "Marshall" }, + author: { id: 102, name: 'Marshall' } }, { id: 13, - text: "John post Marshall comment 13", + text: 'John post Marshall comment 13', postId: 1, userId: 102, - author: { id: 102, name: "Marshall" }, - }, - ], + author: { id: 102, name: 'Marshall' } + } + ] } ]; ``` @@ -378,36 +378,36 @@ We don't want to have to include the resolver for the user record every time we ```js const commentResolvers = { joins: { - author: ($select) => async (comment) => { + author: $select => async comment => { comment.author = ( await users.find({ - query: { id: comment.userId, $select: $select || ["name"] }, - paginate: false, + query: { id: comment.userId, $select: $select || ['name'] }, + paginate: false }) )[0]; - }, - }, + } + } }; const postResolvers = { joins: { comments: { - resolver: ($select, $limit, $sort) => async (post) => { + resolver: ($select, $limit, $sort) => async post => { post.comments = await comments.find({ query: { postId: post.id, $select: $select, $limit: $limit || 5, - [$sort]: { createdAt: -1 }, + [$sort]: { createdAt: -1 } }, - paginate: false, + paginate: false }); return post.comments; }, - joins: commentResolvers, - }, - }, + joins: commentResolvers + } + } }; ``` @@ -424,15 +424,15 @@ You need to understand batch-loaders before we proceed, so [read about them now. ### Using a Simple Batch-Loader ```js -const { fastJoin } = require("feathers-hooks-common"); -const BatchLoader = require("@feathers-plus/batch-loader"); +const { fastJoin } = require('feathers-hooks-common'); +const BatchLoader = require('@feathers-plus/batch-loader'); const { loaderFactory } = BatchLoader; const postResolvers = { - before: (context) => { + before: context => { context._loaders = { user: {} }; - context._loaders.user.id = loaderFactory(users, "id", false, { - paginate: false, + context._loaders.user.id = loaderFactory(users, 'id', false, { + paginate: false })(context); }, @@ -441,12 +441,8 @@ const postResolvers = { (post.author = await context._loaders.user.id.load(post.userId)), starers: () => async (post, context) => - !post.starIds - ? null - : (post.starers = await context._loaders.user.id.loadMany( - post.starIds - )), - }, + !post.starIds ? null : (post.starers = await context._loaders.user.id.loadMany(post.starIds)) + } }; ``` @@ -464,19 +460,19 @@ Let's look at the code in this example: ```js // Original record -[{ id: 1, body: "John post", userId: 101, starIds: [102, 103, 104] }][ +[{ id: 1, body: 'John post', userId: 101, starIds: [102, 103, 104] }][ // Result { id: 1, - body: "John post", + body: 'John post', userId: 101, starIds: [102, 103, 104], - author: { id: 101, name: "John" }, + author: { id: 101, name: 'John' }, starers: [ - { id: 102, name: "Marshall" }, - { id: 103, name: "Barbara" }, - { id: 104, name: "Aubree" }, - ], + { id: 102, name: 'Marshall' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' } + ] } ]; ``` @@ -488,25 +484,22 @@ Let's look at the code in this example: The `loaderFactory(users, 'id', false)` above is just a convenience wrapper for building a BatchLoader. We can create our batch loaders directly should we need them to do more. ```js -const { fastJoin, makeCallingParams } = require("feathers-hooks-common"); -const BatchLoader = require("@feathers-plus/batch-loader"); +const { fastJoin, makeCallingParams } = require('feathers-hooks-common'); +const BatchLoader = require('@feathers-plus/batch-loader'); const { getResultsByKey, getUniqueKeys } = BatchLoader; const postResolvers = { - before: (context) => { + before: context => { context._loaders = { user: {} }; context._loaders.user.id = new BatchLoader( async (keys, context) => { const result = await users.find( - makeCallingParams( - context, - { id: { $in: getUniqueKeys(keys) } }, - undefined, - { paginate: false } - ) + makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } }, undefined, { + paginate: false + }) ); - return getResultsByKey(keys, result, (user) => user.id, "!"); + return getResultsByKey(keys, result, user => user.id, '!'); }, { context } ); @@ -517,12 +510,8 @@ const postResolvers = { (post.author = await context._loaders.user.id.load(post.userId)), starers: () => async (post, context) => - !post.starIds - ? null - : (post.starers = await context._loaders.user.id.loadMany( - post.starIds - )), - }, + !post.starIds ? null : (post.starers = await context._loaders.user.id.loadMany(post.starIds)) + } }; ``` @@ -536,8 +525,8 @@ Let's also add a `reputation` array of objects to `posts`. This will show the in ```js // project/src/services/posts/posts.hooks.js -const { fastJoin, makeCallingParams } = require("feathers-hooks-common"); -const BatchLoader = require("@feathers-plus/batch-loader"); +const { fastJoin, makeCallingParams } = require('feathers-hooks-common'); +const BatchLoader = require('@feathers-plus/batch-loader'); const { getResultsByKey, getUniqueKeys } = BatchLoader; const commentResolvers = { @@ -545,27 +534,22 @@ const commentResolvers = { author: () => async (comment, context) => !comment.userId ? null - : (comment.userRecord = await context._loaders.user.id.load( - comment.userId - )), - }, + : (comment.userRecord = await context._loaders.user.id.load(comment.userId)) + } }; const postResolvers = { - before: (context) => { + before: context => { context._loaders = { user: {}, comments: {} }; context._loaders.user.id = new BatchLoader( async (keys, context) => { const result = await users.find( - makeCallingParams( - context, - { id: { $in: getUniqueKeys(keys) } }, - undefined, - { paginate: false } - ) + makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } }, undefined, { + paginate: false + }) ); - return getResultsByKey(keys, result, (user) => user.id, "!"); + return getResultsByKey(keys, result, user => user.id, '!'); }, { context } ); @@ -573,19 +557,11 @@ const postResolvers = { context._loaders.comments.postId = new BatchLoader( async (keys, context) => { const result = await comments.find( - makeCallingParams( - context, - { postId: { $in: getUniqueKeys(keys) } }, - undefined, - { paginate: false } - ) - ); - return getResultsByKey( - keys, - result, - (comment) => comment.postId, - "[!]" + makeCallingParams(context, { postId: { $in: getUniqueKeys(keys) } }, undefined, { + paginate: false + }) ); + return getResultsByKey(keys, result, comment => comment.postId, '[!]'); }, { context } ); @@ -598,14 +574,12 @@ const postResolvers = { starers: () => async (post, context) => !post.starIds ? null - : (post.starIdsRecords = await context._loaders.user.id.loadMany( - post.starIds - )), + : (post.starIdsRecords = await context._loaders.user.id.loadMany(post.starIds)), reputation_author: () => async (post, context) => { if (!post.reputation) return null; const authors = await context._loaders.user.id.loadMany( - post.reputation.map((rep) => rep.userId) + post.reputation.map(rep => rep.userId) ); post.reputation.forEach((rep, i) => { rep.author = authors[i].name; @@ -616,27 +590,25 @@ const postResolvers = { resolver: (...args) => async (post, context) => - (post.commentRecords = await context._loaders.comments.postId.load( - post.id - )), - joins: commentResolvers, - }, - }, + (post.commentRecords = await context._loaders.comments.postId.load(post.id)), + joins: commentResolvers + } + } }; const query = { author: true, - starers: [["id", "name"]], + starers: [['id', 'name']], comments: { args: null, - author: [["id", "name"]], - }, + author: [['id', 'name']] + } }; module.exports = { after: { - all: [fastJoin(postResolvers, (context) => query)], - }, + all: [fastJoin(postResolvers, context => query)] + } }; ``` @@ -749,9 +721,9 @@ We can improve the situation by using persistent caches with the BatchLoaders. A Let's see how we can use the [cache hook](./index.html#cache) as it maintains a persistent cache for the service its registered on. ```js -const { cache, fastJoin, makeCallingParams } = require("feathers-hooks-common"); -const BatchLoader = require("@feathers-plus/batch-loader"); -const CacheMap = require("@feathers-plus/cache"); +const { cache, fastJoin, makeCallingParams } = require('feathers-hooks-common'); +const BatchLoader = require('@feathers-plus/batch-loader'); +const CacheMap = require('@feathers-plus/cache'); const { getResultsByKey, getUniqueKeys } = BatchLoader; // Create a cache for a maximum of 100 users @@ -759,19 +731,19 @@ const cacheMapUsers = CacheMap({ max: 100 }); // Create a batchLoader using the persistent cache const userBatchLoader = new BatchLoader( - async (keys) => { + async keys => { const result = await users.find( makeCallingParams({}, { id: { $in: getUniqueKeys(keys) } }, undefined, { - paginate: false, + paginate: false }) ); - return getResultsByKey(keys, result, (user) => user.id, "!"); + return getResultsByKey(keys, result, user => user.id, '!'); }, { cacheMap: cacheMapUsers } ); const postResolvers = { - before: (context) => { + before: context => { context._loaders = { user: {} }; context._loaders.user.id = userBatchLoader; }, @@ -781,30 +753,26 @@ const postResolvers = { (post.author = await context._loaders.user.id.load(post.userId)), starers: () => async (post, context) => - !post.starIds - ? null - : (post.starers = await context._loaders.user.id.loadMany( - post.starIds - )), - }, + !post.starIds ? null : (post.starers = await context._loaders.user.id.loadMany(post.starIds)) + } }; const query = { author: true, - starers: [["id", "name"]], + starers: [['id', 'name']], comments: { args: null, - author: [["id", "name"]], - }, + author: [['id', 'name']] + } }; module.exports = { before: { - all: cache(cacheMapUsers), + all: cache(cacheMapUsers) }, after: { - all: [cache(cacheMapUsers), fastJoin(postResolvers, () => query)], - }, + all: [cache(cacheMapUsers), fastJoin(postResolvers, () => query)] + } }; ``` @@ -839,21 +807,21 @@ Populates items _recursively_ to any depth. Supports 1:1, 1:n and n:1 relationsh ```javascript // users like { _id: '111', name: 'John', roleId: '555' } // roles like { _id: '555', permissions: ['foo', bar'] } -import { populate } from "feathers-hooks-common"; +import { populate } from 'feathers-hooks-common'; const userRoleSchema = { include: { - service: "roles", - nameAs: "role", - parentField: "roleId", - childField: "_id", - }, + service: 'roles', + nameAs: 'role', + parentField: 'roleId', + childField: '_id' + } }; -app.service("users").hooks({ +app.service('users').hooks({ after: { - all: populate({ schema: userRoleSchema }), - }, + all: populate({ schema: userRoleSchema }) + } }); // result like @@ -868,17 +836,17 @@ app.service("users").hooks({ // roles like { _id: '555', permissions: ['foo', 'bar'] } const userRolesSchema = { include: { - service: "roles", - nameAs: "roles", - parentField: "roleIds", - childField: "_id", - }, + service: 'roles', + nameAs: 'roles', + parentField: 'roleIds', + childField: '_id' + } }; usersService.hooks({ after: { - all: populate({ schema: userRolesSchema }), - }, + all: populate({ schema: userRolesSchema }) + } }); // result like @@ -895,17 +863,17 @@ usersService.hooks({ // comments like { _id: '555', text: '...', postId: '111' } const postCommentsSchema = { include: { - service: "comments", - nameAs: "comments", - parentField: "_id", - childField: "postId", - }, + service: 'comments', + nameAs: 'comments', + parentField: '_id', + childField: 'postId' + } }; postService.hooks({ after: { - all: populate({ schema: postCommentsSchema }), - }, + all: populate({ schema: postCommentsSchema }) + } }); // result like @@ -964,16 +932,16 @@ module.exports.after = { // comments like { _id: '555', text: '...', postId: '111' } const postCommentsSchema = { include: { - service: "comments", - nameAs: "comments", - select: (hook, parentItem) => ({ postId: parentItem._id }), - }, + service: 'comments', + nameAs: 'comments', + select: (hook, parentItem) => ({ postId: parentItem._id }) + } }; postService.hooks({ after: { - all: populate({ schema: postCommentsSchema }), - }, + all: populate({ schema: postCommentsSchema }) + } }); // result like @@ -1141,10 +1109,10 @@ The following example shows how the client can ask for the type of schema it nee ```javascript // on client -import { paramsForServer } from "feathers-hooks-common"; -purchaseOrders.get(id, paramsForServer({ schema: "po-acct" })); // pass schema name to server +import { paramsForServer } from 'feathers-hooks-common'; +purchaseOrders.get(id, paramsForServer({ schema: 'po-acct' })); // pass schema name to server // or -purchaseOrders.get(id, paramsForServer({ schema: "po-rec" })); +purchaseOrders.get(id, paramsForServer({ schema: 'po-rec' })); ``` ```javascript @@ -1212,17 +1180,13 @@ A full featured example of such a process appears below. It validates and saniti ```javascript // file /server/services/users/users.hooks.js -const auth = require("feathers-authentication").hooks; -const { - callbackToPromise, - remove, - validate, -} = require("feathers-hooks-common"); -const validateSchema = require("feathers-hooks-validate-joi"); - -const clientValidations = require("/common/usersClientValidations"); -const serverValidations = require("/server/validations/usersServerValidations"); -const schemas = require("/server/validations/schemas"); +const auth = require('feathers-authentication').hooks; +const { callbackToPromise, remove, validate } = require('feathers-hooks-common'); +const validateSchema = require('feathers-hooks-validate-joi'); + +const clientValidations = require('/common/usersClientValidations'); +const serverValidations = require('/server/validations/usersServerValidations'); +const schemas = require('/server/validations/schemas'); const serverValidationsSignup = callbackToPromise(serverValidations.signup, 1); @@ -1230,13 +1194,11 @@ exports.before = { create: [ validateSchema.form(schemas.signup, schemas.options), // schema validation validate(clientValidations.signup), // re-run form sync validation - validate((values) => - clientValidations.signupAsync(values, "someMoreParams") - ), // re-run form async + validate(values => clientValidations.signupAsync(values, 'someMoreParams')), // re-run form async validate(serverValidationsSignup), // run server validation - remove("confirmPassword"), - auth.hashPassword(), - ], + remove('confirmPassword'), + auth.hashPassword() + ] }; ``` @@ -1250,7 +1212,7 @@ Validations used on front-end. They are re-run by the server. const clientValidations = {}; // sync validation of signup form on form submit -clientValidations.signup = (values) => { +clientValidations.signup = values => { const errors = {}; checkName(values.name, errors); @@ -1263,24 +1225,24 @@ clientValidations.signup = (values) => { }; // async validation on exit from some fields on form -clientValidations.signupAsync = (values) => +clientValidations.signupAsync = values => new Promise((resolve, reject) => { const errs = {}; // set a dummy error - errs.email = "Already taken."; + errs.email = 'Already taken.'; if (!Object.keys(errs).length) { resolve(null); // 'null' as we did not sanitize 'values' } - reject(new errors.BadRequest("Values already taken.", { errors: errs })); + reject(new errors.BadRequest('Values already taken.', { errors: errs })); }); module.exports = clientValidations; -function checkName(name, errors, fieldName = "name") { - if (!/^[\\sa-zA-Z]{8,30}$/.test((name || "").trim())) { - errors[fieldName] = "Name must be 8 or more letters or spaces."; +function checkName(name, errors, fieldName = 'name') { + if (!/^[\\sa-zA-Z]{8,30}$/.test((name || '').trim())) { + errors[fieldName] = 'Name must be 8 or more letters or spaces.'; } } ``` @@ -1289,12 +1251,12 @@ Schema definitions used by the server. ```javascript // file /server/validations/schemas -const Joi = require("joi"); +const Joi = require('joi'); const username = Joi.string().trim().alphanum().min(5).max(30).required(); const password = Joi.string() .trim() - .regex(/^[\sa-zA-Z0-9]+$/, "letters, numbers, spaces") + .regex(/^[\sa-zA-Z0-9]+$/, 'letters, numbers, spaces') .min(8) .max(30) .required(); @@ -1305,15 +1267,15 @@ module.exports = { abortEarly: false, convert: true, allowUnknown: false, - stripUnknown: true, + stripUnknown: true }, signup: Joi.object().keys({ name: Joi.string().trim().min(8).max(30).required(), username, password, - confirmPassword: password.label("Confirm password"), - email, - }), + confirmPassword: password.label('Confirm password'), + email + }) }; ``` @@ -1327,12 +1289,12 @@ module.exports = { const formErrors = {}; const sanitized = {}; - Object.keys(data).forEach((key) => { - sanitized[key] = (data[key] || "").trim(); + Object.keys(data).forEach(key => { + sanitized[key] = (data[key] || '').trim(); }); cb(Object.keys(formErrors).length > 0 ? formErrors : null, sanitized); - }, + } }; ``` diff --git a/docs/hooks.md b/docs/hooks.md index 8dd8a930..96541356 100644 --- a/docs/hooks.md +++ b/docs/hooks.md @@ -4,10 +4,9 @@ Runs a series of hooks which mutate context.data or content.result (the Feathers default). -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/act-on-dispatch.ts)| - +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ---------------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/act-on-dispatch.ts) | - **Arguments** @@ -20,17 +19,13 @@ Runs a series of hooks which mutate context.data or content.result (the Feathers - **Example** ```js - const { actOnDefault, actOnDispatch } = require('feathers-hooks-common') + const { actOnDefault, actOnDispatch } = require('feathers-hooks-common'); module.exports = { after: { - find: [ - hook1(), - actOnDispatch(hook2(), actOnDefault(hook3()), hook4()), - hook5() - ] + find: [hook1(), actOnDispatch(hook2(), actOnDefault(hook3()), hook4()), hook5()] } - } + }; ``` Hooks `hook1`, `hook3` and `hook5` will run "normally", mutating `content.result`. @@ -42,15 +37,13 @@ Runs a series of hooks which mutate context.data or content.result (the Feathers The main purpose of `actOnDefault` is to "undo" `actOnDispatch`. - ## actOnDispatch Runs a series of hooks which mutate context.dispatch. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/act-on-dispatch.ts)| - +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ---------------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/act-on-dispatch.ts) | - **Arguments** @@ -63,17 +56,13 @@ Runs a series of hooks which mutate context.dispatch. - **Example** ```js - const { actOnDefault, actOnDispatch } = require('feathers-hooks-common') + const { actOnDefault, actOnDispatch } = require('feathers-hooks-common'); module.exports = { after: { - find: [ - hook1(), - actOnDispatch(hook2(), actOnDefault(hook3()), hook4()), - hook5() - ] + find: [hook1(), actOnDispatch(hook2(), actOnDefault(hook3()), hook4()), hook5()] } - } + }; ``` Hooks `hook1`, `hook3` and `hook5` will run "normally", mutating `content.result`. @@ -85,15 +74,13 @@ Runs a series of hooks which mutate context.dispatch.

context.dispatch is a writeable, optional property and contains a "safe" version of the data that should be sent to any client. If context.dispatch has not been set context.result will be sent to the client instead.

Note: context.dispatch only affects the data sent through a Feathers Transport like REST or Socket.io. An internal method call will still get the data set in context.result.

- ## alterItems Make changes to data or result items. Very flexible. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/alter-items.ts)| - +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------------ | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/alter-items.ts) | - **Arguments** - `{Function} func` @@ -102,7 +89,7 @@ Make changes to data or result items. Very flexible. | -------- | :--------: | --------------------------- | --------------------------------------------- | | `func` | `Function` | `(item,` `context) =>` `{}` | Function modifies `item` in place. See below. | - - **returns** +- **returns** The mutated `item`. Returning `undefined` means the `item` in the parameters was mutated in place. returns result `undefined || item` @@ -165,15 +152,13 @@ The mutated `item`. Returning `undefined` means the `item` in the parameters was `func` may alternatively return a replacement `item` rather than `undefined`. This is a convenience feature which permits, for example, use of functions from the [Lodash](https://lodash.com/) library, as such functions tend to return new objects. - ## cache Persistent, least-recently-used record cache for services. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/cache.ts)| - +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------ | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/cache.ts) | - **Arguments** @@ -189,18 +174,18 @@ Persistent, least-recently-used record cache for services. | `keyField` | `String` | `context.service.id` or `item._id ? '_id' !! 'id'` | The name of the record id field. | | `option` | `Object` | | Options. | -| `options` | Argument | Type | Default | Description | -| --------- | ---------- | :--------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | -| `clone` | `Function` | `item => JSON.parse(` `JSON.stringify(item) )` | Function to perform a deep clone. See below. | -| `makeCacheKey` | `Function` | `key => key` | Function to convert record key to cache key. Use this to convert MongoDB/Mongoose ObjectId/bson keys to a cache key using `item._id.toString()`. | +| `options` | Argument | Type | Default | Description | +| -------------- | ---------- | :--------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | +| `clone` | `Function` | `item => JSON.parse(` `JSON.stringify(item) )` | Function to perform a deep clone. See below. | +| `makeCacheKey` | `Function` | `key => key` | Function to convert record key to cache key. Use this to convert MongoDB/Mongoose ObjectId/bson keys to a cache key using `item._id.toString()`. | - **Example** ```js - const CacheMap = require('@feathers-plus/cache') - const { cache } = require('feathers-hooks-common') + const CacheMap = require('@feathers-plus/cache'); + const { cache } = require('feathers-hooks-common'); - const cacheMap = CacheMap({ max: 100 }) // Keep the 100 most recently used. + const cacheMap = CacheMap({ max: 100 }); // Keep the 100 most recently used. module.exports = { before: { @@ -209,13 +194,13 @@ Persistent, least-recently-used record cache for services. after: { all: cache(cacheMap) } - } + }; ``` ```js - const { cache } = require('feathers-hooks-common') + const { cache } = require('feathers-hooks-common'); - const cacheMap = new Map() + const cacheMap = new Map(); module.exports = { before: { @@ -224,17 +209,16 @@ Persistent, least-recently-used record cache for services. after: { all: cache(cacheMap) } - } + }; ``` ```js - const CacheMap = require('@feathers-plus/cache') - const mongoose = require('mongoose') - const { cache } = require('feathers-hooks-common') + const CacheMap = require('@feathers-plus/cache'); + const mongoose = require('mongoose'); + const { cache } = require('feathers-hooks-common'); - const cacheMap = CacheMap({ max: 100 }) - const makeCacheKey = key => - key instanceof mongoose.Types.ObjectId ? key.toString() : key + const cacheMap = CacheMap({ max: 100 }); + const makeCacheKey = key => (key instanceof mongoose.Types.ObjectId ? key.toString() : key); module.exports = { before: { @@ -243,7 +227,7 @@ Persistent, least-recently-used record cache for services. after: { all: cache(cacheMap, undefined, { makeCacheKey }) } - } + }; ``` > The `cache` hook **must** be registered in both `before` and `after`. @@ -279,16 +263,13 @@ Persistent, least-recently-used record cache for services. | `item` | `Object` | | The record. | | `clonedItem` | `Object` | | A clone of `item`. | - - ## debug Display the current hook context for debugging. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/debug.ts)| - +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------ | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/debug.ts) | - **Arguments** - `{String} label` @@ -329,14 +310,13 @@ Display the current hook context for debugging. `debug` is great for debugging issues with hooks. Log the hook context before and after a hook to see what the hook started with, and what it changed. - ## dePopulate Remove records and properties created by the populate hook. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/de-populate.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------------ | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/de-populate.ts) | - **Arguments** - `{Function} customDepop` @@ -348,13 +328,13 @@ Remove records and properties created by the populate hook. - **Example** ```js - const { dePopulate } = require('feathers-hooks-common') + const { dePopulate } = require('feathers-hooks-common'); module.exports = { before: { all: [depopulate()] } - } + }; ``` - **Details** @@ -363,39 +343,37 @@ Remove records and properties created by the populate hook. Removes fields created by resolver functions using `fgraphql`. Populated items may, after dePopulate, be used in a patch service call. - ## disablePagination Disables pagination when query.$limit is -1 or '-1'. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|no|find|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/disable-pagination.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------------------- | +| yes | no | find | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/disable-pagination.ts) | - **Example** ```js - const { disablePagination } = require('feathers-hooks-common') + const { disablePagination } = require('feathers-hooks-common'); module.exports = { before: { find: disablePagination() } - } + }; ``` - **Details** Pagination is disabled if `context.query.$limit` is -1 or '-1'. It works for all types of calls including REST. - ## disallow Prevents access to a service method completely or for specific transports. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/disallow.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | --------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/disallow.ts) | - **Arguments** @@ -408,7 +386,6 @@ Prevents access to a service method completely or for specific transports. | `transports` | Value | Description | | ------------ | ------------------------------------- | ----------- | | `socketio` | disallow calls by Socket.IO transport | -| `primus` | disallow calls by Primus transport | | `rest` | disallow calls by REST transport | | `external` | disallow calls other than from server | | `server` | disallow calls from server | @@ -416,7 +393,7 @@ Prevents access to a service method completely or for specific transports. - **Example** ```js - const { disallow, iff } = require('feathers-hooks-common') + const { disallow, iff } = require('feathers-hooks-common'); module.exports = { before: { @@ -429,42 +406,41 @@ Prevents access to a service method completely or for specific transports. // disallow the remove hook if the user is not an admin remove: iff(context => !context.params.user.isAdmin, disallow()) } - } + }; ``` - **Details** Prevents access to a service method completely or just for specific transports. All transports set the `context.params.provider` property, and `disallow` checks this. - ## discard Delete certain fields from the record(s). -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes||create, update, patch|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/discard.ts)| -||yes|all||| +| before | after | methods | multi | details | +| ------ | ----- | --------------------- | ----- | -------------------------------------------------------------------------------------------------------- | +| yes | | create, update, patch | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/discard.ts) | +| | yes | all | | | -> __Note:__ The discard hook will remove fields even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), discard(...))`. +> **Note:** The discard hook will remove fields even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), discard(...))`. - Arguments - - `{Array < String >} fieldNames` + - `{Array < String >} fieldNames` -|Name|Type|Description| -|---|---|---| -|fieldNames|dot notation|One or more fields you want to remove from the record(s).| +| Name | Type | Description | +| ---------- | ------------ | --------------------------------------------------------- | +| fieldNames | dot notation | One or more fields you want to remove from the record(s). | - **Example** ```js - const { discard, iff, isProvider } = require('feathers-hooks-common') + const { discard, iff, isProvider } = require('feathers-hooks-common'); module.exports = { after: { all: iff(isProvider('external'), discard('password', 'address.city')) } - } + }; ``` - **Details** @@ -476,43 +452,42 @@ Delete certain fields from the record(s). Delete certain fields from the query object. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|no|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/discard-query.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | -------------------------------------------------------------------------------------------------------------- | +| yes | no | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/discard-query.ts) | -> __Note:__ The discardQuery hook will remove any fields not specified even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), discardQuery(...))`. +> **Note:** The discardQuery hook will remove any fields not specified even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), discardQuery(...))`. - Arguments - - `{Array < String >} fieldNames` + - `{Array < String >} fieldNames` -|Name|Type|Description| -|---|---|---| -|fieldNames|dot notation|One or more fields you want to remove from the query.| +| Name | Type | Description | +| ---------- | ------------ | ----------------------------------------------------- | +| fieldNames | dot notation | One or more fields you want to remove from the query. | - **Example** ```js - const { discardQuery, iff, isProvider } = require('feathers-hooks-common') + const { discardQuery, iff, isProvider } = require('feathers-hooks-common'); module.exports = { after: { all: iff(isProvider('external'), discardQuery('secret')) } - } + }; ``` - **Details** Delete the fields from `context.params.query`. - ## fastJoin Join related records. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/fast-join.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ---------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/fast-join.ts) | > `fastJoin` is preferred over using `populate`. @@ -543,21 +518,27 @@ Join related records.

The services in all these examples are assumed, for simplicity, to have pagination disabled. You will have to decide when to use `paginate: false` in your code.

- ``` js + ```js // project/src/services/posts/posts.hooks.js const { fastJoin } = require('feathers-hooks-common'); const postResolvers = { joins: { - author: (...args) => async post => post.author = (await users.find({ - query: { id: post.userId }, - paginate: false - }))[0], - - starers: $select => async post => post.starers = await users.find({ - query: { id: { $in: post.starIds }, $select: $select || ['name'] }, - paginate: false - }), + author: + (...args) => + async post => + (post.author = ( + await users.find({ + query: { id: post.userId }, + paginate: false + }) + )[0]), + + starers: $select => async post => + (post.starers = await users.find({ + query: { id: { $in: post.starIds }, $select: $select || ['name'] }, + paginate: false + })) } }; @@ -566,22 +547,24 @@ Join related records. starers: [['id', 'name']] }; - module.exports = { after: { - all: [ fastJoin(postResolvers, query) ], - } }; + module.exports = { + after: { + all: [fastJoin(postResolvers, query)] + } + }; // Original record - [ { id: 1, body: 'John post', userId: 101, starIds: [102, 103, 104] } ] - - // Result - [ { id: 1, + [{ id: 1, body: 'John post', userId: 101, starIds: [102, 103, 104] }][ + // Result + { + id: 1, body: 'John post', userId: 101, - starIds: [ 102, 103, 104 ], + starIds: [102, 103, 104], author: { id: 101, name: 'John' }, - starers: [ { name: 'Marshall' }, { name: 'Barbara' }, { name: 'Aubree' } ] - }] - + starers: [{ name: 'Marshall' }, { name: 'Barbara' }, { name: 'Aubree' }] + } + ]; ``` - **Example with recursive operations** @@ -650,16 +633,16 @@ Join related records. ```js // project/src/services/posts/posts.hooks.js - const { fastJoin } = require('feathers-hooks-common') - const BatchLoader = require('@feathers-plus/batch-loader') - const { loaderFactory } = BatchLoader + const { fastJoin } = require('feathers-hooks-common'); + const BatchLoader = require('@feathers-plus/batch-loader'); + const { loaderFactory } = BatchLoader; const postResolvers = { before: context => { - context._loaders = { user: {} } + context._loaders = { user: {} }; context._loaders.user.id = loaderFactory(users, 'id', false, { paginate: false - })(context) + })(context); }, joins: { author: () => async (post, context) => @@ -668,20 +651,18 @@ Join related records. starers: () => async (post, context) => !post.starIds ? null - : (post.starers = await context._loaders.user.id.loadMany( - post.starIds - )) + : (post.starers = await context._loaders.user.id.loadMany(post.starIds)) } - } + }; module.exports = { after: { all: [fastJoin(postResolvers)] } - } + }; // Original record - ;[{ id: 1, body: 'John post', userId: 101, starIds: [102, 103, 104] }][ + [{ id: 1, body: 'John post', userId: 101, starIds: [102, 103, 104] }][ // Result { id: 1, @@ -695,7 +676,7 @@ Join related records. { id: 104, name: 'Aubree' } ] } - ] + ]; ``` - **Comprehensive example** @@ -812,17 +793,13 @@ Join related records. - **Example Using a Persistent Cache** ```js - const { - cache, - fastJoin, - makeCallingParams - } = require('feathers-hooks-common') - const BatchLoader = require('@feathers-plus/batch-loader') - const CacheMap = require('@feathers-plus/cache') - const { getResultsByKey, getUniqueKeys } = BatchLoader + const { cache, fastJoin, makeCallingParams } = require('feathers-hooks-common'); + const BatchLoader = require('@feathers-plus/batch-loader'); + const CacheMap = require('@feathers-plus/cache'); + const { getResultsByKey, getUniqueKeys } = BatchLoader; // Create a cache for a maximum of 100 users - const cacheMapUsers = CacheMap({ max: 100 }) + const cacheMapUsers = CacheMap({ max: 100 }); // Create a batchLoader using the persistent cache const userBatchLoader = new BatchLoader( @@ -831,16 +808,16 @@ Join related records. makeCallingParams({}, { id: { $in: getUniqueKeys(keys) } }, undefined, { paginate: false }) - ) - return getResultsByKey(keys, result, user => user.id, '!') + ); + return getResultsByKey(keys, result, user => user.id, '!'); }, { cacheMap: cacheMapUsers } - ) + ); const postResolvers = { before: context => { - context._loaders = { user: {} } - context._loaders.user.id = userBatchLoader + context._loaders = { user: {} }; + context._loaders.user.id = userBatchLoader; }, joins: { @@ -850,11 +827,9 @@ Join related records. starers: () => async (post, context) => !post.starIds ? null - : (post.starers = await context._loaders.user.id.loadMany( - post.starIds - )) + : (post.starers = await context._loaders.user.id.loadMany(post.starIds)) } - } + }; const query = { author: true, @@ -863,7 +838,7 @@ Join related records. args: null, author: [['id', 'name']] } - } + }; module.exports = { before: { @@ -872,7 +847,7 @@ Join related records. after: { all: [cache(cacheMapUsers), fastJoin(postResolvers, () => query)] } - } + }; ``` The number of service calls needed to run the `query` above **the second time**: @@ -897,14 +872,13 @@ The `cache` hook also makes `get` service calls more efficient. The companion `@feathers-plus/cache` implements a least recently-used cache which discards the least recently used items first. When used in conjunction with the `cache` hook, it can be used to implement persistent caches for BatchLoaders. BatchLoaders configured this way would retain their cache between requests, eliminating the need to _prime_ the cache at the start of each request. - ## iff Execute one or another series of hooks depending on a sync or async predicate. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/iff.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ---------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/iff.ts) | - **Arguments** - `{Boolean | Promise | Function} predicate` @@ -950,14 +924,13 @@ Execute one or another series of hooks depending on a sync or async predicate. The predicate and hook functions will not be called with `this` set to the service, as is normal for hook functions. Use `hook.service` instead. - ## iffElse Execute one array of hooks or another based on a sync or async predicate. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/iff-else.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | --------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/iff-else.ts) | - **Arguments** - `{Function} predicate` @@ -989,35 +962,34 @@ Execute one array of hooks or another based on a sync or async predicate. The predicate and hook functions will not be called with `this` set to the service, as is normal for hook functions. Use `hook.service` instead. - ## keep Keep certain fields in the record(s), deleting the rest. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes||create, update, patch|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/keep.ts)| -||yes|all||| +| before | after | methods | multi | details | +| ------ | ----- | --------------------- | ----- | ----------------------------------------------------------------------------------------------------- | +| yes | | create, update, patch | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/keep.ts) | +| | yes | all | | | -> __Note:__ The keep hook will remove any fields not specified even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), keep(...))`. +> **Note:** The keep hook will remove any fields not specified even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), keep(...))`. - Arguments - - `{Array < String >} fieldNames` + - `{Array < String >} fieldNames` -|Name|Type|Description| -|---|---|---| -|fieldNames|dot notation|The only fields you want to keep in the record(s).| +| Name | Type | Description | +| ---------- | ------------ | -------------------------------------------------- | +| fieldNames | dot notation | The only fields you want to keep in the record(s). | - **Example** ```js - const { keep } = require('feathers-hooks-common') + const { keep } = require('feathers-hooks-common'); module.exports = { after: { create: keep('name', 'dept', 'address.city') } - } + }; ``` - **Details** @@ -1025,17 +997,16 @@ Keep certain fields in the record(s), deleting the rest. Update either `context.data` (before hook) or `context.result[.data]` (after hook). Their values are returned if they are not an object, so a `null` value is supported. - ## keepInArray Keep certain fields in a nested array inside the record(s), deleting the rest. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes||create, update, patch|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/keep-in-array.ts)| -||yes|all||| +| before | after | methods | multi | details | +| ------ | ----- | --------------------- | ----- | -------------------------------------------------------------------------------------------------------------- | +| yes | | create, update, patch | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/keep-in-array.ts) | +| | yes | all | | | -> __Note:__ The keepInArray hook will remove any fields not specified even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), keepInArray(...))`. +> **Note:** The keepInArray hook will remove any fields not specified even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), keepInArray(...))`. - **Arguments** - `{String} arrayName` @@ -1049,14 +1020,14 @@ Keep certain fields in a nested array inside the record(s), deleting the rest. - **Example** ```js - const { keepInArray } = require('feathers-hooks-common') + const { keepInArray } = require('feathers-hooks-common'); module.exports = { after: { create: keepInArray('users', ['name', 'dept', 'address.city']), find: keepInArray('account.users', ['name', 'dept', 'address.city']) } - } + }; ``` - **Details** @@ -1068,52 +1039,51 @@ Keep certain fields in a nested array inside the record(s), deleting the rest. Keep certain fields in the query object, deleting the rest. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/keep-query.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ----------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/keep-query.ts) | -> __Note:__ The keepQuery hook will remove any fields not specified even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), keepQuery(...))`. +> **Note:** The keepQuery hook will remove any fields not specified even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), keepQuery(...))`. - Arguments - - `{Array < String >} fieldNames` + - `{Array < String >} fieldNames` -|Name|Type|Description| -|---|---|---| -|fieldNames|dot notation|The only fields you want to keep in the query object.| +| Name | Type | Description | +| ---------- | ------------ | ----------------------------------------------------- | +| fieldNames | dot notation | The only fields you want to keep in the query object. | - **Example** ```js - const { keepQuery } = require('feathers-hooks-common') + const { keepQuery } = require('feathers-hooks-common'); module.exports = { after: { create: keepQuery('name', 'address.city') } - } + }; ``` - **Details** Updates `context.params.query`. - ## keepQueryInArray Keep certain fields in a nested array inside the query object, deleting the rest. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/keep-query-in-array.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | -------------------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/keep-query-in-array.ts) | -> __Note:__ The keepQueryInArray hook will remove any fields not specified even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), keepQueryInArray(...))`. +> **Note:** The keepQueryInArray hook will remove any fields not specified even if the service is being called from the server. You may want to condition the hook to run only for external transports, e.g. `iff(isProvider('external'), keepQueryInArray(...))`. - Arguments - - `{Array < String >} fieldNames` + - `{Array < String >} fieldNames` -|Name|Type|Description| -|---|---|---| -|fieldNames|dot notation|The only fields you want to keep in a nested array inside the query object.| +| Name | Type | Description | +| ---------- | ------------ | --------------------------------------------------------------------------- | +| fieldNames | dot notation | The only fields you want to keep in a nested array inside the query object. | - **Arguments** - `{String} arrayName` @@ -1127,13 +1097,13 @@ Keep certain fields in a nested array inside the query object, deleting the rest - **Example** ```js - const { keepQueryInArray } = require('feathers-hooks-common') + const { keepQueryInArray } = require('feathers-hooks-common'); module.exports = { before: { find: keepQueryInArray('$or', ['name', 'dept', 'address.city']) } - } + }; ``` - **Details** @@ -1141,48 +1111,45 @@ Keep certain fields in a nested array inside the query object, deleting the rest Updates `context.params.query`. Their values are returned if they are not an object, so a `null` value is supported. - ## lowerCase Convert certain field values to lower case. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes||create, update, patch|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/lower-case.ts)| -||yes|all||| - +| before | after | methods | multi | details | +| ------ | ----- | --------------------- | ----- | ----------------------------------------------------------------------------------------------------------- | +| yes | | create, update, patch | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/lower-case.ts) | +| | yes | all | | | - Arguments - - `{Array < String >} fieldNames` + - `{Array < String >} fieldNames` -|Name|Type|Description| -|---|---|---| -|fieldNames|dot notation|The fields in the record(s) whose values are converted to lower case.| +| Name | Type | Description | +| ---------- | ------------ | --------------------------------------------------------------------- | +| fieldNames | dot notation | The fields in the record(s) whose values are converted to lower case. | - **Example** ```js - const { lowerCase } = require('feathers-hooks-common') + const { lowerCase } = require('feathers-hooks-common'); module.exports = { before: { create: lowerCase('email', 'username', 'div.dept') } - } + }; ``` - **Details** Update either `context.data` (before hook) or `context.result[.data]` (after hook). - ## mongoKeys Wrap MongoDB foreign keys in ObjectID. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|no|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/mongo-keys.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ----------------------------------------------------------------------------------------------------------- | +| yes | no | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/mongo-keys.ts) | - **Arguments** @@ -1233,14 +1200,13 @@ Wrap MongoDB foreign keys in ObjectID. `mongoKeys` automates this, given the field names of all the foreign keys in the schema. This reduces the boilerplate clutter and reduces the chance of bugs occurring. - ## paramsFromClient Pass `context.params` from client to server. Server hook. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/params-from-client.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/params-from-client.ts) | - **Arguments** @@ -1254,7 +1220,7 @@ Pass `context.params` from client to server. Server hook. ```js // client - const { paramsForServer } = require('feathers-hooks-common') + const { paramsForServer } = require('feathers-hooks-common'); service.update( id, @@ -1264,16 +1230,16 @@ Pass `context.params` from client to server. Server hook. populate: 'po-1', serialize: 'po-mgr' }) - ) + ); // server - const { paramsFromClient } = require('feathers-hooks-common') + const { paramsFromClient } = require('feathers-hooks-common'); module.exports = { before: { all: [paramsFromClient('populate', 'serialize', 'otherProp'), myHook] } - } + }; // myHook's `context.params` will now be // { query: { dept: 'a' }, populate: 'po-1', serialize: 'po-mgr' } } @@ -1285,14 +1251,13 @@ Pass `context.params` from client to server. Server hook. This technique also works for service calls made on the server. - ## populate Join related records. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/populate.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | --------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/populate.ts) | > `fastJoin` is preferred over using `populate`. @@ -1355,7 +1320,7 @@ Join related records. ```javascript // users like { _id: '111', name: 'John', roleId: '555' } // roles like { _id: '555', permissions: ['foo', bar'] } - import { populate } from 'feathers-hooks-common' + import { populate } from 'feathers-hooks-common'; const userRoleSchema = { include: { @@ -1364,13 +1329,13 @@ Join related records. parentField: 'roleId', childField: '_id' } - } + }; app.service('users').hooks({ after: { all: populate({ schema: userRoleSchema }) } - }) + }); // result like // { _id: '111', name: 'John', roleId: '555', @@ -1389,13 +1354,13 @@ Join related records. parentField: 'roleIds', childField: '_id' } - } + }; usersService.hooks({ after: { all: populate({ schema: userRolesSchema }) } - }) + }); // result like // { _id: '111', name: 'John', roleIds: ['555', '666'], roles: [ @@ -1416,13 +1381,13 @@ Join related records. parentField: '_id', childField: 'postId' } - } + }; postService.hooks({ after: { all: populate({ schema: postCommentsSchema }) } - }) + }); // result like // { _id: '111', body: '...' }, comments: [ @@ -1484,13 +1449,13 @@ Join related records. nameAs: 'comments', select: (hook, parentItem) => ({ postId: parentItem._id }) } - } + }; postService.hooks({ after: { all: populate({ schema: postCommentsSchema }) } - }) + }); // result like // { _id: '111', body: '...' }, comments: [ @@ -1505,19 +1470,18 @@ Join related records. `populate` supports 1:1, 1:n and n:1 relationships. It can provide performance profile information. - ## preventChanges Prevent patch service calls from changing certain fields. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|no|patch|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/prevent-changes.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ---------------------------------------------------------------------------------------------------------------- | +| yes | no | patch | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/prevent-changes.ts) | - - **Arguments** +- **Arguments** - - `{Boolean} ifThrow` - - `{Array < String >} fieldNames` +- `{Boolean} ifThrow` +- `{Array < String >} fieldNames` | Argument | Type | Default | Description | | ------------ | :----------: | ------- | ------------------------------------------------------ | @@ -1527,55 +1491,53 @@ Prevent patch service calls from changing certain fields. - **Example** ```js - const { preventChanges } = require('feathers-hooks-common') + const { preventChanges } = require('feathers-hooks-common'); module.exports = { before: { patch: preventChanges(true, 'security.badge') } - } + }; ``` - **Details** Consider using validateSchema if you would rather specify which fields are allowed to change. - ## required Check selected fields exist and are not falsey. Numeric 0 is acceptable. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|no|create, update, patch|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/required.ts)| +| before | after | methods | multi | details | +| ------ | ----- | --------------------- | ----- | --------------------------------------------------------------------------------------------------------- | +| yes | no | create, update, patch | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/required.ts) | - Arguments - - `{Array < String >} fieldNames` + - `{Array < String >} fieldNames` -|Name|Type|Description| -|---|---|---| -|fieldNames|dot notation|These fields must exist and not be falsey. Numeric 0 is acceptable.| +| Name | Type | Description | +| ---------- | ------------ | ------------------------------------------------------------------- | +| fieldNames | dot notation | These fields must exist and not be falsey. Numeric 0 is acceptable. | - **Example** ```js - const { required } = require('feathers-hooks-common') + const { required } = require('feathers-hooks-common'); module.exports = { before: { all: required('email', 'password') } - } + }; ``` - ## runParallel Run a hook in parallel to the other hooks and the service call. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/run-parallel.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/run-parallel.ts) | - **Arguments** @@ -1610,14 +1572,13 @@ Run a hook in parallel to the other hooks and the service call. The hook was provided by bedeoverend. Thank you. - ## serialize Prune values from related records. Calculate new values. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/serialize.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ---------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/serialize.ts) | - **Arguments** - `{Object | Function} schema` @@ -1687,25 +1648,25 @@ Prune values from related records. Calculate new values. The `setField` hook allows to set a field on the hook context based on the value of another field on the hook context. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/set-field.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ---------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/set-field.ts) | ### Options -- `from` *required* - The property on the hook context to use. Can be an array (e.g. `[ 'params', 'user', 'id' ]`) or a dot separated string (e.g. `'params.user.id'`). -- `as` *required* - The property on the hook context to set. Can be an array (e.g. `[ 'params', 'query', 'userId' ]`) or a dot separated string (e.g. `'params.query.userId'`). +- `from` _required_ - The property on the hook context to use. Can be an array (e.g. `[ 'params', 'user', 'id' ]`) or a dot separated string (e.g. `'params.user.id'`). +- `as` _required_ - The property on the hook context to set. Can be an array (e.g. `[ 'params', 'query', 'userId' ]`) or a dot separated string (e.g. `'params.query.userId'`). - `allowUndefined` (default: `false`) - If set to `false`, an error will be thrown if the value of `from` is `undefined` in an external request (`params.provider` is set). On internal calls (or if set to true `true` for external calls) the hook will do nothing. -> __Important:__ This hook should be used after the [authenticate hook](https://docs.feathersjs.com/api/authentication/hook.html#authenticate-options) when accessing user fields (from `params.user`). +> **Important:** This hook should be used after the [authenticate hook](https://docs.feathersjs.com/api/authentication/hook.html#authenticate-options) when accessing user fields (from `params.user`). -__Note:__ When the service enable `multi:true` and `data` is an array data type, this hook may working to an unexpected result +**Note:** When the service enable `multi:true` and `data` is an array data type, this hook may working to an unexpected result ### Examples Limit all external access of the `users` service to the authenticated user: -> __Note:__ For MongoDB, Mongoose and NeDB `params.user.id` needs to be changed to `params.user._id`. For any other custom id accordingly. +> **Note:** For MongoDB, Mongoose and NeDB `params.user.id` needs to be changed to `params.user._id`. For any other custom id accordingly. ```js const { authenticate } = require('@feathersjs/authentication'); @@ -1721,7 +1682,7 @@ app.service('users').hooks({ }) ] } -}) +}); ``` Only allow access to invoices for the users organization: @@ -1740,7 +1701,7 @@ app.service('invoices').hooks({ }) ] } -}) +}); ``` Set the current user id as `userId` when creating a message and only allow users to edit and remove their own messages: @@ -1783,41 +1744,40 @@ app.service('messages').hooks({ Create/update certain fields to the current date-time. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/set-now.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | -------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/set-now.ts) | - Arguments - - `{Array < String >} fieldNames` + - `{Array < String >} fieldNames` -|Name|Type|Description| -|---|---|---| -|fieldNames|dot notation|The fields that you want to add or set to the current date-time.| +| Name | Type | Description | +| ---------- | ------------ | ---------------------------------------------------------------- | +| fieldNames | dot notation | The fields that you want to add or set to the current date-time. | - **Example** ```js - const { setNow } = require('feathers-hooks-common') + const { setNow } = require('feathers-hooks-common'); module.exports = { before: { create: setNow('createdAt', 'updatedAt') } - } + }; ``` - **Details** Update either `context.data` (before hook) or `context.result[.data]` (after hook). - ## setSlug Set slugs in URL, e.g. /stores/:storeId. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/set-slug.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | --------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/set-slug.ts) | - **Arguments** - `{String} slug` @@ -1831,13 +1791,13 @@ Set slugs in URL, e.g. /stores/:storeId. - **Example** ```js - const { setSlug } = require('feathers-hooks-common') + const { setSlug } = require('feathers-hooks-common'); module.exports = { before: { all: [hooks.setSlug('storeId')] } - } + }; // `context.params.query` will always be normalized, // e.g. `{ size: 'large', storeId: '123' }` @@ -1855,14 +1815,13 @@ Set slugs in URL, e.g. /stores/:storeId. This hook normalizes the difference between the transports. - ## sifter Filter data or result records using a MongoDB-like selection syntax. -|before|after|methods|multi|details| -|---|---|---|---|---| -|no|yes|find|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/sifter.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------- | +| no | yes | find | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/sifter.ts) | - **Arguments** @@ -1875,29 +1834,29 @@ Filter data or result records using a MongoDB-like selection syntax. - **Example** ```js - const sift = require('sift') - const { sifter } = require('feathers-hooks-common') + const sift = require('sift'); + const { sifter } = require('feathers-hooks-common'); - const selectCountry = hook => sift({ 'address.country': hook.params.country }) + const selectCountry = hook => sift({ 'address.country': hook.params.country }); module.exports = { before: { find: sifter(selectCountry) } - } + }; ``` ```js - const sift = require('sift') - const { sifter } = require('feathers-hooks-common') + const sift = require('sift'); + const { sifter } = require('feathers-hooks-common'); - const selectCountry = country => () => sift({ address: { country: country } }) + const selectCountry = country => () => sift({ address: { country: country } }); module.exports = { before: { find: sifter(selectCountry('Canada')) } - } + }; ``` - **Details** @@ -1912,16 +1871,16 @@ Filter data or result records using a MongoDB-like selection syntax. Flag records as logically deleted instead of physically removing them. Requires a Feathers v4 or later database adapter. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|no|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/soft-delete.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------------ | +| yes | no | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/soft-delete.ts) | - **Arguments** -| Argument | Type | Default | Description | -| --- | --- | --- | --- | -| `deletedQuery` | `Function|Object` | `{ deleted: { $ne: true } }` | An object or async function that takes the query which returns the part of the query to exclude deleted entrie -| `removeData` | `Function|Object` | `{ deleted: true }` | An object or async function that returns the data used to flag an entry as deleted +| Argument | Type | Default | Description | +| -------------- | --------- | ------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `deletedQuery` | `Function | Object` | `{ deleted: { $ne: true } }` | An object or async function that takes the query which returns the part of the query to exclude deleted entrie | +| `removeData` | `Function | Object` | `{ deleted: true }` | An object or async function that returns the data used to flag an entry as deleted | By default, `softDelete` queries for a `deleted` property not set to `true` (meaning it can either exist or be anything else). @@ -1937,7 +1896,7 @@ Setting `params.disableSoftDelete` to `true` allows to skip the `softDelete` hoo // Use standard softDelete which uses `deleted: true` app.service('people').hooks({ before: { - all: [ softDelete() ] + all: [softDelete()] } }); @@ -1977,14 +1936,13 @@ Setting `params.disableSoftDelete` to `true` allows to skip the `softDelete` hoo }); ``` - ## stashBefore Stash current value of record, usually before mutating it. Performs a get call. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|no|get, update, patch, remove|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/stash-before.ts)| +| before | after | methods | multi | details | +| ------ | ----- | -------------------------- | ----- | ------------------------------------------------------------------------------------------------------------- | +| yes | no | get, update, patch, remove | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/stash-before.ts) | - **Arguments** - `{String} fieldName` @@ -1996,18 +1954,18 @@ Stash current value of record, usually before mutating it. Performs a get call. - **Example** ```js - const { stashBefore } = require('feathers-hooks-common') + const { stashBefore } = require('feathers-hooks-common'); module.exports = { before: { patch: stashBefore() } - } + }; ``` - **Details** - The hook performs its own preliminary `get` call. If the original service call is also a `get`, its `context.params` is used for the preliminary `get`. The preliminary `get` will be skipped if `params.disableStashBefore` is truthy. + The hook performs its own preliminary `get` call. If the original service call is also a `get`, its `context.params` is used for the preliminary `get`. The preliminary `get` will be skipped if `params.disableStashBefore` is truthy. For any other method the calling params are formed from the original calling context: @@ -2017,14 +1975,13 @@ Stash current value of record, usually before mutating it. Performs a get call. user: context.params.user } ``` - ## traverse Transform fields & objects in place in the record(s) using a recursive walk. Powerful. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/traverse.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | --------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/traverse.ts) | - **Arguments** - `{Function} transformer` @@ -2038,29 +1995,29 @@ Transform fields & objects in place in the record(s) using a recursive walk. Pow - **Example** ```js - const { traverse } = require('feathers-hooks-common') + const { traverse } = require('feathers-hooks-common'); // Trim strings - const trimmer = function(node) { + const trimmer = function (node) { if (typeof node === 'string') { - this.update(node.trim()) + this.update(node.trim()); } - } + }; // REST HTTP request may use the string 'null' in its query string. // Replace these strings with the value null. - const nuller = function(node) { + const nuller = function (node) { if (node === 'null') { - this.update(null) + this.update(null); } - } + }; module.exports = { before: { create: traverse(trimmer), find: traverse(nuller, context => context.params.query) } - } + }; ``` - **Details** @@ -2069,14 +2026,13 @@ Transform fields & objects in place in the record(s) using a recursive walk. Pow > [substack/js-traverse](https://github.com/substack/js-traverse) documents the extensive methods and context available to the transformer function. - ## unless Execute a series of hooks if a sync or async predicate is falsey. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/unless.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/unless.ts) | - **Arguments** - `{Boolean | Promise | Function} predicate` @@ -2090,7 +2046,7 @@ Execute a series of hooks if a sync or async predicate is falsey. - **Example** ```js - const { isProvider, unless } = require('feathers-hooks-common') + const { isProvider, unless } = require('feathers-hooks-common'); module.exports = { before: { @@ -2101,7 +2057,7 @@ Execute a series of hooks if a sync or async predicate is falsey. hookB ) } - } + }; ``` - **Details** @@ -2110,14 +2066,13 @@ Execute a series of hooks if a sync or async predicate is falsey. The predicate and hook functions will not be called with `this` set to the service, as is normal for hook functions. Use `hook.service` instead. - ## validate Validate data using a validation function. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|no|create, update, patch|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/validate.ts)| +| before | after | methods | multi | details | +| ------ | ----- | --------------------- | ----- | --------------------------------------------------------------------------------------------------------- | +| yes | no | create, update, patch | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/validate.ts) | - **Arguments** @@ -2130,17 +2085,17 @@ Validate data using a validation function. - **Example** ```js - const { validate } = require('feathers-hooks-common') - const { promisify } = require('util') + const { validate } = require('feathers-hooks-common'); + const { promisify } = require('util'); // function myCallbackValidator(values, cb) { ... } - const myValidator = promisify(myCallbackValidator) + const myValidator = promisify(myCallbackValidator); module.exports = { before: { create: validate(myValidator) } - } + }; ``` - **Details** @@ -2168,14 +2123,13 @@ Validate data using a validation function. > Wrap your validator in Node's `util.promisify` if it uses a callback. - ## validateSchema Validate data using JSON-Schema. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/validate-schema.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ---------------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/hooks/validate-schema.ts) | - **Arguments** - `{Object} schema` @@ -2198,28 +2152,28 @@ Validate data using JSON-Schema. - **Example** ```js - const Ajv = require('ajv') + const Ajv = require('ajv'); const createSchema = { /* JSON-Schema */ - } + }; module.before({ create: validateSchema(createSchema, Ajv) - }) + }); ``` ```js - const Ajv = require('ajv') - const ajv = new Ajv({ allErrors: true, $data: true }) + const Ajv = require('ajv'); + const ajv = new Ajv({ allErrors: true, $data: true }); - ajv.addFormat('allNumbers', '^d+$') + ajv.addFormat('allNumbers', '^d+$'); const createSchema = { /* JSON-Schema */ - } + }; module.before({ create: validateSchema(createSchema, ajv) - }) + }); ``` - **Details** @@ -2252,12 +2206,12 @@ Validate data using JSON-Schema. `error.errors` will, by default, contain an array of error messages. By default the message will look like ```js -;[ +[ '\'in row 1 of 3, first\' should match format "startWithJo"', "in row 1 of 3, should have required property 'last'", '\'in row 2 of 3, first\' should match format "startWithJo"', "in row 3 of 3, should have required property 'last'" -] +]; ``` > You could, for example, return `{ name1: message, name2: message }` which might be more suitable for a UI. diff --git a/docs/migrating.md b/docs/migrating.md index a65f2bc9..812547be 100644 --- a/docs/migrating.md +++ b/docs/migrating.md @@ -18,7 +18,7 @@ The following hooks and utilities have been deprecated and replaced with differe - promiseToCallback - No longer necessary since callbacks have been deprecated in Feathers v3 and later - `removeQuery` - Use [discardQuery](hooks#discardquery) instead - `setCreatedAt` - Use [setNow](hooks#setnow) instead -- `setUpdatedAt` - Use [setNow](hooks#setnow) instead +- `setUpdatedAt` - Use [setNow](hooks#setnow) instead - `skipRemainingHooks` - Use conditional hook chains with [iff](hooks#iff) instead - `skipRemainingHooksOnFlag` - Use conditional hook chains with [iff](hooks#iff) instead - `softDelete2` - Use Feathers v4 database adapters and the new [softDelete](hooks#softdelete) instead @@ -27,10 +27,10 @@ The following hooks and utilities have been deprecated and replaced with differe Several utility methods have been replaced by [Lodash](https://lodash.com) methods which are thoroughly tested and performance optimized in many different environments. -- `existsByDot` - Use [_.has()](https://lodash.com/docs/latest#has) -- `deleteByDot` - Use [_.omit](https://lodash.com/docs/latest#omit) -- `getByDot` - Use [_.get()](https://lodash.com/docs/latest#get) -- `setByDot` - Use [_.set()](https://lodash.com/docs/latest#set) +- `existsByDot` - Use [\_.has()](https://lodash.com/docs/latest#has) +- `deleteByDot` - Use [\_.omit](https://lodash.com/docs/latest#omit) +- `getByDot` - Use [\_.get()](https://lodash.com/docs/latest#get) +- `setByDot` - Use [\_.set()](https://lodash.com/docs/latest#set) ## Safe mutations diff --git a/docs/utilities.md b/docs/utilities.md index fa499f19..95a4e606 100644 --- a/docs/utilities.md +++ b/docs/utilities.md @@ -12,9 +12,9 @@ Build `params` for a service call. - `{Object} options` -| Argument | Type | Default | Description | -| --------- | :------: | ------- | ----------------------------------------------------------- | -| `options` | `Object` | | How to construct params for service call. | +| Argument | Type | Default | Description | +| --------- | :------: | ------- | ----------------------------------------- | +| `options` | `Object` | | How to construct params for service call. | | `options` | Argument | Type | Default | Description | | ---------------- | ----------------- | :--: | ---------------------------------------------------------------------------------------------------------------------------- | ----------- | @@ -23,21 +23,22 @@ Build `params` for a service call. | `newProps` | `Object` | `{}` | Additional props to add to the new params. | | `hooksToDisable` | `Array< String >` | `[]` | The names of hooks to disable during the service call. `populate`, `fastJoin`, `softDelete` and `stashBefore` are supported. | | `ignoreDefaults` | `Boolean` | | Ignore the defaults `propNames` and `newProps`. | + - **Returns** - `{Function}` - + - **Arguments** - `{Object} context` | Argument | Type | Default | Description | | --------- | :------: | ------- | ----------------------------------------------------------- | -| `context` | `Object` | | The `context` of the hook which will make the service call. | +| `context` | `Object` | | The `context` of the hook which will make the service call. | - - **Returns** +- **Returns** - - `{Object} newParams` + - `{Object} newParams` | Name | Type | Description | | ----------- | :------: | -------------------------------- | @@ -122,12 +123,12 @@ Restrict a hook to run for certain methods and method types. - `{String | Array< String >} [ methods ]` - `{String} [ label ]` -| Argument | Type | Default | Description | -| --------- | :------------------------: | ------------- | --------------------------------------------------------------- | -| `context` | `Object` | | The hook context. | -| `type` | `String | Array< String >` | all types | The service type allowed - before, after, error. | -| `methods` | `String | Array< String >` | all methods | The service methods allowed - find, get, update, patch, remove. | -| `label` | `String` | `'anonymous'` | Name of hook to use with `throw`. | +| Argument | Type | Default | Description | +| --------- | :------: | ---------------- | --------------------------------- | --------------------------------------------------------------- | +| `context` | `Object` | | The hook context. | +| `type` | `String | Array< String >` | all types | The service type allowed - before, after, error. | +| `methods` | `String | Array< String >` | all methods | The service methods allowed - find, get, update, patch, remove. | +| `label` | `String` | `'anonymous'` | Name of hook to use with `throw`. | - **Example** @@ -157,9 +158,9 @@ Restrict a hook to run for certain methods and method types. Sequentially execute multiple sync or async hooks. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|n/a|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/combine.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | -------------------------------------------------------------------------------------------------------- | +| yes | yes | all | n/a | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/combine.ts) | - **Arguments** - `{Array< Function >} hookFuncs` @@ -171,14 +172,11 @@ Sequentially execute multiple sync or async hooks. - **Example** ```js - const { combine, createdAt, updatedAt } = require('feathers-hooks-common') + const { combine, createdAt, updatedAt } = require('feathers-hooks-common'); async function myCustomHook(context) { - const newContext = await combine( - setNow('createdAt'), - setNow('updatedAt') - ).call(this, context) - return newContext + const newContext = await combine(setNow('createdAt'), setNow('updatedAt')).call(this, context); + return newContext; } ``` @@ -197,15 +195,14 @@ module.exports = { before: { } }; ``` - ## every Return the and of a series of sync or async predicate functions. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/every.ts)| - +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------ | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/every.ts) | + - **Arguments** - `{Array< Function >} predicates` @@ -213,15 +210,13 @@ Return the and of a series of sync or async predicate functions. | ------------ | :-----------------: | ------- | ----------------------------------------------------------------------------- | | `predicates` | `Array< Function >` | | Functions which take the current hook as a param and return a boolean result. | - **Returns** - `{Boolean} result` -|Name|Type|Description| -|---|---|---| -result|Boolean|The logical and of predicates - +| Name | Type | Description | +| ------ | ------- | ----------------------------- | +| result | Boolean | The logical and of predicates | - **Example** @@ -237,7 +232,6 @@ result|Boolean|The logical and of predicates `every` is a predicate function for use in conditional hooks. The predicate functions are run in parallel, and `true` is returned if every predicate returns a truthy value. - ## getItems Get the records in `context.data` or `context.result` @@ -251,11 +245,11 @@ Get the records in `context.data` or `context.result` **Returns** - - `{Array< Object > | Object | undefined} records` +- `{Array< Object > | Object | undefined} records` -|Name|Type|Description| -|---|---|---| -records|Array< Object > | Object | undefined|The records. +| Name | Type | Description | +| ------- | --------------- | ----------- | --------- | ------------ | +| records | Array< Object > | Object | undefined | The records. | - **Example** @@ -265,16 +259,20 @@ records|Array< Object > | Object | undefined|The records. const insertCode = code => context => { const items = getItems(context); if (Array.isArray(items)) { - items.forEach(item => { item.code = code; }); + items.forEach(item => { + item.code = code; + }); } else { items.code = code; } replaceItems(context, items); }; - module.exports = { before: { - create: insertCode('a') - } }; + module.exports = { + before: { + create: insertCode('a') + } + }; ``` - **Details** @@ -285,9 +283,9 @@ records|Array< Object > | Object | undefined|The records. Negate a sync or async predicate function. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/is-not.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/is-not.ts) | - **Arguments** @@ -301,9 +299,9 @@ Negate a sync or async predicate function. - `{Boolean} result` -|Name|Type|Description| -|---|---|---| -result|Boolean|The not of predicate +| Name | Type | Description | +| ------ | ------- | -------------------- | +| result | Boolean | The not of predicate | - **Example** @@ -320,15 +318,14 @@ result|Boolean|The not of predicate `isNot` is a predicate function for use in conditional hooks. - ## isProvider Check which transport provided the service call. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/is-provider.ts)| - +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------------ | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/is-provider.ts) | + - **Arguments** - `{Array< String >} transports` @@ -339,43 +336,39 @@ Check which transport provided the service call. | `transports` | Value | Description | | ------------ | :---------------------------------: | ----------- | | `socketio` | Allow calls by Socket.IO transport. | -| `primus` | Allow calls by Primus transport. | | `rest` | Allow calls by REST transport. | | `external` | Allow calls other than from server. | | `server` | Allow calls from server. | - **Returns** - `{Boolean} result` -|Name|Type|Description| -|---|---|---| -result|Boolean|If the call was made by one of the transports. - +| Name | Type | Description | +| ------ | ------- | ---------------------------------------------- | +| result | Boolean | If the call was made by one of the transports. | - **Example** ```js - const { iff, isProvider, discard } = require('feathers-hooks-common') + const { iff, isProvider, discard } = require('feathers-hooks-common'); module.exports = { after: { create: iff(isProvider('external'), discard('password')) } - } + }; ``` - **Details** `isProvider` is a predicate function for use in conditional hooks. Its determines which transport provided the service call by checking `context.params.provider`. - ## makeCallingParams Build context.params for service calls. -> __Tip:__ You should prefer using the `callingParams` utility to `makeCallingParams`. +> **Tip:** You should prefer using the `callingParams` utility to `makeCallingParams`. - **Arguments** @@ -420,7 +413,6 @@ Build context.params for service calls. The value `context.params._populate: 'skip'` is automatically added to skip any `fastJoin` or `populate` hooks registered on the called service. Set it to `false`, like in the example above, to make those hooks run. - ## paramsForServer Pass an explicit context.params from client to server. Client-side. @@ -438,7 +430,7 @@ Pass an explicit context.params from client to server. Client-side. ```js // client - const { paramsForServer } = require('feathers-hooks-common') + const { paramsForServer } = require('feathers-hooks-common'); service.update( id, @@ -448,16 +440,16 @@ Pass an explicit context.params from client to server. Client-side. populate: 'po-1', serialize: 'po-mgr' }) - ) + ); // server - const { paramsFromClient } = require('feathers-hooks-common') + const { paramsFromClient } = require('feathers-hooks-common'); module.exports = { before: { all: [paramsFromClient('populate', 'serialize', 'otherProp'), myHook] } - } + }; // myHook's `context.params` will now be // { query: { dept: 'a' }, populate: 'po-1', serialize: 'po-mgr' } } @@ -471,7 +463,6 @@ Pass an explicit context.params from client to server. Client-side.

The data is transfered using `context.params.query.$client`. If that field already exists, it must be an Object.

- ## replaceItems Replace the records in context.data or context.result[.data]. @@ -510,8 +501,6 @@ Replace the records in context.data or context.result[.data]. `replaceItems` replaces the records in the hook context: `context.data` (before hook) or `context.result[.data]` (after hook). - - ## runHook Let's you call a hook right after the service call. @@ -539,8 +528,8 @@ Let's you call a hook right after the service call. ``` ```js - const { fastJoin, runHook } = require('feathers-hooks-common') - const runHookFinds = runHook({ app: app, method: 'find' }) + const { fastJoin, runHook } = require('feathers-hooks-common'); + const runHookFinds = runHook({ app: app, method: 'find' }); const paymentsRecords = [ { _id: 101, amount: 100, patientId: 1 }, @@ -549,15 +538,15 @@ Let's you call a hook right after the service call. { _id: 104, amount: 115, patientId: 2 }, { _id: 105, amount: 120, patientId: 3 }, { _id: 106, amount: 125, patientId: 3 } - ] - await payments.create(paymentsRecords) + ]; + await payments.create(paymentsRecords); const patientsRecords = [ { _id: 1, name: 'John' }, { _id: 2, name: 'Marshall' }, { _id: 3, name: 'David' } - ] - await patients.create(patientsRecords) + ]; + await patients.create(patientsRecords); const paymentResolvers = { joins: { @@ -568,18 +557,18 @@ Let's you call a hook right after the service call. id: payment.patientId } }) - )[0] + )[0]; } } - } + }; await payments .find() .then(runHookFinds(fastJoin(paymentResolvers))) - .then(data => console.log(data)) + .then(data => console.log(data)); // log - ;[ + [ { _id: 101, amount: 100, patientId: 1, patient: { _id: 1, name: 'John' } }, { _id: 102, amount: 105, patientId: 1, patient: { _id: 1, name: 'John' } }, { _id: 103, amount: 110, patientId: 1, patient: { _id: 1, name: 'John' } }, @@ -591,7 +580,7 @@ Let's you call a hook right after the service call. }, { _id: 105, amount: 120, patientId: 3, patient: { _id: 3, name: 'David' } }, { _id: 106, amount: 125, patientId: 3, patient: { _id: 3, name: 'David' } } - ] + ]; ``` - **Details** @@ -604,14 +593,13 @@ Let's you call a hook right after the service call. `runHook` is designed for such cases. Instead of having to register a conditioned hook, it allows us to run the hook in a `.then()` right after the service call. - ## some Return the or of a series of sync or async predicate functions. -|before|after|methods|multi|details| -|---|---|---|---|---| -|yes|yes|all|yes|[source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/some.ts)| +| before | after | methods | multi | details | +| ------ | ----- | ------- | ----- | ----------------------------------------------------------------------------------------------------- | +| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/some.ts) | - **Arguments** @@ -623,11 +611,11 @@ Return the or of a series of sync or async predicate functions. **Returns** - - `{Boolean} result` +- `{Boolean} result` -|Name|Type|Description| -|---|---|---| -result|Boolean|The logical or of predicates +| Name | Type | Description | +| ------ | ------- | ---------------------------- | +| result | Boolean | The logical or of predicates | - **Example** @@ -642,4 +630,3 @@ result|Boolean|The logical or of predicates - **Details** `some` is a predicate function for use in conditional hooks. The predicate functions are run in parallel, and `true` is returned if any predicate returns a truthy value. - diff --git a/package-lock.json b/package-lock.json index 959b3427..ddbc2e2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,9 +10,9 @@ "license": "MIT", "dependencies": { "@feathers-plus/batch-loader": "^0.3.6", - "@feathersjs/commons": "^4.5.15", - "@feathersjs/errors": "^4.5.15", - "@feathersjs/feathers": "^4.5.15", + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", "ajv": "^6.12.6", "debug": "^4.3.4", "graphql": "^16.6.0", @@ -22,41 +22,43 @@ "devDependencies": { "@feathers-plus/cache": "^1.4.0", "@feathers-plus/graphql": "^1.10.0", - "@feathersjs/authentication": "^4.5.15", - "@feathersjs/authentication-jwt": "^2.0.10", - "@feathersjs/authentication-local": "^4.5.15", - "@feathersjs/client": "^4.5.15", - "@feathersjs/express": "^4.5.15", - "@feathersjs/socketio": "^4.5.15", - "@feathersjs/socketio-client": "^4.5.15", + "@feathersjs/authentication": "^5.0.0-pre.29", + "@feathersjs/authentication-local": "^5.0.0-pre.29", + "@feathersjs/client": "^5.0.0-pre.29", + "@feathersjs/express": "^5.0.0-pre.29", + "@feathersjs/socketio": "^5.0.0-pre.29", + "@feathersjs/socketio-client": "^5.0.0-pre.29", "@types/chai": "^4.3.3", "@types/clone": "^2.1.1", "@types/debug": "^4.1.7", - "@types/lodash": "^4.14.184", + "@types/lodash": "^4.14.185", "@types/mocha": "^9.1.1", - "@types/node": "^18.7.14", + "@types/node": "^18.7.18", "@types/traverse": "^0.6.32", - "@typescript-eslint/eslint-plugin": "^5.36.1", - "@typescript-eslint/parser": "^5.36.1", + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", "c8": "^7.12.0", "chai": "^4.3.6", "clone": "^2.1.2", - "eslint": "^8.23.0", + "eslint": "^8.23.1", + "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-prefer-arrow": "^1.2.3", + "eslint-plugin-prettier": "^4.2.1", "feathers-memory": "^4.1.0", "mocha": "^10.0.0", - "mongodb": "^4.6.0", - "npm-check-updates": "^16.0.6", + "mongodb": "^4.9.1", + "npm-check-updates": "^16.1.3", + "prettier": "^2.7.1", "shx": "^0.3.4", "sift": "^16.0.0", "ts-node": "^10.9.1", "tsup": "^6.2.3", - "typescript": "^4.8.2", - "vitepress": "1.0.0-alpha.14" + "typescript": "^4.8.3", + "vitepress": "^1.0.0-alpha.14" }, "engines": { - "node": ">= 12" + "node": ">= 14" } }, "node_modules/@algolia/autocomplete-core": { @@ -290,10 +292,29 @@ } } }, + "node_modules/@esbuild/android-arm": { + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.8.tgz", + "integrity": "sha512-CyEWALmn+no/lbgbAJsbuuhT8s2J19EJGHkeyAwjbFJMrj80KJ9zuYsoAvidPTU7BgBf87r/sgae8Tw0dbOc4Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "dependencies": { + "esbuild-wasm": "0.15.8" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/linux-loong64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.7.tgz", - "integrity": "sha512-IKznSJOsVUuyt7cDzzSZyqBEcZe+7WlBqTVXiF1OXP/4Nm387ToaXZ0fyLwI1iBlI/bzpxVq411QE2/Bt2XWWw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.8.tgz", + "integrity": "sha512-pE5RQsOTSERCtfZdfCT25wzo7dfhOSlhAXcsZmuvRYhendOv7djcdvtINdnDp2DAjP17WXlBB4nBO6sHLczmsg==", "cpu": [ "loong64" ], @@ -530,21 +551,41 @@ "url": "https://opencollective.com/feathers" } }, - "node_modules/@feathersjs/authentication": { + "node_modules/@feathersjs/adapter-commons/node_modules/@feathersjs/commons": { "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-4.5.15.tgz", - "integrity": "sha512-zIlFstFBHVRqO4Pvf9NpCew9QPrgHP+eJgwzh6uKgDfNGUwAlO6OHqwuggJWiwrq6Kb9LJYQQyCnsRJ/5jVilA==", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-4.5.15.tgz", + "integrity": "sha512-eVEcLJL3GcPQBQcD77jI3fZ4MMx+iD02Px2Z1lDw+cn/iGCeQkWWAPQs4Tp+HGR1rTL5JO+unyhzN8V9X7OYmw==", + "dev": true, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/daffl" + } + }, + "node_modules/@feathersjs/adapter-commons/node_modules/@feathersjs/errors": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-4.5.15.tgz", + "integrity": "sha512-EJAYWMsWZlUA/halbgZBc6eP2d3HPkHi5GzprYEK58GCh51KJ36VjX7VKVEnMjgBSED+PE00tpr3ZvUC4nUR+Q==", "dev": true, "dependencies": { - "@feathersjs/errors": "^4.5.15", - "@feathersjs/feathers": "^4.5.15", - "@feathersjs/transport-commons": "^4.5.15", - "@types/jsonwebtoken": "^8.5.6", + "debug": "^4.3.3" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@feathersjs/adapter-commons/node_modules/@feathersjs/feathers": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-4.5.15.tgz", + "integrity": "sha512-Q7sa1QAEhspYHsVEJPRg313bqjNaOhgvibiUxtjf3CGGJL9hVcAPLHQbrzsZuVTR4QwBATZSf6voEtuNmG/pIQ==", + "dev": true, + "dependencies": { + "@feathersjs/commons": "^4.5.15", "debug": "^4.3.3", - "jsonwebtoken": "^8.5.1", - "lodash": "^4.17.21", - "long-timeout": "^0.1.1", - "uuid": "^8.3.2" + "events": "^3.3.0", + "uberproto": "^2.0.6" }, "engines": { "node": ">= 10" @@ -554,50 +595,65 @@ "url": "https://github.com/sponsors/daffl" } }, - "node_modules/@feathersjs/authentication-jwt": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication-jwt/-/authentication-jwt-2.0.10.tgz", - "integrity": "sha512-4IVBXDa4w17rroWiSM6LpSzUVG9Za1x1t7fioSObYt60PTkY7QunZt77GkdWfTNLNFvV++VVZ5tGFN6kfIKqCA==", + "node_modules/@feathersjs/authentication": { + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-5.0.0-pre.29.tgz", + "integrity": "sha512-vol00wb2b+zhvvkrbPkDqrMga5dSmLydzhixt+Sh3vY5jp7uWrWRqqrTXrysXLSfisQMGVFbTNNxc5maCU+pKg==", "dev": true, "dependencies": { - "@feathersjs/errors": "^3.3.6", - "debug": "^4.0.0", - "lodash.merge": "^4.6.0", - "lodash.omit": "^4.5.0", - "lodash.pick": "^4.4.0", - "passport-jwt": "^4.0.0" + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/schema": "^5.0.0-pre.29", + "@feathersjs/transport-commons": "^5.0.0-pre.29", + "@types/jsonwebtoken": "^8.5.9", + "jsonwebtoken": "^8.5.1", + "lodash": "^4.17.21", + "long-timeout": "^0.1.1", + "uuid": "^9.0.0" }, "engines": { - "node": ">= 6" + "node": ">= 12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/daffl" } }, - "node_modules/@feathersjs/authentication-jwt/node_modules/@feathersjs/errors": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-3.3.6.tgz", - "integrity": "sha512-VCohY/AQU13xYyZGl6rfdUgE+2bjaI76a4aEb6reIphHKgb4mnjYlg2PzS1/hcU1qUNi515kY9yQa5HsE7J1dQ==", + "node_modules/@feathersjs/authentication-client": { + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication-client/-/authentication-client-5.0.0-pre.29.tgz", + "integrity": "sha512-QcHlyOUGUqfgO+SIkFFASHzGdCrAX4yTI9i/4l6AKgWpPX2MoKnfWGOn8N/3xFR89pvnS3A9hU/NO0T8B0KVjw==", "dev": true, "dependencies": { - "debug": "^4.0.0" + "@feathersjs/authentication": "^5.0.0-pre.29", + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29" }, "engines": { - "node": ">= 6" + "node": ">= 12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/daffl" } }, "node_modules/@feathersjs/authentication-local": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication-local/-/authentication-local-4.5.15.tgz", - "integrity": "sha512-5K+S6eAUVbrEqaL12yYjCP5dn+QXklVg/nJgBIkCfRp/uaTbQM4W7VQanrB9EgBwhX1p4EJhWkB/xeNam8qb5A==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication-local/-/authentication-local-5.0.0-pre.29.tgz", + "integrity": "sha512-j6o0iKz1dFTU5/pp7GGX53Vyo/lMLyBgm1A4ebihDVRBt2oXWRW2FUHLwGRANKrjUVR7F9s59XYz3OYhpbs+CA==", "dev": true, "dependencies": { - "@feathersjs/authentication": "^4.5.15", - "@feathersjs/errors": "^4.5.15", - "@feathersjs/feathers": "^4.5.15", + "@feathersjs/authentication": "^5.0.0-pre.29", + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", "bcryptjs": "^2.4.3", - "debug": "^4.3.3", "lodash": "^4.17.21" }, "engines": { - "node": ">= 10" + "node": ">= 12" }, "funding": { "type": "github", @@ -605,12 +661,19 @@ } }, "node_modules/@feathersjs/client": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/client/-/client-4.5.15.tgz", - "integrity": "sha512-2xFnXofikWTlwrSVar+G4UjrzAS7ZGiFHYSpi6dk0C7IXh6Ooniv4U+vHSz/CLlb45d4hGN43nzEGAQTb6T4LQ==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/client/-/client-5.0.0-pre.29.tgz", + "integrity": "sha512-JfqNabQsw/kxj4RgfhA6lsuUmH1H8m1JxHCH98mfCWhCzE/r263ZqAOCSulvWL57VArdyR4a03rbV+jp/JTqqQ==", "dev": true, + "dependencies": { + "@feathersjs/authentication-client": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/rest-client": "^5.0.0-pre.29", + "@feathersjs/socketio-client": "^5.0.0-pre.29" + }, "engines": { - "node": ">= 10" + "node": ">= 12" }, "funding": { "type": "github", @@ -618,11 +681,11 @@ } }, "node_modules/@feathersjs/commons": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-4.5.15.tgz", - "integrity": "sha512-eVEcLJL3GcPQBQcD77jI3fZ4MMx+iD02Px2Z1lDw+cn/iGCeQkWWAPQs4Tp+HGR1rTL5JO+unyhzN8V9X7OYmw==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-5.0.0-pre.29.tgz", + "integrity": "sha512-BlGRPYPsMEANKrOM2fprmMixmyca9P3CNvJYxhGSaFZLt1+USAxFfx02d0/s8KkHtO+qEg2bz/TmR8BdsABrmg==", "engines": { - "node": ">= 10" + "node": ">= 12" }, "funding": { "type": "github", @@ -630,32 +693,31 @@ } }, "node_modules/@feathersjs/errors": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-4.5.15.tgz", - "integrity": "sha512-EJAYWMsWZlUA/halbgZBc6eP2d3HPkHi5GzprYEK58GCh51KJ36VjX7VKVEnMjgBSED+PE00tpr3ZvUC4nUR+Q==", - "dependencies": { - "debug": "^4.3.3" - }, + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-5.0.0-pre.29.tgz", + "integrity": "sha512-0gb/px3/ict6FQ8ebqYAiqAxG2s+oLmrhs9Wr+4cnE96BlEH5lgyUTK0px7aDMFkkhjr25egtxBnM1RCoL36fg==", "engines": { - "node": ">= 10" + "node": ">= 12" } }, "node_modules/@feathersjs/express": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-4.5.15.tgz", - "integrity": "sha512-5gNaXpDZFY0W8svZflDCdQILeiVFt532LiLHYhBJdMK/lMyttKl1Ul8ZjQ/WF4P8Wmp196bxeIUyiJpIdoCXbQ==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-5.0.0-pre.29.tgz", + "integrity": "sha512-47xpo0WXAhAagSAPwtPYFPDDTiy4o2bZMSU745otDhG0gXik26757QEnkS3OuZwdE0ztJGaH2IYv7AGQWbFSbA==", "dev": true, "dependencies": { - "@feathersjs/commons": "^4.5.15", - "@feathersjs/errors": "^4.5.15", + "@feathersjs/authentication": "^5.0.0-pre.29", + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/transport-commons": "^5.0.0-pre.29", "@types/express": "^4.17.13", - "debug": "^4.3.3", - "express": "^4.17.2", - "lodash": "^4.17.21", - "uberproto": "^2.0.6" + "@types/express-serve-static-core": "^4.17.30", + "cors": "^2.8.5", + "express": "^4.18.1" }, "engines": { - "node": ">= 10" + "node": ">= 12" }, "funding": { "type": "github", @@ -663,37 +725,109 @@ } }, "node_modules/@feathersjs/feathers": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-4.5.15.tgz", - "integrity": "sha512-Q7sa1QAEhspYHsVEJPRg313bqjNaOhgvibiUxtjf3CGGJL9hVcAPLHQbrzsZuVTR4QwBATZSf6voEtuNmG/pIQ==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-5.0.0-pre.29.tgz", + "integrity": "sha512-cRuGDTlkqhKLgc23gV1ohZ0HjdsnrOBxDmp9pPBeTGuFT69fyqSuUJfcipfaF0hP3C0WDI//92wXfRblAod24g==", "dependencies": { - "@feathersjs/commons": "^4.5.15", - "debug": "^4.3.3", - "events": "^3.3.0", - "uberproto": "^2.0.6" + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/hooks": "^0.7.5", + "events": "^3.3.0" }, "engines": { - "node": ">= 10" + "node": ">= 12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/daffl" + } + }, + "node_modules/@feathersjs/hooks": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@feathersjs/hooks/-/hooks-0.7.5.tgz", + "integrity": "sha512-xHbWPCJ5upr9eDdRSuJgWSKgCLN07YLvVjS7PdDqWrEz/iz5YBqoIQOzHhNPsWXOA6T7v+ArifrTUitG+ZzIRA==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/@feathersjs/rest-client": { + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/rest-client/-/rest-client-5.0.0-pre.29.tgz", + "integrity": "sha512-PgBIwEIEMocgFK4GIVyougNWKD+M38a3mg9e0dWxxZXBlERjX8A+Vavcbb84ZxAvQnG3H/IPD3zy8HNEOlt1ZA==", + "dev": true, + "dependencies": { + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@types/superagent": "^4.1.15", + "qs": "^6.11.0" + }, + "engines": { + "node": ">= 12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/daffl" + } + }, + "node_modules/@feathersjs/schema": { + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/schema/-/schema-5.0.0-pre.29.tgz", + "integrity": "sha512-GIko7iC3mnemal4lxXvdFWtHuS2xvfb12AQruuaIQ2WiB7DyVn3HEENgaOj5RfI8mU+8jWjYozPE7oOjCKv0NQ==", + "dev": true, + "dependencies": { + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/hooks": "^0.7.5", + "@types/json-schema": "^7.0.11", + "ajv": "^8.11.0", + "json-schema": "^0.4.0", + "json-schema-to-ts": "^2.5.5" + }, + "engines": { + "node": ">= 12" }, "funding": { "type": "github", "url": "https://github.com/sponsors/daffl" } }, + "node_modules/@feathersjs/schema/node_modules/ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@feathersjs/schema/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/@feathersjs/socketio": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/socketio/-/socketio-4.5.15.tgz", - "integrity": "sha512-ma3mKeD7XC5su9pXWqbtauvDJgCXDms1tGZkY2mKET+P52zuqzhUyksPE1RLFu/Rpy28U77Uu39pAM9342hfDg==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/socketio/-/socketio-5.0.0-pre.29.tgz", + "integrity": "sha512-AV+buawaO58ZWj86V4EfXmn/wxae6H2CUfEo97X+OwEJULrmTdZLGAOrx5R5AQxzZYsPMA3YZZ9mRd5PVEEttg==", "dev": true, "dependencies": { - "@feathersjs/transport-commons": "^4.5.15", - "@types/socket.io": "^2.1.11", - "debug": "^4.3.3", - "socket.io": "^2.3.0", - "uberproto": "^2.0.6" + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/hooks": "^0.7.5", + "@feathersjs/transport-commons": "^5.0.0-pre.29", + "socket.io": "^4.5.2" }, "engines": { - "node": ">= 10" + "node": ">= 12" }, "funding": { "type": "github", @@ -701,16 +835,15 @@ } }, "node_modules/@feathersjs/socketio-client": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/socketio-client/-/socketio-client-4.5.15.tgz", - "integrity": "sha512-jvhMr3h6HLUrKCYp7I7T6FhbPn+0dCmNZ27o2+eD8T9tYPMod9y9d5GHGx9jvVQIQ6r2dJ8iXhb03FQXgplZww==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/socketio-client/-/socketio-client-5.0.0-pre.29.tgz", + "integrity": "sha512-hbOsPBOdVCUUCfS8obCl0N5zn1LkJrKRryBi0IR2qRURnc992YqT7gBVfP705gzkTrEe58ETjm7qC0meA+FStw==", "dev": true, "dependencies": { - "@feathersjs/transport-commons": "^4.5.15", - "@types/socket.io-client": "^1.4.36" + "@feathersjs/transport-commons": "^5.0.0-pre.29" }, "engines": { - "node": ">= 10" + "node": ">= 12" }, "funding": { "type": "github", @@ -718,19 +851,19 @@ } }, "node_modules/@feathersjs/transport-commons": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-4.5.15.tgz", - "integrity": "sha512-i9VqWq4VEASqvF+00kwIKhfvCU3tarLuywGMeN4zM3HXuuJKGIv6g0DAaZyWvgqhiuopZmMtHoP8mFRYIPxCEg==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-5.0.0-pre.29.tgz", + "integrity": "sha512-jy0ltjjrPuMas6vukLMB/9lnjL6aKpSSpN0X8gWGbQqZBDJ6VE7AHDj+6eKdcPiEtWmkj3kZQ0pwbD9DzE7vhA==", "dev": true, "dependencies": { - "@feathersjs/commons": "^4.5.15", - "@feathersjs/errors": "^4.5.15", - "debug": "^4.3.3", - "lodash": "^4.17.21", - "radix-router": "^3.0.1" + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "encodeurl": "^1.0.2", + "lodash": "^4.17.21" }, "engines": { - "node": ">= 10" + "node": ">= 12" }, "funding": { "type": "github", @@ -1076,18 +1209,6 @@ "@types/node": "*" } }, - "node_modules/@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", - "dev": true, - "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "*", - "@types/node": "*", - "@types/responselike": "*" - } - }, "node_modules/@types/chai": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", @@ -1109,6 +1230,24 @@ "@types/node": "*" } }, + "node_modules/@types/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "dev": true + }, + "node_modules/@types/cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@types/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-t73xJJrvdTjXrn4jLS9VSGRbz0nUY3cl2DMGDU48lKl+HR9dbbjW2A9r3g40VA++mQpy6uuHg33gy7du2BKpog==", + "dev": true + }, + "node_modules/@types/cors": { + "version": "2.8.12", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", + "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", + "dev": true + }, "node_modules/@types/debug": { "version": "4.1.7", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", @@ -1118,15 +1257,6 @@ "@types/ms": "*" } }, - "node_modules/@types/engine.io": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/@types/engine.io/-/engine.io-3.1.7.tgz", - "integrity": "sha512-qNjVXcrp+1sS8YpRUa714r0pgzOwESdW5UjHL7D/2ZFdBX0BXUXtg1LUrp+ylvqbvMcMWUy73YpRoxPN2VoKAQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/express": { "version": "4.17.14", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz", @@ -1157,12 +1287,6 @@ "dev": true, "optional": true }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -1190,15 +1314,6 @@ "@types/node": "*" } }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/lodash": { "version": "4.14.185", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.185.tgz", @@ -1241,15 +1356,6 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", "dev": true }, - "node_modules/@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/serve-static": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz", @@ -1260,31 +1366,14 @@ "@types/node": "*" } }, - "node_modules/@types/socket.io": { - "version": "2.1.13", - "resolved": "https://registry.npmjs.org/@types/socket.io/-/socket.io-2.1.13.tgz", - "integrity": "sha512-JRgH3nCgsWel4OPANkhH8TelpXvacAJ9VeryjuqCDiaVDMpLysd6sbt0dr6Z15pqH3p2YpOT3T1C5vQ+O/7uyg==", + "node_modules/@types/superagent": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.15.tgz", + "integrity": "sha512-mu/N4uvfDN2zVQQ5AYJI/g4qxn2bHB6521t1UuH09ShNWjebTqN0ZFuYK9uYjcgmI0dTQEs+Owi1EO6U0OkOZQ==", "dev": true, "dependencies": { - "@types/engine.io": "*", - "@types/node": "*", - "@types/socket.io-parser": "*" - } - }, - "node_modules/@types/socket.io-client": { - "version": "1.4.36", - "resolved": "https://registry.npmjs.org/@types/socket.io-client/-/socket.io-client-1.4.36.tgz", - "integrity": "sha512-ZJWjtFBeBy1kRSYpVbeGYTElf6BqPQUkXDlHHD4k/42byCN5Rh027f4yARHCink9sKAkbtGZXEAmR0ZCnc2/Ag==", - "dev": true - }, - "node_modules/@types/socket.io-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/socket.io-parser/-/socket.io-parser-3.0.0.tgz", - "integrity": "sha512-Ry/rbTE6HQNL9eu3LpL1Ocup5VexXu1bSSGlSho/IR5LuRc8YvxwSNJ3JxqTltVJEATLbZkMQETSbxfKNgp4Ew==", - "deprecated": "This is a stub types definition. socket.io-parser provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "socket.io-parser": "*" + "@types/cookiejar": "*", + "@types/node": "*" } }, "node_modules/@types/traverse": { @@ -1316,16 +1405,15 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz", - "integrity": "sha512-Fde6W0IafXktz1UlnhGkrrmnnGpAo1kyX7dnyHHVrmwJOn72Oqm3eYtddrpOwwel2W8PAK9F3pIL5S+lfoM0og==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.38.0.tgz", + "integrity": "sha512-GgHi/GNuUbTOeoJiEANi0oI6fF3gBQc3bGFYj40nnAPCbhrtEDf2rjBmefFadweBmO1Du1YovHeDP2h5JLhtTQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.37.0", - "@typescript-eslint/type-utils": "5.37.0", - "@typescript-eslint/utils": "5.37.0", + "@typescript-eslint/scope-manager": "5.38.0", + "@typescript-eslint/type-utils": "5.38.0", + "@typescript-eslint/utils": "5.38.0", "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", "regexpp": "^3.2.0", "semver": "^7.3.7", @@ -1349,14 +1437,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.37.0.tgz", - "integrity": "sha512-01VzI/ipYKuaG5PkE5+qyJ6m02fVALmMPY3Qq5BHflDx3y4VobbLdHQkSMg9VPRS4KdNt4oYTMaomFoHonBGAw==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.38.0.tgz", + "integrity": "sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.37.0", - "@typescript-eslint/types": "5.37.0", - "@typescript-eslint/typescript-estree": "5.37.0", + "@typescript-eslint/scope-manager": "5.38.0", + "@typescript-eslint/types": "5.38.0", + "@typescript-eslint/typescript-estree": "5.38.0", "debug": "^4.3.4" }, "engines": { @@ -1376,13 +1464,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz", - "integrity": "sha512-F67MqrmSXGd/eZnujjtkPgBQzgespu/iCZ+54Ok9X5tALb9L2v3G+QBSoWkXG0p3lcTJsL+iXz5eLUEdSiJU9Q==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.38.0.tgz", + "integrity": "sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.37.0", - "@typescript-eslint/visitor-keys": "5.37.0" + "@typescript-eslint/types": "5.38.0", + "@typescript-eslint/visitor-keys": "5.38.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1393,13 +1481,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz", - "integrity": "sha512-BSx/O0Z0SXOF5tY0bNTBcDEKz2Ec20GVYvq/H/XNKiUorUFilH7NPbFUuiiyzWaSdN3PA8JV0OvYx0gH/5aFAQ==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.38.0.tgz", + "integrity": "sha512-iZq5USgybUcj/lfnbuelJ0j3K9dbs1I3RICAJY9NZZpDgBYXmuUlYQGzftpQA9wC8cKgtS6DASTvF3HrXwwozA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.37.0", - "@typescript-eslint/utils": "5.37.0", + "@typescript-eslint/typescript-estree": "5.38.0", + "@typescript-eslint/utils": "5.38.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1420,9 +1508,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.37.0.tgz", - "integrity": "sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.38.0.tgz", + "integrity": "sha512-HHu4yMjJ7i3Cb+8NUuRCdOGu2VMkfmKyIJsOr9PfkBVYLYrtMCK/Ap50Rpov+iKpxDTfnqvDbuPLgBE5FwUNfA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1433,13 +1521,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz", - "integrity": "sha512-JkFoFIt/cx59iqEDSgIGnQpCTRv96MQnXCYvJi7QhBC24uyuzbD8wVbajMB1b9x4I0octYFJ3OwjAwNqk1AjDA==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.0.tgz", + "integrity": "sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.37.0", - "@typescript-eslint/visitor-keys": "5.37.0", + "@typescript-eslint/types": "5.38.0", + "@typescript-eslint/visitor-keys": "5.38.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1460,15 +1548,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.37.0.tgz", - "integrity": "sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.38.0.tgz", + "integrity": "sha512-6sdeYaBgk9Fh7N2unEXGz+D+som2QCQGPAf1SxrkEr+Z32gMreQ0rparXTNGRRfYUWk/JzbGdcM8NSSd6oqnTA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.37.0", - "@typescript-eslint/types": "5.37.0", - "@typescript-eslint/typescript-estree": "5.37.0", + "@typescript-eslint/scope-manager": "5.38.0", + "@typescript-eslint/types": "5.38.0", + "@typescript-eslint/typescript-estree": "5.38.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1484,12 +1572,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz", - "integrity": "sha512-Hp7rT4cENBPIzMwrlehLW/28EVCOcE9U1Z1BQTc8EA8v5qpr7GRGuG+U58V5tTY48zvUOA3KHvw3rA8tY9fbdA==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.0.tgz", + "integrity": "sha512-MxnrdIyArnTi+XyFLR+kt/uNAcdOnmT+879os7qDRI+EYySR4crXJq9BXPfRzzLGq0wgxkwidrCJ9WCAoacm1w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.37.0", + "@typescript-eslint/types": "5.38.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1774,12 +1862,6 @@ "node": ">=0.4.0" } }, - "node_modules/after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==", - "dev": true - }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -2009,12 +2091,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true - }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -2024,27 +2100,12 @@ "node": "*" } }, - "node_modules/backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==", - "dev": true - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base64-arraybuffer": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", - "integrity": "sha512-a1eIFi4R9ySrbiMuyTGx5e92uRH5tQY6kArNcFaKBUleIoLjdjBg7Zxm3Mqm3Kmkf27HLR/1fnxX9q8GQ7Iavg==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -2089,12 +2150,6 @@ "node": ">=8" } }, - "node_modules/blob": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", - "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", - "dev": true - }, "node_modules/body-parser": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", @@ -2134,6 +2189,21 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/body-scroll-lock": { "version": "4.0.0-beta.0", "resolved": "https://registry.npmjs.org/body-scroll-lock/-/body-scroll-lock-4.0.0-beta.0.tgz", @@ -2468,57 +2538,20 @@ } }, "node_modules/cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.1.2.tgz", + "integrity": "sha512-N7F4os5ZI+8mWHSbeJmxn+qimf5uK3WU53FD1b298XLGtOLPpSA/1xAchfP4NJlDwqgaviZ0SQfxTQD0K6lr9w==", "dev": true, "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" + "get-stream": "^6.0.1", + "http-cache-semantics": "^4.1.0", + "keyv": "^4.5.0", + "mimic-response": "^4.0.0", + "normalize-url": "^7.1.0", + "responselike": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "dev": true, - "dependencies": { - "lowercase-keys": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=14.16" } }, "node_modules/call-bind": { @@ -2722,18 +2755,6 @@ "node": ">=0.8" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2789,24 +2810,6 @@ "node": "^12.20.0 || >=14" } }, - "node_modules/component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==", - "dev": true - }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "node_modules/component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==", - "dev": true - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2905,6 +2908,19 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -3218,77 +3234,34 @@ "node": ">=0.10.0" } }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/engine.io": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.6.0.tgz", - "integrity": "sha512-Kc8fo5bbg8F4a2f3HPHTEpGyq/IRIQpyeHu3H1ThR14XDD7VrLcsGBo16HUpahgp8YkHJDaU5gNxJZbuGcuueg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.0.tgz", + "integrity": "sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg==", "dev": true, "dependencies": { + "@types/cookie": "^0.4.1", + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "2.0.0", "cookie": "~0.4.1", - "debug": "~4.1.0", - "engine.io-parser": "~2.2.0", - "ws": "~7.4.2" + "cors": "~2.8.5", + "debug": "~4.3.1", + "engine.io-parser": "~5.0.3", + "ws": "~8.2.3" }, "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/engine.io-client": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.3.tgz", - "integrity": "sha512-qsgyc/CEhJ6cgMUwxRRtOndGVhIu5hpL5tR4umSpmX/MvkFoIxUTM7oFMDQumHNzlNLwSVy6qhstFPoWTf7dOw==", - "dev": true, - "dependencies": { - "component-emitter": "~1.3.0", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.2.0", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.6", - "parseuri": "0.0.6", - "ws": "~7.4.2", - "xmlhttprequest-ssl": "~1.6.2", - "yeast": "0.1.2" - } - }, - "node_modules/engine.io-client/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "dependencies": { - "ms": "2.0.0" + "node": ">=10.0.0" } }, - "node_modules/engine.io-client/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, "node_modules/engine.io-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz", - "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", + "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", "dev": true, - "dependencies": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.4", - "blob": "0.0.5", - "has-binary2": "~1.0.2" + "engines": { + "node": ">=10.0.0" } }, "node_modules/engine.io/node_modules/cookie": { @@ -3300,16 +3273,6 @@ "node": ">= 0.6" } }, - "node_modules/engine.io/node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, "node_modules/env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", @@ -3389,9 +3352,9 @@ } }, "node_modules/esbuild": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.7.tgz", - "integrity": "sha512-7V8tzllIbAQV1M4QoE52ImKu8hT/NLGlGXkiDsbEU5PS6K8Mn09ZnYoS+dcmHxOS9CRsV4IRAMdT3I67IyUNXw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.8.tgz", + "integrity": "sha512-Remsk2dmr1Ia65sU+QasE6svJbsHe62lzR+CnjpUvbZ+uSYo1SitiOWPRfZQkCu82YWZBBKXiD/j0i//XWMZ+Q==", "dev": true, "hasInstallScript": true, "bin": { @@ -3401,33 +3364,34 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/linux-loong64": "0.15.7", - "esbuild-android-64": "0.15.7", - "esbuild-android-arm64": "0.15.7", - "esbuild-darwin-64": "0.15.7", - "esbuild-darwin-arm64": "0.15.7", - "esbuild-freebsd-64": "0.15.7", - "esbuild-freebsd-arm64": "0.15.7", - "esbuild-linux-32": "0.15.7", - "esbuild-linux-64": "0.15.7", - "esbuild-linux-arm": "0.15.7", - "esbuild-linux-arm64": "0.15.7", - "esbuild-linux-mips64le": "0.15.7", - "esbuild-linux-ppc64le": "0.15.7", - "esbuild-linux-riscv64": "0.15.7", - "esbuild-linux-s390x": "0.15.7", - "esbuild-netbsd-64": "0.15.7", - "esbuild-openbsd-64": "0.15.7", - "esbuild-sunos-64": "0.15.7", - "esbuild-windows-32": "0.15.7", - "esbuild-windows-64": "0.15.7", - "esbuild-windows-arm64": "0.15.7" + "@esbuild/android-arm": "0.15.8", + "@esbuild/linux-loong64": "0.15.8", + "esbuild-android-64": "0.15.8", + "esbuild-android-arm64": "0.15.8", + "esbuild-darwin-64": "0.15.8", + "esbuild-darwin-arm64": "0.15.8", + "esbuild-freebsd-64": "0.15.8", + "esbuild-freebsd-arm64": "0.15.8", + "esbuild-linux-32": "0.15.8", + "esbuild-linux-64": "0.15.8", + "esbuild-linux-arm": "0.15.8", + "esbuild-linux-arm64": "0.15.8", + "esbuild-linux-mips64le": "0.15.8", + "esbuild-linux-ppc64le": "0.15.8", + "esbuild-linux-riscv64": "0.15.8", + "esbuild-linux-s390x": "0.15.8", + "esbuild-netbsd-64": "0.15.8", + "esbuild-openbsd-64": "0.15.8", + "esbuild-sunos-64": "0.15.8", + "esbuild-windows-32": "0.15.8", + "esbuild-windows-64": "0.15.8", + "esbuild-windows-arm64": "0.15.8" } }, "node_modules/esbuild-android-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.7.tgz", - "integrity": "sha512-p7rCvdsldhxQr3YHxptf1Jcd86dlhvc3EQmQJaZzzuAxefO9PvcI0GLOa5nCWem1AJ8iMRu9w0r5TG8pHmbi9w==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.8.tgz", + "integrity": "sha512-bVh8FIKOolF7/d4AMzt7xHlL0Ljr+mYKSHI39TJWDkybVWHdn6+4ODL3xZGHOxPpdRpitemXA1WwMKYBsw8dGw==", "cpu": [ "x64" ], @@ -3436,14 +3400,17 @@ "os": [ "android" ], + "dependencies": { + "esbuild-wasm": "0.15.8" + }, "engines": { "node": ">=12" } }, "node_modules/esbuild-android-arm64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.7.tgz", - "integrity": "sha512-L775l9ynJT7rVqRM5vo+9w5g2ysbOCfsdLV4CWanTZ1k/9Jb3IYlQ06VCI1edhcosTYJRECQFJa3eAvkx72eyQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.8.tgz", + "integrity": "sha512-ReAMDAHuo0H1h9LxRabI6gwYPn8k6WiUeyxuMvx17yTrJO+SCnIfNc/TSPFvDwtK9MiyiKG/2dBYHouT/M0BXQ==", "cpu": [ "arm64" ], @@ -3457,9 +3424,9 @@ } }, "node_modules/esbuild-darwin-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.7.tgz", - "integrity": "sha512-KGPt3r1c9ww009t2xLB6Vk0YyNOXh7hbjZ3EecHoVDxgtbUlYstMPDaReimKe6eOEfyY4hBEEeTvKwPsiH5WZg==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.8.tgz", + "integrity": "sha512-KaKcGfJ+yto7Fo5gAj3xwxHMd1fBIKatpCHK8znTJLVv+9+NN2/tIPBqA4w5rBwjX0UqXDeIE2v1xJP+nGEXgA==", "cpu": [ "x64" ], @@ -3473,9 +3440,9 @@ } }, "node_modules/esbuild-darwin-arm64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.7.tgz", - "integrity": "sha512-kBIHvtVqbSGajN88lYMnR3aIleH3ABZLLFLxwL2stiuIGAjGlQW741NxVTpUHQXUmPzxi6POqc9npkXa8AcSZQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.8.tgz", + "integrity": "sha512-8tjEaBgAKnXCkP7bhEJmEqdG9HEV6oLkF36BrMzpfW2rgaw0c48Zrxe+9RlfeGvs6gDF4w+agXyTjikzsS3izw==", "cpu": [ "arm64" ], @@ -3489,9 +3456,9 @@ } }, "node_modules/esbuild-freebsd-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.7.tgz", - "integrity": "sha512-hESZB91qDLV5MEwNxzMxPfbjAhOmtfsr9Wnuci7pY6TtEh4UDuevmGmkUIjX/b+e/k4tcNBMf7SRQ2mdNuK/HQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.8.tgz", + "integrity": "sha512-jaxcsGHYzn2L0/lffON2WfH4Nc+d/EwozVTP5K2v016zxMb5UQMhLoJzvLgBqHT1SG0B/mO+a+THnJCMVg15zw==", "cpu": [ "x64" ], @@ -3505,9 +3472,9 @@ } }, "node_modules/esbuild-freebsd-arm64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.7.tgz", - "integrity": "sha512-dLFR0ChH5t+b3J8w0fVKGvtwSLWCv7GYT2Y2jFGulF1L5HftQLzVGN+6pi1SivuiVSmTh28FwUhi9PwQicXI6Q==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.8.tgz", + "integrity": "sha512-2xp2UlljMvX8HExtcg7VHaeQk8OBU0CSl1j18B5CcZmSDkLF9p3utuMXIopG3a08fr9Hv+Dz6+seSXUow/G51w==", "cpu": [ "arm64" ], @@ -3521,9 +3488,9 @@ } }, "node_modules/esbuild-linux-32": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.7.tgz", - "integrity": "sha512-v3gT/LsONGUZcjbt2swrMjwxo32NJzk+7sAgtxhGx1+ZmOFaTRXBAi1PPfgpeo/J//Un2jIKm/I+qqeo4caJvg==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.8.tgz", + "integrity": "sha512-9u1E54BRz1FQMl86iaHK146+4ID2KYNxL3trLZT4QLLx3M7Q9n4lGG3lrzqUatGR2cKy8c33b0iaCzsItZWkFg==", "cpu": [ "ia32" ], @@ -3537,9 +3504,9 @@ } }, "node_modules/esbuild-linux-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.7.tgz", - "integrity": "sha512-LxXEfLAKwOVmm1yecpMmWERBshl+Kv5YJ/1KnyAr6HRHFW8cxOEsEfisD3sVl/RvHyW//lhYUVSuy9jGEfIRAQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.8.tgz", + "integrity": "sha512-4HxrsN9eUzJXdVGMTYA5Xler82FuZUu21bXKN42zcLHHNKCAMPUzD62I+GwDhsdgUBAUj0tRXDdsQHgaP6v0HA==", "cpu": [ "x64" ], @@ -3553,9 +3520,9 @@ } }, "node_modules/esbuild-linux-arm": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.7.tgz", - "integrity": "sha512-JKgAHtMR5f75wJTeuNQbyznZZa+pjiUHV7sRZp42UNdyXC6TiUYMW/8z8yIBAr2Fpad8hM1royZKQisqPABPvQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.8.tgz", + "integrity": "sha512-7DVBU9SFjX4+vBwt8tHsUCbE6Vvl6y6FQWHAgyw1lybC5gULqn/WnjHYHN2/LJaZRsDBvxWT4msEgwLGq1Wd3Q==", "cpu": [ "arm" ], @@ -3569,9 +3536,9 @@ } }, "node_modules/esbuild-linux-arm64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.7.tgz", - "integrity": "sha512-P3cfhudpzWDkglutWgXcT2S7Ft7o2e3YDMrP1n0z2dlbUZghUkKCyaWw0zhp4KxEEzt/E7lmrtRu/pGWnwb9vw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.8.tgz", + "integrity": "sha512-1OCm7Aq0tEJT70PbxmHSGYDLYP8DKH8r4Nk7/XbVzWaduo9beCjGBB+tGZIHK6DdTQ3h00/4Tb/70YMH/bOtKg==", "cpu": [ "arm64" ], @@ -3585,9 +3552,9 @@ } }, "node_modules/esbuild-linux-mips64le": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.7.tgz", - "integrity": "sha512-T7XKuxl0VpeFLCJXub6U+iybiqh0kM/bWOTb4qcPyDDwNVhLUiPcGdG2/0S7F93czUZOKP57YiLV8YQewgLHKw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.8.tgz", + "integrity": "sha512-yeFoNPVFPEzZvFYBfUQNG2TjGRaCyV1E27OcOg4LOtnGrxb2wA+mkW3luckyv1CEyd00mpAg7UdHx8nlx3ghgA==", "cpu": [ "mips64el" ], @@ -3601,9 +3568,9 @@ } }, "node_modules/esbuild-linux-ppc64le": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.7.tgz", - "integrity": "sha512-6mGuC19WpFN7NYbecMIJjeQgvDb5aMuvyk0PDYBJrqAEMkTwg3Z98kEKuCm6THHRnrgsdr7bp4SruSAxEM4eJw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.8.tgz", + "integrity": "sha512-CEyMMUUNabXibw8OSNmBXhOIGhnjNVl5Lpseiuf00iKN0V47oqDrbo4dsHz1wH62m49AR8iG8wpDlTqfYgKbtg==", "cpu": [ "ppc64" ], @@ -3617,9 +3584,9 @@ } }, "node_modules/esbuild-linux-riscv64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.7.tgz", - "integrity": "sha512-uUJsezbswAYo/X7OU/P+PuL/EI9WzxsEQXDekfwpQ23uGiooxqoLFAPmXPcRAt941vjlY9jtITEEikWMBr+F/g==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.8.tgz", + "integrity": "sha512-OCGSOaspMUjexSCU8ZiA0UnV/NiRU+s2vIfEcAQWQ6u32R+2luyfh/4ZaY6jFbylJE07Esc/yRvb9Q5fXuClXA==", "cpu": [ "riscv64" ], @@ -3633,9 +3600,9 @@ } }, "node_modules/esbuild-linux-s390x": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.7.tgz", - "integrity": "sha512-+tO+xOyTNMc34rXlSxK7aCwJgvQyffqEM5MMdNDEeMU3ss0S6wKvbBOQfgd5jRPblfwJ6b+bKiz0g5nABpY0QQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.8.tgz", + "integrity": "sha512-RHdpdfxRTSrZXZJlFSLazFU4YwXLB5Rgf6Zr5rffqSsO4y9JybgtKO38bFwxZNlDXliYISXN/YROKrG9s7mZQA==", "cpu": [ "s390x" ], @@ -3649,9 +3616,9 @@ } }, "node_modules/esbuild-netbsd-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.7.tgz", - "integrity": "sha512-yVc4Wz+Pu3cP5hzm5kIygNPrjar/v5WCSoRmIjCPWfBVJkZNb5brEGKUlf+0Y759D48BCWa0WHrWXaNy0DULTQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.8.tgz", + "integrity": "sha512-VolFFRatBH09T5QMWhiohAWCOien1R1Uz9K0BRVVTBgBaVBt7eArsXTKxVhUgRf2vwu2c2SXkuP0r7HLG0eozw==", "cpu": [ "x64" ], @@ -3665,9 +3632,9 @@ } }, "node_modules/esbuild-openbsd-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.7.tgz", - "integrity": "sha512-GsimbwC4FSR4lN3wf8XmTQ+r8/0YSQo21rWDL0XFFhLHKlzEA4SsT1Tl8bPYu00IU6UWSJ+b3fG/8SB69rcuEQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.8.tgz", + "integrity": "sha512-HTAPlg+n4kUeE/isQxlCfsOz0xJGNoT5LJ9oYZWFKABfVf4Ycu7Zlf5ITgOnrdheTkz8JeL/gISIOCFAoOXrSA==", "cpu": [ "x64" ], @@ -3681,9 +3648,9 @@ } }, "node_modules/esbuild-sunos-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.7.tgz", - "integrity": "sha512-8CDI1aL/ts0mDGbWzjEOGKXnU7p3rDzggHSBtVryQzkSOsjCHRVe0iFYUuhczlxU1R3LN/E7HgUO4NXzGGP/Ag==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.8.tgz", + "integrity": "sha512-qMP/jR/FzcIOwKj+W+Lb+8Cfr8GZHbHUJxAPi7DUhNZMQ/6y7sOgRzlOSpRrbbUntrRZh0MqOyDhJ3Gpo6L1QA==", "cpu": [ "x64" ], @@ -3696,10 +3663,23 @@ "node": ">=12" } }, + "node_modules/esbuild-wasm": { + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.15.8.tgz", + "integrity": "sha512-Y7uCl5RNO4URjlemjdx++ukVHEMt5s5AfMWYUnMiK4Sry+pPCvQIctzXq6r6FKCyGKjX6/NGMCqR2OX6aLxj0w==", + "dev": true, + "optional": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/esbuild-windows-32": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.7.tgz", - "integrity": "sha512-cOnKXUEPS8EGCzRSFa1x6NQjGhGsFlVgjhqGEbLTPsA7x4RRYiy2RKoArNUU4iR2vHmzqS5Gr84MEumO/wxYKA==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.8.tgz", + "integrity": "sha512-RKR1QHh4iWzjUhkP8Yqi75PPz/KS+b8zw3wUrzw6oAkj+iU5Qtyj61ZDaSG3Qf2vc6hTIUiPqVTqBH0NpXFNwg==", "cpu": [ "ia32" ], @@ -3713,9 +3693,9 @@ } }, "node_modules/esbuild-windows-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.7.tgz", - "integrity": "sha512-7MI08Ec2sTIDv+zH6StNBKO+2hGUYIT42GmFyW6MBBWWtJhTcQLinKS6ldIN1d52MXIbiJ6nXyCJ+LpL4jBm3Q==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.8.tgz", + "integrity": "sha512-ag9ptYrsizgsR+PQE8QKeMqnosLvAMonQREpLw4evA4FFgOBMLEat/dY/9txbpozTw9eEOYyD3a4cE9yTu20FA==", "cpu": [ "x64" ], @@ -3729,9 +3709,9 @@ } }, "node_modules/esbuild-windows-arm64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.7.tgz", - "integrity": "sha512-R06nmqBlWjKHddhRJYlqDd3Fabx9LFdKcjoOy08YLimwmsswlFBJV4rXzZCxz/b7ZJXvrZgj8DDv1ewE9+StMw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.8.tgz", + "integrity": "sha512-dbpAb0VyPaUs9mgw65KRfQ9rqiWCHpNzrJusoPu+LpEoswosjt/tFxN7cd2l68AT4qWdBkzAjDLRon7uqMeWcg==", "cpu": [ "arm64" ], @@ -3839,6 +3819,18 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-config-prettier": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", + "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, "node_modules/eslint-import-resolver-node": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", @@ -3947,6 +3939,27 @@ "eslint": ">=2.0.0" } }, + "node_modules/eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -4204,11 +4217,32 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/express/node_modules/qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "node_modules/fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -4376,6 +4410,31 @@ "node": ">= 8" } }, + "node_modules/feathers-memory/node_modules/@feathersjs/commons": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-4.5.15.tgz", + "integrity": "sha512-eVEcLJL3GcPQBQcD77jI3fZ4MMx+iD02Px2Z1lDw+cn/iGCeQkWWAPQs4Tp+HGR1rTL5JO+unyhzN8V9X7OYmw==", + "dev": true, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/daffl" + } + }, + "node_modules/feathers-memory/node_modules/@feathersjs/errors": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-4.5.15.tgz", + "integrity": "sha512-EJAYWMsWZlUA/halbgZBc6eP2d3HPkHi5GzprYEK58GCh51KJ36VjX7VKVEnMjgBSED+PE00tpr3ZvUC4nUR+Q==", + "dev": true, + "dependencies": { + "debug": "^4.3.3" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/feathers-memory/node_modules/sift": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/sift/-/sift-8.5.1.tgz", @@ -4588,12 +4647,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -4786,18 +4839,17 @@ } }, "node_modules/got": { - "version": "12.4.1", - "resolved": "https://registry.npmjs.org/got/-/got-12.4.1.tgz", - "integrity": "sha512-Sz1ojLt4zGNkcftIyJKnulZT/yEDvifhUjccHA8QzOuTgPs/+njXYNMFE3jR4/2OODQSSbH8SdnoLCkbh41ieA==", + "version": "12.5.0", + "resolved": "https://registry.npmjs.org/got/-/got-12.5.0.tgz", + "integrity": "sha512-/Bneo/L6bLN1wDyJCeRZ3CLoixvwb9v3rE3IHulFSfTHwP85xSr4QatA8K0c6GlL5+mc4IZ57BzluNZJiXvHIg==", "dev": true, "dependencies": { "@sindresorhus/is": "^5.2.0", "@szmarczak/http-timer": "^5.0.1", - "@types/cacheable-request": "^6.0.2", "cacheable-lookup": "^6.0.4", - "cacheable-request": "^7.0.2", + "cacheable-request": "^10.1.2", "decompress-response": "^6.0.0", - "form-data-encoder": "^2.1.0", + "form-data-encoder": "^2.1.2", "get-stream": "^6.0.1", "http2-wrapper": "^2.1.10", "lowercase-keys": "^3.0.0", @@ -4870,21 +4922,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, - "dependencies": { - "isarray": "2.0.1" - } - }, - "node_modules/has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==", - "dev": true - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -5190,12 +5227,6 @@ "node": ">=8" } }, - "node_modules/indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==", - "dev": true - }, "node_modules/infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", @@ -5589,14 +5620,8 @@ "integrity": "sha512-HneQBCrXGBy15QnaDfcn6OLoU8AQPAa0Qn0IeJR/QCo4E8dNZaGGwxpCwWyEBQC5QvFonP8d6t60iGpAHVAfNA==", "dev": true, "engines": { - "node": ">=12" - } - }, - "node_modules/isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==", - "dev": true + "node": ">=12" + } }, "node_modules/isexe": { "version": "2.0.0", @@ -5700,6 +5725,23 @@ "jju": "^1.1.0" } }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "node_modules/json-schema-to-ts": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-2.5.5.tgz", + "integrity": "sha512-GFD5t0fUnX/B0gE9xbHjxv2BwFXRJND2+OKoLoMElJ3XRJ7dOBlLT7KXpg96aETeZ0RJbAZOfqHALBf5k4aIIA==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "ts-algebra": "^1.1.1", + "ts-toolbelt": "^9.6.0" + } + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -5928,24 +5970,12 @@ "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==", "dev": true }, - "node_modules/lodash.omit": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", - "integrity": "sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==", - "dev": true - }, "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", "dev": true }, - "node_modules/lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==", - "dev": true - }, "node_modules/lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -6182,12 +6212,15 @@ } }, "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", + "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", "dev": true, "engines": { - "node": ">=4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/minimatch": { @@ -6431,9 +6464,9 @@ "dev": true }, "node_modules/mongodb": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.9.1.tgz", - "integrity": "sha512-ZhgI/qBf84fD7sI4waZBoLBNJYPQN5IOC++SBCiPiyhzpNKOxN/fi0tBHvH2dEC42HXtNEbFB0zmNz4+oVtorQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.10.0.tgz", + "integrity": "sha512-My2QxLTw0Cc1O9gih0mz4mqo145Jq4rLAQx0Glk/Ha9iYBzYpt4I2QFNRIh35uNFNfe8KFQcdwY1/HKxXBkinw==", "dev": true, "dependencies": { "bson": "^4.7.0", @@ -6565,12 +6598,12 @@ } }, "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-7.1.0.tgz", + "integrity": "sha512-JgkdydFdLe1E5Q7DpLvKVyBZOOwXYGhIbMbOMm3lJ06XKzaiit+qo1HciO3z3IFklStfarzJHVQf9ZcNPTvZlw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12.20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6586,9 +6619,9 @@ } }, "node_modules/npm-check-updates": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.1.3.tgz", - "integrity": "sha512-cjFV+Mb5I5rZWVElJugp1cArdzlHQy6Tzi+1i6T72nzLNFN10x7OjA7iQXgFpqeN+U5Zwv8u0/XVCEWM9KxqhQ==", + "version": "16.2.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.2.1.tgz", + "integrity": "sha512-WPKs8BZeSQMFfK9ABk4ZtdcWYG1J9LjtQ8nOBZ2aZc0kejlJtBchZHkyezuQbWcJQDW06zyforgjG5/ts+zh4w==", "dev": true, "dependencies": { "chalk": "^5.0.1", @@ -7094,18 +7127,6 @@ "node": ">=0.10.0" } }, - "node_modules/parseqs": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", - "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", - "dev": true - }, - "node_modules/parseuri": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", - "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", - "dev": true - }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -7115,25 +7136,6 @@ "node": ">= 0.8" } }, - "node_modules/passport-jwt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/passport-jwt/-/passport-jwt-4.0.0.tgz", - "integrity": "sha512-BwC0n2GP/1hMVjR4QpnvqA61TxenUMlmfNjYNgK0ZAs0HK4SOQkHcSv4L328blNTLtHq7DbmvyNJiH+bn6C5Mg==", - "dev": true, - "dependencies": { - "jsonwebtoken": "^8.2.0", - "passport-strategy": "^1.0.0" - } - }, - "node_modules/passport-strategy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", - "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -7311,6 +7313,33 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/proc-log": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", @@ -7395,16 +7424,6 @@ "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", "dev": true }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -7429,9 +7448,9 @@ } }, "node_modules/qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, "dependencies": { "side-channel": "^1.0.4" @@ -7475,12 +7494,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/radix-router": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/radix-router/-/radix-router-3.0.1.tgz", - "integrity": "sha512-jpHXHgP+ZmVzEfmZ7WVRSvc/EqMoAqYuMtBsHd9s47Hs9Iy8FDJhkweMrDH0wmdxanLzVIWhq0UpomLXNpW8tg==", - "dev": true - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -8173,70 +8186,28 @@ } }, "node_modules/socket.io": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.5.0.tgz", - "integrity": "sha512-gGunfS0od3VpwDBpGwVkzSZx6Aqo9uOcf1afJj2cKnKFAoyl16fvhpsUhmUFd4Ldbvl5JvRQed6eQw6oQp6n8w==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", + "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", "dev": true, "dependencies": { - "debug": "~4.1.0", - "engine.io": "~3.6.0", - "has-binary2": "~1.0.2", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.5.0", - "socket.io-parser": "~3.4.0" + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "debug": "~4.3.2", + "engine.io": "~6.2.0", + "socket.io-adapter": "~2.4.0", + "socket.io-parser": "~4.2.0" + }, + "engines": { + "node": ">=10.0.0" } }, "node_modules/socket.io-adapter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", - "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", - "dev": true - }, - "node_modules/socket.io-client": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.5.0.tgz", - "integrity": "sha512-lOO9clmdgssDykiOmVQQitwBAF3I6mYcQAo7hQ7AM6Ny5X7fp8hIJ3HcQs3Rjz4SoggoxA1OgrQyY8EgTbcPYw==", - "dev": true, - "dependencies": { - "backo2": "1.0.2", - "component-bind": "1.0.0", - "component-emitter": "~1.3.0", - "debug": "~3.1.0", - "engine.io-client": "~3.5.0", - "has-binary2": "~1.0.2", - "indexof": "0.0.1", - "parseqs": "0.0.6", - "parseuri": "0.0.6", - "socket.io-parser": "~3.3.0", - "to-array": "0.1.4" - } - }, - "node_modules/socket.io-client/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/socket.io-client/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", + "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==", "dev": true }, - "node_modules/socket.io-client/node_modules/socket.io-parser": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.2.tgz", - "integrity": "sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg==", - "dev": true, - "dependencies": { - "component-emitter": "~1.3.0", - "debug": "~3.1.0", - "isarray": "2.0.1" - } - }, "node_modules/socket.io-parser": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", @@ -8250,33 +8221,6 @@ "node": ">=10.0.0" } }, - "node_modules/socket.io/node_modules/component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==", - "dev": true - }, - "node_modules/socket.io/node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/socket.io/node_modules/socket.io-parser": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz", - "integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==", - "dev": true, - "dependencies": { - "component-emitter": "1.2.1", - "debug": "~4.1.0", - "isarray": "2.0.1" - } - }, "node_modules/socks": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", @@ -8654,12 +8598,6 @@ "node": ">=0.8" } }, - "node_modules/to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==", - "dev": true - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -8707,6 +8645,15 @@ "tree-kill": "cli.js" } }, + "node_modules/ts-algebra": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-1.1.1.tgz", + "integrity": "sha512-W43a3/BN0Tp4SgRNERQF/QPVuY1rnHkgCr/fISLY0Ycu05P0NWPYRuViU8JFn+pFZuY6/zp9TgET1fxMzppR/Q==", + "dev": true, + "dependencies": { + "ts-toolbelt": "^9.6.0" + } + }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -8765,6 +8712,12 @@ "node": ">=0.3.1" } }, + "node_modules/ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "dev": true + }, "node_modules/tsconfig-paths": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", @@ -8974,6 +8927,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/uberproto/-/uberproto-2.0.6.tgz", "integrity": "sha512-68H97HffZoFaa3HFtpstahWorN9dSp5uTU6jo3GjIQ6JkJBR3hC2Nx/e/HFOoYHdUyT/Z1MRWfxN1EiQJZUyCQ==", + "dev": true, "engines": { "node": "*" } @@ -9114,9 +9068,9 @@ } }, "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", "dev": true, "bin": { "uuid": "dist/bin/uuid" @@ -9184,9 +9138,9 @@ } }, "node_modules/vite": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.1.tgz", - "integrity": "sha512-hgxQWev/AL7nWYrqByYo8nfcH9n97v6oFsta9+JX8h6cEkni7nHKP2kJleNYV2kcGhE8jsbaY1aStwPZXzPbgA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.3.tgz", + "integrity": "sha512-/3XWiktaopByM5bd8dqvHxRt5EEgRikevnnrpND0gRfNkrMrPaGGexhtLCzv15RcCMtV2CLw+BPas8YFeSG0KA==", "dev": true, "dependencies": { "esbuild": "^0.15.6", @@ -9240,9 +9194,9 @@ } }, "node_modules/vitepress": { - "version": "1.0.0-alpha.14", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.14.tgz", - "integrity": "sha512-GVwDeZPc/+5vgxOh0NfbKlk/QT4e20hRUdLdG+hEP8myJmM0IC4uIL7xK2G/wn6ucei9hLb0YQh677oDhCxF6g==", + "version": "1.0.0-alpha.15", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.15.tgz", + "integrity": "sha512-+pHJQCpnv0wVgLRyonisrj7Y77PVhbns2nTLxV9GkH3T+RTY/W2JmRatzBg5WciMaPyO8Ms6F3YElO5PULVv3w==", "dev": true, "dependencies": { "@docsearch/css": "^3.2.1", @@ -9525,12 +9479,12 @@ } }, "node_modules/ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", + "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", "dev": true, "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", @@ -9557,15 +9511,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/xmlhttprequest-ssl": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz", - "integrity": "sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -9653,12 +9598,6 @@ "node": ">=8" } }, - "node_modules/yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==", - "dev": true - }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", @@ -9884,10 +9823,20 @@ "algoliasearch": "^4.0.0" } }, + "@esbuild/android-arm": { + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.8.tgz", + "integrity": "sha512-CyEWALmn+no/lbgbAJsbuuhT8s2J19EJGHkeyAwjbFJMrj80KJ9zuYsoAvidPTU7BgBf87r/sgae8Tw0dbOc4Q==", + "dev": true, + "optional": true, + "requires": { + "esbuild-wasm": "0.15.8" + } + }, "@esbuild/linux-loong64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.7.tgz", - "integrity": "sha512-IKznSJOsVUuyt7cDzzSZyqBEcZe+7WlBqTVXiF1OXP/4Nm387ToaXZ0fyLwI1iBlI/bzpxVq411QE2/Bt2XWWw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.8.tgz", + "integrity": "sha512-pE5RQsOTSERCtfZdfCT25wzo7dfhOSlhAXcsZmuvRYhendOv7djcdvtINdnDp2DAjP17WXlBB4nBO6sHLczmsg==", "dev": true, "optional": true }, @@ -10059,143 +10008,218 @@ "@feathersjs/commons": "^4.5.15", "@feathersjs/errors": "^4.5.15", "@feathersjs/feathers": "^4.5.15" + }, + "dependencies": { + "@feathersjs/commons": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-4.5.15.tgz", + "integrity": "sha512-eVEcLJL3GcPQBQcD77jI3fZ4MMx+iD02Px2Z1lDw+cn/iGCeQkWWAPQs4Tp+HGR1rTL5JO+unyhzN8V9X7OYmw==", + "dev": true + }, + "@feathersjs/errors": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-4.5.15.tgz", + "integrity": "sha512-EJAYWMsWZlUA/halbgZBc6eP2d3HPkHi5GzprYEK58GCh51KJ36VjX7VKVEnMjgBSED+PE00tpr3ZvUC4nUR+Q==", + "dev": true, + "requires": { + "debug": "^4.3.3" + } + }, + "@feathersjs/feathers": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-4.5.15.tgz", + "integrity": "sha512-Q7sa1QAEhspYHsVEJPRg313bqjNaOhgvibiUxtjf3CGGJL9hVcAPLHQbrzsZuVTR4QwBATZSf6voEtuNmG/pIQ==", + "dev": true, + "requires": { + "@feathersjs/commons": "^4.5.15", + "debug": "^4.3.3", + "events": "^3.3.0", + "uberproto": "^2.0.6" + } + } } }, "@feathersjs/authentication": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-4.5.15.tgz", - "integrity": "sha512-zIlFstFBHVRqO4Pvf9NpCew9QPrgHP+eJgwzh6uKgDfNGUwAlO6OHqwuggJWiwrq6Kb9LJYQQyCnsRJ/5jVilA==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-5.0.0-pre.29.tgz", + "integrity": "sha512-vol00wb2b+zhvvkrbPkDqrMga5dSmLydzhixt+Sh3vY5jp7uWrWRqqrTXrysXLSfisQMGVFbTNNxc5maCU+pKg==", "dev": true, "requires": { - "@feathersjs/errors": "^4.5.15", - "@feathersjs/feathers": "^4.5.15", - "@feathersjs/transport-commons": "^4.5.15", - "@types/jsonwebtoken": "^8.5.6", - "debug": "^4.3.3", + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/schema": "^5.0.0-pre.29", + "@feathersjs/transport-commons": "^5.0.0-pre.29", + "@types/jsonwebtoken": "^8.5.9", "jsonwebtoken": "^8.5.1", "lodash": "^4.17.21", "long-timeout": "^0.1.1", - "uuid": "^8.3.2" + "uuid": "^9.0.0" } }, - "@feathersjs/authentication-jwt": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication-jwt/-/authentication-jwt-2.0.10.tgz", - "integrity": "sha512-4IVBXDa4w17rroWiSM6LpSzUVG9Za1x1t7fioSObYt60PTkY7QunZt77GkdWfTNLNFvV++VVZ5tGFN6kfIKqCA==", + "@feathersjs/authentication-client": { + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication-client/-/authentication-client-5.0.0-pre.29.tgz", + "integrity": "sha512-QcHlyOUGUqfgO+SIkFFASHzGdCrAX4yTI9i/4l6AKgWpPX2MoKnfWGOn8N/3xFR89pvnS3A9hU/NO0T8B0KVjw==", "dev": true, "requires": { - "@feathersjs/errors": "^3.3.6", - "debug": "^4.0.0", - "lodash.merge": "^4.6.0", - "lodash.omit": "^4.5.0", - "lodash.pick": "^4.4.0", - "passport-jwt": "^4.0.0" - }, - "dependencies": { - "@feathersjs/errors": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-3.3.6.tgz", - "integrity": "sha512-VCohY/AQU13xYyZGl6rfdUgE+2bjaI76a4aEb6reIphHKgb4mnjYlg2PzS1/hcU1qUNi515kY9yQa5HsE7J1dQ==", - "dev": true, - "requires": { - "debug": "^4.0.0" - } - } + "@feathersjs/authentication": "^5.0.0-pre.29", + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29" } }, "@feathersjs/authentication-local": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication-local/-/authentication-local-4.5.15.tgz", - "integrity": "sha512-5K+S6eAUVbrEqaL12yYjCP5dn+QXklVg/nJgBIkCfRp/uaTbQM4W7VQanrB9EgBwhX1p4EJhWkB/xeNam8qb5A==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication-local/-/authentication-local-5.0.0-pre.29.tgz", + "integrity": "sha512-j6o0iKz1dFTU5/pp7GGX53Vyo/lMLyBgm1A4ebihDVRBt2oXWRW2FUHLwGRANKrjUVR7F9s59XYz3OYhpbs+CA==", "dev": true, "requires": { - "@feathersjs/authentication": "^4.5.15", - "@feathersjs/errors": "^4.5.15", - "@feathersjs/feathers": "^4.5.15", + "@feathersjs/authentication": "^5.0.0-pre.29", + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", "bcryptjs": "^2.4.3", - "debug": "^4.3.3", "lodash": "^4.17.21" } }, "@feathersjs/client": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/client/-/client-4.5.15.tgz", - "integrity": "sha512-2xFnXofikWTlwrSVar+G4UjrzAS7ZGiFHYSpi6dk0C7IXh6Ooniv4U+vHSz/CLlb45d4hGN43nzEGAQTb6T4LQ==", - "dev": true + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/client/-/client-5.0.0-pre.29.tgz", + "integrity": "sha512-JfqNabQsw/kxj4RgfhA6lsuUmH1H8m1JxHCH98mfCWhCzE/r263ZqAOCSulvWL57VArdyR4a03rbV+jp/JTqqQ==", + "dev": true, + "requires": { + "@feathersjs/authentication-client": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/rest-client": "^5.0.0-pre.29", + "@feathersjs/socketio-client": "^5.0.0-pre.29" + } }, "@feathersjs/commons": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-4.5.15.tgz", - "integrity": "sha512-eVEcLJL3GcPQBQcD77jI3fZ4MMx+iD02Px2Z1lDw+cn/iGCeQkWWAPQs4Tp+HGR1rTL5JO+unyhzN8V9X7OYmw==" + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-5.0.0-pre.29.tgz", + "integrity": "sha512-BlGRPYPsMEANKrOM2fprmMixmyca9P3CNvJYxhGSaFZLt1+USAxFfx02d0/s8KkHtO+qEg2bz/TmR8BdsABrmg==" }, "@feathersjs/errors": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-4.5.15.tgz", - "integrity": "sha512-EJAYWMsWZlUA/halbgZBc6eP2d3HPkHi5GzprYEK58GCh51KJ36VjX7VKVEnMjgBSED+PE00tpr3ZvUC4nUR+Q==", - "requires": { - "debug": "^4.3.3" - } + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-5.0.0-pre.29.tgz", + "integrity": "sha512-0gb/px3/ict6FQ8ebqYAiqAxG2s+oLmrhs9Wr+4cnE96BlEH5lgyUTK0px7aDMFkkhjr25egtxBnM1RCoL36fg==" }, "@feathersjs/express": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-4.5.15.tgz", - "integrity": "sha512-5gNaXpDZFY0W8svZflDCdQILeiVFt532LiLHYhBJdMK/lMyttKl1Ul8ZjQ/WF4P8Wmp196bxeIUyiJpIdoCXbQ==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-5.0.0-pre.29.tgz", + "integrity": "sha512-47xpo0WXAhAagSAPwtPYFPDDTiy4o2bZMSU745otDhG0gXik26757QEnkS3OuZwdE0ztJGaH2IYv7AGQWbFSbA==", "dev": true, "requires": { - "@feathersjs/commons": "^4.5.15", - "@feathersjs/errors": "^4.5.15", + "@feathersjs/authentication": "^5.0.0-pre.29", + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/transport-commons": "^5.0.0-pre.29", "@types/express": "^4.17.13", - "debug": "^4.3.3", - "express": "^4.17.2", - "lodash": "^4.17.21", - "uberproto": "^2.0.6" + "@types/express-serve-static-core": "^4.17.30", + "cors": "^2.8.5", + "express": "^4.18.1" } }, "@feathersjs/feathers": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-4.5.15.tgz", - "integrity": "sha512-Q7sa1QAEhspYHsVEJPRg313bqjNaOhgvibiUxtjf3CGGJL9hVcAPLHQbrzsZuVTR4QwBATZSf6voEtuNmG/pIQ==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-5.0.0-pre.29.tgz", + "integrity": "sha512-cRuGDTlkqhKLgc23gV1ohZ0HjdsnrOBxDmp9pPBeTGuFT69fyqSuUJfcipfaF0hP3C0WDI//92wXfRblAod24g==", "requires": { - "@feathersjs/commons": "^4.5.15", - "debug": "^4.3.3", - "events": "^3.3.0", - "uberproto": "^2.0.6" + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/hooks": "^0.7.5", + "events": "^3.3.0" + } + }, + "@feathersjs/hooks": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@feathersjs/hooks/-/hooks-0.7.5.tgz", + "integrity": "sha512-xHbWPCJ5upr9eDdRSuJgWSKgCLN07YLvVjS7PdDqWrEz/iz5YBqoIQOzHhNPsWXOA6T7v+ArifrTUitG+ZzIRA==" + }, + "@feathersjs/rest-client": { + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/rest-client/-/rest-client-5.0.0-pre.29.tgz", + "integrity": "sha512-PgBIwEIEMocgFK4GIVyougNWKD+M38a3mg9e0dWxxZXBlERjX8A+Vavcbb84ZxAvQnG3H/IPD3zy8HNEOlt1ZA==", + "dev": true, + "requires": { + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@types/superagent": "^4.1.15", + "qs": "^6.11.0" + } + }, + "@feathersjs/schema": { + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/schema/-/schema-5.0.0-pre.29.tgz", + "integrity": "sha512-GIko7iC3mnemal4lxXvdFWtHuS2xvfb12AQruuaIQ2WiB7DyVn3HEENgaOj5RfI8mU+8jWjYozPE7oOjCKv0NQ==", + "dev": true, + "requires": { + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/hooks": "^0.7.5", + "@types/json-schema": "^7.0.11", + "ajv": "^8.11.0", + "json-schema": "^0.4.0", + "json-schema-to-ts": "^2.5.5" + }, + "dependencies": { + "ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } } }, "@feathersjs/socketio": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/socketio/-/socketio-4.5.15.tgz", - "integrity": "sha512-ma3mKeD7XC5su9pXWqbtauvDJgCXDms1tGZkY2mKET+P52zuqzhUyksPE1RLFu/Rpy28U77Uu39pAM9342hfDg==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/socketio/-/socketio-5.0.0-pre.29.tgz", + "integrity": "sha512-AV+buawaO58ZWj86V4EfXmn/wxae6H2CUfEo97X+OwEJULrmTdZLGAOrx5R5AQxzZYsPMA3YZZ9mRd5PVEEttg==", "dev": true, "requires": { - "@feathersjs/transport-commons": "^4.5.15", - "@types/socket.io": "^2.1.11", - "debug": "^4.3.3", - "socket.io": "^2.3.0", - "uberproto": "^2.0.6" + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/hooks": "^0.7.5", + "@feathersjs/transport-commons": "^5.0.0-pre.29", + "socket.io": "^4.5.2" } }, "@feathersjs/socketio-client": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/socketio-client/-/socketio-client-4.5.15.tgz", - "integrity": "sha512-jvhMr3h6HLUrKCYp7I7T6FhbPn+0dCmNZ27o2+eD8T9tYPMod9y9d5GHGx9jvVQIQ6r2dJ8iXhb03FQXgplZww==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/socketio-client/-/socketio-client-5.0.0-pre.29.tgz", + "integrity": "sha512-hbOsPBOdVCUUCfS8obCl0N5zn1LkJrKRryBi0IR2qRURnc992YqT7gBVfP705gzkTrEe58ETjm7qC0meA+FStw==", "dev": true, "requires": { - "@feathersjs/transport-commons": "^4.5.15", - "@types/socket.io-client": "^1.4.36" + "@feathersjs/transport-commons": "^5.0.0-pre.29" } }, "@feathersjs/transport-commons": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-4.5.15.tgz", - "integrity": "sha512-i9VqWq4VEASqvF+00kwIKhfvCU3tarLuywGMeN4zM3HXuuJKGIv6g0DAaZyWvgqhiuopZmMtHoP8mFRYIPxCEg==", + "version": "5.0.0-pre.29", + "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-5.0.0-pre.29.tgz", + "integrity": "sha512-jy0ltjjrPuMas6vukLMB/9lnjL6aKpSSpN0X8gWGbQqZBDJ6VE7AHDj+6eKdcPiEtWmkj3kZQ0pwbD9DzE7vhA==", "dev": true, "requires": { - "@feathersjs/commons": "^4.5.15", - "@feathersjs/errors": "^4.5.15", - "debug": "^4.3.3", - "lodash": "^4.17.21", - "radix-router": "^3.0.1" + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", + "encodeurl": "^1.0.2", + "lodash": "^4.17.21" } }, "@gar/promisify": { @@ -10467,18 +10491,6 @@ "@types/node": "*" } }, - "@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", - "dev": true, - "requires": { - "@types/http-cache-semantics": "*", - "@types/keyv": "*", - "@types/node": "*", - "@types/responselike": "*" - } - }, "@types/chai": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", @@ -10500,6 +10512,24 @@ "@types/node": "*" } }, + "@types/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "dev": true + }, + "@types/cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@types/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-t73xJJrvdTjXrn4jLS9VSGRbz0nUY3cl2DMGDU48lKl+HR9dbbjW2A9r3g40VA++mQpy6uuHg33gy7du2BKpog==", + "dev": true + }, + "@types/cors": { + "version": "2.8.12", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", + "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", + "dev": true + }, "@types/debug": { "version": "4.1.7", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", @@ -10509,15 +10539,6 @@ "@types/ms": "*" } }, - "@types/engine.io": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/@types/engine.io/-/engine.io-3.1.7.tgz", - "integrity": "sha512-qNjVXcrp+1sS8YpRUa714r0pgzOwESdW5UjHL7D/2ZFdBX0BXUXtg1LUrp+ylvqbvMcMWUy73YpRoxPN2VoKAQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/express": { "version": "4.17.14", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz", @@ -10548,12 +10569,6 @@ "dev": true, "optional": true }, - "@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, "@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -10581,15 +10596,6 @@ "@types/node": "*" } }, - "@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/lodash": { "version": "4.14.185", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.185.tgz", @@ -10630,16 +10636,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", - "dev": true - }, - "@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "dev": true, - "requires": { - "@types/node": "*" - } + "dev": true }, "@types/serve-static": { "version": "1.15.0", @@ -10651,30 +10648,14 @@ "@types/node": "*" } }, - "@types/socket.io": { - "version": "2.1.13", - "resolved": "https://registry.npmjs.org/@types/socket.io/-/socket.io-2.1.13.tgz", - "integrity": "sha512-JRgH3nCgsWel4OPANkhH8TelpXvacAJ9VeryjuqCDiaVDMpLysd6sbt0dr6Z15pqH3p2YpOT3T1C5vQ+O/7uyg==", - "dev": true, - "requires": { - "@types/engine.io": "*", - "@types/node": "*", - "@types/socket.io-parser": "*" - } - }, - "@types/socket.io-client": { - "version": "1.4.36", - "resolved": "https://registry.npmjs.org/@types/socket.io-client/-/socket.io-client-1.4.36.tgz", - "integrity": "sha512-ZJWjtFBeBy1kRSYpVbeGYTElf6BqPQUkXDlHHD4k/42byCN5Rh027f4yARHCink9sKAkbtGZXEAmR0ZCnc2/Ag==", - "dev": true - }, - "@types/socket.io-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/socket.io-parser/-/socket.io-parser-3.0.0.tgz", - "integrity": "sha512-Ry/rbTE6HQNL9eu3LpL1Ocup5VexXu1bSSGlSho/IR5LuRc8YvxwSNJ3JxqTltVJEATLbZkMQETSbxfKNgp4Ew==", + "@types/superagent": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.15.tgz", + "integrity": "sha512-mu/N4uvfDN2zVQQ5AYJI/g4qxn2bHB6521t1UuH09ShNWjebTqN0ZFuYK9uYjcgmI0dTQEs+Owi1EO6U0OkOZQ==", "dev": true, "requires": { - "socket.io-parser": "*" + "@types/cookiejar": "*", + "@types/node": "*" } }, "@types/traverse": { @@ -10706,16 +10687,15 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz", - "integrity": "sha512-Fde6W0IafXktz1UlnhGkrrmnnGpAo1kyX7dnyHHVrmwJOn72Oqm3eYtddrpOwwel2W8PAK9F3pIL5S+lfoM0og==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.38.0.tgz", + "integrity": "sha512-GgHi/GNuUbTOeoJiEANi0oI6fF3gBQc3bGFYj40nnAPCbhrtEDf2rjBmefFadweBmO1Du1YovHeDP2h5JLhtTQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.37.0", - "@typescript-eslint/type-utils": "5.37.0", - "@typescript-eslint/utils": "5.37.0", + "@typescript-eslint/scope-manager": "5.38.0", + "@typescript-eslint/type-utils": "5.38.0", + "@typescript-eslint/utils": "5.38.0", "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", "regexpp": "^3.2.0", "semver": "^7.3.7", @@ -10723,53 +10703,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.37.0.tgz", - "integrity": "sha512-01VzI/ipYKuaG5PkE5+qyJ6m02fVALmMPY3Qq5BHflDx3y4VobbLdHQkSMg9VPRS4KdNt4oYTMaomFoHonBGAw==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.38.0.tgz", + "integrity": "sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.37.0", - "@typescript-eslint/types": "5.37.0", - "@typescript-eslint/typescript-estree": "5.37.0", + "@typescript-eslint/scope-manager": "5.38.0", + "@typescript-eslint/types": "5.38.0", + "@typescript-eslint/typescript-estree": "5.38.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz", - "integrity": "sha512-F67MqrmSXGd/eZnujjtkPgBQzgespu/iCZ+54Ok9X5tALb9L2v3G+QBSoWkXG0p3lcTJsL+iXz5eLUEdSiJU9Q==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.38.0.tgz", + "integrity": "sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.37.0", - "@typescript-eslint/visitor-keys": "5.37.0" + "@typescript-eslint/types": "5.38.0", + "@typescript-eslint/visitor-keys": "5.38.0" } }, "@typescript-eslint/type-utils": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz", - "integrity": "sha512-BSx/O0Z0SXOF5tY0bNTBcDEKz2Ec20GVYvq/H/XNKiUorUFilH7NPbFUuiiyzWaSdN3PA8JV0OvYx0gH/5aFAQ==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.38.0.tgz", + "integrity": "sha512-iZq5USgybUcj/lfnbuelJ0j3K9dbs1I3RICAJY9NZZpDgBYXmuUlYQGzftpQA9wC8cKgtS6DASTvF3HrXwwozA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.37.0", - "@typescript-eslint/utils": "5.37.0", + "@typescript-eslint/typescript-estree": "5.38.0", + "@typescript-eslint/utils": "5.38.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.37.0.tgz", - "integrity": "sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.38.0.tgz", + "integrity": "sha512-HHu4yMjJ7i3Cb+8NUuRCdOGu2VMkfmKyIJsOr9PfkBVYLYrtMCK/Ap50Rpov+iKpxDTfnqvDbuPLgBE5FwUNfA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz", - "integrity": "sha512-JkFoFIt/cx59iqEDSgIGnQpCTRv96MQnXCYvJi7QhBC24uyuzbD8wVbajMB1b9x4I0octYFJ3OwjAwNqk1AjDA==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.0.tgz", + "integrity": "sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.37.0", - "@typescript-eslint/visitor-keys": "5.37.0", + "@typescript-eslint/types": "5.38.0", + "@typescript-eslint/visitor-keys": "5.38.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -10778,26 +10758,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.37.0.tgz", - "integrity": "sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.38.0.tgz", + "integrity": "sha512-6sdeYaBgk9Fh7N2unEXGz+D+som2QCQGPAf1SxrkEr+Z32gMreQ0rparXTNGRRfYUWk/JzbGdcM8NSSd6oqnTA==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.37.0", - "@typescript-eslint/types": "5.37.0", - "@typescript-eslint/typescript-estree": "5.37.0", + "@typescript-eslint/scope-manager": "5.38.0", + "@typescript-eslint/types": "5.38.0", + "@typescript-eslint/typescript-estree": "5.38.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz", - "integrity": "sha512-Hp7rT4cENBPIzMwrlehLW/28EVCOcE9U1Z1BQTc8EA8v5qpr7GRGuG+U58V5tTY48zvUOA3KHvw3rA8tY9fbdA==", + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.0.tgz", + "integrity": "sha512-MxnrdIyArnTi+XyFLR+kt/uNAcdOnmT+879os7qDRI+EYySR4crXJq9BXPfRzzLGq0wgxkwidrCJ9WCAoacm1w==", "dev": true, "requires": { - "@typescript-eslint/types": "5.37.0", + "@typescript-eslint/types": "5.38.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -11009,12 +10989,6 @@ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==", - "dev": true - }, "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -11197,36 +11171,18 @@ "es-shim-unscopables": "^1.0.0" } }, - "arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true - }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==", - "dev": true - }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "base64-arraybuffer": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", - "integrity": "sha512-a1eIFi4R9ySrbiMuyTGx5e92uRH5tQY6kArNcFaKBUleIoLjdjBg7Zxm3Mqm3Kmkf27HLR/1fnxX9q8GQ7Iavg==", - "dev": true - }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -11251,12 +11207,6 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, - "blob": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", - "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", - "dev": true - }, "body-parser": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", @@ -11291,6 +11241,15 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true + }, + "qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } } } }, @@ -11540,44 +11499,17 @@ "dev": true }, "cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.1.2.tgz", + "integrity": "sha512-N7F4os5ZI+8mWHSbeJmxn+qimf5uK3WU53FD1b298XLGtOLPpSA/1xAchfP4NJlDwqgaviZ0SQfxTQD0K6lr9w==", "dev": true, "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - }, - "responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "dev": true, - "requires": { - "lowercase-keys": "^2.0.0" - } - } + "get-stream": "^6.0.1", + "http-cache-semantics": "^4.1.0", + "keyv": "^4.5.0", + "mimic-response": "^4.0.0", + "normalize-url": "^7.1.0", + "responselike": "^3.0.0" } }, "call-bind": { @@ -11723,15 +11655,6 @@ "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", "dev": true }, - "clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -11771,24 +11694,6 @@ "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", "dev": true }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -11876,6 +11781,16 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -12108,27 +12023,22 @@ } } }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, "engine.io": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.6.0.tgz", - "integrity": "sha512-Kc8fo5bbg8F4a2f3HPHTEpGyq/IRIQpyeHu3H1ThR14XDD7VrLcsGBo16HUpahgp8YkHJDaU5gNxJZbuGcuueg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.0.tgz", + "integrity": "sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg==", "dev": true, "requires": { + "@types/cookie": "^0.4.1", + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "2.0.0", "cookie": "~0.4.1", - "debug": "~4.1.0", - "engine.io-parser": "~2.2.0", - "ws": "~7.4.2" + "cors": "~2.8.5", + "debug": "~4.3.1", + "engine.io-parser": "~5.0.3", + "ws": "~8.2.3" }, "dependencies": { "cookie": { @@ -12136,66 +12046,14 @@ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", "dev": true - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "engine.io-client": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.3.tgz", - "integrity": "sha512-qsgyc/CEhJ6cgMUwxRRtOndGVhIu5hpL5tR4umSpmX/MvkFoIxUTM7oFMDQumHNzlNLwSVy6qhstFPoWTf7dOw==", - "dev": true, - "requires": { - "component-emitter": "~1.3.0", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.2.0", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.6", - "parseuri": "0.0.6", - "ws": "~7.4.2", - "xmlhttprequest-ssl": "~1.6.2", - "yeast": "0.1.2" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true } } }, "engine.io-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz", - "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", - "dev": true, - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.4", - "blob": "0.0.5", - "has-binary2": "~1.0.2" - } + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", + "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", + "dev": true }, "env-paths": { "version": "2.2.1", @@ -12261,171 +12119,182 @@ } }, "esbuild": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.7.tgz", - "integrity": "sha512-7V8tzllIbAQV1M4QoE52ImKu8hT/NLGlGXkiDsbEU5PS6K8Mn09ZnYoS+dcmHxOS9CRsV4IRAMdT3I67IyUNXw==", - "dev": true, - "requires": { - "@esbuild/linux-loong64": "0.15.7", - "esbuild-android-64": "0.15.7", - "esbuild-android-arm64": "0.15.7", - "esbuild-darwin-64": "0.15.7", - "esbuild-darwin-arm64": "0.15.7", - "esbuild-freebsd-64": "0.15.7", - "esbuild-freebsd-arm64": "0.15.7", - "esbuild-linux-32": "0.15.7", - "esbuild-linux-64": "0.15.7", - "esbuild-linux-arm": "0.15.7", - "esbuild-linux-arm64": "0.15.7", - "esbuild-linux-mips64le": "0.15.7", - "esbuild-linux-ppc64le": "0.15.7", - "esbuild-linux-riscv64": "0.15.7", - "esbuild-linux-s390x": "0.15.7", - "esbuild-netbsd-64": "0.15.7", - "esbuild-openbsd-64": "0.15.7", - "esbuild-sunos-64": "0.15.7", - "esbuild-windows-32": "0.15.7", - "esbuild-windows-64": "0.15.7", - "esbuild-windows-arm64": "0.15.7" + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.8.tgz", + "integrity": "sha512-Remsk2dmr1Ia65sU+QasE6svJbsHe62lzR+CnjpUvbZ+uSYo1SitiOWPRfZQkCu82YWZBBKXiD/j0i//XWMZ+Q==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.15.8", + "@esbuild/linux-loong64": "0.15.8", + "esbuild-android-64": "0.15.8", + "esbuild-android-arm64": "0.15.8", + "esbuild-darwin-64": "0.15.8", + "esbuild-darwin-arm64": "0.15.8", + "esbuild-freebsd-64": "0.15.8", + "esbuild-freebsd-arm64": "0.15.8", + "esbuild-linux-32": "0.15.8", + "esbuild-linux-64": "0.15.8", + "esbuild-linux-arm": "0.15.8", + "esbuild-linux-arm64": "0.15.8", + "esbuild-linux-mips64le": "0.15.8", + "esbuild-linux-ppc64le": "0.15.8", + "esbuild-linux-riscv64": "0.15.8", + "esbuild-linux-s390x": "0.15.8", + "esbuild-netbsd-64": "0.15.8", + "esbuild-openbsd-64": "0.15.8", + "esbuild-sunos-64": "0.15.8", + "esbuild-windows-32": "0.15.8", + "esbuild-windows-64": "0.15.8", + "esbuild-windows-arm64": "0.15.8" } }, "esbuild-android-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.7.tgz", - "integrity": "sha512-p7rCvdsldhxQr3YHxptf1Jcd86dlhvc3EQmQJaZzzuAxefO9PvcI0GLOa5nCWem1AJ8iMRu9w0r5TG8pHmbi9w==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.8.tgz", + "integrity": "sha512-bVh8FIKOolF7/d4AMzt7xHlL0Ljr+mYKSHI39TJWDkybVWHdn6+4ODL3xZGHOxPpdRpitemXA1WwMKYBsw8dGw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "esbuild-wasm": "0.15.8" + } }, "esbuild-android-arm64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.7.tgz", - "integrity": "sha512-L775l9ynJT7rVqRM5vo+9w5g2ysbOCfsdLV4CWanTZ1k/9Jb3IYlQ06VCI1edhcosTYJRECQFJa3eAvkx72eyQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.8.tgz", + "integrity": "sha512-ReAMDAHuo0H1h9LxRabI6gwYPn8k6WiUeyxuMvx17yTrJO+SCnIfNc/TSPFvDwtK9MiyiKG/2dBYHouT/M0BXQ==", "dev": true, "optional": true }, "esbuild-darwin-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.7.tgz", - "integrity": "sha512-KGPt3r1c9ww009t2xLB6Vk0YyNOXh7hbjZ3EecHoVDxgtbUlYstMPDaReimKe6eOEfyY4hBEEeTvKwPsiH5WZg==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.8.tgz", + "integrity": "sha512-KaKcGfJ+yto7Fo5gAj3xwxHMd1fBIKatpCHK8znTJLVv+9+NN2/tIPBqA4w5rBwjX0UqXDeIE2v1xJP+nGEXgA==", "dev": true, "optional": true }, "esbuild-darwin-arm64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.7.tgz", - "integrity": "sha512-kBIHvtVqbSGajN88lYMnR3aIleH3ABZLLFLxwL2stiuIGAjGlQW741NxVTpUHQXUmPzxi6POqc9npkXa8AcSZQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.8.tgz", + "integrity": "sha512-8tjEaBgAKnXCkP7bhEJmEqdG9HEV6oLkF36BrMzpfW2rgaw0c48Zrxe+9RlfeGvs6gDF4w+agXyTjikzsS3izw==", "dev": true, "optional": true }, "esbuild-freebsd-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.7.tgz", - "integrity": "sha512-hESZB91qDLV5MEwNxzMxPfbjAhOmtfsr9Wnuci7pY6TtEh4UDuevmGmkUIjX/b+e/k4tcNBMf7SRQ2mdNuK/HQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.8.tgz", + "integrity": "sha512-jaxcsGHYzn2L0/lffON2WfH4Nc+d/EwozVTP5K2v016zxMb5UQMhLoJzvLgBqHT1SG0B/mO+a+THnJCMVg15zw==", "dev": true, "optional": true }, "esbuild-freebsd-arm64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.7.tgz", - "integrity": "sha512-dLFR0ChH5t+b3J8w0fVKGvtwSLWCv7GYT2Y2jFGulF1L5HftQLzVGN+6pi1SivuiVSmTh28FwUhi9PwQicXI6Q==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.8.tgz", + "integrity": "sha512-2xp2UlljMvX8HExtcg7VHaeQk8OBU0CSl1j18B5CcZmSDkLF9p3utuMXIopG3a08fr9Hv+Dz6+seSXUow/G51w==", "dev": true, "optional": true }, "esbuild-linux-32": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.7.tgz", - "integrity": "sha512-v3gT/LsONGUZcjbt2swrMjwxo32NJzk+7sAgtxhGx1+ZmOFaTRXBAi1PPfgpeo/J//Un2jIKm/I+qqeo4caJvg==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.8.tgz", + "integrity": "sha512-9u1E54BRz1FQMl86iaHK146+4ID2KYNxL3trLZT4QLLx3M7Q9n4lGG3lrzqUatGR2cKy8c33b0iaCzsItZWkFg==", "dev": true, "optional": true }, "esbuild-linux-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.7.tgz", - "integrity": "sha512-LxXEfLAKwOVmm1yecpMmWERBshl+Kv5YJ/1KnyAr6HRHFW8cxOEsEfisD3sVl/RvHyW//lhYUVSuy9jGEfIRAQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.8.tgz", + "integrity": "sha512-4HxrsN9eUzJXdVGMTYA5Xler82FuZUu21bXKN42zcLHHNKCAMPUzD62I+GwDhsdgUBAUj0tRXDdsQHgaP6v0HA==", "dev": true, "optional": true }, "esbuild-linux-arm": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.7.tgz", - "integrity": "sha512-JKgAHtMR5f75wJTeuNQbyznZZa+pjiUHV7sRZp42UNdyXC6TiUYMW/8z8yIBAr2Fpad8hM1royZKQisqPABPvQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.8.tgz", + "integrity": "sha512-7DVBU9SFjX4+vBwt8tHsUCbE6Vvl6y6FQWHAgyw1lybC5gULqn/WnjHYHN2/LJaZRsDBvxWT4msEgwLGq1Wd3Q==", "dev": true, "optional": true }, "esbuild-linux-arm64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.7.tgz", - "integrity": "sha512-P3cfhudpzWDkglutWgXcT2S7Ft7o2e3YDMrP1n0z2dlbUZghUkKCyaWw0zhp4KxEEzt/E7lmrtRu/pGWnwb9vw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.8.tgz", + "integrity": "sha512-1OCm7Aq0tEJT70PbxmHSGYDLYP8DKH8r4Nk7/XbVzWaduo9beCjGBB+tGZIHK6DdTQ3h00/4Tb/70YMH/bOtKg==", "dev": true, "optional": true }, "esbuild-linux-mips64le": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.7.tgz", - "integrity": "sha512-T7XKuxl0VpeFLCJXub6U+iybiqh0kM/bWOTb4qcPyDDwNVhLUiPcGdG2/0S7F93czUZOKP57YiLV8YQewgLHKw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.8.tgz", + "integrity": "sha512-yeFoNPVFPEzZvFYBfUQNG2TjGRaCyV1E27OcOg4LOtnGrxb2wA+mkW3luckyv1CEyd00mpAg7UdHx8nlx3ghgA==", "dev": true, "optional": true }, "esbuild-linux-ppc64le": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.7.tgz", - "integrity": "sha512-6mGuC19WpFN7NYbecMIJjeQgvDb5aMuvyk0PDYBJrqAEMkTwg3Z98kEKuCm6THHRnrgsdr7bp4SruSAxEM4eJw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.8.tgz", + "integrity": "sha512-CEyMMUUNabXibw8OSNmBXhOIGhnjNVl5Lpseiuf00iKN0V47oqDrbo4dsHz1wH62m49AR8iG8wpDlTqfYgKbtg==", "dev": true, "optional": true }, "esbuild-linux-riscv64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.7.tgz", - "integrity": "sha512-uUJsezbswAYo/X7OU/P+PuL/EI9WzxsEQXDekfwpQ23uGiooxqoLFAPmXPcRAt941vjlY9jtITEEikWMBr+F/g==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.8.tgz", + "integrity": "sha512-OCGSOaspMUjexSCU8ZiA0UnV/NiRU+s2vIfEcAQWQ6u32R+2luyfh/4ZaY6jFbylJE07Esc/yRvb9Q5fXuClXA==", "dev": true, "optional": true }, "esbuild-linux-s390x": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.7.tgz", - "integrity": "sha512-+tO+xOyTNMc34rXlSxK7aCwJgvQyffqEM5MMdNDEeMU3ss0S6wKvbBOQfgd5jRPblfwJ6b+bKiz0g5nABpY0QQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.8.tgz", + "integrity": "sha512-RHdpdfxRTSrZXZJlFSLazFU4YwXLB5Rgf6Zr5rffqSsO4y9JybgtKO38bFwxZNlDXliYISXN/YROKrG9s7mZQA==", "dev": true, "optional": true }, "esbuild-netbsd-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.7.tgz", - "integrity": "sha512-yVc4Wz+Pu3cP5hzm5kIygNPrjar/v5WCSoRmIjCPWfBVJkZNb5brEGKUlf+0Y759D48BCWa0WHrWXaNy0DULTQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.8.tgz", + "integrity": "sha512-VolFFRatBH09T5QMWhiohAWCOien1R1Uz9K0BRVVTBgBaVBt7eArsXTKxVhUgRf2vwu2c2SXkuP0r7HLG0eozw==", "dev": true, "optional": true }, "esbuild-openbsd-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.7.tgz", - "integrity": "sha512-GsimbwC4FSR4lN3wf8XmTQ+r8/0YSQo21rWDL0XFFhLHKlzEA4SsT1Tl8bPYu00IU6UWSJ+b3fG/8SB69rcuEQ==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.8.tgz", + "integrity": "sha512-HTAPlg+n4kUeE/isQxlCfsOz0xJGNoT5LJ9oYZWFKABfVf4Ycu7Zlf5ITgOnrdheTkz8JeL/gISIOCFAoOXrSA==", "dev": true, "optional": true }, "esbuild-sunos-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.7.tgz", - "integrity": "sha512-8CDI1aL/ts0mDGbWzjEOGKXnU7p3rDzggHSBtVryQzkSOsjCHRVe0iFYUuhczlxU1R3LN/E7HgUO4NXzGGP/Ag==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.8.tgz", + "integrity": "sha512-qMP/jR/FzcIOwKj+W+Lb+8Cfr8GZHbHUJxAPi7DUhNZMQ/6y7sOgRzlOSpRrbbUntrRZh0MqOyDhJ3Gpo6L1QA==", + "dev": true, + "optional": true + }, + "esbuild-wasm": { + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.15.8.tgz", + "integrity": "sha512-Y7uCl5RNO4URjlemjdx++ukVHEMt5s5AfMWYUnMiK4Sry+pPCvQIctzXq6r6FKCyGKjX6/NGMCqR2OX6aLxj0w==", "dev": true, "optional": true }, "esbuild-windows-32": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.7.tgz", - "integrity": "sha512-cOnKXUEPS8EGCzRSFa1x6NQjGhGsFlVgjhqGEbLTPsA7x4RRYiy2RKoArNUU4iR2vHmzqS5Gr84MEumO/wxYKA==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.8.tgz", + "integrity": "sha512-RKR1QHh4iWzjUhkP8Yqi75PPz/KS+b8zw3wUrzw6oAkj+iU5Qtyj61ZDaSG3Qf2vc6hTIUiPqVTqBH0NpXFNwg==", "dev": true, "optional": true }, "esbuild-windows-64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.7.tgz", - "integrity": "sha512-7MI08Ec2sTIDv+zH6StNBKO+2hGUYIT42GmFyW6MBBWWtJhTcQLinKS6ldIN1d52MXIbiJ6nXyCJ+LpL4jBm3Q==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.8.tgz", + "integrity": "sha512-ag9ptYrsizgsR+PQE8QKeMqnosLvAMonQREpLw4evA4FFgOBMLEat/dY/9txbpozTw9eEOYyD3a4cE9yTu20FA==", "dev": true, "optional": true }, "esbuild-windows-arm64": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.7.tgz", - "integrity": "sha512-R06nmqBlWjKHddhRJYlqDd3Fabx9LFdKcjoOy08YLimwmsswlFBJV4rXzZCxz/b7ZJXvrZgj8DDv1ewE9+StMw==", + "version": "0.15.8", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.8.tgz", + "integrity": "sha512-dbpAb0VyPaUs9mgw65KRfQ9rqiWCHpNzrJusoPu+LpEoswosjt/tFxN7cd2l68AT4qWdBkzAjDLRon7uqMeWcg==", "dev": true, "optional": true }, @@ -12524,6 +12393,13 @@ } } }, + "eslint-config-prettier": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", + "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "dev": true, + "requires": {} + }, "eslint-import-resolver-node": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", @@ -12619,6 +12495,15 @@ "dev": true, "requires": {} }, + "eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -12796,6 +12681,15 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true + }, + "qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } } } }, @@ -12804,6 +12698,12 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -12948,6 +12848,21 @@ "sift": "^8.5.0" }, "dependencies": { + "@feathersjs/commons": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-4.5.15.tgz", + "integrity": "sha512-eVEcLJL3GcPQBQcD77jI3fZ4MMx+iD02Px2Z1lDw+cn/iGCeQkWWAPQs4Tp+HGR1rTL5JO+unyhzN8V9X7OYmw==", + "dev": true + }, + "@feathersjs/errors": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-4.5.15.tgz", + "integrity": "sha512-EJAYWMsWZlUA/halbgZBc6eP2d3HPkHi5GzprYEK58GCh51KJ36VjX7VKVEnMjgBSED+PE00tpr3ZvUC4nUR+Q==", + "dev": true, + "requires": { + "debug": "^4.3.3" + } + }, "sift": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/sift/-/sift-8.5.1.tgz", @@ -13112,12 +13027,6 @@ "functions-have-names": "^1.2.2" } }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -13247,18 +13156,17 @@ } }, "got": { - "version": "12.4.1", - "resolved": "https://registry.npmjs.org/got/-/got-12.4.1.tgz", - "integrity": "sha512-Sz1ojLt4zGNkcftIyJKnulZT/yEDvifhUjccHA8QzOuTgPs/+njXYNMFE3jR4/2OODQSSbH8SdnoLCkbh41ieA==", + "version": "12.5.0", + "resolved": "https://registry.npmjs.org/got/-/got-12.5.0.tgz", + "integrity": "sha512-/Bneo/L6bLN1wDyJCeRZ3CLoixvwb9v3rE3IHulFSfTHwP85xSr4QatA8K0c6GlL5+mc4IZ57BzluNZJiXvHIg==", "dev": true, "requires": { "@sindresorhus/is": "^5.2.0", "@szmarczak/http-timer": "^5.0.1", - "@types/cacheable-request": "^6.0.2", "cacheable-lookup": "^6.0.4", - "cacheable-request": "^7.0.2", + "cacheable-request": "^10.1.2", "decompress-response": "^6.0.0", - "form-data-encoder": "^2.1.0", + "form-data-encoder": "^2.1.2", "get-stream": "^6.0.1", "http2-wrapper": "^2.1.10", "lowercase-keys": "^3.0.0", @@ -13311,21 +13219,6 @@ "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, - "requires": { - "isarray": "2.0.1" - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==", - "dev": true - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -13546,12 +13439,6 @@ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==", - "dev": true - }, "infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", @@ -13822,12 +13709,6 @@ "integrity": "sha512-HneQBCrXGBy15QnaDfcn6OLoU8AQPAa0Qn0IeJR/QCo4E8dNZaGGwxpCwWyEBQC5QvFonP8d6t60iGpAHVAfNA==", "dev": true }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==", - "dev": true - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -13915,6 +13796,23 @@ "jju": "^1.1.0" } }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "json-schema-to-ts": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-2.5.5.tgz", + "integrity": "sha512-GFD5t0fUnX/B0gE9xbHjxv2BwFXRJND2+OKoLoMElJ3XRJ7dOBlLT7KXpg96aETeZ0RJbAZOfqHALBf5k4aIIA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "ts-algebra": "^1.1.1", + "ts-toolbelt": "^9.6.0" + } + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -14105,24 +14003,12 @@ "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==", "dev": true }, - "lodash.omit": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", - "integrity": "sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==", - "dev": true - }, "lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", "dev": true }, - "lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==", - "dev": true - }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -14309,9 +14195,9 @@ "dev": true }, "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", + "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", "dev": true }, "minimatch": { @@ -14506,9 +14392,9 @@ "dev": true }, "mongodb": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.9.1.tgz", - "integrity": "sha512-ZhgI/qBf84fD7sI4waZBoLBNJYPQN5IOC++SBCiPiyhzpNKOxN/fi0tBHvH2dEC42HXtNEbFB0zmNz4+oVtorQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.10.0.tgz", + "integrity": "sha512-My2QxLTw0Cc1O9gih0mz4mqo145Jq4rLAQx0Glk/Ha9iYBzYpt4I2QFNRIh35uNFNfe8KFQcdwY1/HKxXBkinw==", "dev": true, "requires": { "bson": "^4.7.0", @@ -14608,9 +14494,9 @@ "dev": true }, "normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-7.1.0.tgz", + "integrity": "sha512-JgkdydFdLe1E5Q7DpLvKVyBZOOwXYGhIbMbOMm3lJ06XKzaiit+qo1HciO3z3IFklStfarzJHVQf9ZcNPTvZlw==", "dev": true }, "npm-bundled": { @@ -14623,9 +14509,9 @@ } }, "npm-check-updates": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.1.3.tgz", - "integrity": "sha512-cjFV+Mb5I5rZWVElJugp1cArdzlHQy6Tzi+1i6T72nzLNFN10x7OjA7iQXgFpqeN+U5Zwv8u0/XVCEWM9KxqhQ==", + "version": "16.2.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.2.1.tgz", + "integrity": "sha512-WPKs8BZeSQMFfK9ABk4ZtdcWYG1J9LjtQ8nOBZ2aZc0kejlJtBchZHkyezuQbWcJQDW06zyforgjG5/ts+zh4w==", "dev": true, "requires": { "chalk": "^5.0.1", @@ -15004,40 +14890,12 @@ "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", "dev": true }, - "parseqs": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", - "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", - "dev": true - }, - "parseuri": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", - "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", - "dev": true - }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true }, - "passport-jwt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/passport-jwt/-/passport-jwt-4.0.0.tgz", - "integrity": "sha512-BwC0n2GP/1hMVjR4QpnvqA61TxenUMlmfNjYNgK0ZAs0HK4SOQkHcSv4L328blNTLtHq7DbmvyNJiH+bn6C5Mg==", - "dev": true, - "requires": { - "jsonwebtoken": "^8.2.0", - "passport-strategy": "^1.0.0" - } - }, - "passport-strategy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", - "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==", - "dev": true - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -15147,6 +15005,21 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, "proc-log": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", @@ -15213,16 +15086,6 @@ "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", "dev": true }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -15238,9 +15101,9 @@ } }, "qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, "requires": { "side-channel": "^1.0.4" @@ -15258,12 +15121,6 @@ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true }, - "radix-router": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/radix-router/-/radix-router-3.0.1.tgz", - "integrity": "sha512-jpHXHgP+ZmVzEfmZ7WVRSvc/EqMoAqYuMtBsHd9s47Hs9Iy8FDJhkweMrDH0wmdxanLzVIWhq0UpomLXNpW8tg==", - "dev": true - }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -15783,100 +15640,25 @@ "dev": true }, "socket.io": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.5.0.tgz", - "integrity": "sha512-gGunfS0od3VpwDBpGwVkzSZx6Aqo9uOcf1afJj2cKnKFAoyl16fvhpsUhmUFd4Ldbvl5JvRQed6eQw6oQp6n8w==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", + "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", "dev": true, "requires": { - "debug": "~4.1.0", - "engine.io": "~3.6.0", - "has-binary2": "~1.0.2", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.5.0", - "socket.io-parser": "~3.4.0" - }, - "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==", - "dev": true - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "socket.io-parser": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz", - "integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~4.1.0", - "isarray": "2.0.1" - } - } + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "debug": "~4.3.2", + "engine.io": "~6.2.0", + "socket.io-adapter": "~2.4.0", + "socket.io-parser": "~4.2.0" } }, "socket.io-adapter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", - "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", + "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==", "dev": true }, - "socket.io-client": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.5.0.tgz", - "integrity": "sha512-lOO9clmdgssDykiOmVQQitwBAF3I6mYcQAo7hQ7AM6Ny5X7fp8hIJ3HcQs3Rjz4SoggoxA1OgrQyY8EgTbcPYw==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "component-bind": "1.0.0", - "component-emitter": "~1.3.0", - "debug": "~3.1.0", - "engine.io-client": "~3.5.0", - "has-binary2": "~1.0.2", - "indexof": "0.0.1", - "parseqs": "0.0.6", - "parseuri": "0.0.6", - "socket.io-parser": "~3.3.0", - "to-array": "0.1.4" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "socket.io-parser": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.2.tgz", - "integrity": "sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg==", - "dev": true, - "requires": { - "component-emitter": "~1.3.0", - "debug": "~3.1.0", - "isarray": "2.0.1" - } - } - } - }, "socket.io-parser": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", @@ -16185,12 +15967,6 @@ "thenify": ">= 3.1.0 < 4" } }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==", - "dev": true - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -16226,6 +16002,15 @@ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true }, + "ts-algebra": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-1.1.1.tgz", + "integrity": "sha512-W43a3/BN0Tp4SgRNERQF/QPVuY1rnHkgCr/fISLY0Ycu05P0NWPYRuViU8JFn+pFZuY6/zp9TgET1fxMzppR/Q==", + "dev": true, + "requires": { + "ts-toolbelt": "^9.6.0" + } + }, "ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -16261,6 +16046,12 @@ } } }, + "ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "dev": true + }, "tsconfig-paths": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", @@ -16413,7 +16204,8 @@ "uberproto": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/uberproto/-/uberproto-2.0.6.tgz", - "integrity": "sha512-68H97HffZoFaa3HFtpstahWorN9dSp5uTU6jo3GjIQ6JkJBR3hC2Nx/e/HFOoYHdUyT/Z1MRWfxN1EiQJZUyCQ==" + "integrity": "sha512-68H97HffZoFaa3HFtpstahWorN9dSp5uTU6jo3GjIQ6JkJBR3hC2Nx/e/HFOoYHdUyT/Z1MRWfxN1EiQJZUyCQ==", + "dev": true }, "unbox-primitive": { "version": "1.0.2", @@ -16517,9 +16309,9 @@ "dev": true }, "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", "dev": true }, "v8-compile-cache-lib": { @@ -16577,9 +16369,9 @@ "dev": true }, "vite": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.1.tgz", - "integrity": "sha512-hgxQWev/AL7nWYrqByYo8nfcH9n97v6oFsta9+JX8h6cEkni7nHKP2kJleNYV2kcGhE8jsbaY1aStwPZXzPbgA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.3.tgz", + "integrity": "sha512-/3XWiktaopByM5bd8dqvHxRt5EEgRikevnnrpND0gRfNkrMrPaGGexhtLCzv15RcCMtV2CLw+BPas8YFeSG0KA==", "dev": true, "requires": { "esbuild": "^0.15.6", @@ -16601,9 +16393,9 @@ } }, "vitepress": { - "version": "1.0.0-alpha.14", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.14.tgz", - "integrity": "sha512-GVwDeZPc/+5vgxOh0NfbKlk/QT4e20hRUdLdG+hEP8myJmM0IC4uIL7xK2G/wn6ucei9hLb0YQh677oDhCxF6g==", + "version": "1.0.0-alpha.15", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.15.tgz", + "integrity": "sha512-+pHJQCpnv0wVgLRyonisrj7Y77PVhbns2nTLxV9GkH3T+RTY/W2JmRatzBg5WciMaPyO8Ms6F3YElO5PULVv3w==", "dev": true, "requires": { "@docsearch/css": "^3.2.1", @@ -16815,9 +16607,9 @@ } }, "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", + "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", "dev": true, "requires": {} }, @@ -16827,12 +16619,6 @@ "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", "dev": true }, - "xmlhttprequest-ssl": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz", - "integrity": "sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==", - "dev": true - }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -16898,12 +16684,6 @@ } } }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==", - "dev": true - }, "yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index f29b5ef1..f778b0d6 100644 --- a/package.json +++ b/package.json @@ -62,9 +62,9 @@ ], "dependencies": { "@feathers-plus/batch-loader": "^0.3.6", - "@feathersjs/commons": "^4.5.15", - "@feathersjs/errors": "^4.5.15", - "@feathersjs/feathers": "^4.5.15", + "@feathersjs/commons": "^5.0.0-pre.29", + "@feathersjs/errors": "^5.0.0-pre.29", + "@feathersjs/feathers": "^5.0.0-pre.29", "ajv": "^6.12.6", "debug": "^4.3.4", "graphql": "^16.6.0", @@ -74,40 +74,42 @@ "devDependencies": { "@feathers-plus/cache": "^1.4.0", "@feathers-plus/graphql": "^1.10.0", - "@feathersjs/authentication": "^4.5.15", - "@feathersjs/authentication-jwt": "^2.0.10", - "@feathersjs/authentication-local": "^4.5.15", - "@feathersjs/client": "^4.5.15", - "@feathersjs/express": "^4.5.15", - "@feathersjs/socketio": "^4.5.15", - "@feathersjs/socketio-client": "^4.5.15", + "@feathersjs/authentication": "^5.0.0-pre.29", + "@feathersjs/authentication-local": "^5.0.0-pre.29", + "@feathersjs/client": "^5.0.0-pre.29", + "@feathersjs/express": "^5.0.0-pre.29", + "@feathersjs/socketio": "^5.0.0-pre.29", + "@feathersjs/socketio-client": "^5.0.0-pre.29", "@types/chai": "^4.3.3", "@types/clone": "^2.1.1", "@types/debug": "^4.1.7", - "@types/lodash": "^4.14.184", + "@types/lodash": "^4.14.185", "@types/mocha": "^9.1.1", - "@types/node": "^18.7.14", + "@types/node": "^18.7.18", "@types/traverse": "^0.6.32", - "@typescript-eslint/eslint-plugin": "^5.36.1", - "@typescript-eslint/parser": "^5.36.1", + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", "c8": "^7.12.0", "chai": "^4.3.6", "clone": "^2.1.2", - "eslint": "^8.23.0", + "eslint": "^8.23.1", + "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-prefer-arrow": "^1.2.3", + "eslint-plugin-prettier": "^4.2.1", "feathers-memory": "^4.1.0", "mocha": "^10.0.0", - "mongodb": "^4.6.0", - "npm-check-updates": "^16.0.6", + "mongodb": "^4.9.1", + "npm-check-updates": "^16.1.3", + "prettier": "^2.7.1", "shx": "^0.3.4", "sift": "^16.0.0", "ts-node": "^10.9.1", "tsup": "^6.2.3", - "typescript": "^4.8.2", - "vitepress": "1.0.0-alpha.14" + "typescript": "^4.8.3", + "vitepress": "^1.0.0-alpha.14" }, "engines": { - "node": ">= 12" + "node": ">= 14" } } diff --git a/src/common/clone.ts b/src/common/clone.ts new file mode 100644 index 00000000..825ce060 --- /dev/null +++ b/src/common/clone.ts @@ -0,0 +1,3 @@ +export function clone(obj: any) { + return JSON.parse(JSON.stringify(obj)); +} diff --git a/src/common/index.ts b/src/common/index.ts index ad2eb095..d1efe961 100644 --- a/src/common/index.ts +++ b/src/common/index.ts @@ -1,8 +1,9 @@ -export function isPromise (p: any): p is Promise { +export function isPromise(p: any): p is Promise { return !!p && (typeof p === 'object' || typeof p === 'function') && typeof p.then === 'function'; } export { pluck } from './pluck'; export { setFields } from './set-fields'; export { transformItems } from './transform-items'; -export { traverse } from './traverse' +export { traverse } from './traverse'; +export { clone } from './clone'; diff --git a/src/common/pluck.ts b/src/common/pluck.ts index 01cdf6a1..5dc68c70 100755 --- a/src/common/pluck.ts +++ b/src/common/pluck.ts @@ -1,14 +1,14 @@ import _pick from 'lodash/pick.js'; -export function pluck > ( +export function pluck>( items: T, fieldNames: string[] -): Record -export function pluck > ( +): Record; +export function pluck>( items: T[], fieldNames: string[] -): Record[] -export function pluck > ( +): Record[]; +export function pluck>( items: T | T[], fieldNames: string[] ): Record | Record[] { @@ -16,8 +16,9 @@ export function pluck > ( return _pick(items, fieldNames); } - const pluckedItems = (Array.isArray(items) ? items : [items]) - .map(item => _pick(item, fieldNames)); + const pluckedItems = (Array.isArray(items) ? items : [items]).map(item => + _pick(item, fieldNames) + ); return pluckedItems; } diff --git a/src/common/set-fields.ts b/src/common/set-fields.ts index b120f4e5..5d3cf008 100755 --- a/src/common/set-fields.ts +++ b/src/common/set-fields.ts @@ -1,6 +1,6 @@ import _set from 'lodash/set.js'; -export function setFields > ( +export function setFields>( items: T | T[], fieldValue: any | (() => any), fieldNames: string[], diff --git a/src/common/transform-items.ts b/src/common/transform-items.ts index e1b3ae94..89869e2d 100755 --- a/src/common/transform-items.ts +++ b/src/common/transform-items.ts @@ -1,6 +1,6 @@ import _get from 'lodash/get.js'; -export function transformItems > ( +export function transformItems>( items: T | T[], fieldNames: string[], transformer: (item: T, fieldName: string, val: any) => void diff --git a/src/common/traverse.ts b/src/common/traverse.ts index f8d7e889..8b1b18fa 100755 --- a/src/common/traverse.ts +++ b/src/common/traverse.ts @@ -1,6 +1,6 @@ import traverser from 'traverse'; -export function traverse > ( +export function traverse>( items: T | T[], converter: (item: T) => void ) { diff --git a/src/hooks/act-on-dispatch.ts b/src/hooks/act-on-dispatch.ts index c5bb2bc7..893ffe07 100755 --- a/src/hooks/act-on-dispatch.ts +++ b/src/hooks/act-on-dispatch.ts @@ -1,29 +1,30 @@ -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; +import type { HookFunction } from '../types'; import { combine } from '../utils/combine'; /** * Runs a series of hooks which mutate context.data or context.result (the Feathers default). - * {@link https://hooks-common.feathersjs.com/hooks.html#actondefault} + * @see https://hooks-common.feathersjs.com/hooks.html#actondefault */ -export const actOnDefault = (...hooks: Hook[]) => actOn(undefined, ...hooks); +export const actOnDefault = (...hooks: HookFunction[]) => + actOn(undefined, ...hooks); /** * Runs a series of hooks which mutate context.dispatch. - * {@link https://hooks-common.feathersjs.com/hooks.html#actondispatch} + * @see https://hooks-common.feathersjs.com/hooks.html#actondispatch */ -export const actOnDispatch = (...hooks: Hook[]) => actOn('dispatch', ...hooks) +export const actOnDispatch = (...hooks: HookFunction[]) => + actOn('dispatch', ...hooks); -function actOn (what: any, ...hooks: any[]): Hook { - return (context: any) => { +function actOn(what: any, ...hooks: HookFunction[]) { + return async (context: H) => { + // @ts-ignore const currActOn = context.params._actOn; + // @ts-ignore context.params._actOn = what; - return combine(...hooks)(context) - // @ts-ignore - .then((newContext: any) => { - newContext.params._actOn = currActOn; - - return newContext; - }); + const newContext = await combine(...hooks)(context); + newContext.params._actOn = currActOn; + return newContext; }; } diff --git a/src/hooks/alter-items.ts b/src/hooks/alter-items.ts index f5b46737..9b9a50a1 100755 --- a/src/hooks/alter-items.ts +++ b/src/hooks/alter-items.ts @@ -1,18 +1,17 @@ -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; +import { BadRequest } from '@feathersjs/errors'; -import type { Hook, HookContext } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; import { isPromise } from '../common'; import { getItems } from '../utils/get-items'; import { replaceItems } from '../utils/replace-items'; /** * Make changes to data or result items. Very flexible. - * {@link https://hooks-common.feathersjs.com/hooks.html#alteritems} + * @see https://hooks-common.feathersjs.com/hooks.html#alteritems */ -export function alterItems ( - cb: (record: T, context: HookContext) => any -): Hook { +export function alterItems( + cb: (record: T, context: H) => any +) { if (!cb) { cb = () => {}; } @@ -21,7 +20,7 @@ export function alterItems ( throw new BadRequest('Function required. (alter)'); } - return (context: any) => { + return (context: H) => { let items = getItems(context); const isArray = Array.isArray(items); @@ -40,13 +39,12 @@ export function alterItems ( }; if (hasPromises) { - return Promise.all(results) - .then(values => { - values.forEach(setItem); + return Promise.all(results).then(values => { + values.forEach(setItem); - replaceItems(context, items); - return context; - }); + replaceItems(context, items); + return context; + }); } else { results.forEach(setItem); diff --git a/src/hooks/cache.ts b/src/hooks/cache.ts index 0b0774ea..8fc25ed3 100755 --- a/src/hooks/cache.ts +++ b/src/hooks/cache.ts @@ -1,23 +1,31 @@ -import type { Hook } from '@feathersjs/feathers'; -import type { CacheMap, CacheOptions } from '../types'; +import type { HookContext, Id } from '@feathersjs/feathers'; import { getItems } from '../utils/get-items'; +import { clone as defaultClone } from '../common/clone'; + +export type CacheMap = Map; + +export interface CacheOptions { + clone?(item: T): T; + makeCacheKey?(id: Id): string; +} const defaultMakeCacheKey = (key: any) => key; /** * Persistent, most-recently-used record cache for services. - * {@link https://hooks-common.feathersjs.com/hooks.html#cache} + * + * @see https://hooks-common.feathersjs.com/hooks.html#cache */ -export function cache ( +export function cache( cacheMap: CacheMap, - keyField?: K, - options?: CacheOptions -): Hook { + keyField?: string, + options?: CacheOptions +) { const clone = options?.clone || defaultClone; const makeCacheKey = options?.makeCacheKey || defaultMakeCacheKey; - return (context: any) => { - keyField = keyField || (context.service || {}).id; // Will be undefined on client + return (context: H) => { + keyField = keyField || context.service?.id; // Will be undefined on client let items = getItems(context); items = Array.isArray(items) ? items : [items]; @@ -31,10 +39,10 @@ export function cache ( const key = makeCacheKey(item[idName]); cacheMap.delete(key); }); - return; + return context; } - if (query.$select) return; + if (query.$select) return context; items.forEach((item: any) => { const idName = getIdName(keyField, item); @@ -42,41 +50,40 @@ export function cache ( cacheMap.set(key, clone(item)); }); - return; + return context; } switch (context.method) { - case 'find': // fall through - case 'remove': // skip remove in before remove - case 'create': - return; - case 'get': { - if (!Object.keys(query).length) { - const key = makeCacheKey(context.id); - const value = cacheMap.get(key); - if (value) context.result = value; - } - return context; - } default: // update, patch, remove - if (context.id) { - cacheMap.delete(context.id); - return; + case 'find': // fall through + case 'remove': // skip remove in before remove + case 'create': + return context; + case 'get': { + if (!Object.keys(query).length) { + const key = makeCacheKey(context.id); + const value = cacheMap.get(key); + if (value) context.result = value; + } + return context; } + default: // update, patch, remove + if (context.id) { + cacheMap.delete(context.id); + return context; + } - items.forEach((item: any) => { - const idName = getIdName(keyField, item); - const key = makeCacheKey(item[idName]); - cacheMap.delete(key); - }); + items.forEach((item: any) => { + const idName = getIdName(keyField, item); + const key = makeCacheKey(item[idName]); + cacheMap.delete(key); + }); } + + return context; }; } -function getIdName (keyField: any, item: any) { +function getIdName(keyField: any, item: any) { if (keyField) return keyField; - return ('_id' in item) ? '_id' : 'id'; -} - -function defaultClone (obj: any) { - return JSON.parse(JSON.stringify(obj)); + return '_id' in item ? '_id' : 'id'; } diff --git a/src/hooks/check-context-if.ts b/src/hooks/check-context-if.ts deleted file mode 100755 index 76f60c07..00000000 --- a/src/hooks/check-context-if.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { HookContext } from '@feathersjs/feathers'; -import type { MethodName, HookType } from '../types'; -import { checkContext } from '../utils/check-context'; - -/** - * Like checkContext, but only if the given type matches the hook's type. - * Restrict a hook to run for certain methods and method types. (Utility function.) - * {@link https://hooks-common.feathersjs.com/hooks.html#checkcontextif} - */ -export function checkContextIf ( - context: HookContext, - type: HookType, - methods: MethodName | MethodName[] | null, - label: string -) { - if (type && context.type === type) { - checkContext(context, type, methods, label); - } -} diff --git a/src/hooks/de-populate.ts b/src/hooks/de-populate.ts index 3b89d369..2a57d308 100755 --- a/src/hooks/de-populate.ts +++ b/src/hooks/de-populate.ts @@ -1,14 +1,14 @@ -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; import _omit from 'lodash/omit.js'; import { getItems } from '../utils/get-items'; import { replaceItems } from '../utils/replace-items'; /** * Remove records and properties created by the populate hook. - * {@link https://hooks-common.feathersjs.com/hooks.html#depopulate} + * @see https://hooks-common.feathersjs.com/hooks.html#depopulate */ -export function dePopulate (func?: any): Hook { - return (context: any) => { +export function dePopulate(func?: (item: any) => void) { + return (context: H) => { const items = getItems(context); const converter = (item: any) => { if (typeof func === 'function') { diff --git a/src/hooks/debug.ts b/src/hooks/debug.ts index 2d6fa0b3..318eed1c 100755 --- a/src/hooks/debug.ts +++ b/src/hooks/debug.ts @@ -1,24 +1,33 @@ /* eslint-disable no-console */ -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; /** * Display the current hook context for debugging. - * {@link https://hooks-common.feathersjs.com/hooks.html#debug} + * @see https://hooks-common.feathersjs.com/hooks.html#debug */ -export function debug (msg: string, ...fieldNames: string[]): Hook { - return (context: any) => { +export function debug(msg: string, ...fieldNames: string[]) { + return (context: H) => { console.log(`* ${msg || ''}\ntype:${context.type}, method: ${context.method}`); - if (context.data) { console.log('data:', context.data); } - if (context.params && context.params.query) { console.log('query:', context.params.query); } - if (context.result) { console.log('result:', context.result); } + if (context.data) { + console.log('data:', context.data); + } + if (context.params && context.params.query) { + console.log('query:', context.params.query); + } + if (context.result) { + console.log('result:', context.result); + } const params = context.params || {}; console.log('params props:', Object.keys(params).sort()); fieldNames.forEach(name => { + // @ts-ignore console.log(`params.${name}:`, params[name]); }); - if (context.error) { console.log('error', context.error); } + if (context.error) { + console.log('error', context.error); + } }; } diff --git a/src/hooks/disable-pagination.ts b/src/hooks/disable-pagination.ts index b0ee76dc..83d5d23c 100755 --- a/src/hooks/disable-pagination.ts +++ b/src/hooks/disable-pagination.ts @@ -1,16 +1,17 @@ -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; import { checkContext } from '../utils/check-context'; /** * Disables pagination when query.$limit is -1 or '-1'. - * {@link https://hooks-common.feathersjs.com/hooks.html#disablepagination} + * @see https://hooks-common.feathersjs.com/hooks.html#disablepagination */ -export function disablePagination (): Hook { - return function (context: any) { +export function disablePagination() { + return (context: H) => { checkContext(context, 'before', ['find'], 'disablePagination'); const $limit = (context.params.query || {}).$limit; if ($limit === '-1' || $limit === -1) { + // @ts-ignore context.params.paginate = false; delete context.params.query.$limit; } diff --git a/src/hooks/disallow.ts b/src/hooks/disallow.ts index 9bbbed9d..bb5c2c0c 100755 --- a/src/hooks/disallow.ts +++ b/src/hooks/disallow.ts @@ -1,21 +1,21 @@ -import errors from '@feathersjs/errors'; -const { MethodNotAllowed } = errors; -import type { Hook } from '@feathersjs/feathers'; +import { MethodNotAllowed } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; import type { TransportName } from '../types'; /** * Prevents access to a service method completely or for specific transports. - * {@link https://hooks-common.feathersjs.com/hooks.html#disallow} + * @see https://hooks-common.feathersjs.com/hooks.html#disallow */ -export function disallow (...transports: TransportName[]): Hook { - return (context: any) => { - const hookProvider = (context.params || {}).provider; +export function disallow(...transports: TransportName[]) { + return (context: H) => { + const hookProvider = context.params?.provider; const anyProvider = transports.length === 0; - const thisProvider = transports.some(provider => - provider === hookProvider || - (provider === 'server' && !hookProvider) || - (provider === 'external' && !!hookProvider) + const thisProvider = transports.some( + provider => + provider === hookProvider || + (provider === 'server' && !hookProvider) || + (provider === 'external' && !!hookProvider) ); if (anyProvider || thisProvider) { diff --git a/src/hooks/discard-query.ts b/src/hooks/discard-query.ts index 1f097660..e298680d 100755 --- a/src/hooks/discard-query.ts +++ b/src/hooks/discard-query.ts @@ -1,16 +1,16 @@ -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; import _omit from 'lodash/omit.js'; import { checkContext } from '../utils/check-context'; /** * Delete certain fields from the query object. - * {@link https://hooks-common.feathersjs.com/hooks.html#discardquery} + * @see https://hooks-common.feathersjs.com/hooks.html#discardquery */ -export function discardQuery (...fieldNames: string[]): Hook { - return (context: any) => { +export function discardQuery(...fieldNames: string[]) { + return (context: H) => { checkContext(context, 'before', null, 'discardQuery'); - const query = (context.params || {}).query || {}; + const query = context.params.query || {}; context.params.query = _omit(query, fieldNames); diff --git a/src/hooks/discard.ts b/src/hooks/discard.ts index 1f353ae1..5ad1c888 100755 --- a/src/hooks/discard.ts +++ b/src/hooks/discard.ts @@ -1,15 +1,15 @@ -import type { Hook } from '@feathersjs/feathers'; import _omit from 'lodash/omit.js'; -import { checkContextIf } from './check-context-if'; +import { checkContextIf } from '../utils/check-context-if'; import { getItems } from '../utils/get-items'; import { replaceItems } from '../utils/replace-items'; +import type { HookContext } from '@feathersjs/feathers'; /** * Delete certain fields from the record(s). - * {@link https://hooks-common.feathersjs.com/hooks.html#discard} + * @see https://hooks-common.feathersjs.com/hooks.html#discard */ -export function discard (...fieldNames: string[]): Hook { - return (context: any) => { +export function discard(...fieldNames: string[]) { + return (context: H) => { checkContextIf(context, 'before', ['create', 'update', 'patch'], 'discard'); const items = getItems(context); diff --git a/src/hooks/fast-join.ts b/src/hooks/fast-join.ts index f342ce0f..b18a35e8 100755 --- a/src/hooks/fast-join.ts +++ b/src/hooks/fast-join.ts @@ -1,5 +1,27 @@ -import type { Hook, Query } from '@feathersjs/feathers'; -import type { ResolverMap, SyncContextFunction } from '../types'; +import type { Application, HookContext, Query, Service } from '@feathersjs/feathers'; +import type { SyncContextFunction } from '../types'; + +export interface ResolverContext + extends HookContext { + _loaders: any; +} + +export type SimpleResolver = ( + ...args: any[] +) => (item: any, context: H) => Promise; + +export interface RecursiveResolver { + resolver: SimpleResolver; + joins: ResolverMap; +} + +export interface ResolverMap { + after?: (context: H) => void | Promise; + before?: (context: H) => void | Promise; + joins: { + [property: string]: SimpleResolver | RecursiveResolver; + }; +} /** * We often want to combine rows from two or more tables based on a relationship between them. The fastJoin hook @@ -15,15 +37,16 @@ import type { ResolverMap, SyncContextFunction } from '../types'; * fastJoin(postResolvers, query) * fastJoin(context => postResolvers) * fastJoin(postResolvers, context => query) // supports queries from client - * {@link https://hooks-common.feathersjs.com/hooks.html#fastjoin} + * @see https://hooks-common.feathersjs.com/hooks.html#fastjoin */ -export function fastJoin ( - resolvers: ResolverMap | SyncContextFunction>, - query?: Query | SyncContextFunction -): Hook { - return (context: any) => { +export function fastJoin( + resolvers: ResolverMap | SyncContextFunction, H>, + query?: Query | SyncContextFunction +) { + return (context: H) => { const { method, data, result, params } = context; + // @ts-ignore if (params._populate || params._graphql) return context; // our service called within another populate const q = typeof query === 'function' ? query(context) : query; @@ -36,20 +59,24 @@ export function fastJoin ( const prevLoaders = context._loaders; context._loaders = {}; - return Promise.resolve() - .then(() => before && before(context)) - .then(() => joins && results && recursive(joinsForQuery(joins2, q, context), results, context)) - .then(() => after && after(context)) - .then(() => { - context._loaders = prevLoaders; - return context; - }); + return ( + Promise.resolve() + // @ts-ignore + .then(() => before && before(context)) + .then( + () => joins && results && recursive(joinsForQuery(joins2, q, context), results, context) + ) + // @ts-ignore + .then(() => after && after(context)) + .then(() => { + context._loaders = prevLoaders; + return context; + }) + ); }; } -function joinsForQuery ({ - joins -}: any = {}, query: any = undefined, context = {}) { +function joinsForQuery({ joins }: any = {}, query: any = undefined, context = {}) { const runtime: any = []; Object.keys(joins).forEach(outerLabel => { @@ -62,7 +89,8 @@ function joinsForQuery ({ const { resolver } = join; let { joins: innerJoins } = join; - if (innerJoins && !innerJoins.resolver && innerJoins.joins) { // support embedded resolvers for other services + if (innerJoins && !innerJoins.resolver && innerJoins.joins) { + // support embedded resolvers for other services innerJoins = innerJoins.joins; } @@ -74,28 +102,27 @@ function joinsForQuery ({ runtime.push({ args, resolver, - joins: innerJoins ? joinsForQuery({ joins: innerJoins }, query ? query[outerLabel] : null, context) : null + joins: innerJoins + ? joinsForQuery({ joins: innerJoins }, query ? query[outerLabel] : null, context) + : null, }); }); return runtime; } -function recursive (joins: any, results: any, context: any) { - return Promise.all((Array.isArray(results) ? results : [results]).map( - result => Promise.all(joins.map( - ({ - args = [], - resolver, - joins - }: any) => { - return Promise.resolve(resolver(...args)(result, context)) - .then(addedResults => { +function recursive(joins: any, results: any, context: any) { + return Promise.all( + (Array.isArray(results) ? results : [results]).map(result => + Promise.all( + joins.map(({ args = [], resolver, joins }: any) => { + return Promise.resolve(resolver(...args)(result, context)).then(addedResults => { if (!addedResults || !joins) return context; return recursive(joins, addedResults, context); }); - } - )) - )); + }) + ) + ) + ); } diff --git a/src/hooks/fgraphql.ts b/src/hooks/fgraphql.ts index 5f9c0353..a3f8432d 100755 --- a/src/hooks/fgraphql.ts +++ b/src/hooks/fgraphql.ts @@ -1,39 +1,75 @@ -import type { Hook } from '@feathersjs/feathers'; +import type { Application, HookContext, Query } from '@feathersjs/feathers'; import makeDebug from 'debug'; -import type { FGraphQLHookOptions } from '../types'; +import type { parse, GraphQLFieldResolver } from 'graphql'; +import type { SyncContextFunction } from '../types'; import { getItems } from '../utils/get-items'; import { replaceItems } from '../utils/replace-items'; +export type FGraphQLResolverMapFactory = (app: Application, runtime: any) => FGraphQLResolverMap; + +export interface FGraphQLResolverMap { + [i: string]: { + [i: string]: GraphQLFieldResolver; + }; + Query: { + [i: string]: GraphQLFieldResolver; + }; +} + +export interface FGraphQLOptions { + skipHookWhen?: SyncContextFunction; + inclAllFieldsServer?: boolean; + inclAllFieldsClient?: boolean; + inclAllFields?: boolean; + inclJoinedNames?: boolean; + extraAuthProps?: string[]; +} + +export interface FGraphQLHookOptions { + recordType: string; + schema: string; + resolvers: FGraphQLResolverMap | FGraphQLResolverMapFactory; + query: Query | SyncContextFunction; + options?: FGraphQLOptions; + runTime: any; + parse: typeof parse; +} + const debug = makeDebug('fgraphql'); const graphqlActions = ['Query', 'Mutation', 'Subscription']; /** * Generate Graphql Resolvers for services - * {@link https://medium.com/@eddyystop/38faee75dd1} + * @see https://medium.com/@eddyystop/38faee75dd1 */ -export function fgraphql ( - options1: FGraphQLHookOptions -): Hook { +export function fgraphql(options1: FGraphQLHookOptions) { debug('init call'); const { parse, recordType, resolvers, runTime, query } = options1; let { schema } = options1; let ourResolvers: any; // will be initialized when hook is first called - const options = Object.assign({}, { - skipHookWhen: (context: any) => !!(context.params || {}).graphql, - inclAllFieldsServer: true, - inclAllFieldsClient: true, - inclAllFields: null, // Will be initialized each hook call. - inclJoinedNames: true, - extraAuthProps: [] - }, options1.options || {}); + const options = Object.assign( + {}, + { + skipHookWhen: (context: any) => !!(context.params || {}).graphql, + inclAllFieldsServer: true, + inclAllFieldsClient: true, + inclAllFields: null, // Will be initialized each hook call. + inclJoinedNames: true, + extraAuthProps: [], + }, + options1.options || {} + ); // @ts-ignore schema = isFunction(schema) ? schema() : schema; if (!isObject(schema) && !isString(schema)) { - throwError(`Resolved schema is typeof ${typeof schema} rather than string or object. (fgraphql)`, 101); + throwError( + `Resolved schema is typeof ${typeof schema} rather than string or object. (fgraphql)`, + 101 + ); } if (!isObject(runTime)) { @@ -47,19 +83,24 @@ export function fgraphql ( // @ts-ignore if (!isArray(options.extraAuthProps)) { // @ts-ignore - throwError(`option extraAuthProps is typeof ${typeof options.extraAuthProps} rather than array. (fgraphql)`, 105); + throwError( + `option extraAuthProps is typeof ${typeof options.extraAuthProps} rather than array. (fgraphql)`, + 105 + ); } const feathersSdl = isObject(schema) ? schema : convertSdlToFeathersSchemaObject(schema, parse); debug('schema now in internal form'); // Return the hook. - return (context: any) => { + return (context: H) => { const contextParams = context.params; // @ts-ignore const optSkipHookWhen = options.skipHookWhen; const skipHookWhen = isFunction(optSkipHookWhen) ? optSkipHookWhen(context) : optSkipHookWhen; - debug(`\n.....hook called. type ${context.type} method ${context.method} resolved skipHookWhen ${skipHookWhen}`); + debug( + `\n.....hook called. type ${context.type} method ${context.method} resolved skipHookWhen ${skipHookWhen}` + ); if (context.params.$populate) return context; // populate or fastJoin are running if (skipHookWhen) return context; @@ -83,10 +124,10 @@ export function fgraphql ( // @ts-ignore options.inclAllFields = contextParams.provider - // @ts-ignore - ? options.inclAllFieldsClient - // @ts-ignore - : options.inclAllFieldsServer; + ? // @ts-ignore + options.inclAllFieldsClient + : // @ts-ignore + options.inclAllFieldsServer; // @ts-ignore debug(`inclAllField ${options.inclAllFields}`); @@ -97,7 +138,7 @@ export function fgraphql ( user: contextParams.user, authenticated: contextParams.authenticated, batchLoaders: {}, - cache: {} + cache: {}, }; // @ts-ignore @@ -112,29 +153,22 @@ export function fgraphql ( feathersSdl, ourResolvers, options, - resolverContent + resolverContent, }; // Populate data. const recs = getItems(context); // @ts-ignore - return processRecords(store, q, recs, recordType) - .then(() => { - replaceItems(context, recs); - return context; - }); + return processRecords(store, q, recs, recordType).then(() => { + replaceItems(context, recs); + return context; + }); }; } // Process records recursively. -function processRecords ( - store: any, - query: any, - recs: any, - type: any, - depth = 0 -): any { +function processRecords(store: any, query: any, recs: any, type: any, depth = 0): any { if (!recs) return; // Catch no data to populate. recs = isArray(recs) ? recs : [recs]; @@ -143,7 +177,10 @@ function processRecords ( const storeOurResolversType = store.ourResolvers[type]; if (!isObject(storeOurResolversType)) { - throwError(`Resolvers for Type ${type} are typeof ${typeof storeOurResolversType} not object. (fgraphql)`, 201); + throwError( + `Resolvers for Type ${type} are typeof ${typeof storeOurResolversType} not object. (fgraphql)`, + 201 + ); } if (!isObject(query)) { @@ -152,14 +189,13 @@ function processRecords ( return Promise.all( recs.map((rec: any, j: any) => processRecord(store, query, depth, rec, type, j)) - ) - .then(() => { - debug(`^^^^^^^^^^ exit ${depth}\n`); - }); + ).then(() => { + debug(`^^^^^^^^^^ exit ${depth}\n`); + }); } // Process the a record. -function processRecord (store: any, query: any, depth: any, rec: any, type: any, j: any): any { +function processRecord(store: any, query: any, depth: any, rec: any, type: any, j: any): any { debug(`processRecord rec# ${j} typeof ${typeof rec} Type ${type}`); if (!rec) return; // Catch any null values from resolvers. @@ -169,33 +205,55 @@ function processRecord (store: any, query: any, depth: any, rec: any, type: any, // Process every query item. return Promise.all( - queryPropNames.map((fieldName, i) => processRecordQuery( - store, query, depth, rec, fieldName, type, recFieldNamesInQuery, joinedNamesInQuery, j, i) + queryPropNames.map((fieldName, i) => + processRecordQuery( + store, + query, + depth, + rec, + fieldName, + type, + recFieldNamesInQuery, + joinedNamesInQuery, + j, + i + ) ) - ) - .then(() => { - // Retain only record fields selected - debug(`field names found ${recFieldNamesInQuery} joined names ${joinedNamesInQuery}`); - if (recFieldNamesInQuery.length || !store.options.inclAllFields || queryPropNames.includes('_none')) { - // recs[0] may have been created by [rec] so can't replace array elem - Object.keys(rec).forEach(key => { - if (!recFieldNamesInQuery.includes(key) && !joinedNamesInQuery.includes(key)) { - delete rec[key]; - } - }); - } + ).then(() => { + // Retain only record fields selected + debug(`field names found ${recFieldNamesInQuery} joined names ${joinedNamesInQuery}`); + if ( + recFieldNamesInQuery.length || + !store.options.inclAllFields || + queryPropNames.includes('_none') + ) { + // recs[0] may have been created by [rec] so can't replace array elem + Object.keys(rec).forEach(key => { + if (!recFieldNamesInQuery.includes(key) && !joinedNamesInQuery.includes(key)) { + delete rec[key]; + } + }); + } - // Include joined names in record. - if (store.options.inclJoinedNames && joinedNamesInQuery.length) { - rec._include = joinedNamesInQuery; - } - }); + // Include joined names in record. + if (store.options.inclJoinedNames && joinedNamesInQuery.length) { + rec._include = joinedNamesInQuery; + } + }); } // Process one query field for a record. -function processRecordQuery ( - store: any, query: any, depth: any, rec: any, fieldName: any, type: any, - recFieldNamesInQuery: any, joinedNamesInQuery: any, j: any, i: any +function processRecordQuery( + store: any, + query: any, + depth: any, + rec: any, + fieldName: any, + type: any, + recFieldNamesInQuery: any, + joinedNamesInQuery: any, + j: any, + i: any ): any { debug(`\nprocessRecordQuery rec# ${j} Type ${type} field# ${i} name ${fieldName}`); @@ -213,27 +271,45 @@ function processRecordQuery ( } // Process a resolver call. -function processRecordFieldResolver (store: any, query: any, depth: any, rec: any, fieldName: any, type: any) { +function processRecordFieldResolver( + store: any, + query: any, + depth: any, + rec: any, + fieldName: any, + type: any +) { debug('is resolver call'); const ourQuery = store.feathersSdl[type][fieldName]; const ourResolver = store.ourResolvers[type][fieldName]; if (!isFunction(ourResolver)) { - throwError(`Resolver for Type ${type} fieldName ${fieldName} is typeof ${typeof ourResolver} not function. (fgraphql)`, 203); + throwError( + `Resolver for Type ${type} fieldName ${fieldName} is typeof ${typeof ourResolver} not function. (fgraphql)`, + 203 + ); } const args = isObject(query[fieldName]) ? query[fieldName]._args : undefined; debug(`resolver listType ${ourQuery.listType} args ${JSON.stringify(args)}`); // Call resolver function. - return Promise.resolve(ourResolver(rec, args || {}, store.resolverContent)) - .then(async rawResult => { - debug(`resolver returned typeof ${isArray(rawResult) ? `array #recs ${rawResult.length}` : typeof rawResult}`); + return Promise.resolve(ourResolver(rec, args || {}, store.resolverContent)).then( + async rawResult => { + debug( + `resolver returned typeof ${ + isArray(rawResult) ? `array #recs ${rawResult.length}` : typeof rawResult + }` + ); // Convert rawResult to query requirements. const result = convertResolverResult(rawResult, ourQuery, fieldName, type); if (isArray(rawResult !== isArray(result) || typeof rawResult !== typeof result)) { - debug(`.....resolver result converted to typeof ${isArray(result) ? `array #recs ${result.length}` : typeof result}`); + debug( + `.....resolver result converted to typeof ${ + isArray(result) ? `array #recs ${result.length}` : typeof result + }` + ); } rec[fieldName] = result; @@ -247,11 +323,12 @@ function processRecordFieldResolver (store: any, query: any, depth: any, rec: an } else { debug('no population of results required'); } - }); + } + ); } // Convert result of resolver function to match query field requirements. -function convertResolverResult (result: any, ourQuery: any, fieldName: any, type: any) { +function convertResolverResult(result: any, ourQuery: any, fieldName: any, type: any) { if (result === null || result === undefined) { return ourQuery.listType ? [] : null; } @@ -260,7 +337,10 @@ function convertResolverResult (result: any, ourQuery: any, fieldName: any, type if (!isArray(result)) return [result]; } else if (isArray(result)) { if (result.length > 1) { - throwError(`Query listType true. Resolver for Type ${type} fieldName ${fieldName} result is array len ${result.length} (fgraphql)`, 204); + throwError( + `Query listType true. Resolver for Type ${type} fieldName ${fieldName} result is array len ${result.length} (fgraphql)`, + 204 + ); } return result[0]; @@ -269,12 +349,12 @@ function convertResolverResult (result: any, ourQuery: any, fieldName: any, type return result; } -function convertSdlToFeathersSchemaObject (schemaDefinitionLanguage: any, parse: any) { +function convertSdlToFeathersSchemaObject(schemaDefinitionLanguage: any, parse: any) { const graphQLSchemaObj = parse(schemaDefinitionLanguage); return convertDocument(graphQLSchemaObj); } -function convertDocument (ast: any) { +function convertDocument(ast: any) { const result: Record = {}; if (ast.kind !== 'Document' || !isArray(ast.definitions)) { @@ -292,7 +372,7 @@ function convertDocument (ast: any) { return result; } -function convertObjectTypeDefinition (definition: any, definitionIndex: any) { +function convertObjectTypeDefinition(definition: any, definitionIndex: any) { const converted: Record = {}; if (definition.kind !== 'ObjectTypeDefinition' || !isArray(definition.fields)) { @@ -310,7 +390,7 @@ function convertObjectTypeDefinition (definition: any, definitionIndex: any) { return [objectTypeName, converted]; } -function convertName (nameObj: any, errDesc?: any) { +function convertName(nameObj: any, errDesc?: any) { if (!isObject(nameObj) || !isString(nameObj.value)) { throw new Error(`${errDesc} does not have a valid name prop.`); } @@ -318,7 +398,7 @@ function convertName (nameObj: any, errDesc?: any) { return nameObj.value; } -function convertFieldDefinition (field: any, errDesc: any) { +function convertFieldDefinition(field: any, errDesc: any) { if (field.kind !== 'FieldDefinition' || !isObject(field.type)) { throw new Error(`${errDesc} is not a valid ObjectTypeDefinition`); } @@ -330,50 +410,55 @@ function convertFieldDefinition (field: any, errDesc: any) { return [fieldName, converted]; } -function convertFieldDefinitionType (fieldDefinitionType: any, errDesc: any, converted?: any): any { - converted = converted || { nonNullTypeList: false, listType: false, nonNullTypeField: false, typeof: null }; +function convertFieldDefinitionType(fieldDefinitionType: any, errDesc: any, converted?: any): any { + converted = converted || { + nonNullTypeList: false, + listType: false, + nonNullTypeField: false, + typeof: null, + }; if (!isObject(fieldDefinitionType)) { throw new Error(`${errDesc} is not a valid Fielddefinition "type".`); } switch (fieldDefinitionType.kind) { - case 'NamedType': - converted.typeof = convertName(fieldDefinitionType.name); - return converted; - case 'NonNullType': - if (fieldDefinitionType.type.kind === 'NamedType') { - converted.nonNullTypeField = true; - } else { - converted.nonNullTypeList = true; - } + case 'NamedType': + converted.typeof = convertName(fieldDefinitionType.name); + return converted; + case 'NonNullType': + if (fieldDefinitionType.type.kind === 'NamedType') { + converted.nonNullTypeField = true; + } else { + converted.nonNullTypeList = true; + } - return convertFieldDefinitionType(fieldDefinitionType.type, errDesc, converted); - case 'ListType': - converted.listType = true; - return convertFieldDefinitionType(fieldDefinitionType.type, errDesc, converted); + return convertFieldDefinitionType(fieldDefinitionType.type, errDesc, converted); + case 'ListType': + converted.listType = true; + return convertFieldDefinitionType(fieldDefinitionType.type, errDesc, converted); } } -function throwError (msg: any, code: any) { +function throwError(msg: any, code: any) { const err = new Error(msg); // @ts-ignore err.code = code; throw err; } -function isObject (obj: any) { +function isObject(obj: any) { return typeof obj === 'object' && obj !== null; } -function isString (str: any) { +function isString(str: any) { return typeof str === 'string'; } -function isFunction (func: any) { +function isFunction(func: any) { return typeof func === 'function'; } -function isArray (array: any) { +function isArray(array: any) { return Array.isArray(array); } diff --git a/src/hooks/iff-else.ts b/src/hooks/iff-else.ts index 589e5be9..46f77b68 100755 --- a/src/hooks/iff-else.ts +++ b/src/hooks/iff-else.ts @@ -1,45 +1,53 @@ -import type { Hook, HookContext } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; import { isPromise } from '../common'; import { combine } from '../utils/combine'; -import type { PredicateFn } from '../types'; +import type { HookFunction, PredicateFn } from '../types'; /** * Execute one array of hooks or another based on a sync or async predicate. - * {@link https://hooks-common.feathersjs.com/hooks.html#iffelse} + * @see https://hooks-common.feathersjs.com/hooks.html#iffelse */ -export function iffElse ( - predicate: boolean | PredicateFn, - trueHooks: Hook | Hook[] | undefined, - falseHooks?: Hook | Hook[] | undefined -): Hook { +export function iffElse( + predicate: boolean | PredicateFn, + trueHook: HookFunction | HookFunction[] | undefined, + falseHook?: HookFunction | HookFunction[] | undefined +) { // fnArgs is [context] for service & permission hooks, [data, connection, context] for event filters - return function (this: any, ctx: HookContext) { - if (typeof trueHooks === 'function') { trueHooks = [trueHooks]; } - if (typeof falseHooks === 'function') { falseHooks = [falseHooks]; } + return function (this: any, ctx: H) { + const trueHooks = Array.isArray(trueHook) + ? trueHook + : typeof trueHook === 'function' + ? [trueHook] + : undefined; + + const falseHooks = Array.isArray(falseHook) + ? falseHook + : typeof falseHook === 'function' + ? [falseHook] + : undefined; const that = this; const check = typeof predicate === 'function' ? predicate.apply(that, [ctx]) : !!predicate; if (!check) { - return callHooks.call(that, ctx, falseHooks) + return callHooks.call(that, ctx, falseHooks as any); } if (!isPromise(check)) { - return callHooks.call(that, ctx, trueHooks); + return callHooks.call(that, ctx, trueHooks as any); } return check.then((check1: any) => { const hooks = check1 ? trueHooks : falseHooks; - return callHooks.call(that, ctx, hooks as Hook[]) + return callHooks.call(that, ctx, hooks as any); }); }; } -function callHooks (this: any, ctx: HookContext, serviceHooks?: Hook[]) { - let hooks = serviceHooks - if (serviceHooks && serviceHooks.length && Array.isArray(serviceHooks[0])) { - hooks = serviceHooks[0]; - } - - return hooks ? combine(...hooks).call(this, ctx) : ctx; +function callHooks( + this: any, + ctx: H, + serviceHooks: HookFunction[] +) { + return serviceHooks ? combine(...serviceHooks).call(this, ctx) : ctx; } diff --git a/src/hooks/iff.ts b/src/hooks/iff.ts index 66acb80e..e7523706 100755 --- a/src/hooks/iff.ts +++ b/src/hooks/iff.ts @@ -1,20 +1,34 @@ -import type { Hook, HookContext } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; import { iffElse } from './iff-else'; -import type { IffHook, PredicateFn } from '../types'; +import type { HookFunction, PredicateFn } from '../types'; + +export interface IffHook extends HookFunction { + else(...hooks: HookFunction[]): HookFunction; +} /** * Execute one or another series of hooks depending on a sync or async predicate. - * {@link https://hooks-common.feathersjs.com/hooks.html#iff} + * @see https://hooks-common.feathersjs.com/hooks.html#iff */ -export function iff ( +export function iff( predicate: boolean | PredicateFn, - ...hooks: Hook[] -): IffHook { - const iffWithoutElse = function (context: HookContext) { - return iffElse(predicate, hooks.slice())(context); + ...hooks: HookFunction[] +): IffHook { + if (hooks.length && Array.isArray(hooks[0])) { + hooks = hooks[0]; } - iffWithoutElse.else = (...falseHooks: any[]) => (context: HookContext) => iffElse(predicate, hooks.slice(), falseHooks.slice())(context); + const iffWithoutElse = function (context: H) { + return iffElse(predicate, hooks.slice())(context); + }; + + iffWithoutElse.else = + (...falseHooks: any[]) => + (context: H) => + // @ts-ignore + iffElse(predicate, hooks.slice(), falseHooks.slice())(context); - return iffWithoutElse; + return iffWithoutElse as IffHook; } + +export { iff as when }; diff --git a/src/hooks/keep-in-array.ts b/src/hooks/keep-in-array.ts index a6ebd062..e8ccfb98 100755 --- a/src/hooks/keep-in-array.ts +++ b/src/hooks/keep-in-array.ts @@ -1,20 +1,19 @@ -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; +import { BadRequest } from '@feathersjs/errors'; import _get from 'lodash/get.js'; import _set from 'lodash/set.js'; import _has from 'lodash/has.js'; import { getItems } from '../utils/get-items'; -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; /** * Keep certain fields in a nested array inside the record(s), deleting the rest. - * {@link https://hooks-common.feathersjs.com/hooks.html#keepinarray} + * @see https://hooks-common.feathersjs.com/hooks.html#keepinarray */ -export function keepInArray ( +export function keepInArray( arrayName: string, fieldNames: string[] -): Hook { - return (context: any) => { +) { + return (context: H) => { const items = getItems(context); if (Array.isArray(items)) { @@ -27,16 +26,23 @@ export function keepInArray ( }; } -function replaceIn (item: any, field: any, fieldNames: any) { +function replaceIn(item: any, field: any, fieldNames: any) { const target = _get(item, field); if (target) { - if (!Array.isArray(target)) throw new BadRequest(`The 'field' param must lead to array. found type '${typeof target}' instead`); - - _set(item, field, target.map(item => replaceItem(item, fieldNames))); + if (!Array.isArray(target)) + throw new BadRequest( + `The 'field' param must lead to array. found type '${typeof target}' instead` + ); + + _set( + item, + field, + target.map(item => replaceItem(item, fieldNames)) + ); } } -function replaceItem (item: any, fields: any) { +function replaceItem(item: any, fields: any) { if (typeof item !== 'object' || item === null) return item; const newItem = {}; diff --git a/src/hooks/keep-query-in-array.ts b/src/hooks/keep-query-in-array.ts index a284ccce..fe1e47af 100644 --- a/src/hooks/keep-query-in-array.ts +++ b/src/hooks/keep-query-in-array.ts @@ -1,20 +1,19 @@ import { checkContext } from '../utils/check-context'; -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; +import { BadRequest } from '@feathersjs/errors'; import _get from 'lodash/get.js'; import _set from 'lodash/set.js'; import _has from 'lodash/has.js'; -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; /** * Keep certain fields in a nested array inside the query object, deleting the rest. - * {@link https://hooks-common.feathersjs.com/hooks.html#keepqueryinarray} + * @see https://hooks-common.feathersjs.com/hooks.html#keepqueryinarray */ -export function keepQueryInArray ( +export function keepQueryInArray( arrayName: string, fieldNames: string[] -): Hook { - return (context: any) => { +) { + return (context: H) => { checkContext(context, 'before', null, 'keepQueryInArray'); replaceIn(context.query, arrayName, fieldNames); @@ -23,16 +22,23 @@ export function keepQueryInArray ( }; } -function replaceIn (item: any, field: any, fieldNames: any) { +function replaceIn(item: any, field: any, fieldNames: any) { const target = _get(item, field); if (target) { - if (!Array.isArray(target)) throw new BadRequest(`The 'field' param must lead to array. found type '${typeof target}' instead`); - - _set(item, field, target.map(item => replaceItem(item, fieldNames))); + if (!Array.isArray(target)) + throw new BadRequest( + `The 'field' param must lead to array. found type '${typeof target}' instead` + ); + + _set( + item, + field, + target.map(item => replaceItem(item, fieldNames)) + ); } } -function replaceItem (item: any, fields: any) { +function replaceItem(item: any, fields: any) { if (typeof item !== 'object' || item === null) return item; const newItem = {}; diff --git a/src/hooks/keep-query.ts b/src/hooks/keep-query.ts index 8e4375e0..aac6d2e0 100755 --- a/src/hooks/keep-query.ts +++ b/src/hooks/keep-query.ts @@ -1,16 +1,16 @@ -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; import { pluck } from '../common'; import { checkContext } from '../utils/check-context'; /** * Keep certain fields in the query object, deleting the rest. - * {@link https://hooks-common.feathersjs.com/hooks.html#keepquery} + * @see https://hooks-common.feathersjs.com/hooks.html#keepquery */ -export function keepQuery (...fieldNames: string[]): Hook { - return (context: any) => { +export function keepQuery(...fieldNames: string[]) { + return (context: H) => { checkContext(context, 'before', null, 'keepQuery'); - const query = (context.params || {}).query || {}; + const query = context.params.query || {}; context.params.query = pluck(query, fieldNames); return context; diff --git a/src/hooks/keep.ts b/src/hooks/keep.ts index 5e5f77f2..e34c488b 100755 --- a/src/hooks/keep.ts +++ b/src/hooks/keep.ts @@ -2,24 +2,25 @@ import _get from 'lodash/get.js'; import _set from 'lodash/set.js'; import _has from 'lodash/has.js'; -import { checkContextIf } from './check-context-if'; +import { checkContextIf } from '../utils/check-context-if'; import { getItems } from '../utils/get-items'; import { replaceItems } from '../utils/replace-items'; -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; /** * Keep certain fields in the record(s), deleting the rest. - * {@link https://hooks-common.feathersjs.com/hooks.html#keep} + * @see https://hooks-common.feathersjs.com/hooks.html#keep */ -export function keep ( - ...fieldNames: string[] -): Hook { - return (context: any) => { +export function keep(...fieldNames: string[]) { + return (context: H) => { checkContextIf(context, 'before', ['create', 'update', 'patch'], 'keep'); const items = getItems(context); if (Array.isArray(items)) { - replaceItems(context, items.map(item => replaceItem(item, fieldNames))); + replaceItems( + context, + items.map(item => replaceItem(item, fieldNames)) + ); } else { replaceItems(context, replaceItem(items, fieldNames)); } @@ -28,7 +29,7 @@ export function keep ( }; } -function replaceItem (item: any, fields: any) { +function replaceItem(item: any, fields: any) { if (typeof item !== 'object' || item === null) return item; const newItem = {}; diff --git a/src/hooks/lower-case.ts b/src/hooks/lower-case.ts index 2e2ddacd..f71cb1ae 100755 --- a/src/hooks/lower-case.ts +++ b/src/hooks/lower-case.ts @@ -1,18 +1,17 @@ import _set from 'lodash/set.js'; -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; +import { BadRequest } from '@feathersjs/errors'; import { transformItems } from '../common'; -import { checkContextIf } from './check-context-if'; +import { checkContextIf } from '../utils/check-context-if'; import { getItems } from '../utils/get-items'; -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; /** * Convert certain field values to lower case. - * {@link https://hooks-common.feathersjs.com/hooks.html#lowercase} + * @see https://hooks-common.feathersjs.com/hooks.html#lowercase */ -export function lowerCase (...fieldNames: string[]): Hook { - return (context: any) => { +export function lowerCase(...fieldNames: string[]) { + return (context: H) => { checkContextIf(context, 'before', ['create', 'update', 'patch'], 'lowercase'); transformItems(getItems(context), fieldNames, (item: any, fieldName: any, value: any) => { diff --git a/src/hooks/mongo-keys.ts b/src/hooks/mongo-keys.ts index 25964f98..e9a35ef4 100755 --- a/src/hooks/mongo-keys.ts +++ b/src/hooks/mongo-keys.ts @@ -1,15 +1,16 @@ -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; import traverse from 'traverse'; import { checkContext } from '../utils/check-context'; /** * Wrap MongoDB foreign keys in ObjectId. - * {@link https://hooks-common.feathersjs.com/hooks.html#mongokeys} + * + * @see https://hooks-common.feathersjs.com/hooks.html#mongokeys */ -export function mongoKeys ( +export function mongoKeys( ObjectId: new (id?: string | number) => any, keyFields: string | string[] -): Hook { +) { keyFields = Array.isArray(keyFields) ? keyFields : [keyFields]; const keyLeaves: any = []; @@ -21,7 +22,7 @@ export function mongoKeys ( return { leaf, len: fieldNames.length, path: JSON.stringify(fieldNames) }; }); - return (context: any) => { + return (context: H) => { checkContext(context, 'before', null, 'mongoKeys'); const query = context.params.query || {}; @@ -60,7 +61,7 @@ export function mongoKeys ( return context; }; - function wrapValue (value: any) { + function wrapValue(value: any) { return Array.isArray(value) ? value.map(val => new ObjectId(val)) : new ObjectId(value); } } diff --git a/src/hooks/params-from-client.ts b/src/hooks/params-from-client.ts index 89af5f8c..9c0a53b7 100755 --- a/src/hooks/params-from-client.ts +++ b/src/hooks/params-from-client.ts @@ -1,18 +1,19 @@ -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; /** * Pass context.params from client to server. Server hook. - * {@link https://hooks-common.feathersjs.com/hooks.html#paramsfromclient} + * @see https://hooks-common.feathersjs.com/hooks.html#paramsfromclient */ -export function paramsFromClient (...whitelist: string[]): Hook { - return (context: any) => { +export function paramsFromClient(...whitelist: string[]) { + return (context: H) => { const params = context.params; - if (params && params.query && params.query.$client && typeof params.query.$client === 'object') { + if (params?.query?.$client && typeof params.query.$client === 'object') { const client = params.query.$client; whitelist.forEach(key => { if (key in client) { + // @ts-ignore params[key] = client[key]; } }); diff --git a/src/hooks/populate.ts b/src/hooks/populate.ts index b2968773..c05cf93a 100755 --- a/src/hooks/populate.ts +++ b/src/hooks/populate.ts @@ -1,14 +1,78 @@ import _get from 'lodash/get.js'; import _set from 'lodash/set.js'; -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; +import { BadRequest } from '@feathersjs/errors'; import { getItems } from '../utils/get-items'; import { replaceItems } from '../utils/replace-items'; -import type { PopulateOptions } from '../types'; -import type { Hook, HookContext } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; + +export interface PopulateOptions { + schema: + | Partial + | ((context: H, options: PopulateOptions) => Partial); + checkPermissions?: (context: H, path: string, permissions: any, depth: number) => boolean; + profile?: boolean; +} + +export interface PopulateSchema { + /** + * The name of the service providing the items, actually its path. + */ + service: string; + /** + * Where to place the items from the join + * dot notation + */ + nameAs: string; + /** + * The name of the field in the parent item for the relation. + * dot notation + */ + parentField: string; + /** + * The name of the field in the child item for the relation. + * Dot notation is allowed and will result in a query like { 'name.first': 'John' } which is not suitable for all DBs. + * You may use query or select to create a query suitable for your DB. + */ + childField: string; + + /** + * Who is allowed to perform this join. See checkPermissions above. + */ + permissions: any; + + /** + * An object to inject into context.params.query. + */ + query: any; + + /** + * A function whose result is injected into the query. + */ + select: (context: HookContext, parentItem: any, depth: number) => any; + + /** + * Force a single joined item to be stored as an array. + */ + asArray: boolean; + + /** + * Controls pagination for this service. + */ + paginate: boolean | number; + + /** + * Perform any populate or fastJoin registered on this service. + */ + useInnerPopulate: boolean; + /** + * Call the service as the server, not with the client’s transport. + */ + provider: string; + include: Partial | Partial[]; +} -export function populate (options: PopulateOptions): Hook { +export function populate(options: PopulateOptions) { // options.schema is like { service: '...', permissions: '...', include: [ ... ] } const typeofSchema = typeof options.schema; @@ -16,14 +80,16 @@ export function populate (options: PopulateOptions): Hook { throw new Error('Options.schema is not an object. (populate)'); } - return function (context: any) { + return function (context: H) { const optionsDefault: PopulateOptions = { schema: {}, checkPermissions: () => true, - profile: false + profile: false, }; - if (context.params._populate === 'skip') { // this service call made from another populate + // @ts-ignore + if (context.params._populate === 'skip') { + // this service call made from another populate return context; } @@ -38,7 +104,7 @@ export function populate (options: PopulateOptions): Hook { const schema1 = typeof schema === 'function' ? schema(context, options1) : schema; const permissions = schema1.permissions || null; const baseService = schema1.service; - const provider = ('provider' in schema1) ? schema1.provider : context.params.provider; + const provider = 'provider' in schema1 ? schema1.provider : context.params.provider; if (typeof checkPermissions !== 'function') { throw new BadRequest('Permissions param is not a function. (populate)'); @@ -56,15 +122,13 @@ export function populate (options: PopulateOptions): Hook { throw new BadRequest('Schema does not resolve to an object. (populate)'); } - const include = [] - .concat(schema1.include || []) - .map(schema => { - if ('provider' in schema) { - return schema; - } else { - return Object.assign({}, schema, { provider }); - } - }); + const include = [].concat(schema1.include || []).map(schema => { + if ('provider' in schema) { + return schema; + } else { + return Object.assign({}, schema, { provider }); + } + }); return !include.length ? items : populateItemArray(options1, context, items, include, 0); }) @@ -75,7 +139,7 @@ export function populate (options: PopulateOptions): Hook { }; } -function populateItemArray ( +function populateItemArray( options: any, context: HookContext, items: any, @@ -98,7 +162,7 @@ function populateItemArray ( ); } -function populateItem ( +function populateItem( options: any, context: HookContext, item: any, @@ -124,34 +188,32 @@ function populateItem ( } const startAtThisInclude = new Date().getTime(); - return populateAddChild(options, context, item, childSchema, depth) - .then((result: any) => { - const nameAs = childSchema.nameAs || childSchema.service; - elapsed[nameAs] = getElapsed(options, startAtThisInclude, depth); + return populateAddChild(options, context, item, childSchema, depth).then((result: any) => { + const nameAs = childSchema.nameAs || childSchema.service; + elapsed[nameAs] = getElapsed(options, startAtThisInclude, depth); - return result; - }); - }) - ) - .then(children => { - // 'children' is like - // [{ nameAs: 'authorInfo', items: {...} }, { nameAs: readersInfo, items: [{...}, {...}] }] - if (options.profile !== false) { - elapsed.total = getElapsed(options, startAtAllIncludes, depth); - item._elapsed = elapsed; - } - - children.forEach(child => { - if (child) { - _set(item, child.nameAs, child.items); - } + return result; }); + }) + ).then(children => { + // 'children' is like + // [{ nameAs: 'authorInfo', items: {...} }, { nameAs: readersInfo, items: [{...}, {...}] }] + if (options.profile !== false) { + elapsed.total = getElapsed(options, startAtAllIncludes, depth); + item._elapsed = elapsed; + } - return item; + children.forEach(child => { + if (child) { + _set(item, child.nameAs, child.items); + } }); + + return item; + }); } -function populateAddChild ( +function populateAddChild( options: any, context: HookContext, parentItem: any, @@ -178,7 +240,15 @@ function populateAddChild ( */ const { - childField, paginate, parentField, permissions, query, select, service, useInnerPopulate, provider + childField, + paginate, + parentField, + permissions, + query, + select, + service, + useInnerPopulate, + provider, } = childSchema; if (!service) { @@ -191,9 +261,7 @@ function populateAddChild ( } if (permissions && !options.checkPermissions(context, service, permissions, depth)) { - throw new BadRequest( - `Permissions for ${service} do not allow include. (populate)` - ); + throw new BadRequest(`Permissions for ${service} do not allow include. (populate)`); } const nameAs = childSchema.nameAs || service; @@ -209,7 +277,8 @@ function populateAddChild ( sqlQuery = { [childField]: Array.isArray(parentVal) ? { $in: parentVal } : parentVal }; } - const queryObj = Object.assign({}, + const queryObj = Object.assign( + {}, query, sqlQuery, selectQuery // dynamic options override static ones @@ -223,17 +292,20 @@ function populateAddChild ( let paginateObj: any = { paginate: false }; const paginateOption = paginate; - if (paginateOption === true) { paginateObj = null; } + if (paginateOption === true) { + paginateObj = null; + } if (typeof paginateOption === 'number') { paginateObj = { paginate: { default: paginateOption } }; } - const params = Object.assign({}, + const params = Object.assign( + {}, context.params, paginateObj, { query: queryObj }, useInnerPopulate ? {} : { _populate: 'skip' }, - ('provider' in childSchema) ? { provider: childSchema.provider } : {} + 'provider' in childSchema ? { provider: childSchema.provider } : {} ); return serviceHandle.find(params); @@ -249,17 +321,15 @@ function populateAddChild ( result = result[0]; } - const include = [] - .concat(childSchema.include || []) - .map(schema => { - if ('provider' in schema) { - return schema; - } else { - return Object.assign({}, schema, { provider }); - } - }); + const include = [].concat(childSchema.include || []).map(schema => { + if ('provider' in schema) { + return schema; + } else { + return Object.assign({}, schema, { provider }); + } + }); - return (childSchema.include && result) + return childSchema.include && result ? populateItemArray(options, context, result, include, depth) : result; }) @@ -269,15 +339,11 @@ function populateAddChild ( // Helpers // used process.hrTime before -function milliToNano (num: number) { +function milliToNano(num: number) { return num * 1000000; } -function getElapsed ( - options: PopulateOptions, - startTime: number, - depth: number -) { +function getElapsed(options: PopulateOptions, startTime: number, depth: number) { if (options.profile === true) { return milliToNano(new Date().getTime() - startTime + 0.001); } diff --git a/src/hooks/prevent-changes.ts b/src/hooks/prevent-changes.ts index a47b6858..ed53a9dc 100755 --- a/src/hooks/prevent-changes.ts +++ b/src/hooks/prevent-changes.ts @@ -2,25 +2,24 @@ import _has from 'lodash/has.js'; import _omit from 'lodash/omit.js'; import { checkContext } from '../utils/check-context'; -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; -import type { Hook } from '@feathersjs/feathers'; +import { BadRequest } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; /** * Prevent patch service calls from changing certain fields. - * {@link https://hooks-common.feathersjs.com/hooks.html#preventchanges} + * @see https://hooks-common.feathersjs.com/hooks.html#preventchanges */ -export function preventChanges ( +export function preventChanges( ifThrow: boolean, ...fieldNames: string[] -): Hook { +) { if (typeof ifThrow === 'string') { // eslint-disable-next-line no-console console.warn('**Deprecated** Use the preventChanges(true, ...fieldNames) syntax instead.'); - fieldNames = [ifThrow, ...fieldNames] + fieldNames = [ifThrow, ...fieldNames]; } - return (context: any) => { + return (context: H) => { checkContext(context, 'before', ['patch'], 'preventChanges'); let data = { ...context.data }; @@ -30,6 +29,7 @@ export function preventChanges ( throw new BadRequest(`Field ${name} may not be patched. (preventChanges)`); } // Delete data.contactPerson.name + // @ts-ignore data = _omit(data, name); } }); diff --git a/src/hooks/required.ts b/src/hooks/required.ts index c705d699..24db02c4 100755 --- a/src/hooks/required.ts +++ b/src/hooks/required.ts @@ -1,18 +1,17 @@ import _get from 'lodash/get.js'; -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; +import { BadRequest } from '@feathersjs/errors'; import _has from 'lodash/has.js'; import { checkContext } from '../utils/check-context'; import { getItems } from '../utils/get-items'; -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; /** * Check selected fields exist and are not falsey. Numeric 0 is acceptable. - * {@link https://hooks-common.feathersjs.com/hooks.html#required} + * @see https://hooks-common.feathersjs.com/hooks.html#required */ -export function required (...fieldNames: string[]): Hook { - return (context: any) => { +export function required(...fieldNames: string[]) { + return (context: H) => { checkContext(context, 'before', ['create', 'update', 'patch'], 'required'); const items = getItems(context); @@ -20,7 +19,8 @@ export function required (...fieldNames: string[]): Hook { fieldNames.forEach(name => { if (!_has(item, name)) throw new BadRequest(`Field ${name} does not exist. (required)`); const value = _get(item, name); - if (!value && value !== 0 && value !== false) throw new BadRequest(`Field ${name} is null. (required)`); + if (!value && value !== 0 && value !== false) + throw new BadRequest(`Field ${name} is null. (required)`); }); }); }; diff --git a/src/hooks/run-parallel.ts b/src/hooks/run-parallel.ts index 27b3efb6..017f1e6b 100755 --- a/src/hooks/run-parallel.ts +++ b/src/hooks/run-parallel.ts @@ -1,23 +1,24 @@ -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; -import type { Hook } from '@feathersjs/feathers'; +import { BadRequest } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; +import type { HookFunction } from '../types'; /** * Run a hook in parallel to the other hooks and the service call. - * {@link https://hooks-common.feathersjs.com/hooks.html#runparallel} + * + * @see https://hooks-common.feathersjs.com/hooks.html#runparallel */ -export function runParallel ( - hook: Hook, - clone: (item: T) => T, - cloneDepth = 6 -): Hook { +export function runParallel( + hook: HookFunction, + clone?: (item: H) => H +) { if (typeof hook !== 'function') { throw new BadRequest('Function not provided. (runParallel)'); } - return function (this: any, context: any) { // must use function - const copy = cloneDepth ? clone(context) : context; + return function (this: any, context: H) { + // must use function + const copy = clone ? clone(context) : context; - setTimeout(() => hook.call(this, copy)); + setTimeout(() => hook.call(this, copy as any)); }; } diff --git a/src/hooks/sequelize-convert.ts b/src/hooks/sequelize-convert.ts index 33db87a1..11e50757 100755 --- a/src/hooks/sequelize-convert.ts +++ b/src/hooks/sequelize-convert.ts @@ -1,36 +1,48 @@ -import type { Hook } from '@feathersjs/feathers'; -import type { SequelizeConversion, SequelizeConverts } from '../types'; +import type { HookContext } from '@feathersjs/feathers'; import { getItems } from '../utils/get-items'; import { replaceItems } from '../utils/replace-items'; +export interface SequelizeConversion { + js: (sqlValue: any) => any; + sql: (jsValue: any) => any; +} + +export interface SequelizeConverts { + [name: string]: keyof C | 'boolean' | 'date' | 'json'; +} + const methodsWithBeforeData = ['create', 'update', 'patch']; const defaultConversions = { boolean: { - sql: (boolean: any) => boolean ? 1 : 0, - js: (numb: any) => !!numb + sql: (boolean: any) => (boolean ? 1 : 0), + js: (numb: any) => !!numb, }, date: { sql: (dateNow: any) => dateNow, - js: (sqlDate: any) => new Date(sqlDate).valueOf() || null + js: (sqlDate: any) => new Date(sqlDate).valueOf() || null, }, json: { sql: (obj: any) => JSON.stringify(obj), - js: (str: any) => JSON.parse(str) - } + js: (str: any) => JSON.parse(str), + }, }; /** - * {@link https://hooks-common.feathersjs.com/hooks.html#sequelizeconvert} + * @see https://hooks-common.feathersjs.com/hooks.html#sequelizeconvert */ -export function sequelizeConvert ( +export function sequelizeConvert< + C extends { [name: string]: SequelizeConversion }, + H extends HookContext = HookContext +>( converts: SequelizeConverts | null | undefined | false, ignores?: string[] | null | undefined | false, conversions?: C -): Hook { +) { const converter = sequelizeConversion(converts, ignores, conversions); - return (context: any) => { - if (context.type === 'before' && !methodsWithBeforeData.includes(context.method)) return context; + return (context: H) => { + if (context.type === 'before' && !methodsWithBeforeData.includes(context.method)) + return context; const items = getItems(context); converter(context.type === 'before' ? 'sql' : 'js', items); @@ -40,7 +52,7 @@ export function sequelizeConvert = {}) { +function sequelizeConversion(converts: any, ignores: any, conversions: Record = {}) { converts = converts || {}; ignores = ignores || []; conversions.boolean = conversions.boolean || defaultConversions.boolean; diff --git a/src/hooks/serialize.ts b/src/hooks/serialize.ts index 510e4ee4..058248b1 100755 --- a/src/hooks/serialize.ts +++ b/src/hooks/serialize.ts @@ -4,24 +4,39 @@ import _omit from 'lodash/omit.js'; import { getItems } from '../utils/get-items'; import { replaceItems } from '../utils/replace-items'; -import type { SerializeSchema, SyncContextFunction } from '../types'; -import type { Hook } from '@feathersjs/feathers'; +import type { SyncContextFunction } from '../types'; +import type { HookContext } from '@feathersjs/feathers'; + +export interface SerializeSchema { + only?: string | string[]; + exclude?: string | string[]; + computed?: { + [propName: string]: (record: any, context: H) => any; + }; + + [key: string]: + | SerializeSchema + | SerializeSchema['computed'] + | string + | string[] + | undefined; +} /** * Prune values from related records. Calculate new values. - * {@link https://hooks-common.feathersjs.com/hooks.html#serialize} + * @see https://hooks-common.feathersjs.com/hooks.html#serialize */ -export function serialize ( - schema1: SerializeSchema | SyncContextFunction -): Hook { - return (context: any) => { +export function serialize( + schema1: SerializeSchema | SyncContextFunction +) { + return (context: H) => { const schema = typeof schema1 === 'function' ? schema1(context) : schema1; const schemaDirectives = ['computed', 'exclude', 'only']; replaceItems(context, serializeItems(getItems(context), schema)); return context; - function serializeItems (items: any, schema: any) { + function serializeItems(items: any, schema: any) { if (!Array.isArray(items)) { return serializeItem(items, schema); } @@ -29,7 +44,7 @@ export function serialize ( return items.map(item => serializeItem(item, schema)); } - function serializeItem (item: any, schema: any) { + function serializeItem(item: any, schema: any) { const computed: Record = {}; Object.keys(schema.computed || {}).forEach(name => { computed[name] = schema.computed[name](item, context); // needs closure @@ -58,7 +73,8 @@ export function serialize ( item = Object.assign({}, item, computed, _computed.length ? { _computed } : {}); Object.keys(schema).forEach(key => { - if (!schemaDirectives.includes(key) && typeof item[key] === 'object') { // needs closure + if (!schemaDirectives.includes(key) && typeof item[key] === 'object') { + // needs closure item[key] = serializeItems(item[key], schema[key]); } }); diff --git a/src/hooks/set-field.ts b/src/hooks/set-field.ts index acc96e4e..fa2640e3 100644 --- a/src/hooks/set-field.ts +++ b/src/hooks/set-field.ts @@ -3,29 +3,37 @@ import _setWith from 'lodash/setWith.js'; import _clone from 'lodash/clone.js'; import _debug from 'debug'; import { checkContext } from '../utils/check-context'; -import errors from '@feathersjs/errors'; -const { Forbidden } = errors; -import type { Hook } from '@feathersjs/feathers'; -import type { SetFieldOptions } from '../types'; +import { Forbidden } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; + +export interface SetFieldOptions { + as: string; + from: string; + allowUndefined?: boolean; +} const debug = _debug('feathers-hooks-common/setField'); /** * The `setField` hook allows to set a field on the hook context based on the value of another field on the hook context. - * {@link https://hooks-common.feathersjs.com/hooks.html#setfield} + * @see https://hooks-common.feathersjs.com/hooks.html#setfield */ -export function setField ( - { as, from, allowUndefined = false }: SetFieldOptions -): Hook { +export function setField({ + as, + from, + allowUndefined = false, +}: SetFieldOptions) { if (!as || !from) { - throw new Error('\'as\' and \'from\' options have to be set'); + throw new Error("'as' and 'from' options have to be set"); } - return context => { + return (context: H) => { const { params, app } = context; if (app.version < '4.0.0') { - throw new Error('The \'setField\' hook only works with Feathers 4 and the latest database adapters'); + throw new Error( + "The 'setField' hook only works with Feathers 4 and the latest database adapters" + ); } checkContext(context, 'before', null, 'setField'); diff --git a/src/hooks/set-now.ts b/src/hooks/set-now.ts index 65af5744..90552147 100755 --- a/src/hooks/set-now.ts +++ b/src/hooks/set-now.ts @@ -1,19 +1,19 @@ -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; -import type { Hook } from '@feathersjs/feathers'; +import { BadRequest } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; import { setFields as _setFields } from '../common'; import { getItems } from '../utils/get-items'; /** * Create/update certain fields to the current date-time. - * {@link https://hooks-common.feathersjs.com/hooks.html#setnow} + * + * @see https://hooks-common.feathersjs.com/hooks.html#setnow */ -export function setNow (...fieldNames: string[]): Hook { +export function setNow(...fieldNames: string[]) { if (!fieldNames.length) { throw new BadRequest('Field name is required. (setNow)'); } - return (context: any) => { + return (context: H) => { _setFields(getItems(context), () => new Date(), fieldNames, 'setNow'); return context; }; diff --git a/src/hooks/set-slug.ts b/src/hooks/set-slug.ts index 657fe8f5..d945534c 100755 --- a/src/hooks/set-slug.ts +++ b/src/hooks/set-slug.ts @@ -1,14 +1,14 @@ import _set from 'lodash/set.js'; -import errors from '@feathersjs/errors'; -const { GeneralError } = errors; -import type { Hook } from '@feathersjs/feathers'; +import { GeneralError } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; /** * Fix slugs in URL, e.g. /stores/:storeId. - * {@link https://hooks-common.feathersjs.com/hooks.html#setslug} + * + * @see https://hooks-common.feathersjs.com/hooks.html#setslug */ -export function setSlug (slug: string, fieldName?: string): Hook { - return (context: any) => { +export function setSlug(slug: string, fieldName?: string) { + return (context: H) => { if (typeof fieldName !== 'string') { fieldName = `query.${slug}`; } diff --git a/src/hooks/sifter.ts b/src/hooks/sifter.ts index f805d492..9acd044e 100755 --- a/src/hooks/sifter.ts +++ b/src/hooks/sifter.ts @@ -1,15 +1,14 @@ -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; -import type { Hook } from '@feathersjs/feathers'; +import { BadRequest } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; import type { SyncContextFunction } from '../types'; import { checkContext } from '../utils/check-context'; import { getItems } from '../utils/get-items'; import { replaceItems } from '../utils/replace-items'; -export function sifter ( - siftFunc: SyncContextFunction<(item: any) => boolean> -): Hook { - return (context: any) => { +export function sifter( + siftFunc: SyncContextFunction<(item: any) => boolean, H> +) { + return (context: H) => { checkContext(context, 'after', 'find', 'sifter'); if (typeof siftFunc !== 'function') { diff --git a/src/hooks/soft-delete.ts b/src/hooks/soft-delete.ts index 1a14fc3d..15236d6a 100755 --- a/src/hooks/soft-delete.ts +++ b/src/hooks/soft-delete.ts @@ -1,8 +1,16 @@ -import errors from '@feathersjs/errors'; -const { GeneralError } = errors; -import type { SoftDeleteOptions } from '../types'; +import { GeneralError } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; import { checkContext } from '../utils/check-context'; +export type SoftDeleteOptionFunction = ( + context?: H +) => Promise<{ [key: string]: any }>; + +export interface SoftDeleteOptions { + deletedQuery?: { [key: string]: any } | SoftDeleteOptionFunction; + removeData?: { [key: string]: any } | SoftDeleteOptionFunction; +} + const defaultQuery = { deleted: { $ne: true } }; const defaultData = { deleted: true }; const getValue = (value: any, ...args: any[]) => { @@ -15,12 +23,13 @@ const getValue = (value: any, ...args: any[]) => { /** * Allow to mark items as deleted instead of removing them. */ -export function softDelete ({ +export function softDelete({ deletedQuery = defaultQuery, - removeData = defaultData -}: SoftDeleteOptions = {}) { - return async (context: any) => { + removeData = defaultData, +}: SoftDeleteOptions = {}) { + return async (context: H) => { const { service, method, params, app } = context; + // @ts-ignore const { disableSoftDelete, query = {} } = params; if (app.version < '4.0.0') { diff --git a/src/hooks/stash-before.ts b/src/hooks/stash-before.ts index f0286744..c535c0d6 100755 --- a/src/hooks/stash-before.ts +++ b/src/hooks/stash-before.ts @@ -1,18 +1,18 @@ -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; -import type { Hook } from '@feathersjs/feathers'; +import { BadRequest } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; import { checkContext } from '../utils/check-context'; /** * Stash current value of record, usually before mutating it. Performs a get call. - * {@link https://hooks-common.feathersjs.com/hooks.html#stashbefore} + * @see https://hooks-common.feathersjs.com/hooks.html#stashbefore */ -export function stashBefore (fieldName?: string): Hook { +export function stashBefore(fieldName?: string) { const beforeField = fieldName || 'before'; - return (context: any) => { + return (context: H) => { checkContext(context, 'before', ['get', 'update', 'patch', 'remove'], 'stashBefore'); + // @ts-ignore if (context.params.disableStashBefore) { return context; } @@ -21,20 +21,27 @@ export function stashBefore (fieldName?: string): Hook { throw new BadRequest('Id is required. (stashBefore)'); } - const params = context.method === 'get' - ? context.params - : { - provider: context.params.provider, - authenticated: context.params.authenticated, - user: context.params.user - }; + const params = + context.method === 'get' + ? context.params + : { + provider: context.params.provider, + // @ts-ignore + authenticated: context.params.authenticated, + // @ts-ignore + user: context.params.user, + }; - return context.service.get(context.id, { - ...params, - query: params.query || {}, - disableStashBefore: true - }) + return context.service + .get(context.id, { + ...params, + // @ts-ignore + query: params.query || {}, + // @ts-ignore + disableStashBefore: true, + }) .then((data: any) => { + // @ts-ignore context.params[beforeField] = JSON.parse(JSON.stringify(data)); return context; }) diff --git a/src/hooks/traverse.ts b/src/hooks/traverse.ts index 8b423620..628a8fcb 100755 --- a/src/hooks/traverse.ts +++ b/src/hooks/traverse.ts @@ -1,4 +1,4 @@ -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; import { traverse as _traverse } from '../common'; import type { SyncContextFunction } from '../types'; import { getItems } from '../utils/get-items'; @@ -6,14 +6,15 @@ import { getItems } from '../utils/get-items'; /** * Transform fields & objects in place in the record(s) using a recursive walk. Powerful. * Check docs at https://github.com/substack/js-traverse for info on transformContext! - * {@link https://hooks-common.feathersjs.com/hooks.html#traverse} + * @see https://hooks-common.feathersjs.com/hooks.html#traverse */ -export function traverse ( - transformer: (this: any, transformContext: any) => any, - getObject?: SyncContextFunction -): Hook { - return (context: any) => { - const items = typeof getObject === 'function' ? getObject(context) : getObject || getItems(context); +export function traverse( + transformer: (transformContext: any) => any, + getObject?: SyncContextFunction +) { + return (context: H) => { + const items = + typeof getObject === 'function' ? getObject(context) : getObject || getItems(context); _traverse(items, transformer); return context; diff --git a/src/hooks/unless.ts b/src/hooks/unless.ts index 77a3e81a..29bdf8f5 100755 --- a/src/hooks/unless.ts +++ b/src/hooks/unless.ts @@ -1,14 +1,16 @@ -import type { Hook } from '@feathersjs/feathers'; +import type { HookContext } from '@feathersjs/feathers'; import { iffElse } from '..'; -import type { PredicateFn } from '../types'; +import type { PredicateFn, HookFunction } from '../types'; /** * Execute a series of hooks if a sync or async predicate is falsey. - * {@link https://hooks-common.feathersjs.com/hooks.html#unless} + * + * @see https://hooks-common.feathersjs.com/hooks.html#unless */ -export function unless ( +export function unless( predicate: boolean | PredicateFn, - ...hooks: Hook[] -): Hook { - return iffElse(predicate, undefined, hooks.slice()) + ...hooks: HookFunction[] +) { + // @ts-ignore + return iffElse(predicate, undefined, hooks.slice()); } diff --git a/src/hooks/validate-schema.ts b/src/hooks/validate-schema.ts index 26ba2f83..372a55fd 100755 --- a/src/hooks/validate-schema.ts +++ b/src/hooks/validate-schema.ts @@ -1,23 +1,23 @@ -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; -import type { Hook } from '@feathersjs/feathers'; -import type { AjvOrNewable, ValidateSchemaOptions } from '../types'; +import { BadRequest } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; +import type { AjvOrNewable, ValidateSchemaOptions } from './validate'; import { getItems } from '../utils/get-items'; /** * Validate data using JSON-Schema. - * {@link https://hooks-common.feathersjs.com/hooks.html#validateschema} + * @see https://hooks-common.feathersjs.com/hooks.html#validateschema */ -export function validateSchema ( +export function validateSchema( schema: object | string, ajvOrAjv: AjvOrNewable, // @ts-ignore options: ValidateSchemaOptions = { allErrors: true } -): Hook { +) { const addNewError = options?.addNewError || addNewErrorDflt; // delete options.addNewError; // TODO: Any better way to tell if ajvOrAjv is an instance or a constructor? - let ajv: any; let Ajv; + let ajv: any; + let Ajv; // @ts-ignore if (typeof ajvOrAjv.addKeyword !== 'function') { Ajv = ajvOrAjv; @@ -26,9 +26,9 @@ export function validateSchema ( } else { ajv = ajvOrAjv; } - const validate = (typeof schema === 'string') ? ajv.getSchema(schema) : ajv.compile(schema); // for fastest execution + const validate = typeof schema === 'string' ? ajv.getSchema(schema) : ajv.compile(schema); // for fastest execution - return (context: any): any => { + return (context: H) => { const items = getItems(context); const itemsArray = Array.isArray(items) ? items : [items]; const itemsLen = itemsArray.length; @@ -36,16 +36,17 @@ export function validateSchema ( let invalid = false; if (validate.schema.$async) { - return Promise.all(itemsArray.map((item, index) => { - return validate(item) - .catch((err: any) => { + return Promise.all( + itemsArray.map((item, index) => { + return validate(item).catch((err: any) => { if (!(err instanceof ajv.constructor.ValidationError)) throw err; invalid = true; addErrors(err.errors, index); }); - })).then(() => { + }) + ).then(() => { if (invalid) { throw new BadRequest('Data does not match schema', { errors: errorMessages }); } @@ -64,15 +65,17 @@ export function validateSchema ( throw new BadRequest('Data does not match schema', { errors: errorMessages }); } - function addErrors (errors: any, index: any) { + function addErrors(errors: any, index: any) { errors.forEach((ajvError: any) => { errorMessages = addNewError(errorMessages, ajvError, itemsLen, index); }); } + + return context; }; } -function addNewErrorDflt (errorMessages: any, ajvError: any, itemsLen: any, index: any) { +function addNewErrorDflt(errorMessages: any, ajvError: any, itemsLen: any, index: any) { const leader = itemsLen === 1 ? '' : `in row ${index + 1} of ${itemsLen}, `; let message; diff --git a/src/hooks/validate.ts b/src/hooks/validate.ts index 8c55da72..faefd114 100755 --- a/src/hooks/validate.ts +++ b/src/hooks/validate.ts @@ -1,20 +1,45 @@ -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; -import type { Hook } from '@feathersjs/feathers'; +import { BadRequest } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; +import type { Ajv, ErrorObject as ajvErrorObject, Options as AjvOptions } from 'ajv'; import { isPromise } from '../common'; -import type { ValidatorFn } from '../types'; import { checkContext } from '../utils/check-context'; import { getItems } from '../utils/get-items'; import { replaceItems } from '../utils/replace-items'; +export type SyncValidatorFn = ( + values: any, + context: H +) => { [key: string]: string } | null; +export type AsyncValidatorFn = ( + values: any, + context: H +) => Promise; +export type ValidatorFn = + | SyncValidatorFn + | AsyncValidatorFn; + +export type AjvOrNewable = Ajv | (new (options?: AjvOptions) => Ajv); + +export interface ValidateSchemaOptions extends AjvOptions { + /** + * The hook will throw if the data does not match the JSON-Schema. error.errors will, by default, contain an array + * of error messages. You may change this with a custom formatting function. Its a reducing function which works + * similarly to Array.reduce(). + */ + addNewError: ( + currentFormattedMessages: any, + ajvErrorObject: ajvErrorObject, + itemsLen: number, + itemIndex: number + ) => any; +} + /** * Validate data using a validation function. - * {@link https://hooks-common.feathersjs.com/hooks.html#validate} + * @see https://hooks-common.feathersjs.com/hooks.html#validate */ -export function validate ( - validator: ValidatorFn -): Hook { - return (context: any) => { +export function validate(validator: ValidatorFn) { + return (context: H) => { checkContext(context, 'before', ['create', 'update', 'patch'], 'validate'); if (typeof validator !== 'function') { @@ -25,7 +50,8 @@ export function validate ( if (isPromise(results)) { return results.then((convertedValues: any) => { - if (convertedValues) { // if values have been sanitized + if (convertedValues) { + // if values have been sanitized replaceItems(context, convertedValues); } diff --git a/src/index.ts b/src/index.ts index 363a6bbc..4319455c 100755 --- a/src/index.ts +++ b/src/index.ts @@ -1,52 +1,51 @@ -export { actOnDefault, actOnDispatch } from './hooks/act-on-dispatch'; -export { alterItems } from './hooks/alter-items'; -export { cache } from './hooks/cache'; -export { checkContextIf } from './hooks/check-context-if'; -export { debug } from './hooks/debug'; -export { dePopulate } from './hooks/de-populate'; -export { disablePagination } from './hooks/disable-pagination'; -export { disallow } from './hooks/disallow'; -export { discard } from './hooks/discard'; -export { discardQuery } from './hooks/discard-query'; -export { fastJoin } from './hooks/fast-join'; -export { fgraphql } from './hooks/fgraphql'; -export { iff } from './hooks/iff'; -export { iff as when } from './hooks/iff'; -export { iffElse } from './hooks/iff-else' -export { isProvider } from './utils/is-provider'; -export { keep } from './hooks/keep'; -export { keepInArray } from './hooks/keep-in-array'; -export { keepQuery } from './hooks/keep-query'; -export { keepQueryInArray } from './hooks/keep-query-in-array'; -export { lowerCase } from './hooks/lower-case'; -export { mongoKeys } from './hooks/mongo-keys'; -export { paramsFromClient } from './hooks/params-from-client'; -export { populate } from './hooks/populate'; -export { preventChanges } from './hooks/prevent-changes'; -export { required } from './hooks/required'; -export { runHook } from './utils/run-hook'; -export { runParallel } from './hooks/run-parallel'; -export { sequelizeConvert } from './hooks/sequelize-convert'; -export { serialize } from './hooks/serialize'; -export { setField } from './hooks/set-field'; -export { setNow } from './hooks/set-now'; -export { setSlug } from './hooks/set-slug'; -export { sifter } from './hooks/sifter'; -export { softDelete } from './hooks/soft-delete'; -export { stashBefore } from './hooks/stash-before'; -export { traverse } from './hooks/traverse'; -export { unless } from './hooks/unless' -export { validate } from './hooks/validate'; -export { validateSchema } from './hooks/validate-schema'; +export * from './hooks/act-on-dispatch'; +export * from './hooks/alter-items'; +export * from './hooks/cache'; +export * from './utils/check-context-if'; +export * from './hooks/debug'; +export * from './hooks/de-populate'; +export * from './hooks/disable-pagination'; +export * from './hooks/disallow'; +export * from './hooks/discard'; +export * from './hooks/discard-query'; +export * from './hooks/fast-join'; +export * from './hooks/fgraphql'; +export * from './hooks/iff'; +export * from './hooks/iff-else'; +export * from './hooks/keep'; +export * from './hooks/keep-in-array'; +export * from './hooks/keep-query'; +export * from './hooks/keep-query-in-array'; +export * from './hooks/lower-case'; +export * from './hooks/mongo-keys'; +export * from './hooks/params-from-client'; +export * from './hooks/populate'; +export * from './hooks/prevent-changes'; +export * from './hooks/required'; +export * from './utils/run-hook'; +export * from './hooks/run-parallel'; +export * from './hooks/sequelize-convert'; +export * from './hooks/serialize'; +export * from './hooks/set-field'; +export * from './hooks/set-now'; +export * from './hooks/set-slug'; +export * from './hooks/sifter'; +export * from './hooks/soft-delete'; +export * from './hooks/stash-before'; +export * from './hooks/traverse'; +export * from './hooks/unless'; +export * from './hooks/validate'; +export * from './hooks/validate-schema'; -export { callingParamsDefaults, callingParams, makeCallingParams } from './utils/calling-params'; -export { checkContext } from './utils/check-context'; -export { combine } from './utils/combine' -export { every } from './utils/every'; -export { getItems } from './utils/get-items'; -export { isNot } from './utils/is-not'; -export { paramsForServer } from './utils/params-for-server'; -export { replaceItems } from './utils/replace-items'; -export { some } from './utils/some'; +export * from './utils/calling-params'; +export * from './utils/check-context'; +export * from './utils/combine'; +export * from './utils/every'; +export * from './utils/get-items'; +export * from './utils/is-not'; +export * from './utils/is-provider'; +export * from './utils/params-for-server'; +export * from './utils/replace-items'; +export * from './utils/some'; export * from './types'; diff --git a/src/types.ts b/src/types.ts index 7acc4400..ff328a60 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,210 +1,28 @@ -import type { Hook, HookContext, Query, Application } from '@feathersjs/feathers'; -import type { Ajv, ErrorObject as ajvErrorObject, Options as AjvOptions } from 'ajv'; -import type { parse, GraphQLFieldResolver } from 'graphql'; - -export type HookType = 'before' | 'after' | 'error'; -export type MethodName = 'find' | 'create' | 'get' | 'update' | 'patch' | 'remove'; -export type TransportName = 'socketio' | 'primus' | 'rest' | 'external' | 'server'; -export type Disablable = 'populate' | 'fastJoin' | 'ignoreDeletedAt' | 'softDelete' | 'softDelete2' | 'stashBefore'; - -export type SyncContextFunction = (context: HookContext) => T; -export type AsyncContextFunction = (context: HookContext) => Promise; -export type ContextFunction = (context: HookContext) => T | Promise; - -export type SyncPredicateFn = SyncContextFunction; -export type AsyncPredicateFn = AsyncContextFunction; -export type PredicateFn = ContextFunction; - -export type CacheMap = Map; - -export interface CacheOptions { - clone?(item: T): T; - makeCacheKey?(id: K): string; -} - -export interface CallingParamsOptions { - /** - * The params.query for the calling params. - */ - query?: any; - /** - * The names of the props in context.params to include in the new params. - */ - propNames?: string[]; - /** - * Additional props to add to the new params. - */ - newProps?: any; - /** - * The names of hooks to disable during the service call. populate, fastJoin, softDelete and stashBefore are supported. - */ - hooksToDisable?: Disablable[] | Disablable; - /** - * Ignore the defaults propNames and newProps. - */ - ignoreDefaults?: boolean; -} - -export interface ResolverContext extends HookContext { - _loaders: any; -} - -export type SimpleResolver = (...args: any[]) => (item: T, context: ResolverContext) => Promise; - -export interface RecursiveResolver { - resolver: SimpleResolver; - joins: ResolverMap; -} - -export interface ResolverMap { - after?: (context: ResolverContext) => void | Promise; - before?: (context: ResolverContext) => void | Promise; - joins: { - [property: string]: SimpleResolver | RecursiveResolver; - }; -} - -export type FGraphQLResolverMapFactory = (app: Application, runtime: any) => FGraphQLResolverMap; - -export interface FGraphQLResolverMap { - [i: string]: { - [i: string]: GraphQLFieldResolver - }; - Query: { - [i: string]: GraphQLFieldResolver - }; -} - -export interface FGraphQLOptions { - skipHookWhen?: SyncContextFunction; - inclAllFieldsServer?: boolean; - inclAllFieldsClient?: boolean; - inclAllFields?: boolean; - inclJoinedNames?: boolean; - extraAuthProps?: string[]; -} - -export interface FGraphQLHookOptions { - recordType: string; - schema: string; - resolvers: FGraphQLResolverMap | FGraphQLResolverMapFactory; - query: Query | SyncContextFunction; - options?: FGraphQLOptions; - runTime: any; - parse: typeof parse; -} - -export interface PopulateOptions { - schema: Partial | ((context: HookContext, options: PopulateOptions) => Partial); - checkPermissions?: (context: HookContext, path: string, permissions: any, depth: number) => boolean; - profile?: boolean; -} - -export interface PopulateSchema { - /** - * The name of the service providing the items, actually its path. - */ - service: string; - /** - * Where to place the items from the join - * dot notation - */ - nameAs: string; - /** - * The name of the field in the parent item for the relation. - * dot notation - */ - parentField: string; - /** - * The name of the field in the child item for the relation. - * Dot notation is allowed and will result in a query like { 'name.first': 'John' } which is not suitable for all DBs. - * You may use query or select to create a query suitable for your DB. - */ - childField: string; - - /** - * Who is allowed to perform this join. See checkPermissions above. - */ - permissions: any; - - /** - * An object to inject into context.params.query. - */ - query: any; - - /** - * A function whose result is injected into the query. - */ - select: (context: HookContext, parentItem: any, depth: number) => any; - - /** - * Force a single joined item to be stored as an array. - */ - asArray: boolean; - - /** - * Controls pagination for this service. - */ - paginate: boolean | number; - - /** - * Perform any populate or fastJoin registered on this service. - */ - useInnerPopulate: boolean; - /** - * Call the service as the server, not with the client’s transport. - */ - provider: string; - include: Partial | Partial[]; -} - -export interface SerializeSchema { - only?: string | string[]; - exclude?: string | string[]; - computed?: { - [propName: string]: (record: any, context: HookContext) => any - }; - - [key: string]: SerializeSchema | SerializeSchema['computed'] | string | string[] | undefined; -} - -export interface SequelizeConversion { - js: (sqlValue: any) => any; - sql: (jsValue: any) => any; -} - -export interface SequelizeConverts { - [name: string]: keyof C | 'boolean' | 'date' | 'json'; -} - -export type SoftDeleteOptionFunction = (context?: HookContext) => Promise<{ [key: string]: any }>; - -export interface SoftDeleteOptions { - deletedQuery?: { [key: string]: any } | SoftDeleteOptionFunction; - removeData?: { [key: string]: any } | SoftDeleteOptionFunction; -} - -export type SyncValidatorFn = (values: any, context: HookContext) => { [key: string]: string } | null; -export type AsyncValidatorFn = (values: any, context: HookContext) => Promise; -export type ValidatorFn = SyncValidatorFn | AsyncValidatorFn; - -export type AjvOrNewable = Ajv | (new (options?: AjvOptions) => Ajv); - -export interface ValidateSchemaOptions extends AjvOptions { - /** - * The hook will throw if the data does not match the JSON-Schema. error.errors will, by default, contain an array - * of error messages. You may change this with a custom formatting function. Its a reducing function which works - * similarly to Array.reduce(). - */ - addNewError: (currentFormattedMessages: any, ajvErrorObject: ajvErrorObject, itemsLen: number, itemIndex: number) => any; -} - -export interface IffHook extends Hook { - else(...hooks: Hook[]): Hook; -} - -export interface SetFieldOptions { - as: string - from: string - allowUndefined?: boolean -} +import type { HookContext } from '@feathersjs/feathers'; + +export const hookTypes = ['around', 'before', 'after', 'error'] as const; +export type HookType = typeof hookTypes[number]; + +export const methodNames = ['find', 'get', 'create', 'update', 'patch', 'remove'] as const; +export type MethodName = typeof methodNames[number]; + +export type TransportName = 'socketio' | 'rest' | 'external' | 'server'; + +export type SyncContextFunction = (context: H) => T; +export type AsyncContextFunction = ( + context: H +) => Promise; +export type ContextFunction = ( + context: H +) => T | Promise; + +export type SyncPredicateFn = SyncContextFunction; +export type AsyncPredicateFn = AsyncContextFunction< + boolean, + H +>; +export type PredicateFn = ContextFunction; + +export declare type HookFunction = ( + context: H +) => Promise | H | void; diff --git a/src/utils/calling-params.ts b/src/utils/calling-params.ts index 945a25ce..454d146e 100755 --- a/src/utils/calling-params.ts +++ b/src/utils/calling-params.ts @@ -1,23 +1,50 @@ import type { HookContext, Params } from '@feathersjs/feathers'; import _get from 'lodash/get.js'; import _set from 'lodash/set.js'; -import type { CallingParamsOptions, SyncContextFunction } from '../types'; + +export type Disablable = + | 'populate' + | 'fastJoin' + | 'ignoreDeletedAt' + | 'softDelete' + | 'softDelete2' + | 'stashBefore'; + +export interface CallingParamsOptions { + /** + * The params.query for the calling params. + */ + query?: any; + /** + * The names of the props in context.params to include in the new params. + */ + propNames?: string[]; + /** + * Additional props to add to the new params. + */ + newProps?: any; + /** + * The names of hooks to disable during the service call. populate, fastJoin, softDelete and stashBefore are supported. + */ + hooksToDisable?: Disablable[] | Disablable; + /** + * Ignore the defaults propNames and newProps. + */ + ignoreDefaults?: boolean; +} const stndAuthProps = ['provider', 'authenticated', 'user']; // feathers-authentication // App wide defaults const defaults = { propNames: stndAuthProps, - newProps: {} + newProps: {}, }; /** * Set defaults for building params for service calls with callingParams. (Utility function.) - * {@link https://hooks-common.feathersjs.com/hooks.html#callingparamsdefaults} + * @see https://hooks-common.feathersjs.com/utilities.html#callingparamsdefaults */ -export function callingParamsDefaults ( - propNames: string[], - newProps?: any -): void { +export function callingParamsDefaults(propNames: string[], newProps?: any): void { if (propNames) { defaults.propNames = Array.isArray(propNames) ? propNames : [propNames]; } @@ -29,16 +56,16 @@ export function callingParamsDefaults ( /** * Build params for a service call. (Utility function.) - * {@link https://hooks-common.feathersjs.com/hooks.html#callingparams} + * @see https://hooks-common.feathersjs.com/utilities.html#callingparams */ -export function callingParams ({ +export function callingParams({ query, propNames = [], newProps = {}, hooksToDisable = [], - ignoreDefaults -}: CallingParamsOptions = {}): SyncContextFunction { - return (context: any) => { + ignoreDefaults, +}: CallingParamsOptions = {}) { + return (context: H) => { propNames = Array.isArray(propNames) ? propNames : [propNames]; hooksToDisable = Array.isArray(hooksToDisable) ? hooksToDisable : [hooksToDisable]; @@ -46,7 +73,8 @@ export function callingParams ({ const allPropNames = ignoreDefaults ? propNames : [...defaults.propNames, ...propNames]; allPropNames.forEach(name => { - if (name) { // for makeCallingParams compatibility + if (name) { + // for makeCallingParams compatibility const value = _get(context.params, name); if (value !== undefined) { @@ -59,23 +87,27 @@ export function callingParams ({ hooksToDisable.forEach(name => { switch (name) { - case 'populate': // fall through - case 'fastJoin': - newParams._populate = 'skip'; - break; - case 'softDelete': - newParams.query = newParams.query || {}; - newParams.query.$disableSoftDelete = true; - break; - case 'softDelete2': - newParams.$disableSoftDelete2 = true; - break; - case 'ignoreDeletedAt': - newParams.$ignoreDeletedAt = true; - break; - case 'stashBefore': - newParams.disableStashBefore = true; - break; + case 'populate': // fall through + case 'fastJoin': + // @ts-ignore + newParams._populate = 'skip'; + break; + case 'softDelete': + newParams.query = newParams.query || {}; + newParams.query.$disableSoftDelete = true; + break; + case 'softDelete2': + // @ts-ignore + newParams.$disableSoftDelete2 = true; + break; + case 'ignoreDeletedAt': + // @ts-ignore + newParams.$ignoreDeletedAt = true; + break; + case 'stashBefore': + // @ts-ignore + newParams.disableStashBefore = true; + break; } }); @@ -86,22 +118,23 @@ export function callingParams ({ /** * You should prefer using the callingParams utility to makeCallingParams. * Build context.params for service calls. (Utility function.) - * {@link https://hooks-common.feathersjs.com/hooks.html#makecallingparams} + * @see https://hooks-common.feathersjs.com/utilities.html#makecallingparams */ -export function makeCallingParams ( - context: HookContext, +export function makeCallingParams( + context: H, query?: any, include?: string | string[], inject = {} ) { return callingParams({ query, - propNames: include === undefined - ? ['provider', 'authenticated', 'user'] - : Array.isArray(include) + propNames: + include === undefined + ? ['provider', 'authenticated', 'user'] + : Array.isArray(include) ? include : [include], newProps: Object.assign({}, { _populate: 'skip' }, inject), - ignoreDefaults: true + ignoreDefaults: true, })(context); } diff --git a/src/utils/check-context-if.ts b/src/utils/check-context-if.ts new file mode 100755 index 00000000..641ec248 --- /dev/null +++ b/src/utils/check-context-if.ts @@ -0,0 +1,23 @@ +import type { HookContext } from '@feathersjs/feathers'; +import type { MethodName, HookType } from '../types'; +import { checkContext } from './check-context'; + +// TODO: Add checkContextIf to docs +/** + * Like checkContext, but only if the given type matches the hook's type. + * Restrict a hook to run for certain methods and method types. (Utility function.) + * + * @see https://hooks-common.feathersjs.com/hooks.html#checkcontextif + */ +export function checkContextIf( + context: H, + type: HookType | HookType[], + methods?: MethodName | MethodName[] | null, + label?: string +) { + if (Array.isArray(type) ? !type.includes(context.type) : type !== context.type) { + return; + } + + checkContext(context, type, methods, label); +} diff --git a/src/utils/check-context.ts b/src/utils/check-context.ts index a1e7586b..cfdd7db4 100755 --- a/src/utils/check-context.ts +++ b/src/utils/check-context.ts @@ -1,14 +1,13 @@ import type { HookContext } from '@feathersjs/feathers'; +import { methodNames } from '../types'; import type { HookType, MethodName } from '../types'; -const stndMethods = ['find', 'get', 'create', 'update', 'patch', 'remove']; - /** * Restrict a hook to run for certain methods and method types. (Utility function.) - * {@link https://hooks-common.feathersjs.com/hooks.html#checkcontext} + * @see https://hooks-common.feathersjs.com/utilities.html#checkcontext */ -export function checkContext ( - context: HookContext, +export function checkContext( + context: H, type?: HookType | HookType[] | null, methods?: MethodName | MethodName[] | null, label = 'anonymous' @@ -20,13 +19,17 @@ export function checkContext ( } } - if (!methods) { return; } - if (stndMethods.indexOf(context.method) === -1) { return; } // allow custom methods + if (!methods) { + return; + } + if (!methodNames.includes(context.method as any)) { + return; + } // allow custom methods - const myMethods = Array.isArray(methods) ? methods : [methods]; // safe enough for allowed values + const methodsArr = Array.isArray(methods) ? methods : [methods]; // safe enough for allowed values - if (myMethods.length > 0 && myMethods.indexOf(context.method) === -1) { - const msg = JSON.stringify(myMethods); + if (methodsArr.length > 0 && !methodsArr.includes(context.method as any)) { + const msg = JSON.stringify(methodsArr); throw new Error(`The '${label}' hook can only be used on the '${msg}' service method(s).`); } } diff --git a/src/utils/combine.ts b/src/utils/combine.ts index 8895bac9..18290136 100755 --- a/src/utils/combine.ts +++ b/src/utils/combine.ts @@ -1,14 +1,57 @@ -import type { Hook } from '@feathersjs/feathers'; - -import { hooks } from '@feathersjs/commons'; -const { processHooks } = hooks +import type { HookContext } from '@feathersjs/feathers'; +import type { HookFunction } from '../types'; /** * Sequentially execute multiple sync or async hooks. - * {@link https://hooks-common.feathersjs.com/hooks.html#combine} + * @see https://hooks-common.feathersjs.com/utilities.html#combine */ -export function combine (...serviceHooks: Hook[]): Hook { - return function (this: any, context: any) { - return processHooks.call(this, serviceHooks, context); +export function combine(...serviceHooks: HookFunction[]) { + // if (serviceHooks.length && Array.isArray(serviceHooks[0])) { + // serviceHooks = serviceHooks[0]; + // } + + const isContext = function (ctx: H) { + return typeof ctx?.method === 'string' && typeof ctx?.type === 'string'; + }; + + return async function (context: H) { + let ctx = context; + + const updateCurrentHook = (current: void | H) => { + // Either use the returned hook object or the current + // hook object from the chain if the hook returned undefined + if (current) { + if (!isContext(current)) { + throw new Error( + `${ctx.type} hook for '${ctx.method}' method returned invalid hook object` + ); + } + + ctx = current; + } + + return ctx; + }; + + // Go through all hooks and chain them into our promise + const promise = serviceHooks.reduce(async (current, fn) => { + // @ts-ignore + const hook = fn.bind(this); + + // Use the returned hook object or the old one + const currentHook = await current; + const currentCtx = await hook(currentHook); + // @ts-ignore + return updateCurrentHook(currentCtx); + }, Promise.resolve(ctx)); + + try { + await promise; + return ctx; + } catch (error: any) { + // Add the hook information to any errors + error.hook = ctx; + throw error; + } }; } diff --git a/src/utils/every.ts b/src/utils/every.ts index 0f329f26..ad9d6055 100755 --- a/src/utils/every.ts +++ b/src/utils/every.ts @@ -1,12 +1,13 @@ +import type { HookContext } from '@feathersjs/feathers'; import type { AsyncPredicateFn, PredicateFn } from '../types'; /** * Return the and of a series of sync or async predicate functions. - * {@link https://hooks-common.feathersjs.com/hooks.html#every} + * @see https://hooks-common.feathersjs.com/utilities.html#every */ -export function every ( - ...predicates: PredicateFn[] -): AsyncPredicateFn { +export function every( + ...predicates: PredicateFn[] +): AsyncPredicateFn { return async function (this: any, ...fnArgs: any[]) { // @ts-ignore const promises = predicates.map(fn => fn.apply(this, fnArgs)); diff --git a/src/utils/get-items.ts b/src/utils/get-items.ts index c3ec2d54..de69848b 100755 --- a/src/utils/get-items.ts +++ b/src/utils/get-items.ts @@ -2,11 +2,14 @@ import type { HookContext } from '@feathersjs/feathers'; /** * Get the records in context.data or context.result[.data]. (Utility function.) - * {@link https://hooks-common.feathersjs.com/hooks.html#getitems} + * + * @see https://hooks-common.feathersjs.com/utilities.html#getitems */ -export function getItems (context: HookContext): any { +export function getItems(context: H): any { + // @ts-ignore if (context.params && context.params._actOn === 'dispatch') return context.dispatch; const items = context.type === 'before' ? context.data : context.result; + // @ts-ignore return items && context.method === 'find' ? items.data || items : items; } diff --git a/src/utils/is-not.ts b/src/utils/is-not.ts index 19dc6985..045f6fb0 100755 --- a/src/utils/is-not.ts +++ b/src/utils/is-not.ts @@ -1,20 +1,21 @@ -import errors from '@feathersjs/errors'; -const { MethodNotAllowed } = errors; +import { MethodNotAllowed } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; import { isPromise } from '../common'; import type { PredicateFn } from '../types'; /** * Negate a sync or async predicate function. - * {@link https://hooks-common.feathersjs.com/hooks.html#isnot} + * + * @see https://hooks-common.feathersjs.com/utilities.html#isnot */ -export function isNot ( - predicate: boolean | PredicateFn -): PredicateFn { +export function isNot( + predicate: boolean | PredicateFn +): PredicateFn { if (typeof predicate !== 'function') { throw new MethodNotAllowed('Expected function as param. (isNot)'); } - return (context: any) => { + return (context: H) => { const result = predicate(context); // Should we pass a clone? (safety vs performance) if (!isPromise(result)) { diff --git a/src/utils/is-provider.ts b/src/utils/is-provider.ts index 31a19f7f..b40f41e5 100755 --- a/src/utils/is-provider.ts +++ b/src/utils/is-provider.ts @@ -1,24 +1,24 @@ -import errors from '@feathersjs/errors'; -const { MethodNotAllowed } = errors; -import type { SyncContextFunction, TransportName } from '../types'; +import { MethodNotAllowed } from '@feathersjs/errors'; +import type { HookContext } from '@feathersjs/feathers'; +import type { TransportName } from '../types'; /** * Check which transport provided the service call. - * {@link https://hooks-common.feathersjs.com/hooks.html#isprovider} + * @see https://hooks-common.feathersjs.com/utilities.html#isprovider */ -export function isProvider ( - ...providers: TransportName[] -): SyncContextFunction { +export function isProvider(...providers: TransportName[]) { if (!providers.length) { - throw new MethodNotAllowed('Calling iff() predicate incorrectly. (isProvider)'); + throw new MethodNotAllowed('Calling isProvider predicate incorrectly.'); } - return (context: any) => { - const hookProvider = (context.params || {}).provider; + return (context: H) => { + const hookProvider = context.params.provider; - return providers.some(provider => provider === hookProvider || - (provider === 'server' && !hookProvider) || - (provider === 'external' && !!hookProvider) + return providers.some( + provider => + provider === hookProvider || + (provider === 'server' && !hookProvider) || + (provider === 'external' && !!hookProvider) ); }; } diff --git a/src/utils/params-for-server.ts b/src/utils/params-for-server.ts index 3cb79e4b..eeec4eb1 100755 --- a/src/utils/params-for-server.ts +++ b/src/utils/params-for-server.ts @@ -2,12 +2,10 @@ import type { Params } from '@feathersjs/feathers'; /** * Pass an explicit context.params from client to server. Client-side. (Utility function.) - * {@link https://hooks-common.feathersjs.com/hooks.html#ParamsForServer} + * + * @see https://hooks-common.feathersjs.com/utilities.html#paramsforserver */ -export function paramsForServer ( - params?: Params, - ...whitelist: string[] -): Params { +export function paramsForServer(params?: Params, ...whitelist: string[]): Params { const ifWhitelist = !!whitelist.length; const _params: Record = Object.assign({}, params); diff --git a/src/utils/replace-items.ts b/src/utils/replace-items.ts index 8f4aa7b5..8b015413 100755 --- a/src/utils/replace-items.ts +++ b/src/utils/replace-items.ts @@ -2,9 +2,10 @@ import type { HookContext } from '@feathersjs/feathers'; /** * Replace the records in context.data or context.result[.data]. (Utility function.) - * {@link https://hooks-common.feathersjs.com/hooks.html#replaceitems} + * @see https://hooks-common.feathersjs.com/utilities.html#replaceitems */ -export function replaceItems (context: HookContext, items: any): void { +export function replaceItems(context: H, items: any): void { + // @ts-ignore if (context.params && context.params._actOn === 'dispatch') { context.dispatch = items; return; diff --git a/src/utils/run-hook.ts b/src/utils/run-hook.ts index de6642f4..2745d117 100755 --- a/src/utils/run-hook.ts +++ b/src/utils/run-hook.ts @@ -1,34 +1,41 @@ -import type { Hook, HookContext, Paginated } from '@feathersjs/feathers'; +import type { HookContext, Paginated } from '@feathersjs/feathers'; /** * Let's you call a hook right after the service call. (Utility function.) - * {@link https://hooks-common.feathersjs.com/hooks.html#runhook} + * @see https://hooks-common.feathersjs.com/utilities.html#runhook */ -export function runHook ( - context?: HookContext -): (hook: Hook) => (data: any[] | Paginated) => Promise { +export function runHook( + context?: H +): (hook: any) => (data: any[] | Paginated) => Promise { const extraContent = context; // cannot access extraContent1 below. why not? - return (hookFunc: any) => (result: any) => { + return hookFunc => result => { const ctx = Object.assign({}, { type: 'after', params: {}, result }, extraContent); + // @ts-ignore if (typeof result === 'object' && result !== null && result.total && result.data) { // @ts-expect-error method is readonly ctx.method = 'find'; } - return Promise.resolve() - .then(() => hookFunc(ctx)) - .then(newContext => { - if (newContext === undefined) { return; } + return ( + Promise.resolve() + // @ts-ignore + .then(() => hookFunc(ctx)) + .then(newContext => { + if (!newContext) { + return; + } - const result = newContext.result; + const result = newContext.result; - if (typeof result === 'object' && result !== null && result.total && result.data) { // find - return newContext.result; - } + if (typeof result === 'object' && result !== null && result.total && result.data) { + // find + return newContext.result; + } - return newContext.result.data || newContext.result; - }); + return newContext.result.data || newContext.result; + }) + ); }; } diff --git a/src/utils/some.ts b/src/utils/some.ts index 3a39bf52..7baf1506 100755 --- a/src/utils/some.ts +++ b/src/utils/some.ts @@ -3,12 +3,12 @@ import type { AsyncPredicateFn, PredicateFn } from '../types'; /** * Return the or of a series of sync or async predicate functions. - * {@link https://hooks-common.feathersjs.com/hooks.html#some} + * @see https://hooks-common.feathersjs.com/utilities.html#some */ -export function some ( - ...predicates: PredicateFn[] -): AsyncPredicateFn { - return async function (this: any, context: HookContext) { +export function some( + ...predicates: PredicateFn[] +): AsyncPredicateFn { + return async function (this: any, context: H) { const promises = predicates.map(fn => fn.apply(this, [context])); const results = await Promise.all(promises); diff --git a/test/common/traverse.test.ts b/test/common/traverse.test.ts index 6fb7f0ff..33327d3d 100755 --- a/test/common/traverse.test.ts +++ b/test/common/traverse.test.ts @@ -13,14 +13,14 @@ describe('services traverse', () => { type: 'before', method: 'create', data: { a: ' a b ' }, - params: { query: { b: ' b b ' } } + params: { query: { b: ' b b ' } }, }; hookBeforeArray = { type: 'before', method: 'create', data: [{ a: ' a b ' }, { c: ' c ' }], - params: { query: { b: ' b b ' }, something: { c: ' c', d: 'd ' } } + params: { query: { b: ' b b ' }, something: { c: ' c', d: 'd ' } }, }; hookAfter = { @@ -28,7 +28,7 @@ describe('services traverse', () => { method: 'create', data: { q: 1 }, params: { query: { b: ' b b ' } }, - result: { a: ' a b ' } + result: { a: ' a b ' }, }; hookAfterArray = { @@ -36,7 +36,7 @@ describe('services traverse', () => { method: 'create', data: { q: 1 }, params: { query: { b: ' b b ' } }, - result: [{ a: ' a b ' }, { c: ' c ' }] + result: [{ a: ' a b ' }, { c: ' c ' }], }; trimmer = function (this: any, node: any) { @@ -50,6 +50,7 @@ describe('services traverse', () => { const result = clone(hookBefore); result.data = { a: 'a b' }; + // @ts-ignore traverse(trimmer)(hookBefore); assert.deepEqual(hookBefore, result); @@ -59,6 +60,7 @@ describe('services traverse', () => { const result = clone(hookBeforeArray); result.data = [{ a: 'a b' }, { c: 'c' }]; + // @ts-ignore traverse(trimmer)(hookBeforeArray); assert.deepEqual(hookBeforeArray, result); @@ -68,6 +70,7 @@ describe('services traverse', () => { const result = clone(hookAfter); result.result = { a: 'a b' }; + // @ts-ignore traverse(trimmer)(hookAfter); assert.deepEqual(hookAfter, result); @@ -77,6 +80,7 @@ describe('services traverse', () => { const result = clone(hookAfterArray); result.result = [{ a: 'a b' }, { c: 'c' }]; + // @ts-ignore traverse(trimmer)(hookAfterArray); assert.deepEqual(hookAfterArray, result); @@ -86,6 +90,7 @@ describe('services traverse', () => { const result = clone(hookBefore); result.params.query = { b: 'b b' }; + // @ts-ignore traverse(trimmer, (hook: any) => hook.params.query)(hookBefore); assert.deepEqual(hookBefore, result); @@ -95,6 +100,7 @@ describe('services traverse', () => { const result = clone(hookBeforeArray); result.params = { query: { b: 'b b' }, something: { c: 'c', d: 'd' } }; + // @ts-ignore traverse(trimmer, (hook: any) => [hook.params.query, hook.params.something])(hookBeforeArray); assert.deepEqual(hookBeforeArray, result); @@ -104,6 +110,7 @@ describe('services traverse', () => { const obj: any = { query: { b: 'b b' }, something: { c: 'c', d: 'd' } }; const result = clone(obj); + // @ts-ignore traverse(trimmer, obj)(hookBeforeArray); assert.deepEqual(obj, result); @@ -112,6 +119,6 @@ describe('services traverse', () => { // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/helpers/config-app.ts b/test/helpers/config-app.ts index c134eb86..20fa417d 100755 --- a/test/helpers/config-app.ts +++ b/test/helpers/config-app.ts @@ -1,4 +1,4 @@ -import feathers from '@feathersjs/feathers'; +import { feathers } from '@feathersjs/feathers'; import memory from 'feathers-memory'; import getInitDb from './get-init-db'; @@ -8,32 +8,31 @@ export default function (dbNames: any) { users, comments, posts, - recommendation + recommendation, }; - return feathers() - .configure(services); + return feathers().configure(services); - function services (this: any) { + function services(this: any) { dbNames.forEach((name: any) => { // console.log(`configure service ${name}`); this.configure(serviceConfigs[name]); }); } - function users (this: any) { + function users(this: any) { this.use('users', memory(getInitDb('users'))); } - function comments (this: any) { + function comments(this: any) { this.use('comments', memory(getInitDb('comments'))); } - function posts (this: any) { + function posts(this: any) { this.use('posts', memory(getInitDb('posts'))); } - function recommendation (this: any) { + function recommendation(this: any) { this.use('recommendation', memory(getInitDb('recommendation'))); } } diff --git a/test/helpers/get-init-db.ts b/test/helpers/get-init-db.ts index 62014e06..d686dcf1 100755 --- a/test/helpers/get-init-db.ts +++ b/test/helpers/get-init-db.ts @@ -1,7 +1,19 @@ export default function (name: any) { const users: any = { - 0: { id: 'as61389dadhga62343hads6712', name: 'Author 1', email: 'author1@posties.com', password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', age: 55 }, - 1: { id: '167asdf3689348sdad7312131s', name: 'Author 2', email: 'author2@posties.com', password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', age: 16 } + 0: { + id: 'as61389dadhga62343hads6712', + name: 'Author 1', + email: 'author1@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 55, + }, + 1: { + id: '167asdf3689348sdad7312131s', + name: 'Author 2', + email: 'author2@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 16, + }, }; const comments: any = { @@ -11,7 +23,7 @@ export default function (name: any) { title: 'Comment 1', content: 'Lorem ipsum dolor sit amet 1', author: 'as61389dadhga62343hads6712', - createdAt: 1480793101559 + createdAt: 1480793101559, }, 2: { id: 2, @@ -19,7 +31,7 @@ export default function (name: any) { title: 'Comment 2', content: 'Lorem ipsum dolor sit amet 2', author: 'as61389dadhga62343hads6712', - createdAt: 1480793101559 + createdAt: 1480793101559, }, 3: { id: 3, @@ -27,8 +39,8 @@ export default function (name: any) { title: 'Comment 3', content: 'Lorem ipsum dolor sit amet 3', author: '167asdf3689348sdad7312131s', - createdAt: 1480793101559 - } + createdAt: 1480793101559, + }, }; const posts: any = { @@ -38,7 +50,7 @@ export default function (name: any) { content: 'Lorem ipsum dolor sit amet 4', author: 'as61389dadhga62343hads6712', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 + createdAt: 1480793101559, }, 2: { id: 2, @@ -46,7 +58,7 @@ export default function (name: any) { content: 'Lorem ipsum dolor sit amet 5', author: '167asdf3689348sdad7312131s', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 + createdAt: 1480793101559, }, 3: { id: 3, @@ -54,7 +66,7 @@ export default function (name: any) { content: 'Lorem ipsum dolor sit amet 5', author: '167asdf3689348sdad7312131s', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 + createdAt: 1480793101559, }, 4: { id: 4, @@ -62,38 +74,38 @@ export default function (name: any) { content: 'Lorem ipsum dolor sit amet 5', author: '167asdf3689348sdad7312131s', readers: [], - createdAt: 1480793101559 - } + createdAt: 1480793101559, + }, }; const recommendation: any = { 1: { userId: 'as61389dadhga62343hads6712', postId: 1, - updatedAt: 1480793101475 + updatedAt: 1480793101475, }, 2: { userId: 'as61389dadhga62343hads6712', postId: 2, - updatedAt: 1480793101475 + updatedAt: 1480793101475, }, 3: { userId: '167asdf3689348sdad7312131s', postId: 1, - updatedAt: 1480793101475 - } + updatedAt: 1480793101475, + }, }; const dbs: any = { users, comments, posts, - recommendation + recommendation, }; // console.log(`returning db for ${name}`); return { store: dbs[name], - idField: '_id' + idField: '_id', }; } diff --git a/test/helpers/make-services.ts b/test/helpers/make-services.ts index 169725ca..659526bd 100755 --- a/test/helpers/make-services.ts +++ b/test/helpers/make-services.ts @@ -4,15 +4,16 @@ const postsStore = [ body: 'John post', userId: 101, starIds: [102, 103, 104], - reputation: [ // The current populate hook cannot handle this structure. + reputation: [ + // The current populate hook cannot handle this structure. { userId: 102, points: 1 }, { userId: 103, points: 1 }, - { userId: 104, points: 1 } - ] + { userId: 104, points: 1 }, + ], }, { id: 2, body: 'Marshall post', userId: 102, starIds: [101, 103, 104] }, { id: 3, body: 'Barbara post', userId: 103 }, - { id: 4, body: 'Aubree post', userId: 104 } + { id: 4, body: 'Aubree post', userId: 104 }, ]; const commentsStore = [ @@ -22,23 +23,23 @@ const commentsStore = [ { id: 14, text: 'Marshall post John comment 14', postId: 2, userId: 101 }, { id: 15, text: 'Marshall post John comment 15', postId: 2, userId: 101 }, { id: 16, text: 'Barbara post John comment 16', postId: 3, userId: 101 }, - { id: 17, text: 'Aubree post Marshall comment 17', postId: 4, userId: 102 } + { id: 17, text: 'Aubree post Marshall comment 17', postId: 4, userId: 102 }, ]; const usersStore = [ { id: 101, name: 'John' }, { id: 102, name: 'Marshall' }, { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' } + { id: 104, name: 'Aubree' }, ]; export const posts: any = makeService(postsStore, 'posts'); -export const comments: any = makeService(commentsStore, 'comments') -export const users: any = makeService(usersStore, 'users') +export const comments: any = makeService(commentsStore, 'comments'); +export const users: any = makeService(usersStore, 'users'); -function makeService (store1: any, _name: any) { +function makeService(store1: any, _name: any) { return { - get (id: any) { + get(id: any) { // console.log(`... ${name} get ${id}`); const store = clone(store1); @@ -49,7 +50,7 @@ function makeService (store1: any, _name: any) { throw Error(`post id ${id} not found`); }, - find (params: any) { + find(params: any) { // console.log(`... ${name} find`, params ? params.query : ''); const store = clone(store1); @@ -59,25 +60,28 @@ function makeService (store1: any, _name: any) { const value = params.query[field]; const $select = params.query.$select; - return asyncReturn(store - .filter((post: any) => { - return typeof value !== 'object' - ? post[field] === value - : value.$in.indexOf(post[field]) !== -1; - }) - .map((post: any) => pluck(post, $select)) + return asyncReturn( + store + .filter((post: any) => { + return typeof value !== 'object' + ? post[field] === value + : value.$in.indexOf(post[field]) !== -1; + }) + .map((post: any) => pluck(post, $select)) ); - } + }, }; } -function asyncReturn (value: any) { +function asyncReturn(value: any) { return new Promise(resolve => { - setTimeout(() => { resolve(value); }, 10); + setTimeout(() => { + resolve(value); + }, 10); }); } -function pluck (obj: any, fields: any) { +function pluck(obj: any, fields: any) { if (!fields) return obj; const res: any = {}; @@ -91,6 +95,6 @@ function pluck (obj: any, fields: any) { return res; } -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/act-on-dispatch.test.ts b/test/hooks/act-on-dispatch.test.ts index 184c3d59..9786895e 100755 --- a/test/hooks/act-on-dispatch.test.ts +++ b/test/hooks/act-on-dispatch.test.ts @@ -1,15 +1,13 @@ - +import type { HookContext } from '@feathersjs/feathers'; import { assert } from 'chai'; import { actOnDefault, actOnDispatch, combine, getItems, replaceItems } from '../../src'; let hookBefore: any; -function testHook (what: any, code: any) { - return (context: any) => { +function testHook(what: any, code: any) { + return (context: HookContext) => { if (context.params._actOn !== what) { - throw new Error( - `Hook code ${code} expected ${what} found ${context.params._actOn}` - ); + throw new Error(`Hook code ${code} expected ${what} found ${context.params._actOn}`); } context.params._actOnCodes.push(code); @@ -19,12 +17,18 @@ function testHook (what: any, code: any) { describe('services actOn', () => { describe('Call hooks which do not call other hooks', () => { beforeEach(() => { - hookBefore = { type: 'before', method: 'get', params: { _actOnCodes: [] } }; + hookBefore = { + type: 'before', + method: 'get', + params: { _actOnCodes: [] }, + }; }); it('actOnDefault', async () => { const result: any = await actOnDefault( - testHook(undefined, 1), testHook(undefined, 2), testHook(undefined, 3) + testHook(undefined, 1), + testHook(undefined, 2), + testHook(undefined, 3) )(hookBefore); assert.deepEqual(result.params._actOnCodes, [1, 2, 3]); @@ -32,7 +36,9 @@ describe('services actOn', () => { it('actOnDispatch', async () => { const result: any = await actOnDispatch( - testHook('dispatch', 10), testHook('dispatch', 20), testHook('dispatch', 30) + testHook('dispatch', 10), + testHook('dispatch', 20), + testHook('dispatch', 30) )(hookBefore); assert.deepEqual(result.params._actOnCodes, [10, 20, 30]); @@ -41,7 +47,11 @@ describe('services actOn', () => { describe('Call hooks calling others same actOn', () => { beforeEach(() => { - hookBefore = { type: 'before', method: 'get', params: { _actOnCodes: [] } }; + hookBefore = { + type: 'before', + method: 'get', + params: { _actOnCodes: [] }, + }; }); it('actOnDefault calling actOnDefault', async () => { @@ -80,7 +90,7 @@ describe('services actOn', () => { data: { a: 1 }, result: { b: 2 }, dispatch: { c: 3 }, - params: { _actOn: 'dispatch' } + params: { _actOn: 'dispatch' }, }; }); diff --git a/test/hooks/alter-items.test.ts b/test/hooks/alter-items.test.ts index 32895f94..412a30ff 100755 --- a/test/hooks/alter-items.test.ts +++ b/test/hooks/alter-items.test.ts @@ -13,13 +13,13 @@ describe('services alterItems', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe' } + data: { first: 'John', last: 'Doe' }, }; hookAfter = { type: 'after', method: 'create', params: { provider: 'rest' }, - result: { first: 'Jane', last: 'Doe' } + result: { first: 'Jane', last: 'Doe' }, }; hookFindPaginate = { type: 'after', @@ -29,9 +29,9 @@ describe('services alterItems', () => { total: 2, data: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] - } + { first: 'Jane', last: 'Doe' }, + ], + }, }; hookFind = { type: 'after', @@ -39,8 +39,8 @@ describe('services alterItems', () => { params: { provider: 'rest' }, result: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] + { first: 'Jane', last: 'Doe' }, + ], }; hookCreateMulti = { type: 'before', @@ -48,8 +48,8 @@ describe('services alterItems', () => { params: { provider: 'rest' }, data: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] + { first: 'Jane', last: 'Doe' }, + ], }; }); @@ -61,7 +61,9 @@ describe('services alterItems', () => { it('context is 2nd param', () => { let contextParam; - alterItems((_rec: any, context: any) => { contextParam = context; })(hookBefore); + alterItems((_rec: any, context: any) => { + contextParam = context; + })(hookBefore); assert.deepEqual(contextParam, hookBefore); }); @@ -78,36 +80,43 @@ describe('services alterItems', () => { }); it('updates hook before::create', () => { - alterItems((rec: any) => { rec.state = 'UT'; })(hookBefore); + alterItems((rec: any) => { + rec.state = 'UT'; + })(hookBefore); assert.deepEqual(hookBefore.data, { first: 'John', last: 'Doe', state: 'UT' }); }); it('updates hook before::create::multi', () => { - alterItems((rec: any) => { rec.state = 'UT'; })(hookCreateMulti); + alterItems((rec: any) => { + rec.state = 'UT'; + })(hookCreateMulti); assert.deepEqual(hookCreateMulti.data, [ { first: 'John', last: 'Doe', state: 'UT' }, - { first: 'Jane', last: 'Doe', state: 'UT' } + { first: 'Jane', last: 'Doe', state: 'UT' }, ]); }); it('updates hook after::find with pagination', () => { - alterItems((rec: any) => { delete rec.last; })(hookFindPaginate); - assert.deepEqual(hookFindPaginate.result.data, [ - { first: 'John' }, - { first: 'Jane' } - ]); + alterItems((rec: any) => { + delete rec.last; + })(hookFindPaginate); + assert.deepEqual(hookFindPaginate.result.data, [{ first: 'John' }, { first: 'Jane' }]); }); it('updates hook after::find with no pagination', () => { - alterItems((rec: any) => { rec.new = rec.first; })(hookFind); + alterItems((rec: any) => { + rec.new = rec.first; + })(hookFind); assert.deepEqual(hookFind.result, [ { first: 'John', last: 'Doe', new: 'John' }, - { first: 'Jane', last: 'Doe', new: 'Jane' } + { first: 'Jane', last: 'Doe', new: 'Jane' }, ]); }); it('updates hook after', () => { - alterItems((rec: any) => { rec.new = rec.first; })(hookAfter); + alterItems((rec: any) => { + rec.new = rec.first; + })(hookAfter); assert.deepEqual(hookAfter.result, { first: 'Jane', last: 'Doe', new: 'Jane' }); }); @@ -118,17 +127,14 @@ describe('services alterItems', () => { it('updates hook after::find with pagination with new item returned', () => { alterItems((rec: any) => Object.assign({}, { first: rec.first }))(hookFindPaginate); - assert.deepEqual(hookFindPaginate.result.data, [ - { first: 'John' }, - { first: 'Jane' } - ]); + assert.deepEqual(hookFindPaginate.result.data, [{ first: 'John' }, { first: 'Jane' }]); }); it('updates hook after::find with pagination with new item returned', () => { alterItems((rec: any) => Object.assign({}, rec, { new: rec.first }))(hookFind); assert.deepEqual(hookFind.result, [ { first: 'John', last: 'Doe', new: 'John' }, - { first: 'Jane', last: 'Doe', new: 'Jane' } + { first: 'Jane', last: 'Doe', new: 'Jane' }, ]); }); @@ -137,19 +143,24 @@ describe('services alterItems', () => { assert.deepEqual(hookAfter.result, { first: 'Jane', last: 'Doe', new: 'Jane' }); }); - it('returns a promise that contains context', () => { - return alterItems((rec: any) => { + it('returns a promise that contains context', async () => { + const promise = alterItems((rec: any) => { rec.state = 'UT'; return Promise.resolve(); - // @ts-ignore - })(hookBefore).then((context: any) => { - assert.deepEqual(context, hookBefore); - }); + })(hookBefore); + + assert.ok(promise instanceof Promise); + + const result = await promise; + + assert.deepEqual(result, hookBefore); }); it('updates hook before::create with new item returned', () => { // @ts-ignore - return alterItems((rec: any) => Promise.resolve(Object.assign({}, rec, { state: 'UT' })))(hookBefore).then(() => { + return alterItems((rec: any) => Promise.resolve(Object.assign({}, rec, { state: 'UT' })))( + hookBefore + ).then(() => { assert.deepEqual(hookBefore.data, { first: 'John', last: 'Doe', state: 'UT' }); }); }); @@ -185,7 +196,9 @@ describe('services alterItems', () => { it('updates hook after::create with new item returned', () => { // @ts-ignore - return alterItems((rec: any) => Promise.resolve(Object.assign({}, rec, { new: rec.first })))(hookAfter).then(() => { + return alterItems((rec: any) => Promise.resolve(Object.assign({}, rec, { new: rec.first })))( + hookAfter + ).then(() => { assert.deepEqual(hookAfter.result, { first: 'Jane', last: 'Doe', new: 'Jane' }); }); }); @@ -196,10 +209,7 @@ describe('services alterItems', () => { return Promise.resolve(); // @ts-ignore })(hookFindPaginate).then(() => { - assert.deepEqual(hookFindPaginate.result.data, [ - { first: 'John' }, - { first: 'Jane' } - ]); + assert.deepEqual(hookFindPaginate.result.data, [{ first: 'John' }, { first: 'Jane' }]); }); }); @@ -211,27 +221,28 @@ describe('services alterItems', () => { })(hookFind).then(() => { assert.deepEqual(hookFind.result, [ { first: 'John', last: 'Doe', new: 'John' }, - { first: 'Jane', last: 'Doe', new: 'Jane' } + { first: 'Jane', last: 'Doe', new: 'Jane' }, ]); }); }); it('updates hook after::find with pagination with new item returned', () => { // @ts-ignore - return alterItems((rec: any) => Promise.resolve(Object.assign({}, { first: rec.first })))(hookFindPaginate).then(() => { - assert.deepEqual(hookFindPaginate.result.data, [ - { first: 'John' }, - { first: 'Jane' } - ]); + return alterItems((rec: any) => Promise.resolve(Object.assign({}, { first: rec.first })))( + hookFindPaginate + ).then(() => { + assert.deepEqual(hookFindPaginate.result.data, [{ first: 'John' }, { first: 'Jane' }]); }); }); it('updates hook after::find with no pagination with new item returned', () => { // @ts-ignore - return alterItems((rec: any) => Promise.resolve(Object.assign({}, rec, { new: rec.first })))(hookFind).then(() => { + return alterItems((rec: any) => Promise.resolve(Object.assign({}, rec, { new: rec.first })))( + hookFind + ).then(() => { assert.deepEqual(hookFind.result, [ { first: 'John', last: 'Doe', new: 'John' }, - { first: 'Jane', last: 'Doe', new: 'Jane' } + { first: 'Jane', last: 'Doe', new: 'Jane' }, ]); }); }); diff --git a/test/hooks/cache.test.ts b/test/hooks/cache.test.ts index e62a23bb..2bae4485 100755 --- a/test/hooks/cache.test.ts +++ b/test/hooks/cache.test.ts @@ -1,6 +1,6 @@ - import { assert } from 'chai'; import { cache } from '../../src'; + // @ts-ignore import CacheMap from '@feathers-plus/cache'; @@ -31,7 +31,7 @@ describe('service cache', () => { id: undefined, method: undefined, params: { provider: 'rest' }, - data: { id: 1, first: 'John', last: 'Doe' } + data: { id: 1, first: 'John', last: 'Doe' }, }; hookBeforeMulti = { type: 'before', @@ -40,22 +40,22 @@ describe('service cache', () => { params: { provider: 'rest' }, data: [ { id: 1, first: 'John', last: 'Doe' }, - { id: 2, first: 'Jane', last: 'Doe' } - ] + { id: 2, first: 'Jane', last: 'Doe' }, + ], }; hookAfterSingle = { type: 'after', id: undefined, method: undefined, params: { provider: 'rest' }, - result: { id: 1, first: 'Jane', last: 'Doe' } + result: { id: 1, first: 'Jane', last: 'Doe' }, }; hookAfterSingleNormalize = { type: 'after', id: undefined, method: undefined, params: { provider: 'rest' }, - result: { id: -1, first: 'Jane', last: 'Doe' } + result: { id: -1, first: 'Jane', last: 'Doe' }, }; hookAfterMulti = { type: 'after', @@ -64,8 +64,8 @@ describe('service cache', () => { params: { provider: 'rest' }, result: [ { id: 1, first: 'John', last: 'Doe' }, - { id: 2, first: 'Jane', last: 'Doe' } - ] + { id: 2, first: 'Jane', last: 'Doe' }, + ], }; hookAfterPaginated = { type: 'after', @@ -75,9 +75,9 @@ describe('service cache', () => { total: 2, data: [ { id: 1, first: 'John', last: 'Doe' }, - { id: 2, first: 'Jane', last: 'Doe' } - ] - } + { id: 2, first: 'Jane', last: 'Doe' }, + ], + }, }; hookBeforeUuid = { type: 'before', @@ -85,7 +85,7 @@ describe('service cache', () => { method: undefined, params: { provider: 'rest' }, data: { uuid: 1, first: 'John', last: 'Doe' }, - service: { id: 'uuid' } + service: { id: 'uuid' }, }; hookAfterUuid = { type: 'after', @@ -93,7 +93,7 @@ describe('service cache', () => { method: undefined, params: { provider: 'rest' }, result: { uuid: 1, first: 'Jane', last: 'Doe' }, - service: { id: 'uuid' } + service: { id: 'uuid' }, }; hookBeforeMultiMixed = { type: 'before', @@ -102,8 +102,8 @@ describe('service cache', () => { params: { provider: 'rest' }, data: [ { _id: 1, first: 'John', last: 'Doe' }, - { id: 2, first: 'Jane', last: 'Doe' } - ] + { id: 2, first: 'Jane', last: 'Doe' }, + ], }; hookAfterMultiMixed = { type: 'after', @@ -112,8 +112,8 @@ describe('service cache', () => { params: { provider: 'rest' }, result: [ { id: 1, first: 'John', last: 'Doe' }, - { _id: 2, first: 'Jane', last: 'Doe' } - ] + { _id: 2, first: 'Jane', last: 'Doe' }, + ], }; }); @@ -370,7 +370,7 @@ describe('service cache', () => { }); }); -function clone (obj: any) { +function clone(obj: any) { cloneCount += 1; return Object.assign({}, obj); } diff --git a/test/hooks/de-populate.test.ts b/test/hooks/de-populate.test.ts index a52c5b7c..58bdecf1 100755 --- a/test/hooks/de-populate.test.ts +++ b/test/hooks/de-populate.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { dePopulate } from '../../src'; @@ -26,9 +25,9 @@ describe('services dePopulate - not dot notation', () => { content: 'Lorem ipsum dolor sit amet 4', author: 'as61389dadhga62343hads6712', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 - } - } + createdAt: 1480793101559, + }, + }, }; hookBefore = { type: 'before', @@ -37,8 +36,8 @@ describe('services dePopulate - not dot notation', () => { data: { userId: 'as61389dadhga62343hads6712', postId: 1, - updatedAt: 1480793101475 - } + updatedAt: 1480793101475, + }, }; hookBeforeArray = { type: 'before', @@ -57,8 +56,8 @@ describe('services dePopulate - not dot notation', () => { content: 'Lorem ipsum dolor sit amet 4', author: 'as61389dadhga62343hads6712', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 - } + createdAt: 1480793101559, + }, }, { userId: 'as61389dadhga62343hads6712', @@ -72,8 +71,8 @@ describe('services dePopulate - not dot notation', () => { content: 'Lorem ipsum dolor sit amet 5', author: '167asdf3689348sdad7312131s', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 - } + createdAt: 1480793101559, + }, }, { userId: '167asdf3689348sdad7312131s', @@ -87,10 +86,10 @@ describe('services dePopulate - not dot notation', () => { content: 'Lorem ipsum dolor sit amet 4', author: 'as61389dadhga62343hads6712', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 - } - } - ] + createdAt: 1480793101559, + }, + }, + ], }; }); @@ -100,7 +99,7 @@ describe('services dePopulate - not dot notation', () => { assert.deepEqual(deHook.result, { userId: 'as61389dadhga62343hads6712', postId: 1, - updatedAt: 1480793101475 + updatedAt: 1480793101475, }); }); @@ -110,32 +109,30 @@ describe('services dePopulate - not dot notation', () => { assert.deepEqual(deHook.data, { userId: 'as61389dadhga62343hads6712', postId: 1, - updatedAt: 1480793101475 + updatedAt: 1480793101475, }); }); it('item array, before hook', () => { const hook = clone(hookBeforeArray); const deHook: any = dePopulate()(hook); - assert.deepEqual(deHook.data, - [ - { - userId: 'as61389dadhga62343hads6712', - postId: 1, - updatedAt: 1480793101475 - }, - { - userId: 'as61389dadhga62343hads6712', - postId: 2, - updatedAt: 1480793101475 - }, - { - userId: '167asdf3689348sdad7312131s', - postId: 1, - updatedAt: 1480793101475 - } - ] - ); + assert.deepEqual(deHook.data, [ + { + userId: 'as61389dadhga62343hads6712', + postId: 1, + updatedAt: 1480793101475, + }, + { + userId: 'as61389dadhga62343hads6712', + postId: 2, + updatedAt: 1480793101475, + }, + { + userId: '167asdf3689348sdad7312131s', + postId: 1, + updatedAt: 1480793101475, + }, + ]); }); }); @@ -165,11 +162,11 @@ describe('services dePopulate - dot notation', () => { content: 'Lorem ipsum dolor sit amet 4', author: 'as61389dadhga62343hads6712', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 - } - } - } - } + createdAt: 1480793101559, + }, + }, + }, + }, }; hookBefore = { type: 'before', @@ -178,8 +175,8 @@ describe('services dePopulate - dot notation', () => { data: { userId: 'as61389dadhga62343hads6712', postId: 1, - updatedAt: 1480793101475 - } + updatedAt: 1480793101475, + }, }; hookBeforeArray = { type: 'before', @@ -199,9 +196,9 @@ describe('services dePopulate - dot notation', () => { content: 'Lorem ipsum dolor sit amet 4', author: 'as61389dadhga62343hads6712', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 - } - } + createdAt: 1480793101559, + }, + }, }, { userId: 'as61389dadhga62343hads6712', @@ -217,9 +214,9 @@ describe('services dePopulate - dot notation', () => { content: 'Lorem ipsum dolor sit amet 5', author: '167asdf3689348sdad7312131s', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 - } - } + createdAt: 1480793101559, + }, + }, }, { userId: '167asdf3689348sdad7312131s', @@ -233,10 +230,10 @@ describe('services dePopulate - dot notation', () => { content: 'Lorem ipsum dolor sit amet 4', author: 'as61389dadhga62343hads6712', readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559 - } - } - ] + createdAt: 1480793101559, + }, + }, + ], }; }); @@ -247,7 +244,7 @@ describe('services dePopulate - dot notation', () => { userId: 'as61389dadhga62343hads6712', postId: 1, updatedAt: 1480793101475, - post: { a: {} } + post: { a: {} }, }); }); @@ -257,37 +254,35 @@ describe('services dePopulate - dot notation', () => { assert.deepEqual(deHook.data, { userId: 'as61389dadhga62343hads6712', postId: 1, - updatedAt: 1480793101475 + updatedAt: 1480793101475, }); }); it('item array, before hook', () => { const hook = clone(hookBeforeArray); const deHook: any = dePopulate()(hook); - assert.deepEqual(deHook.data, - [ - { - userId: 'as61389dadhga62343hads6712', - postId: 1, - updatedAt: 1480793101475, - post: {} - }, - { - userId: 'as61389dadhga62343hads6712', - postId: 2, - updatedAt: 1480793101475, - post: {} - }, - { - userId: '167asdf3689348sdad7312131s', - postId: 1, - updatedAt: 1480793101475 - } - ] - ); + assert.deepEqual(deHook.data, [ + { + userId: 'as61389dadhga62343hads6712', + postId: 1, + updatedAt: 1480793101475, + post: {}, + }, + { + userId: 'as61389dadhga62343hads6712', + postId: 2, + updatedAt: 1480793101475, + post: {}, + }, + { + userId: '167asdf3689348sdad7312131s', + postId: 1, + updatedAt: 1480793101475, + }, + ]); }); }); -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/debug.test.ts b/test/hooks/debug.test.ts index eebf9317..d4ec03f1 100755 --- a/test/hooks/debug.test.ts +++ b/test/hooks/debug.test.ts @@ -7,7 +7,7 @@ describe('services debug', () => { method: 'create', data: { a: 'a' }, params: { query: { b: 'b' } }, - result: { c: 'c' } + result: { c: 'c' }, }; debug('my message')(hook); }); @@ -18,7 +18,7 @@ describe('services debug', () => { method: 'create', data: { a: 'a' }, params: { query: { b: 'b' }, foo: 'bar' }, - result: { c: 'c' } + result: { c: 'c' }, }; debug('my message', 'query', 'foo')(hook); }); diff --git a/test/hooks/disable-pagination.test.ts b/test/hooks/disable-pagination.test.ts index d9c39c6b..6f7d92f0 100755 --- a/test/hooks/disable-pagination.test.ts +++ b/test/hooks/disable-pagination.test.ts @@ -8,7 +8,7 @@ describe('services disablePagination', () => { hookBefore = { type: 'before', method: 'find', - params: { query: { id: 1, $limit: -1 } } + params: { query: { id: 1, $limit: -1 } }, }; }); @@ -29,12 +29,16 @@ describe('services disablePagination', () => { it('throws if after hook', () => { hookBefore.type = 'after'; - assert.throws(() => { disablePagination()(hookBefore); }); + assert.throws(() => { + disablePagination()(hookBefore); + }); }); it('throws if not find', () => { hookBefore.method = 'get'; - assert.throws(() => { disablePagination()(hookBefore); }); + assert.throws(() => { + disablePagination()(hookBefore); + }); }); }); diff --git a/test/hooks/disallow.test.ts b/test/hooks/disallow.test.ts index 98f33ac0..53ab2284 100755 --- a/test/hooks/disallow.test.ts +++ b/test/hooks/disallow.test.ts @@ -1,8 +1,6 @@ import { assert } from 'chai'; -import { - disallow -} from '../../src'; +import { disallow } from '../../src'; describe('services disallow', () => { describe('disallow is compatible with .disable (without predicate)', () => { @@ -17,34 +15,52 @@ describe('services disallow', () => { }); it('disables all providers with no param', () => { - assert.throws(() => { disallow()(hookSocketio); }); - assert.throws(() => { disallow()(hookServer); }); + assert.throws(() => { + disallow()(hookSocketio); + }); + assert.throws(() => { + disallow()(hookServer); + }); }); it('disables a provider', () => { - assert.throws(() => { disallow('socketio')(hookSocketio); }); + assert.throws(() => { + disallow('socketio')(hookSocketio); + }); }); it('does not disable the server', () => { disallow('socketio')(hookServer); - assert.throws(() => { disallow('socketio')(hookSocketio); }); + assert.throws(() => { + disallow('socketio')(hookSocketio); + }); }); it('does not disable another provider', () => { disallow('socketio')(hookRest); - assert.throws(() => { disallow('socketio')(hookSocketio); }); + assert.throws(() => { + disallow('socketio')(hookSocketio); + }); }); it('disables multiple providers', () => { disallow('socketio', 'rest')(hookServer); - assert.throws(() => { disallow('socketio', 'rest')(hookSocketio); }); - assert.throws(() => { disallow('socketio', 'rest')(hookRest); }); + assert.throws(() => { + disallow('socketio', 'rest')(hookSocketio); + }); + assert.throws(() => { + disallow('socketio', 'rest')(hookRest); + }); }); it('"external" disables all external providers', () => { disallow('socketio', 'rest')(hookServer); - assert.throws(() => { disallow('socketio', 'rest')(hookSocketio); }); - assert.throws(() => { disallow('socketio', 'rest')(hookRest); }); + assert.throws(() => { + disallow('socketio', 'rest')(hookSocketio); + }); + assert.throws(() => { + disallow('socketio', 'rest')(hookRest); + }); }); }); @@ -74,7 +90,9 @@ describe('services disallow', () => { const result = disallow('rest')(hook); assert.equal(result, undefined); - assert.throws(() => { disallow('socketio')(hook); }); + assert.throws(() => { + disallow('socketio')(hook); + }); }); it('finds provider with 2 args', () => { @@ -83,7 +101,9 @@ describe('services disallow', () => { const result = disallow('rest', 'server')(hook); assert.equal(result, undefined); - assert.throws(() => { disallow('rest', 'socketio')(hook); }); + assert.throws(() => { + disallow('rest', 'socketio')(hook); + }); }); it('finds server', () => { @@ -92,7 +112,9 @@ describe('services disallow', () => { const result = disallow('rest', 'socketio', 'external')(hook); assert.equal(result, undefined); - assert.throws(() => { disallow('rest', 'socketio', 'server')(hook); }); + assert.throws(() => { + disallow('rest', 'socketio', 'server')(hook); + }); }); it('finds external', () => { @@ -101,7 +123,9 @@ describe('services disallow', () => { const result = disallow('rest', 'server')(hook); assert.equal(result, undefined); - assert.throws(() => { disallow('rest', 'server', 'external')(hook); }); + assert.throws(() => { + disallow('rest', 'server', 'external')(hook); + }); }); it('succeeds if not provider', () => { @@ -129,6 +153,6 @@ describe('services disallow', () => { // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/discard-1.test.ts b/test/hooks/discard-1.test.ts index 4892f32d..8bfd467d 100755 --- a/test/hooks/discard-1.test.ts +++ b/test/hooks/discard-1.test.ts @@ -1,27 +1,54 @@ - import { assert } from 'chai'; import { discard } from '../../src'; describe('common hook discard', () => { describe('removes fields', () => { - - const beforeJohn = (): any => ({ type: 'before', data: { first: 'John', last: 'Doe' } }); - const beforeUndef = (): any => ({ type: 'before', data: { first: undefined, last: 'Doe' } }); - const beforeNull = (): any => ({ type: 'before', data: { first: null, last: 'Doe' } }); - const afterJane = (): any => ({ type: 'after', result: { first: 'Jane', last: 'Doe' } }); - const afterBoth = (): any => ({ type: 'after', result: [{ first: 'John', last: 'Doe' }, { first: 'Jane', last: 'Doe' }] }); - const afterPage = (): any => ({ type: 'after', result: { total: 2, skip: 0, data: [{ first: 'John', last: 'Doe' }, { first: 'Jane', last: 'Doe' }] } }); + const beforeJohn = (): any => ({ type: 'before', data: { first: 'John', last: 'Doe' } }); + const beforeUndef = (): any => ({ type: 'before', data: { first: undefined, last: 'Doe' } }); + const beforeNull = (): any => ({ type: 'before', data: { first: null, last: 'Doe' } }); + const afterJane = (): any => ({ type: 'after', result: { first: 'Jane', last: 'Doe' } }); + const afterBoth = (): any => ({ + type: 'after', + result: [ + { first: 'John', last: 'Doe' }, + { first: 'Jane', last: 'Doe' }, + ], + }); + const afterPage = (): any => ({ + type: 'after', + result: { + total: 2, + skip: 0, + data: [ + { first: 'John', last: 'Doe' }, + { first: 'Jane', last: 'Doe' }, + ], + }, + }); const decisionTable = [ - // desc, context, method, provider, args, result - ['before::create', beforeJohn(), 'create', null, ['first'], { last: 'Doe' } ], - ['after::find with paginate', afterPage(), 'find', null, ['last'], [{ first: 'John' }, { first: 'Jane' }] ], - ['after::find no paginate', afterBoth(), 'find', null, ['last'], [{ first: 'John' }, { first: 'Jane' }] ], - ['after', afterJane(), 'create', null, ['last'], { first: 'Jane' } ], - ['call internally on server', afterJane(), 'create', undefined, ['last'], { first: 'Jane' } ], - ['not throw field missing', beforeJohn(), 'create', 'rest', ['first', 'xx'], { last: 'Doe' } ], - ['not throw field undefined', beforeUndef(), 'create', 'rest', ['first'], { last: 'Doe' } ], - ['not throw field null', beforeNull(), 'create', 'rest', ['first'], { last: 'Doe' } ] + ['before::create', beforeJohn(), 'create', null, ['first'], { last: 'Doe' }], + [ + 'after::find with paginate', + afterPage(), + 'find', + null, + ['last'], + [{ first: 'John' }, { first: 'Jane' }], + ], + [ + 'after::find no paginate', + afterBoth(), + 'find', + null, + ['last'], + [{ first: 'John' }, { first: 'Jane' }], + ], + ['after', afterJane(), 'create', null, ['last'], { first: 'Jane' }], + ['call internally on server', afterJane(), 'create', undefined, ['last'], { first: 'Jane' }], + ['not throw field missing', beforeJohn(), 'create', 'rest', ['first', 'xx'], { last: 'Doe' }], + ['not throw field undefined', beforeUndef(), 'create', 'rest', ['first'], { last: 'Doe' }], + ['not throw field null', beforeNull(), 'create', 'rest', ['first'], { last: 'Doe' }], ]; decisionTable.forEach(([desc, context, method, provider, args, result]) => { @@ -33,31 +60,74 @@ describe('common hook discard', () => { } discard(...args)(context); - assert.deepEqual(context.data ? context.data : context.result.data || context.result, result); + assert.deepEqual( + context.data ? context.data : context.result.data || context.result, + result + ); }); }); }); describe('handles dot notation', () => { - - const ctx = (): any => ({ type: 'before', method: 'create', data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } }); - const ctx2 = (): any => ({ type: 'after', method: 'get', result: { property: null, foo: 'bar' } }); + const ctx = (): any => ({ + type: 'before', + method: 'create', + data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + }); + const ctx2 = (): any => ({ + type: 'after', + method: 'get', + result: { property: null, foo: 'bar' }, + }); const decisionTable = [ // desc, context, args, result - ['handles dots', ctx(), ['dept'], { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } } ], - ['handle 1 dot', ctx(), ['empl.status'], { empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' } ], - ['handle 2 dot', ctx(), ['empl.name.first'], { empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' } ], - ['missing path', ctx(), ['empl.xx.first'], { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } ], - ['missing no dot', ctx(), ['xx'], { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } ], - ['2 fields', ctx(), ['empl.status', 'dept'], { empl: { name: { first: 'John', last: 'Doe' } } } ], - ['path not obj', ctx2(), ['property.secret'], { property: null, foo: 'bar' } ] + [ + 'handles dots', + ctx(), + ['dept'], + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }, + ], + [ + 'handle 1 dot', + ctx(), + ['empl.status'], + { empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' }, + ], + [ + 'handle 2 dot', + ctx(), + ['empl.name.first'], + { empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + ], + [ + 'missing path', + ctx(), + ['empl.xx.first'], + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + ], + [ + 'missing no dot', + ctx(), + ['xx'], + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + ], + [ + '2 fields', + ctx(), + ['empl.status', 'dept'], + { empl: { name: { first: 'John', last: 'Doe' } } }, + ], + ['path not obj', ctx2(), ['property.secret'], { property: null, foo: 'bar' }], ]; decisionTable.forEach(([desc, context, args, result]) => { it(desc, () => { discard(...args)(context); - assert.deepEqual(context.data ? context.data : context.result.data || context.result, result); + assert.deepEqual( + context.data ? context.data : context.result.data || context.result, + result + ); }); }); }); diff --git a/test/hooks/discard-2.test.ts b/test/hooks/discard-2.test.ts index 5b0fcc40..1fc18e1d 100755 --- a/test/hooks/discard-2.test.ts +++ b/test/hooks/discard-2.test.ts @@ -1,45 +1,109 @@ - import { assert } from 'chai'; import { discard } from '../../src'; describe('common hook discard', () => { describe('removes fields', () => { - - const beforeJohn = (): any => ({ type: 'before', data: { first: 'John', last: 'Doe' } }); + const beforeJohn = (): any => ({ type: 'before', data: { first: 'John', last: 'Doe' } }); // eslint-disable-next-line @typescript-eslint/no-unused-vars // const beforeUndef = (): any => ({ type: 'before', data: { first: undefined, last: 'Doe' } }); - const beforeNull = (): any => ({ type: 'before', data: { first: null, last: 'Doe' } }); - const afterJane = (): any => ({ type: 'after', result: { first: 'Jane', last: 'Doe' } }); - const afterBoth = (): any => ({ type: 'after', result: [{ first: 'John', last: 'Doe' }, { first: 'Jane', last: 'Doe' }] }); - const afterPage = (): any => ({ type: 'after', result: { total: 2, skip: 0, data: [{ first: 'John', last: 'Doe' }, { first: 'Jane', last: 'Doe' }] } }); + const beforeNull = (): any => ({ type: 'before', data: { first: null, last: 'Doe' } }); + const afterJane = (): any => ({ type: 'after', result: { first: 'Jane', last: 'Doe' } }); + const afterBoth = (): any => ({ + type: 'after', + result: [ + { first: 'John', last: 'Doe' }, + { first: 'Jane', last: 'Doe' }, + ], + }); + const afterPage = (): any => ({ + type: 'after', + result: { + total: 2, + skip: 0, + data: [ + { first: 'John', last: 'Doe' }, + { first: 'Jane', last: 'Doe' }, + ], + }, + }); const decisionTable = [ // desc, context, method, provider, args, result - ['before::create', beforeJohn(), 'create', undefined, ['first'], { last: 'Doe' } ], - ['before::create', beforeJohn(), 'create', 'rest', ['first'], { last: 'Doe' } ], - ['before::create', beforeJohn(), 'create', 'socketio',['first'], { last: 'Doe' } ], - ['before::create', beforeJohn(), 'create', 'primus', ['first'], { last: 'Doe' } ], - ['after::find with paginate', afterPage(), 'find', undefined, ['last'], [{ first: 'John' }, { first: 'Jane' }] ], - ['after::find with paginate', afterPage(), 'find', 'rest', ['last'], [{ first: 'John' }, { first: 'Jane' }] ], - ['after::find with paginate', afterPage(), 'find', 'socketio',['last'], [{ first: 'John' }, { first: 'Jane' }] ], - ['after::find with paginate', afterPage(), 'find', 'primus', ['last'], [{ first: 'John' }, { first: 'Jane' }] ], - ['after::find no paginate', afterBoth(), 'find', undefined, ['last'], [{ first: 'John' }, { first: 'Jane' }] ], - ['after::find no paginate', afterBoth(), 'find', 'rest', ['last'], [{ first: 'John' }, { first: 'Jane' }] ], - ['after::find no paginate', afterBoth(), 'find', 'socketio',['last'], [{ first: 'John' }, { first: 'Jane' }] ], - ['after::find no paginate', afterBoth(), 'find', 'primus', ['last'], [{ first: 'John' }, { first: 'Jane' }] ], - ['after', afterJane(), 'create', undefined, ['last'], { first: 'Jane' } ], - ['after', afterJane(), 'create', 'rest', ['last'], { first: 'Jane' } ], - ['after', afterJane(), 'create', 'socketio',['last'], { first: 'Jane' } ], - ['after', afterJane(), 'create', 'primus', ['last'], { first: 'Jane' } ], - ['call internally on server', afterJane(), 'create', undefined, ['last'], { first: 'Jane' } ], - ['not throw field missing', beforeJohn(), 'create', undefined, ['first', 'xx'], { last: 'Doe' } ], - ['not throw field missing', beforeJohn(), 'create', 'rest', ['first', 'xx'], { last: 'Doe' } ], - ['not throw field missing', beforeJohn(), 'create', 'socketio',['first', 'xx'], { last: 'Doe' } ], - ['not throw field missing', beforeJohn(), 'create', 'primus', ['first', 'xx'], { last: 'Doe' } ], - ['not throw field null', beforeNull(), 'create', undefined, ['first'], { last: 'Doe' } ], - ['not throw field null', beforeNull(), 'create', 'rest', ['first'], { last: 'Doe' } ], - ['not throw field null', beforeNull(), 'create', 'socketio',['first'], { last: 'Doe' } ], - ['not throw field null', beforeNull(), 'create', 'promus', ['first'], { last: 'Doe' } ] + ['before::create', beforeJohn(), 'create', undefined, ['first'], { last: 'Doe' }], + ['before::create', beforeJohn(), 'create', 'rest', ['first'], { last: 'Doe' }], + ['before::create', beforeJohn(), 'create', 'socketio', ['first'], { last: 'Doe' }], + [ + 'after::find with paginate', + afterPage(), + 'find', + undefined, + ['last'], + [{ first: 'John' }, { first: 'Jane' }], + ], + [ + 'after::find with paginate', + afterPage(), + 'find', + 'rest', + ['last'], + [{ first: 'John' }, { first: 'Jane' }], + ], + [ + 'after::find with paginate', + afterPage(), + 'find', + 'socketio', + ['last'], + [{ first: 'John' }, { first: 'Jane' }], + ], + [ + 'after::find no paginate', + afterBoth(), + 'find', + undefined, + ['last'], + [{ first: 'John' }, { first: 'Jane' }], + ], + [ + 'after::find no paginate', + afterBoth(), + 'find', + 'rest', + ['last'], + [{ first: 'John' }, { first: 'Jane' }], + ], + [ + 'after::find no paginate', + afterBoth(), + 'find', + 'socketio', + ['last'], + [{ first: 'John' }, { first: 'Jane' }], + ], + ['after', afterJane(), 'create', undefined, ['last'], { first: 'Jane' }], + ['after', afterJane(), 'create', 'rest', ['last'], { first: 'Jane' }], + ['after', afterJane(), 'create', 'socketio', ['last'], { first: 'Jane' }], + ['call internally on server', afterJane(), 'create', undefined, ['last'], { first: 'Jane' }], + [ + 'not throw field missing', + beforeJohn(), + 'create', + undefined, + ['first', 'xx'], + { last: 'Doe' }, + ], + ['not throw field missing', beforeJohn(), 'create', 'rest', ['first', 'xx'], { last: 'Doe' }], + [ + 'not throw field missing', + beforeJohn(), + 'create', + 'socketio', + ['first', 'xx'], + { last: 'Doe' }, + ], + ['not throw field null', beforeNull(), 'create', undefined, ['first'], { last: 'Doe' }], + ['not throw field null', beforeNull(), 'create', 'rest', ['first'], { last: 'Doe' }], + ['not throw field null', beforeNull(), 'create', 'socketio', ['first'], { last: 'Doe' }], ]; decisionTable.forEach(([desc, context, method, provider, args, result]) => { @@ -51,31 +115,74 @@ describe('common hook discard', () => { } discard(...args)(context); - assert.deepEqual(context.data ? context.data : context.result.data || context.result, result); + assert.deepEqual( + context.data ? context.data : context.result.data || context.result, + result + ); }); }); }); describe('handles dot notation', () => { - - const ctx = (): any => ({ type: 'before', method: 'create', data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } }); - const ctx2 = (): any => ({ type: 'after', method: 'get', result: { property: null, foo: 'bar' } }); + const ctx = (): any => ({ + type: 'before', + method: 'create', + data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + }); + const ctx2 = (): any => ({ + type: 'after', + method: 'get', + result: { property: null, foo: 'bar' }, + }); const decisionTable = [ // desc, context, args, result - ['handles dots', ctx(), ['dept'], { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } } ], - ['handle 1 dot', ctx(), ['empl.status'], { empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' } ], - ['handle 2 dot', ctx(), ['empl.name.first'], { empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' } ], - ['missing path', ctx(), ['empl.xx.first'], { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } ], - ['missing no dot', ctx(), ['xx'], { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } ], - ['2 fields', ctx(), ['empl.status', 'dept'], { empl: { name: { first: 'John', last: 'Doe' } } } ], - ['path not obj', ctx2(), ['property.secret'], { property: null, foo: 'bar' } ] + [ + 'handles dots', + ctx(), + ['dept'], + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }, + ], + [ + 'handle 1 dot', + ctx(), + ['empl.status'], + { empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' }, + ], + [ + 'handle 2 dot', + ctx(), + ['empl.name.first'], + { empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + ], + [ + 'missing path', + ctx(), + ['empl.xx.first'], + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + ], + [ + 'missing no dot', + ctx(), + ['xx'], + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + ], + [ + '2 fields', + ctx(), + ['empl.status', 'dept'], + { empl: { name: { first: 'John', last: 'Doe' } } }, + ], + ['path not obj', ctx2(), ['property.secret'], { property: null, foo: 'bar' }], ]; decisionTable.forEach(([desc, context, args, result]) => { it(desc, () => { discard(...args)(context); - assert.deepEqual(context.data ? context.data : context.result.data || context.result, result); + assert.deepEqual( + context.data ? context.data : context.result.data || context.result, + result + ); }); }); }); diff --git a/test/hooks/discard-query.test.ts b/test/hooks/discard-query.test.ts index ab2cb42a..4def0f9f 100755 --- a/test/hooks/discard-query.test.ts +++ b/test/hooks/discard-query.test.ts @@ -10,7 +10,7 @@ describe('services discardQuery', () => { hookBefore = { type: 'before', method: 'create', - params: { query: { first: 'John', last: 'Doe' } } + params: { query: { first: 'John', last: 'Doe' } }, }; hookAfter = { type: 'after', method: 'create', result: { first: 'Jane', last: 'Doe' } }; }); @@ -21,7 +21,9 @@ describe('services discardQuery', () => { }); it('throws on hook after', () => { - assert.throws(() => { discardQuery('last')(hookAfter); }); + assert.throws(() => { + discardQuery('last')(hookAfter); + }); }); it('does not throw if field is missing', () => { @@ -36,44 +38,48 @@ describe('services discardQuery', () => { type: 'before', method: 'create', params: { - query: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - } + query: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + }, }; }); it('prop with no dots', () => { discardQuery('dept')(hookBefore); - assert.deepEqual(hookBefore.params.query, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } } - ); + assert.deepEqual(hookBefore.params.query, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + }); }); it('prop with 1 dot', () => { discardQuery('empl.status')(hookBefore); - assert.deepEqual(hookBefore.params.query, - { empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.params.query, { + empl: { name: { first: 'John', last: 'Doe' } }, + dept: 'Acct', + }); }); it('prop with 2 dots', () => { discardQuery('empl.name.first')(hookBefore); - assert.deepEqual(hookBefore.params.query, - { empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.params.query, { + empl: { name: { last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); it('ignores bad or missing paths', () => { discardQuery('empl.xx.first')(hookBefore); - assert.deepEqual(hookBefore.params.query, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.params.query, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); it('ignores bad or missing no dot path', () => { discardQuery('xx')(hookBefore); - assert.deepEqual(hookBefore.params.query, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.params.query, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); }); }); diff --git a/test/hooks/discard.test.ts b/test/hooks/discard.test.ts index c94da613..7b74f9e6 100755 --- a/test/hooks/discard.test.ts +++ b/test/hooks/discard.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import * as hooks from '../../src'; @@ -14,13 +13,13 @@ describe('services discard', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe' } + data: { first: 'John', last: 'Doe' }, }; hookAfter = { type: 'after', method: 'create', params: { provider: 'rest' }, - result: { first: 'Jane', last: 'Doe' } + result: { first: 'Jane', last: 'Doe' }, }; hookFindPaginate = { type: 'after', @@ -30,9 +29,9 @@ describe('services discard', () => { total: 2, data: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] - } + { first: 'Jane', last: 'Doe' }, + ], + }, }; hookFind = { type: 'after', @@ -40,8 +39,8 @@ describe('services discard', () => { params: { provider: 'rest' }, result: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] + { first: 'Jane', last: 'Doe' }, + ], }; }); @@ -52,18 +51,12 @@ describe('services discard', () => { it('updates hook after::find with pagination', () => { hooks.discard('last')(hookFindPaginate); - assert.deepEqual(hookFindPaginate.result.data, [ - { first: 'John' }, - { first: 'Jane' } - ]); + assert.deepEqual(hookFindPaginate.result.data, [{ first: 'John' }, { first: 'Jane' }]); }); it('updates hook after::find with no pagination', () => { hooks.discard('last')(hookFind); - assert.deepEqual(hookFind.result, [ - { first: 'John' }, - { first: 'Jane' } - ]); + assert.deepEqual(hookFind.result, [{ first: 'John' }, { first: 'Jane' }]); }); it('updates hook after', () => { @@ -82,7 +75,7 @@ describe('services discard', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe' } + data: { first: 'John', last: 'Doe' }, }; hooks.discard('first', 'xx')(hook); assert.deepEqual(hook.data, { last: 'Doe' }); @@ -93,7 +86,7 @@ describe('services discard', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: null, last: 'Doe' } + data: { first: null, last: 'Doe' }, }; hooks.discard('first')(hook); assert.deepEqual(hook.data, { last: 'Doe' }); @@ -106,43 +99,47 @@ describe('services discard', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } + data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, }; }); it('prop with no dots', () => { hooks.discard('dept')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + }); }); it('prop with 1 dot', () => { hooks.discard('empl.status')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' } }, + dept: 'Acct', + }); }); it('prop with 2 dots', () => { hooks.discard('empl.name.first')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); it('ignores bad or missing paths', () => { hooks.discard('empl.xx.first')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); it('ignores bad or missing no dot path', () => { hooks.discard('xx')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); it('discards multiple fields', () => { @@ -155,9 +152,9 @@ describe('services discard', () => { email: 'foo', password: 'bar', name: 'Rafael', - id: 'b' + id: 'b', }, - query: {} + query: {}, }; hooks.discard('email', 'password')(hook); @@ -168,7 +165,7 @@ describe('services discard', () => { // email: 'foo', // password: 'bar', name: 'Rafael', - id: 'b' + id: 'b', } as any); }); @@ -178,16 +175,16 @@ describe('services discard', () => { method: 'get', result: { property: null, - other: 'bar' + other: 'bar', }, - query: {} + query: {}, }; hooks.discard('property.secret')(hook); assert.deepEqual(hook.result, { property: null, - other: 'bar' + other: 'bar', }); }); }); diff --git a/test/hooks/fast-join-cache.test.ts b/test/hooks/fast-join-cache.test.ts index a6367310..f139646f 100755 --- a/test/hooks/fast-join-cache.test.ts +++ b/test/hooks/fast-join-cache.test.ts @@ -1,6 +1,5 @@ - import { assert } from 'chai'; -import feathers from '@feathersjs/feathers'; +import { feathers } from '@feathersjs/feathers'; import BatchLoader from '@feathers-plus/batch-loader'; // @ts-ignore import CacheMap from '@feathers-plus/cache'; @@ -14,7 +13,7 @@ const postsStoreInit = [ { id: 1, body: 'John post', userId: 101, starIds: [102, 103, 104] }, { id: 2, body: 'Marshall post', userId: 102, starIds: [101, 103, 104] }, { id: 3, body: 'Barbara post', userId: 103 }, - { id: 4, body: 'Aubree post', userId: 104 } + { id: 4, body: 'Aubree post', userId: 104 }, ]; const usersStoreStartId = 105; @@ -22,7 +21,7 @@ const usersStoreInit = [ { id: 101, name: 'John' }, { id: 102, name: 'Marshall' }, { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' } + { id: 104, name: 'Aubree' }, ]; let app: any; @@ -34,33 +33,36 @@ let joinStarersCount: any; let userBatchLoaderCount: any; const cacheMapUsers = CacheMap({ max: 100 }); -const userBatchLoader = new BatchLoader(async (keys: any, context: any) => { - userBatchLoaderCount += 1; - const result: any = await users.find(makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } })); - return getResultsByKey(keys, result, (user: any) => user.id, '!'); -}, -{ context: {}, cacheMap: cacheMapUsers } +const userBatchLoader = new BatchLoader( + async (keys: any, context: any) => { + userBatchLoaderCount += 1; + const result: any = await users.find( + makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } }) + ); + return getResultsByKey(keys, result, (user: any) => user.id, '!'); + }, + { context: {}, cacheMap: cacheMapUsers } ); -function services (this: any) { +function services(this: any) { const app = this; app.configure(usersService); app.configure(postsService); } -function postsService (this: any) { +function postsService(this: any) { const app = this; const store = clone(postsStoreInit); class PostsService extends Service { - foo: boolean + foo: boolean; - constructor (...args: any[]) { + constructor(...args: any[]) { super(...args); this.foo = true; } - get (...args: any[]) { + get(...args: any[]) { // @ts-ignore return super.get(...args); } @@ -70,23 +72,23 @@ function postsService (this: any) { app.service('posts').hooks({ before: { - all: [] - } + all: [], + }, }); } -function usersService (this: any) { +function usersService(this: any) { const app = this; const store = clone(usersStoreInit); class UsersService extends Service { - junk: boolean - constructor (...args: any[]) { + junk: boolean; + constructor(...args: any[]) { super(...args); this.junk = true; } - get (...args: any[]) { + get(...args: any[]) { // @ts-ignore return super.get(...args); } @@ -96,18 +98,17 @@ function usersService (this: any) { app.service('users').hooks({ before: { - all: iff(enableCache, cache(cacheMapUsers)) + all: iff(enableCache, cache(cacheMapUsers)), }, after: { - all: iff(enableCache, cache(cacheMapUsers)) - } + all: iff(enableCache, cache(cacheMapUsers)), + }, }); } describe('services fastJoin & cache', () => { beforeEach(() => { - app = feathers() - .configure(services); + app = feathers().configure(services); posts = app.service('posts'); users = app.service('users'); @@ -136,20 +137,22 @@ describe('services fastJoin & cache', () => { const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - author: { id: 101, name: 'John' }, - starers: - [{ id: 102, name: 'Marshall' }, - { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' }] - }], + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + author: { id: 101, name: 'John' }, + starers: [ + { id: 102, name: 'Marshall' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' }, + ], + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -160,20 +163,22 @@ describe('services fastJoin & cache', () => { const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - author: { id: 101, name: 'John' }, - starers: - [{ id: 102, name: 'Marshall' }, - { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' }] - }], + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + author: { id: 101, name: 'John' }, + starers: [ + { id: 102, name: 'Marshall' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' }, + ], + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -191,20 +196,22 @@ describe('services fastJoin & cache', () => { const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - author: { id: 101, name: 'John' }, - starers: - [{ id: 102, name: 'Marshall' }, - { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' }] - }], + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + author: { id: 101, name: 'John' }, + starers: [ + { id: 102, name: 'Marshall' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' }, + ], + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -217,20 +224,22 @@ describe('services fastJoin & cache', () => { const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - author: { id: 101, name: 'John' }, - starers: - [{ id: 102, name: 'Marshall' }, - { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' }] - }], + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + author: { id: 101, name: 'John' }, + starers: [ + { id: 102, name: 'Marshall' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' }, + ], + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; // First call let context = await ex8b(); @@ -257,16 +266,19 @@ describe('services fastJoin & cache', () => { }); }); -async function ex8 () { +async function ex8() { const postResolvers = { before: (context: any) => { context._loaders = { user: {} }; - context._loaders.user.id = new BatchLoader(async (keys: any, context: any) => { - const result = await users.find(makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } })); - return getResultsByKey(keys, result, (user: any) => user.id, '!'); - }, - { context } + context._loaders.user.id = new BatchLoader( + async (keys: any, context: any) => { + const result = await users.find( + makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } }) + ); + return getResultsByKey(keys, result, (user: any) => user.id, '!'); + }, + { context } ); }, @@ -278,27 +290,34 @@ async function ex8 () { starers: () => async (post: any, context: any) => { if (!post.starIds) return; post.starers = await context._loaders.user.id.loadMany(post.starIds); - } - } + }, + }, }; - const context: any = { method: 'find', result: clone(await posts.find({ query: { id: 1 } })), params: {} }; + const context: any = { + method: 'find', + result: clone(await posts.find({ query: { id: 1 } })), + params: {}, + }; return fastJoin(postResolvers)(context); } -async function ex8a () { +async function ex8a() { const cacheMap = CacheMap({ max: 100 }); const postResolvers = { before: (context: any) => { context._loaders = { user: {} }; - context._loaders.user.id = new BatchLoader(async (keys: any, context: any) => { - const result = await users.find(makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } })); - return getResultsByKey(keys, result, (user: any) => user.id, '!'); - }, - { context, cacheMap } + context._loaders.user.id = new BatchLoader( + async (keys: any, context: any) => { + const result = await users.find( + makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } }) + ); + return getResultsByKey(keys, result, (user: any) => user.id, '!'); + }, + { context, cacheMap } ); }, @@ -310,16 +329,20 @@ async function ex8a () { starers: () => async (post: any, context: any) => { if (!post.starIds) return; post.starers = await context._loaders.user.id.loadMany(post.starIds); - } - } + }, + }, }; - const context: any = { method: 'find', result: clone(await posts.find({ query: { id: 1 } })), params: {} }; + const context: any = { + method: 'find', + result: clone(await posts.find({ query: { id: 1 } })), + params: {}, + }; return fastJoin(postResolvers)(context); } -async function ex8b () { +async function ex8b() { const postResolvers = { before: (context: any) => { context._loaders = { user: {} }; @@ -337,15 +360,19 @@ async function ex8b () { joinStarersCount += 1; if (!post.starIds) return; post.starers = await context._loaders.user.id.loadMany(post.starIds); - } - } + }, + }, }; - const context: any = { method: 'find', result: clone(await posts.find({ query: { id: 1 } })), params: {} }; + const context: any = { + method: 'find', + result: clone(await posts.find({ query: { id: 1 } })), + params: {}, + }; return fastJoin(postResolvers)(context); } -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/fast-join.test.ts b/test/hooks/fast-join.test.ts index e2a9c817..7856391b 100755 --- a/test/hooks/fast-join.test.ts +++ b/test/hooks/fast-join.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import BatchLoader from '@feathers-plus/batch-loader'; import { fastJoin, makeCallingParams } from '../../src'; @@ -12,21 +11,23 @@ describe('service fast-join', () => { const context = await ex1(); const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - reputation: - [{ userId: 102, points: 1 }, - { userId: 103, points: 1 }, - { userId: 104, points: 1 }], - author: { id: 101, name: 'John' }, - starers: [{ name: 'Marshall' }, { name: 'Barbara' }, { name: 'Aubree' }] - }], + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + reputation: [ + { userId: 102, points: 1 }, + { userId: 103, points: 1 }, + { userId: 104, points: 1 }, + ], + author: { id: 101, name: 'John' }, + starers: [{ name: 'Marshall' }, { name: 'Barbara' }, { name: 'Aubree' }], + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -36,20 +37,22 @@ describe('service fast-join', () => { const context = await ex2(); const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - reputation: - [{ userId: 102, points: 1 }, - { userId: 103, points: 1 }, - { userId: 104, points: 1 }], - author: { id: 101, name: 'John' } - }], + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + reputation: [ + { userId: 102, points: 1 }, + { userId: 103, points: 1 }, + { userId: 104, points: 1 }, + ], + author: { id: 101, name: 'John' }, + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -59,24 +62,27 @@ describe('service fast-join', () => { const context = await ex3(); const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - reputation: - [{ userId: 102, points: 1 }, - { userId: 103, points: 1 }, - { userId: 104, points: 1 }], - author: { id: 101, name: 'John' }, - starers: [ - { id: 102, name: 'Marshall' }, - { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' }] - }], + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + reputation: [ + { userId: 102, points: 1 }, + { userId: 103, points: 1 }, + { userId: 104, points: 1 }, + ], + author: { id: 101, name: 'John' }, + starers: [ + { id: 102, name: 'Marshall' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' }, + ], + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -86,22 +92,24 @@ describe('service fast-join', () => { const context = await ex4(); const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - reputation: - [{ userId: 102, points: 1 }, - { userId: 103, points: 1 }, - { userId: 104, points: 1 }], - starerCount: 3, - author: { id: 101, name: 'John' }, - starers: [{ name: 'Marshall' }, { name: 'Barbara' }, { name: 'Aubree' }] - }], + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + reputation: [ + { userId: 102, points: 1 }, + { userId: 103, points: 1 }, + { userId: 104, points: 1 }, + ], + starerCount: 3, + author: { id: 101, name: 'John' }, + starers: [{ name: 'Marshall' }, { name: 'Barbara' }, { name: 'Aubree' }], + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -111,41 +119,44 @@ describe('service fast-join', () => { const context = await ex5(); const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - reputation: - [{ userId: 102, points: 1 }, - { userId: 103, points: 1 }, - { userId: 104, points: 1 }], - comments: - [{ - id: 11, - text: 'John post Marshall comment 11', - postId: 1, - userId: 102, - author: { id: 102, name: 'Marshall' } - }, + result: [ { - id: 12, - text: 'John post Marshall comment 12', - postId: 1, - userId: 102, - author: { id: 102, name: 'Marshall' } + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + reputation: [ + { userId: 102, points: 1 }, + { userId: 103, points: 1 }, + { userId: 104, points: 1 }, + ], + comments: [ + { + id: 11, + text: 'John post Marshall comment 11', + postId: 1, + userId: 102, + author: { id: 102, name: 'Marshall' }, + }, + { + id: 12, + text: 'John post Marshall comment 12', + postId: 1, + userId: 102, + author: { id: 102, name: 'Marshall' }, + }, + { + id: 13, + text: 'John post Marshall comment 13', + postId: 1, + userId: 102, + author: { id: 102, name: 'Marshall' }, + }, + ], }, - { - id: 13, - text: 'John post Marshall comment 13', - postId: 1, - userId: 102, - author: { id: 102, name: 'Marshall' } - }] - }], + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -155,41 +166,44 @@ describe('service fast-join', () => { const context = await ex6(); const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - reputation: - [{ userId: 102, points: 1 }, - { userId: 103, points: 1 }, - { userId: 104, points: 1 }], - comments: - [{ - id: 11, - text: 'John post Marshall comment 11', - postId: 1, - userId: 102, - author: { id: 102, name: 'Marshall' } - }, + result: [ { - id: 12, - text: 'John post Marshall comment 12', - postId: 1, - userId: 102, - author: { id: 102, name: 'Marshall' } + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + reputation: [ + { userId: 102, points: 1 }, + { userId: 103, points: 1 }, + { userId: 104, points: 1 }, + ], + comments: [ + { + id: 11, + text: 'John post Marshall comment 11', + postId: 1, + userId: 102, + author: { id: 102, name: 'Marshall' }, + }, + { + id: 12, + text: 'John post Marshall comment 12', + postId: 1, + userId: 102, + author: { id: 102, name: 'Marshall' }, + }, + { + id: 13, + text: 'John post Marshall comment 13', + postId: 1, + userId: 102, + author: { id: 102, name: 'Marshall' }, + }, + ], }, - { - id: 13, - text: 'John post Marshall comment 13', - postId: 1, - userId: 102, - author: { id: 102, name: 'Marshall' } - }] - }], + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -199,24 +213,27 @@ describe('service fast-join', () => { const context = await ex7(); const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - reputation: - [{ userId: 102, points: 1 }, - { userId: 103, points: 1 }, - { userId: 104, points: 1 }], - author: { id: 101, name: 'John' }, - starers: - [{ id: 102, name: 'Marshall' }, - { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' }] - }], + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + reputation: [ + { userId: 102, points: 1 }, + { userId: 103, points: 1 }, + { userId: 104, points: 1 }, + ], + author: { id: 101, name: 'John' }, + starers: [ + { id: 102, name: 'Marshall' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' }, + ], + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -226,24 +243,27 @@ describe('service fast-join', () => { const context = await ex8(); const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - reputation: - [{ userId: 102, points: 1 }, - { userId: 103, points: 1 }, - { userId: 104, points: 1 }], - author: { id: 101, name: 'John' }, - starers: - [{ id: 102, name: 'Marshall' }, - { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' }] - }], + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + reputation: [ + { userId: 102, points: 1 }, + { userId: 103, points: 1 }, + { userId: 104, points: 1 }, + ], + author: { id: 101, name: 'John' }, + starers: [ + { id: 102, name: 'Marshall' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' }, + ], + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); @@ -253,257 +273,310 @@ describe('service fast-join', () => { const context = await ex9(); const result: any = { method: 'find', - result: - [{ - id: 1, - body: 'John post', - userId: 101, - starIds: [102, 103, 104], - reputation: - [{ userId: 102, points: 1, author: 'Marshall' }, - { userId: 103, points: 1, author: 'Barbara' }, - { userId: 104, points: 1, author: 'Aubree' }], - author: { id: 101, name: 'John' }, - starers: - [{ id: 102, name: 'Marshall' }, - { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' }], - comments: - [{ - id: 11, - text: 'John post Marshall comment 11', - postId: 1, - userId: 102, - author: { id: 102, name: 'Marshall' } + result: [ + { + id: 1, + body: 'John post', + userId: 101, + starIds: [102, 103, 104], + reputation: [ + { userId: 102, points: 1, author: 'Marshall' }, + { userId: 103, points: 1, author: 'Barbara' }, + { userId: 104, points: 1, author: 'Aubree' }, + ], + author: { id: 101, name: 'John' }, + starers: [ + { id: 102, name: 'Marshall' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' }, + ], + comments: [ + { + id: 11, + text: 'John post Marshall comment 11', + postId: 1, + userId: 102, + author: { id: 102, name: 'Marshall' }, + }, + { + id: 12, + text: 'John post Marshall comment 12', + postId: 1, + userId: 102, + author: { id: 102, name: 'Marshall' }, + }, + { + id: 13, + text: 'John post Marshall comment 13', + postId: 1, + userId: 102, + author: { id: 102, name: 'Marshall' }, + }, + ], }, { - id: 12, - text: 'John post Marshall comment 12', - postId: 1, + id: 2, + body: 'Marshall post', userId: 102, - author: { id: 102, name: 'Marshall' } + starIds: [101, 103, 104], + author: { id: 102, name: 'Marshall' }, + starers: [ + { id: 101, name: 'John' }, + { id: 103, name: 'Barbara' }, + { id: 104, name: 'Aubree' }, + ], + comments: [ + { + id: 14, + text: 'Marshall post John comment 14', + postId: 2, + userId: 101, + author: { id: 101, name: 'John' }, + }, + { + id: 15, + text: 'Marshall post John comment 15', + postId: 2, + userId: 101, + author: { id: 101, name: 'John' }, + }, + ], }, { - id: 13, - text: 'John post Marshall comment 13', - postId: 1, - userId: 102, - author: { id: 102, name: 'Marshall' } - }] - }, - { - id: 2, - body: 'Marshall post', - userId: 102, - starIds: [101, 103, 104], - author: { id: 102, name: 'Marshall' }, - starers: - [{ id: 101, name: 'John' }, - { id: 103, name: 'Barbara' }, - { id: 104, name: 'Aubree' }], - comments: - [{ - id: 14, - text: 'Marshall post John comment 14', - postId: 2, - userId: 101, - author: { id: 101, name: 'John' } + id: 3, + body: 'Barbara post', + userId: 103, + author: { id: 103, name: 'Barbara' }, + comments: [ + { + id: 16, + text: 'Barbara post John comment 16', + postId: 3, + userId: 101, + author: { id: 101, name: 'John' }, + }, + ], }, { - id: 15, - text: 'Marshall post John comment 15', - postId: 2, - userId: 101, - author: { id: 101, name: 'John' } - }] - }, - { - id: 3, - body: 'Barbara post', - userId: 103, - author: { id: 103, name: 'Barbara' }, - comments: - [{ - id: 16, - text: 'Barbara post John comment 16', - postId: 3, - userId: 101, - author: { id: 101, name: 'John' } - }] - }, - { - id: 4, - body: 'Aubree post', - userId: 104, - author: { id: 104, name: 'Aubree' }, - comments: - [{ - id: 17, - text: 'Aubree post Marshall comment 17', - postId: 4, - userId: 102, - author: { id: 102, name: 'Marshall' } - }] - }], + id: 4, + body: 'Aubree post', + userId: 104, + author: { id: 104, name: 'Aubree' }, + comments: [ + { + id: 17, + text: 'Aubree post Marshall comment 17', + postId: 4, + userId: 102, + author: { id: 102, name: 'Marshall' }, + }, + ], + }, + ], params: {}, - _loaders: undefined + _loaders: undefined, }; assert.deepEqual(context, result); }); }); -async function ex1 () { +async function ex1() { const postResolvers = { joins: { author: () => async (post: any) => { - post.author = (await users.find({ - query: { - id: post.userId - } - }))[0]; + post.author = ( + await users.find({ + query: { + id: post.userId, + }, + }) + )[0]; }, starers: ($select: any) => async (post: any) => { post.starers = await users.find({ query: { - id: { $in: post.starIds }, $select: $select || ['name'] - } + id: { $in: post.starIds }, + $select: $select || ['name'], + }, }); - } - } + }, + }, }; - const context: any = { method: 'find', result: await posts.find({ query: { id: 1 } }), params: {} }; + const context: any = { + method: 'find', + result: await posts.find({ query: { id: 1 } }), + params: {}, + }; return fastJoin(postResolvers)(context); } -async function ex2 () { +async function ex2() { const postResolvers = { joins: { author: () => async (post: any) => { - post.author = (await users.find({ - query: { - id: post.userId - } - }))[0]; + post.author = ( + await users.find({ + query: { + id: post.userId, + }, + }) + )[0]; }, starers: ($select: any) => async (post: any) => { post.starers = await users.find({ query: { - id: { $in: post.starIds }, $select: $select || ['name'] - } + id: { $in: post.starIds }, + $select: $select || ['name'], + }, }); - } - } + }, + }, }; const query = { - author: true + author: true, }; - const context: any = { method: 'find', result: await posts.find({ query: { id: 1 } }), params: {} }; + const context: any = { + method: 'find', + result: await posts.find({ query: { id: 1 } }), + params: {}, + }; return fastJoin(postResolvers, (_context: any) => query)(context); } -async function ex3 () { +async function ex3() { const postResolvers = { joins: { author: () => async (post: any) => { - post.author = (await users.find({ - query: { - id: post.userId - } - }))[0]; + post.author = ( + await users.find({ + query: { + id: post.userId, + }, + }) + )[0]; }, starers: ($select: any) => async (post: any) => { post.starers = await users.find({ query: { - id: { $in: post.starIds }, $select: $select || ['name'] - } + id: { $in: post.starIds }, + $select: $select || ['name'], + }, }); - } - } + }, + }, }; const query = { author: true, - starers: [['id', 'name']] + starers: [['id', 'name']], }; - const context: any = { method: 'find', result: await posts.find({ query: { id: 1 } }), params: {} }; + const context: any = { + method: 'find', + result: await posts.find({ query: { id: 1 } }), + params: {}, + }; - return fastJoin((_context: any) => postResolvers, (_context: any) => query)(context); + return fastJoin( + (_context: any) => postResolvers, + (_context: any) => query + )(context); } -async function ex4 () { +async function ex4() { const postResolvers: any = { joins: { author: () => async (post: any) => { - post.author = (await users.find({ - query: { - id: post.userId - } - }))[0]; + post.author = ( + await users.find({ + query: { + id: post.userId, + }, + }) + )[0]; }, starers: ($select: any) => async (post: any) => { post.starers = await users.find({ query: { - id: { $in: post.starIds }, $select: $select || ['name'] - } + id: { $in: post.starIds }, + $select: $select || ['name'], + }, }); }, - starerCount: () => (post: any) => { post.starerCount = post.starIds.length; } - } + starerCount: () => (post: any) => { + post.starerCount = post.starIds.length; + }, + }, }; - const context: any = { method: 'find', result: await posts.find({ query: { id: 1 } }), params: {} }; + const context: any = { + method: 'find', + result: await posts.find({ query: { id: 1 } }), + params: {}, + }; return fastJoin(postResolvers)(context); } -async function ex5 () { +async function ex5() { const postResolvers: any = { joins: { comments: { resolver: ($select: any, $limit: any, $sort: any) => async (post: any) => { post.comments = await comments.find({ query: { - postId: post.id, $select, $limit: $limit || 5, [$sort]: { createdAt: -1 } - } + postId: post.id, + $select, + $limit: $limit || 5, + [$sort]: { createdAt: -1 }, + }, }); return post.comments; }, joins: { author: ($select: any) => async (comment: any) => { - comment.author = (await users.find({ - query: { - id: comment.userId, $select - } - }))[0]; - } - } - } - } + comment.author = ( + await users.find({ + query: { + id: comment.userId, + $select, + }, + }) + )[0]; + }, + }, + }, + }, }; - const context: any = { method: 'find', result: await posts.find({ query: { id: 1 } }), params: {} }; + const context: any = { + method: 'find', + result: await posts.find({ query: { id: 1 } }), + params: {}, + }; return fastJoin(postResolvers)(context); } -async function ex6 () { +async function ex6() { const commentResolvers = { joins: { author: (_$select: any) => async (comment: any) => { - comment.author = (await users.find({ - query: { - id: comment.userId - } - }))[0]; - } - } + comment.author = ( + await users.find({ + query: { + id: comment.userId, + }, + }) + )[0]; + }, + }, }; const postResolvers = { @@ -512,22 +585,29 @@ async function ex6 () { resolver: ($select: any, $limit: any, $sort: any) => async (post: any) => { post.comments = await comments.find({ query: { - postId: post.id, $select, $limit: $limit || 5, [$sort]: { createdAt: -1 } - } + postId: post.id, + $select, + $limit: $limit || 5, + [$sort]: { createdAt: -1 }, + }, }); return post.comments; }, - joins: commentResolvers - } - } + joins: commentResolvers, + }, + }, }; - const context: any = { method: 'find', result: await posts.find({ query: { id: 1 } }), params: {} }; + const context: any = { + method: 'find', + result: await posts.find({ query: { id: 1 } }), + params: {}, + }; return fastJoin(postResolvers)(context); } -async function ex7 () { +async function ex7() { const postResolvers = { before: (context: any) => { context._loaders = { user: {} }; @@ -543,25 +623,32 @@ async function ex7 () { starers: () => async (post: any, context: any) => { if (!post.starIds) return; post.starers = await context._loaders.user.id.loadMany(post.starIds); - } - } + }, + }, }; - const context: any = { method: 'find', result: await posts.find({ query: { id: 1 } }), params: {} }; + const context: any = { + method: 'find', + result: await posts.find({ query: { id: 1 } }), + params: {}, + }; return fastJoin(postResolvers)(context); } -async function ex8 () { +async function ex8() { const postResolvers = { before: (context: any) => { context._loaders = { user: {} }; - context._loaders.user.id = new BatchLoader(async (keys: any, context: any) => { - const result = await users.find(makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } })); - return getResultsByKey(keys, result, (user: any) => user.id, '!'); - }, - { context } + context._loaders.user.id = new BatchLoader( + async (keys: any, context: any) => { + const result = await users.find( + makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } }) + ); + return getResultsByKey(keys, result, (user: any) => user.id, '!'); + }, + { context } ); }, @@ -573,42 +660,52 @@ async function ex8 () { starers: () => async (post: any, context: any) => { if (!post.starIds) return; post.starers = await context._loaders.user.id.loadMany(post.starIds); - } - } + }, + }, }; - const context: any = { method: 'find', result: await posts.find({ query: { id: 1 } }), params: {} }; + const context: any = { + method: 'find', + result: await posts.find({ query: { id: 1 } }), + params: {}, + }; return fastJoin(postResolvers)(context); } -async function ex9 () { +async function ex9() { const commentResolvers = { joins: { author: () => async (comment: any, context: any) => { if (!comment.userId) return; comment.author = await context._loaders.user.id.load(comment.userId); - } - } + }, + }, }; const postResolvers = { before: (context: any) => { context._loaders = { user: {}, comments: {} }; - context._loaders.user.id = new BatchLoader(async (keys: any, context: any) => { - const result = await users.find(makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } })); - return getResultsByKey(keys, result, (user: any) => user.id, '!'); - }, - { context } + context._loaders.user.id = new BatchLoader( + async (keys: any, context: any) => { + const result = await users.find( + makeCallingParams(context, { id: { $in: getUniqueKeys(keys) } }) + ); + return getResultsByKey(keys, result, (user: any) => user.id, '!'); + }, + { context } ); - context._loaders.comments.postId = new BatchLoader(async (keys: any, context: any) => { - const result = await comments.find(makeCallingParams(context, { postId: { $in: getUniqueKeys(keys) } })); - // @ts-ignore - return getResultsByKey(keys, result, (comment: any) => comment.postId, '[!]'); - }, - { context } + context._loaders.comments.postId = new BatchLoader( + async (keys: any, context: any) => { + const result = await comments.find( + makeCallingParams(context, { postId: { $in: getUniqueKeys(keys) } }) + ); + // @ts-ignore + return getResultsByKey(keys, result, (comment: any) => comment.postId, '[!]'); + }, + { context } ); }, @@ -622,23 +719,35 @@ async function ex9 () { post.starers = await context._loaders.user.id.loadMany(post.starIds); }, - reputation_author: (..._args: any[]): any => async (post: any, context: any): Promise => { - if (!post.reputation) return null; - const authors = await context._loaders.user.id.loadMany(post.reputation.map((rep: any) => rep.userId)); - post.reputation.forEach((rep: any, i: any) => { rep.author = authors[i].name; }); - }, + reputation_author: + (..._args: any[]): any => + async (post: any, context: any): Promise => { + if (!post.reputation) return null; + const authors = await context._loaders.user.id.loadMany( + post.reputation.map((rep: any) => rep.userId) + ); + post.reputation.forEach((rep: any, i: any) => { + rep.author = authors[i].name; + }); + }, comments: { - resolver: (..._args: any[]) => async (post: any, context: any) => { - post.comments = await context._loaders.comments.postId.load(post.id); - return post.comments; - }, - joins: commentResolvers - } - } + resolver: + (..._args: any[]) => + async (post: any, context: any) => { + post.comments = await context._loaders.comments.postId.load(post.id); + return post.comments; + }, + joins: commentResolvers, + }, + }, }; - const context: any = { method: 'find', result: await posts.find({ query: { id: { $in: [1, 2, 3, 4] } } }), params: {} }; + const context: any = { + method: 'find', + result: await posts.find({ query: { id: { $in: [1, 2, 3, 4] } } }), + params: {}, + }; return fastJoin(postResolvers)(context); } diff --git a/test/hooks/fgraphql.test.ts b/test/hooks/fgraphql.test.ts index 6a0b56f7..1770003d 100755 --- a/test/hooks/fgraphql.test.ts +++ b/test/hooks/fgraphql.test.ts @@ -64,39 +64,47 @@ describe('services fgraphql', () => { ]; /* eslint-enable */ - decisionTable.forEach(([desc, schema, resolvers, recordType, query, options, context, client, result]) => { - it(desc, async () => { - context.params = context.params || {}; - if (client) { - context.params.provider = 'socketio'; - } - - try { - const newContext: any = await fgraphql({ - parse, runTime, schema, resolvers, recordType, query, options - })(context); - - if (!isObject(result)) { - assert(false, `Unexpected success. Expected ${result}.`); - } else { - // inspector('result=', result); - // inspector('actual=', newContext.data || newContext.result); - assert.deepEqual(newContext.data || newContext.result, result, 'unexpected result'); - } - } catch (err: any) { - if (err.message.substr(0, 19) === 'Unexpected success.') { - throw err; + decisionTable.forEach( + ([desc, schema, resolvers, recordType, query, options, context, client, result]) => { + it(desc, async () => { + context.params = context.params || {}; + if (client) { + context.params.provider = 'socketio'; } - if (isObject(result)) { - assert(false, `unexpected fail: ${err.message}`); - return; + try { + const newContext: any = await fgraphql({ + parse, + runTime, + schema, + resolvers, + recordType, + query, + options, + })(context); + + if (!isObject(result)) { + assert(false, `Unexpected success. Expected ${result}.`); + } else { + // inspector('result=', result); + // inspector('actual=', newContext.data || newContext.result); + assert.deepEqual(newContext.data || newContext.result, result, 'unexpected result'); + } + } catch (err: any) { + if (err.message.substr(0, 19) === 'Unexpected success.') { + throw err; + } + + if (isObject(result)) { + assert(false, `unexpected fail: ${err.message}`); + return; + } + + assert.strictEqual(err.code, result, `unexpected error: ${err.message}`); } - - assert.strictEqual(err.code, result, `unexpected error: ${err.message}`); - } - }); - }); + }); + } + ); }); describe('using batchloader', () => { @@ -115,13 +123,13 @@ describe('services fgraphql', () => { 32: { _id: '32', name: 'user 32' }, 35: { _id: '35', name: 'user 35' }, 36: { _id: '36', name: 'user 36' }, - 37: { _id: '37', name: 'user 37' } + 37: { _id: '37', name: 'user 37' }, }; const postsDb: any = { 11: { _id: '11', body: 'body 11', userId: '31' }, 12: { _id: '12', body: 'body 12', userId: '31' }, - 13: { _id: '13', body: 'body 13', userId: '32' } + 13: { _id: '13', body: 'body 13', userId: '32' }, }; const commentsDb: any = { @@ -133,7 +141,7 @@ describe('services fgraphql', () => { 26: { _id: '26', comment: 'comment 26', postId: '13', userId: '36' }, 27: { _id: '27', comment: 'comment 24', postId: '11', userId: '37' }, 28: { _id: '28', comment: 'comment 25', postId: '12', userId: '37' }, - 29: { _id: '29', comment: 'comment 26', postId: '13', userId: '37' } + 29: { _id: '29', comment: 'comment 26', postId: '13', userId: '37' }, }; beforeEach(() => { @@ -164,39 +172,38 @@ describe('services fgraphql', () => { context = { type: 'after', params: {}, - result: Object.keys(postsDb).map(key => postsDb[key]) + result: Object.keys(postsDb).map(key => postsDb[key]), }; query = { body: 1, userId: 1, author: { - name: 1 + name: 1, }, comments: { userId: 1, author: { - name: 1 - } - } + name: 1, + }, + }, }; options = { - inclJoinedNames: false + inclJoinedNames: false, }; - usersBatchLoader = new BatchLoader( - async (keys: any) => { - usersBatchLoaderCalls.push(keys); - const result = keys.map((key: any) => usersDb[key]); - return getResultsByKey(keys, result, (rec: any) => rec._id, '!'); - } - ); + usersBatchLoader = new BatchLoader(async (keys: any) => { + usersBatchLoaderCalls.push(keys); + const result = keys.map((key: any) => usersDb[key]); + return getResultsByKey(keys, result, (rec: any) => rec._id, '!'); + }); resolvers = () => ({ Post: { // tests returning a Promise - author: (parent: any, _args: any, _content: any, _ast: any) => usersBatchLoader.load(parent.userId), + author: (parent: any, _args: any, _content: any, _ast: any) => + usersBatchLoader.load(parent.userId), // tests returning a value comments: (parent: any, _args: any, _content: any, _ast: any) => { const x: any = []; @@ -206,11 +213,12 @@ describe('services fgraphql', () => { } }); return x; - } + }, }, Comment: { - author: (parent: any, _args: any, _content: any, _ast: any) => usersBatchLoader.load(parent.userId) - } + author: (parent: any, _args: any, _content: any, _ast: any) => + usersBatchLoader.load(parent.userId), + }, }); result = [ @@ -220,42 +228,54 @@ describe('services fgraphql', () => { comments: [ { userId: '35', author: { _id: '35', name: 'user 35' } }, { userId: '36', author: { _id: '36', name: 'user 36' } }, - { userId: '37', author: { _id: '37', name: 'user 37' } } + { userId: '37', author: { _id: '37', name: 'user 37' } }, ], - author: { _id: '31', name: 'user 31' } - }, { + author: { _id: '31', name: 'user 31' }, + }, + { body: 'body 12', userId: '31', comments: [ { userId: '35', author: { _id: '35', name: 'user 35' } }, { userId: '36', author: { _id: '36', name: 'user 36' } }, - { userId: '37', author: { _id: '37', name: 'user 37' } } + { userId: '37', author: { _id: '37', name: 'user 37' } }, ], - author: { _id: '31', name: 'user 31' } - }, { + author: { _id: '31', name: 'user 31' }, + }, + { body: 'body 13', userId: '32', comments: [ { userId: '35', author: { _id: '35', name: 'user 35' } }, { userId: '36', author: { _id: '36', name: 'user 36' } }, - { userId: '37', author: { _id: '37', name: 'user 37' } } + { userId: '37', author: { _id: '37', name: 'user 37' } }, ], - author: { _id: '32', name: 'user 32' } - } + author: { _id: '32', name: 'user 32' }, + }, ]; }); it('batches calls', async () => { try { const newContext: any = await fgraphql({ - parse, runTime, schema, resolvers, recordType, query, options + parse, + runTime, + schema, + resolvers, + recordType, + query, + options, })(context); // inspector('batchloader calls', usersBatchLoaderCalls); // inspector('actual=', newContext.data || newContext.result); assert.deepEqual(newContext.data || newContext.result, result, 'unexpected result'); - assert.deepEqual(usersBatchLoaderCalls, [['31', '32', '35', '36', '37']], 'unexpected calls'); + assert.deepEqual( + usersBatchLoaderCalls, + [['31', '32', '35', '36', '37']], + 'unexpected calls' + ); } catch (err) { console.log(err); throw err; @@ -264,12 +284,12 @@ describe('services fgraphql', () => { }); }); -function isObject (obj: any) { +function isObject(obj: any) { return typeof obj === 'object' && obj !== null; } // schemas -function s (typ: any) { +function s(typ: any) { const SDL1 = ` type User { _id: ID @@ -331,174 +351,174 @@ type User { }`; switch (typ) { - case 'str': - return SDL1; - case 'cnv0': - return C0; - case 'cnv1': - return C1; - case 'fcn': - return () => SDL1; - case 'obj': - return { - User: { - firstName: { typeof: 'String' }, - lastName: { typeof: 'String' }, - fullName: { nonNullTypeField: true, typeof: 'String' } - } - }; - case 'param': - return { - User: { - firstName: { typeof: 'String' }, - lastName: { typeof: 'String' }, - fullName: { nonNullTypeField: true, typeof: 'String' }, - params: { typeof: 'JSON' } - } - }; - case 'err1': - return (): any => null; - - case 'S2': - return S2; - case 'S3': - return S3; - default: - throw new Error(`Invalid typ ${typ} for "s" function.`); - } -} - -// resolvers -function r (typ: any) { - return function resolvers (_app: any, _options: any) { // eslint-disable-line no-unused-vars - // const { convertArgsToFeathers, extractAllItems, extractFirstItem } = options; // eslint-disable-line no-unused-vars - // const convertArgs = convertArgsToFeathers([]); // eslint-disable-line no-unused-vars - // let comments = app.service('/comments'); - - switch (typ) { - case 'full': - return { - User: { - // fullName: String! - fullName: - (parent: any, _args: any, _content: any, _ast: any) => `${parent.first} ${parent.last}` // eslint-disable-line no-unused-vars - } - }; - case 'parent': + case 'str': + return SDL1; + case 'cnv0': + return C0; + case 'cnv1': + return C1; + case 'fcn': + return () => SDL1; + case 'obj': return { User: { - // fullName: String! - fullName: - (parent: any, _args: any, _content: any, _ast: any) => { // eslint-disable-line no-unused-vars - const returns = `${parent.first} ${parent.last}`; - parent.first = 'foo'; - return returns; - } - } + firstName: { typeof: 'String' }, + lastName: { typeof: 'String' }, + fullName: { nonNullTypeField: true, typeof: 'String' }, + }, }; - case 'params': + case 'param': return { User: { - // fullName: String! - fullName: - (parent: any, _args: any, _content: any, _ast: any) => `${parent.first} ${parent.last}`, // eslint-disable-line no-unused-vars - params: - (_parent: any, args: any, _content: any, ast: any) => ({ - args, - ast - }) - } + firstName: { typeof: 'String' }, + lastName: { typeof: 'String' }, + fullName: { nonNullTypeField: true, typeof: 'String' }, + params: { typeof: 'JSON' }, + }, }; case 'err1': - return { User: { fullName: 'foo' } }; - - case 'array2': - return { - User: { - fullName: () => [{ fullName: 'foo' }, { fullName: 'foo' }] - } - }; - case 'undefin': - return { - User: { - fullName: (): any => undefined - } - }; - case 'array1': - return { - User: { - fullName: (parent: any) => [`${parent.first} ${parent.last}`] - } - }; + return (): any => null; case 'S2': - return { - User: { - // posts: [Post] - posts: - (_parent: any, args: any, content: any, _ast: any) => { // eslint-disable-line no-unused-vars - return [ - { _id: '1001', body: 'foo body' }, - { _id: (args.params || content.foo || {})._id || '1002', body: 'bar body' } - ]; - }, - // comments: [Comment] - comments: - (_parent: any, _args: any, _content: any, _ast: any) => { // eslint-disable-line no-unused-vars - return [ - { _id: '2001', comment: 'foo comment' }, - { _id: '2002', comment: 'bar comment' } - ]; - } - }, - Post: {} - }; - + return S2; case 'S3': - return { - User: { - // posts: [Post] - posts: - (_parent: any, args: any, _content: any, _ast: any) => { // eslint-disable-line no-unused-vars - return [ - { _id: '1001', body: 'foo body' }, - { _id: (args.params || {})._id || '1002', body: 'bar body' } - ]; - }, - // comments: [Comment] - comments: - (_parent: any, _args: any, _content: any, _ast: any) => { // eslint-disable-line no-unused-vars - return [ - { _id: '2001', comment: 'foo comment' }, - { _id: '2002', comment: 'bar comment' } - ]; - } - }, - Post: { - // author: User - author: - (_parent: any, _args: any, _content: any, _ast: any) => { // eslint-disable-line no-unused-vars - return { _id: '3001', first: 'Jane', last: 'Doe' }; - } - }, - Comment: { - // author: User - author: - (_parent: any, _args: any, _content: any, _ast: any) => { // eslint-disable-line no-unused-vars - return { _id: '4001', first: 'Jane', last: 'Doe' }; - } - } - }; + return S3; default: - throw new Error(`Invalid typ ${typ} for "r" function.`); + throw new Error(`Invalid typ ${typ} for "s" function.`); + } +} + +// resolvers +function r(typ: any) { + return function resolvers(_app: any, _options: any) { + // eslint-disable-line no-unused-vars + // const { convertArgsToFeathers, extractAllItems, extractFirstItem } = options; // eslint-disable-line no-unused-vars + // const convertArgs = convertArgsToFeathers([]); // eslint-disable-line no-unused-vars + // let comments = app.service('/comments'); + + switch (typ) { + case 'full': + return { + User: { + // fullName: String! + fullName: (parent: any, _args: any, _content: any, _ast: any) => + `${parent.first} ${parent.last}`, // eslint-disable-line no-unused-vars + }, + }; + case 'parent': + return { + User: { + // fullName: String! + fullName: (parent: any, _args: any, _content: any, _ast: any) => { + // eslint-disable-line no-unused-vars + const returns = `${parent.first} ${parent.last}`; + parent.first = 'foo'; + return returns; + }, + }, + }; + case 'params': + return { + User: { + // fullName: String! + fullName: (parent: any, _args: any, _content: any, _ast: any) => + `${parent.first} ${parent.last}`, // eslint-disable-line no-unused-vars + params: (_parent: any, args: any, _content: any, ast: any) => ({ + args, + ast, + }), + }, + }; + case 'err1': + return { User: { fullName: 'foo' } }; + + case 'array2': + return { + User: { + fullName: () => [{ fullName: 'foo' }, { fullName: 'foo' }], + }, + }; + case 'undefin': + return { + User: { + fullName: (): any => undefined, + }, + }; + case 'array1': + return { + User: { + fullName: (parent: any) => [`${parent.first} ${parent.last}`], + }, + }; + + case 'S2': + return { + User: { + // posts: [Post] + posts: (_parent: any, args: any, content: any, _ast: any) => { + // eslint-disable-line no-unused-vars + return [ + { _id: '1001', body: 'foo body' }, + { _id: (args.params || content.foo || {})._id || '1002', body: 'bar body' }, + ]; + }, + // comments: [Comment] + comments: (_parent: any, _args: any, _content: any, _ast: any) => { + // eslint-disable-line no-unused-vars + return [ + { _id: '2001', comment: 'foo comment' }, + { _id: '2002', comment: 'bar comment' }, + ]; + }, + }, + Post: {}, + }; + + case 'S3': + return { + User: { + // posts: [Post] + posts: (_parent: any, args: any, _content: any, _ast: any) => { + // eslint-disable-line no-unused-vars + return [ + { _id: '1001', body: 'foo body' }, + { _id: (args.params || {})._id || '1002', body: 'bar body' }, + ]; + }, + // comments: [Comment] + comments: (_parent: any, _args: any, _content: any, _ast: any) => { + // eslint-disable-line no-unused-vars + return [ + { _id: '2001', comment: 'foo comment' }, + { _id: '2002', comment: 'bar comment' }, + ]; + }, + }, + Post: { + // author: User + author: (_parent: any, _args: any, _content: any, _ast: any) => { + // eslint-disable-line no-unused-vars + return { _id: '3001', first: 'Jane', last: 'Doe' }; + }, + }, + Comment: { + // author: User + author: (_parent: any, _args: any, _content: any, _ast: any) => { + // eslint-disable-line no-unused-vars + return { _id: '4001', first: 'Jane', last: 'Doe' }; + }, + }, + }; + default: + throw new Error(`Invalid typ ${typ} for "r" function.`); } }; } // query -function q (typ: any): any { +function q(typ: any): any { switch (typ) { - /* eslint-disable */ + /* eslint-disable */ case 'obj': return { fullName: {} } ; case 'none': @@ -590,46 +610,46 @@ function q (typ: any): any { } // options -function o (typ: any) { +function o(typ: any) { switch (typ) { - case 'both': - return { - inclAllFieldsServer: true, - inclAllFieldsClient: true - }; - case 'server-': - return { inclAllFieldsServer: false }; - case 'client-': - return { inclAllFieldsClient: false }; - case 'loop': - return { skipHookWhen: () => false }; - case 'prop-': - return { - inclAllFieldsServer: true, - inclAllFieldsClient: true, - extraAuthProps: 1 - }; - case 'prop+': - return { - inclAllFieldsServer: true, - inclAllFieldsClient: true, - extraAuthProps: ['foo'] - }; - case 'join-': - return { - inclAllFieldsServer: true, - inclAllFieldsClient: true, - inclJoinedNames: false - }; - default: - throw new Error(`Invalid typ ${typ} for "o" function.`); + case 'both': + return { + inclAllFieldsServer: true, + inclAllFieldsClient: true, + }; + case 'server-': + return { inclAllFieldsServer: false }; + case 'client-': + return { inclAllFieldsClient: false }; + case 'loop': + return { skipHookWhen: () => false }; + case 'prop-': + return { + inclAllFieldsServer: true, + inclAllFieldsClient: true, + extraAuthProps: 1, + }; + case 'prop+': + return { + inclAllFieldsServer: true, + inclAllFieldsClient: true, + extraAuthProps: ['foo'], + }; + case 'join-': + return { + inclAllFieldsServer: true, + inclAllFieldsClient: true, + inclJoinedNames: false, + }; + default: + throw new Error(`Invalid typ ${typ} for "o" function.`); } } // results -function a (typ: any) { +function a(typ: any) { switch (typ) { - /* eslint-disable */ + /* eslint-disable */ case 'janeNull' : return { first: 'Jane', last: 'Doe', fullName: null, _include: ['fullName'] }; case 'janeFull' : diff --git a/test/hooks/get-replace-items.test.ts b/test/hooks/get-replace-items.test.ts index ce7aaa98..63534679 100755 --- a/test/hooks/get-replace-items.test.ts +++ b/test/hooks/get-replace-items.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { getItems, replaceItems } from '../../src'; @@ -18,25 +17,31 @@ describe('services getItems & replaceItems', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe' } + data: { first: 'John', last: 'Doe' }, }; hookBeforeArray = { type: 'before', method: 'create', params: { provider: 'rest' }, - data: [{ first: 'John', last: 'Doe' }, { first: 'Jane', last: 'Doe' }] + data: [ + { first: 'John', last: 'Doe' }, + { first: 'Jane', last: 'Doe' }, + ], }; hookAfter = { type: 'after', method: 'create', params: { provider: 'rest' }, - result: { first: 'Jane2', last: 'Doe2' } + result: { first: 'Jane2', last: 'Doe2' }, }; hookAfterArray = { type: 'after', method: 'create', params: { provider: 'rest' }, - result: [{ first: 'John2', last: 'Doe2' }, { first: 'Jane', last: 'Doe' }] + result: [ + { first: 'John2', last: 'Doe2' }, + { first: 'Jane', last: 'Doe' }, + ], }; hookFindPaginate = { type: 'after', @@ -46,9 +51,9 @@ describe('services getItems & replaceItems', () => { total: 2, data: [ { first: 'John3', last: 'Doe3' }, - { first: 'Jane3', last: 'Doe3' } - ] - } + { first: 'Jane3', last: 'Doe3' }, + ], + }, }; hookFind = { type: 'after', @@ -56,8 +61,8 @@ describe('services getItems & replaceItems', () => { params: { provider: 'rest' }, result: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] + { first: 'Jane', last: 'Doe' }, + ], }; }); @@ -70,7 +75,7 @@ describe('services getItems & replaceItems', () => { const stuff = getItems(hookBeforeArray); assert.deepEqual(stuff, [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } + { first: 'Jane', last: 'Doe' }, ]); }); @@ -83,7 +88,7 @@ describe('services getItems & replaceItems', () => { const stuff = getItems(hookAfterArray); assert.deepEqual(stuff, [ { first: 'John2', last: 'Doe2' }, - { first: 'Jane', last: 'Doe' } + { first: 'Jane', last: 'Doe' }, ]); }); @@ -91,7 +96,7 @@ describe('services getItems & replaceItems', () => { const stuff = getItems(hookFindPaginate); assert.deepEqual(stuff, [ { first: 'John3', last: 'Doe3' }, - { first: 'Jane3', last: 'Doe3' } + { first: 'Jane3', last: 'Doe3' }, ]); }); @@ -99,7 +104,7 @@ describe('services getItems & replaceItems', () => { const stuff = getItems(hookFind); assert.deepEqual(stuff, [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } + { first: 'Jane', last: 'Doe' }, ]); }); @@ -126,11 +131,13 @@ describe('services getItems & replaceItems', () => { params: { provider: 'rest' }, result: { total: 200, - data: [] - } + data: [], + }, }; hookFind = { - type: 'after', method: 'find', params: { provider: 'rest' } + type: 'after', + method: 'find', + params: { provider: 'rest' }, }; }); diff --git a/test/hooks/iff-else.test.ts b/test/hooks/iff-else.test.ts index bc58860d..092acf81 100755 --- a/test/hooks/iff-else.test.ts +++ b/test/hooks/iff-else.test.ts @@ -37,7 +37,7 @@ const predicateAsync2 = (options: any) => (hook: any) => { const predicateAsyncFunny = (hook: any) => { predicateHook = clone(hook); - return new Promise(resolve => { + return new Promise(resolve => { predicateValue = 'abc'; return resolve(predicateValue); }); @@ -51,13 +51,14 @@ const hookFcnSync = (hook: HookContext): HookContext => { return hook; }; -const hookFcnAsync = (hook: HookContext) => new Promise(resolve => { - hookFcnAsyncCalls += 1; +const hookFcnAsync = (hook: HookContext) => + new Promise(resolve => { + hookFcnAsyncCalls += 1; - hook.data.first = hook.data.first.toLowerCase(); + hook.data.first = hook.data.first.toLowerCase(); - resolve(hook); -}); + resolve(hook); + }); const hookCb = (hook: any) => { hookFcnCalls += 1; @@ -75,14 +76,19 @@ describe('services iff - sync predicate, sync hook', () => { }); it('calls sync hook function if truthy non-function', () => { - // @ts-ignore - return iff('a', hookFcnSync)(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + return ( + iff( + // @ts-ignore + 'a', + hookFcnSync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('does not call sync hook function if falsey non-function', () => { @@ -99,14 +105,19 @@ describe('services iff - sync predicate, sync hook', () => { }); it('calls sync hook function if sync predicate truthy', () => { - // @ts-ignore - return iff(() => 'a', hookFcnSync)(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + return ( + iff( + // @ts-ignore + () => 'a', + hookFcnSync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('does not call sync hook function if sync predicate falsey', () => { @@ -133,13 +144,18 @@ describe('services iff - sync predicate, async hook', () => { }); it('calls async hook function if sync predicate truthy', () => { - return iff(true, hookFcnAsync)(hook) - // @ts-ignore - .then((result1: any) => { - assert.deepEqual(result1, hookAfter); - assert.equal(hookFcnAsyncCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + return ( + iff( + true, + hookFcnAsync + )(hook) + // @ts-ignore + .then((result1: any) => { + assert.deepEqual(result1, hookAfter); + assert.equal(hookFcnAsyncCalls, 1); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('does not call async hook function if sync predicate falsey', () => { @@ -155,13 +171,18 @@ describe('services iff - sync predicate, async hook', () => { }); it('calls async hook function if sync predicate returns truthy', () => { - return iff(() => true, hookFcnAsync)(hook) - // @ts-ignore - .then((result1: any) => { - assert.deepEqual(result1, hookAfter); - assert.equal(hookFcnAsyncCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + return ( + iff( + () => true, + hookFcnAsync + )(hook) + // @ts-ignore + .then((result1: any) => { + assert.deepEqual(result1, hookAfter); + assert.equal(hookFcnAsyncCalls, 1); + assert.deepEqual(hook, hookAfter); + }) + ); }); }); @@ -175,23 +196,33 @@ describe('services iff - async predicate, sync hook', () => { }); it('calls sync hook function if aync predicate truthy', () => { - return iff(() => new Promise(resolve => resolve(true)), hookFcnSync)(hook) - // @ts-ignore - .then((result1: any) => { - assert.deepEqual(result1, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.deepEqual(result1, hookAfter); - }); + return ( + iff( + () => new Promise(resolve => resolve(true)), + hookFcnSync + )(hook) + // @ts-ignore + .then((result1: any) => { + assert.deepEqual(result1, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.deepEqual(result1, hookAfter); + }) + ); }); it('does not call sync hook function if async predicate falsey', () => { - return iff(() => new Promise(resolve => resolve(false)), hookFcnSync)(hook) - // @ts-ignore - .then((result1: any) => { - assert.deepEqual(result1, hookBefore); - assert.equal(hookFcnSyncCalls, 0); - assert.deepEqual(hook, hookBefore); - }); + return ( + iff( + () => new Promise(resolve => resolve(false)), + hookFcnSync + )(hook) + // @ts-ignore + .then((result1: any) => { + assert.deepEqual(result1, hookBefore); + assert.equal(hookFcnSyncCalls, 0); + assert.deepEqual(hook, hookBefore); + }) + ); }); }); @@ -205,23 +236,33 @@ describe('services iff - async predicate, async hook', () => { }); it('calls async hook function if aync predicate truthy', () => { - return iff(() => new Promise(resolve => resolve(true)), hookFcnAsync)(hook) - // @ts-ignore - .then((result1: any) => { - assert.deepEqual(result1, hookAfter); - assert.equal(hookFcnAsyncCalls, 1); - assert.deepEqual(result1, hookAfter); - }); + return ( + iff( + () => new Promise(resolve => resolve(true)), + hookFcnAsync + )(hook) + // @ts-ignore + .then((result1: any) => { + assert.deepEqual(result1, hookAfter); + assert.equal(hookFcnAsyncCalls, 1); + assert.deepEqual(result1, hookAfter); + }) + ); }); it('does not call async hook function if async predicate falsey', () => { - return iff(() => new Promise(resolve => resolve(false)), hookFcnAsync)(hook) - // @ts-ignore - .then((result1: any) => { - assert.deepEqual(result1, hookBefore); - assert.equal(hookFcnAsyncCalls, 0); - assert.deepEqual(hook, hookBefore); - }); + return ( + iff( + () => new Promise(resolve => resolve(false)), + hookFcnAsync + )(hook) + // @ts-ignore + .then((result1: any) => { + assert.deepEqual(result1, hookBefore); + assert.equal(hookFcnAsyncCalls, 0); + assert.deepEqual(hook, hookBefore); + }) + ); }); }); @@ -237,37 +278,52 @@ describe('services iff - sync predicate', () => { }); it('does not need to access hook', () => { - // @ts-ignore - return iff(() => 'a', hookFcnSync)(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + return ( + iff( + // @ts-ignore + () => 'a', + hookFcnSync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('is passed hook as param', () => { - return iff(predicateSync, hookFcnSync)(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(predicateHook, hookBefore); - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + return ( + iff( + predicateSync, + hookFcnSync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(predicateHook, hookBefore); + assert.deepEqual(hook, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('a higher order predicate can pass more options', () => { - return iff(predicateSync2({ z: 'z' }), hookFcnSync)(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(predicateOptions, { z: 'z' }); - assert.deepEqual(predicateHook, hookBefore); - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + return ( + iff( + predicateSync2({ z: 'z' }), + hookFcnSync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(predicateOptions, { z: 'z' }); + assert.deepEqual(predicateHook, hookBefore); + assert.deepEqual(hook, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.deepEqual(hook, hookAfter); + }) + ); }); }); @@ -284,40 +340,55 @@ describe('services iff - async predicate', () => { }); it('is passed hook as param', () => { - return iff(predicateAsync, hookFcnSync)(hook) - // @ts-ignore - .then((result1: any) => { - assert.deepEqual(predicateHook, hookBefore); - assert.deepEqual(result1, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.deepEqual(result1, hookAfter); - }); + return ( + iff( + predicateAsync, + hookFcnSync + )(hook) + // @ts-ignore + .then((result1: any) => { + assert.deepEqual(predicateHook, hookBefore); + assert.deepEqual(result1, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.deepEqual(result1, hookAfter); + }) + ); }); it('is resolved', () => { - // @ts-ignore - return iff(predicateAsyncFunny, hookFcnSync)(hook) - // @ts-ignore - .then((result1: any) => { - assert.deepEqual(predicateHook, hookBefore); - assert.deepEqual(result1, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.deepEqual(result1, hookAfter); + return ( + iff( + // @ts-ignore + predicateAsyncFunny, + hookFcnSync + )(hook) + // @ts-ignore + .then((result1: any) => { + assert.deepEqual(predicateHook, hookBefore); + assert.deepEqual(result1, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.deepEqual(result1, hookAfter); - assert.equal(predicateValue, 'abc'); - }); + assert.equal(predicateValue, 'abc'); + }) + ); }); it('a higher order predicate can pass more options', () => { - return iff(predicateAsync2({ y: 'y' }), hookFcnSync)(hook) - // @ts-ignore - .then((result1: any) => { - assert.deepEqual(predicateOptions, { y: 'y' }); - assert.deepEqual(predicateHook, hookBefore); - assert.deepEqual(result1, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.deepEqual(result1, hookAfter); - }); + return ( + iff( + predicateAsync2({ y: 'y' }), + hookFcnSync + )(hook) + // @ts-ignore + .then((result1: any) => { + assert.deepEqual(predicateOptions, { y: 'y' }); + assert.deepEqual(predicateHook, hookBefore); + assert.deepEqual(result1, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.deepEqual(result1, hookAfter); + }) + ); }); }); @@ -332,78 +403,56 @@ describe('services iff - runs .else()', () => { }); it('using iff(true, ...)', () => { - return iff(true, - hookFcnSync, - hookFcnSync, - hookFcnSync - )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 3); - assert.equal(hookFcnAsyncCalls, 0); - assert.equal(hookFcnCalls, 0); - - assert.deepEqual(hook, hookAfter); - }); - }); - - it('using iff(true, ...).else(...)', () => { - return iff(true, - hookFcnSync, - hookFcnSync, - hookFcnSync - ) - .else( + return ( + iff( + true, + hookFcnSync, + hookFcnSync, hookFcnSync )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 3); - assert.equal(hookFcnAsyncCalls, 0); - assert.equal(hookFcnCalls, 0); + // @ts-ignore + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 3); + assert.equal(hookFcnAsyncCalls, 0); + assert.equal(hookFcnCalls, 0); - assert.deepEqual(hook, hookAfter); - }); + assert.deepEqual(hook, hookAfter); + }) + ); }); - it('using if(false).else(...)', () => { - return iff(false, - hookFcnSync - ) - .else( - hookFcnSync, - hookFcnSync, - hookFcnSync - )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 3); - assert.equal(hookFcnAsyncCalls, 0); - assert.equal(hookFcnCalls, 0); + it('using iff(true, ...).else(...)', () => { + return ( + iff(true, hookFcnSync, hookFcnSync, hookFcnSync) + .else(hookFcnSync)(hook) + // @ts-ignore + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 3); + assert.equal(hookFcnAsyncCalls, 0); + assert.equal(hookFcnCalls, 0); - assert.deepEqual(hook, hookAfter); - }); + assert.deepEqual(hook, hookAfter); + }) + ); }); - it('using if(false).else(...) with the array syntax', () => { - return iff(false, - // @ts-ignore - [hookFcnSync] - ) - // @ts-ignore - .else([ - hookFcnSync, - hookFcnSync, - hookFcnSync - ])(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 3); - assert.equal(hookFcnAsyncCalls, 0); - assert.equal(hookFcnCalls, 0); + it('using if(false).else(...)', () => { + return ( + iff(false, hookFcnSync) + .else( + hookFcnSync, + hookFcnSync, + hookFcnSync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 3); + assert.equal(hookFcnAsyncCalls, 0); + assert.equal(hookFcnCalls, 0); - assert.deepEqual(hook, hookAfter); - }); + assert.deepEqual(hook, hookAfter); + }) + ); }); }); @@ -418,69 +467,60 @@ describe('services iff - runs iff(true, iff(true, ...)', () => { }); it('using iff(true, iff(true, hookFcnSync))', () => { - return iff(true, - hookFcnAsync, - iff(true, hookFcnSync), - hookCb - )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 1); + return ( + iff( + true, + hookFcnAsync, + iff(true, hookFcnSync), + hookCb + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 1); + assert.equal(hookFcnAsyncCalls, 1); + assert.equal(hookFcnCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('using iff(true, iff(true, hookFcnAsync))', () => { - return iff(true, - hookFcnSync, - iff(true, hookFcnAsync), - hookCb - )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 1); + return ( + iff( + true, + hookFcnSync, + iff(true, hookFcnAsync), + hookCb + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 1); + assert.equal(hookFcnAsyncCalls, 1); + assert.equal(hookFcnCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('runs iff(true, iff(true, hookFcnCb))', () => { - return iff(true, - hookFcnSync, - iff(true, hookCb), - hookFcnAsync - )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 1); - - assert.deepEqual(hook, hookAfter); - }); - }); - - it('runs iff(true, iff(true, hookFcnCb)) with the array syntax', () => { - // @ts-ignore - return iff(true, [ - hookFcnSync, - // @ts-ignore - iff(true, [hookCb]), - hookFcnAsync - ])(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 1); - - assert.deepEqual(hook, hookAfter); - }); + return ( + iff( + true, + hookFcnSync, + iff(true, hookCb), + hookFcnAsync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 1); + assert.equal(hookFcnAsyncCalls, 1); + assert.equal(hookFcnCalls, 1); + + assert.deepEqual(hook, hookAfter); + }) + ); }); }); @@ -495,35 +535,41 @@ describe('services iff - runs iff(true, iff(false).else(...)', () => { }); it('using iff(true, iff(false).else(hookFcnSync))', () => { - return iff(true, - hookFcnAsync, - iff(false, hookCb).else(hookFcnSync), - hookFcnAsync - )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 2); - assert.equal(hookFcnCalls, 0); + return ( + iff( + true, + hookFcnAsync, + iff(false, hookCb).else(hookFcnSync), + hookFcnAsync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 1); + assert.equal(hookFcnAsyncCalls, 2); + assert.equal(hookFcnCalls, 0); - assert.deepEqual(hook, hookAfter); - }); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('using iff(true, iff(false).else(hookFcnAsync))', () => { - return iff(true, - hookFcnSync, - iff(false, hookFcnSync).else(hookFcnAsync), - hookFcnSync - )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 2); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 0); - - assert.deepEqual(hook, hookAfter); - }); + return ( + iff( + true, + hookFcnSync, + iff(false, hookFcnSync).else(hookFcnAsync), + hookFcnSync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 2); + assert.equal(hookFcnAsyncCalls, 1); + assert.equal(hookFcnCalls, 0); + + assert.deepEqual(hook, hookAfter); + }) + ); }); }); @@ -538,63 +584,41 @@ describe('services iff - runs iff(false).else(iff(...).else(...))', () => { }); it('using iff(false).else(iff(true, ...))', () => { - return iff(false, - hookCb - ) - .else( - hookFcnSync, - iff(true, hookFcnAsync), - hookFcnSync - )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 2); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 0); + return ( + iff(false, hookCb) + .else( + hookFcnSync, + iff(true, hookFcnAsync), + hookFcnSync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 2); + assert.equal(hookFcnAsyncCalls, 1); + assert.equal(hookFcnCalls, 0); - assert.deepEqual(hook, hookAfter); - }); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('runs iff(false).else(iff(false).else(...))', () => { - return iff(false, - hookCb - ) - .else( - hookFcnSync, - iff(false, hookFcnSync).else(hookFcnAsync), - hookFcnSync - )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 2); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 0); - - assert.deepEqual(hook, hookAfter); - }); - }); - - it('runs iff(false).else(iff(false).else(...)) with the array syntax', () => { - return iff(false, - // @ts-ignore - [hookCb] - ) - // @ts-ignore - .else([ - hookFcnSync, + return ( + iff(false, hookCb) + .else( + hookFcnSync, + iff(false, hookFcnSync).else(hookFcnAsync), + hookFcnSync + )(hook) // @ts-ignore - iff(false, [hookFcnSync]).else([hookFcnAsync]), - hookFcnSync - ])(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 2); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 0); + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 2); + assert.equal(hookFcnAsyncCalls, 1); + assert.equal(hookFcnCalls, 0); - assert.deepEqual(hook, hookAfter); - }); + assert.deepEqual(hook, hookAfter); + }) + ); }); }); @@ -609,70 +633,49 @@ describe('services iff - multiple iff() sequentially', () => { }); it('runs in iff(true, ...)', () => { - return iff(true, - hookCb, - iff(true, hookFcnSync, hookFcnSync, hookFcnSync), - hookCb, - iff(true, hookFcnAsync, hookFcnAsync, hookFcnAsync, hookFcnAsync), - hookCb - )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 3); - assert.equal(hookFcnAsyncCalls, 4); - assert.equal(hookFcnCalls, 3); - - assert.deepEqual(hook, hookAfter); - }); - }); - - it('runs in iff(false).else(...)', () => { - return iff(false, - hookCb - ) - .else( - hookFcnSync, - iff(true, hookFcnAsync), - iff(false, hookFcnSync).else(hookCb), - hookFcnSync + return ( + iff( + true, + hookCb, + iff(true, hookFcnSync, hookFcnSync, hookFcnSync), + hookCb, + iff(true, hookFcnAsync, hookFcnAsync, hookFcnAsync, hookFcnAsync), + hookCb )(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 2); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 1); + // @ts-ignore + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 3); + assert.equal(hookFcnAsyncCalls, 4); + assert.equal(hookFcnCalls, 3); - assert.deepEqual(hook, hookAfter); - }); + assert.deepEqual(hook, hookAfter); + }) + ); }); - it('runs in iff(false).else(...) with the array syntax', () => { - return iff(false, - // @ts-ignore - [hookCb] - ) - // @ts-ignore - .else([ - hookFcnSync, - // @ts-ignore - iff(true, [hookFcnAsync]), + it('runs in iff(false).else(...)', () => { + return ( + iff(false, hookCb) + .else( + hookFcnSync, + iff(true, hookFcnAsync), + iff(false, hookFcnSync).else(hookCb), + hookFcnSync + )(hook) // @ts-ignore - iff(false, [hookFcnSync]).else([hookCb]), - hookFcnSync - ])(hook) - // @ts-ignore - .then((hook: any) => { - assert.equal(hookFcnSyncCalls, 2); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 1); + .then((hook: any) => { + assert.equal(hookFcnSyncCalls, 2); + assert.equal(hookFcnAsyncCalls, 1); + assert.equal(hookFcnCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + assert.deepEqual(hook, hookAfter); + }) + ); }); }); // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/iff.test.ts b/test/hooks/iff.test.ts index 1ade665d..4f622b79 100755 --- a/test/hooks/iff.test.ts +++ b/test/hooks/iff.test.ts @@ -50,12 +50,13 @@ const hookFcnSync = (hook: HookContext): HookContext => { return hook; }; -const hookFcnAsync = (hook: HookContext) => new Promise(resolve => { - hookFcnAsyncCalls = +1; - hook.data.first = hook.data.first.toLowerCase(); +const hookFcnAsync = (hook: HookContext) => + new Promise(resolve => { + hookFcnAsyncCalls = +1; + hook.data.first = hook.data.first.toLowerCase(); - resolve(hook); -}); + resolve(hook); + }); const hookFcn = (hook: HookContext): HookContext => { hookFcnCbCalls = +1; @@ -73,9 +74,12 @@ describe('services iff - sync predicate, sync hook', () => { }); it('calls sync hook function if truthy non-function', () => { - // @ts-ignore - iff('a', hookFcnSync)(hook) - // @ts-ignore + iff( + // @ts-ignore + 'a', + hookFcnSync + )(hook) + // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); assert.equal(hookFcnSyncCalls, 1); @@ -97,9 +101,12 @@ describe('services iff - sync predicate, sync hook', () => { }); it('calls sync hook function if sync predicate truthy', () => { - // @ts-ignore - iff(() => 'a', hookFcnSync)(hook) - // @ts-ignore + iff( + // @ts-ignore + () => 'a', + hookFcnSync + )(hook) + // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); assert.equal(hookFcnSyncCalls, 1); @@ -144,7 +151,6 @@ describe('services iff - sync predicate, async hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -174,7 +180,6 @@ describe('services iff - sync predicate, async hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); }); @@ -202,7 +207,6 @@ describe('services iff - async predicate, sync hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -220,7 +224,6 @@ describe('services iff - async predicate, sync hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); }); @@ -281,8 +284,11 @@ describe('services iff - sync predicate', () => { }); it('does not need to access hook', () => { - // @ts-ignore - iff(() => 'a', hookFcnSync)(hook) + iff( + // @ts-ignore + () => 'a', + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -292,7 +298,10 @@ describe('services iff - sync predicate', () => { }); it('is passed hook as param', () => { - iff(predicateSync, hookFcnSync)(hook) + iff( + predicateSync, + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(predicateHook, hookBefore); @@ -303,7 +312,10 @@ describe('services iff - sync predicate', () => { }); it('a higher order predicate can pass more options', () => { - iff(predicateSync2({ z: 'z' }), hookFcnSync)(hook) + iff( + predicateSync2({ z: 'z' }), + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(predicateOptions, { z: 'z' }); @@ -343,7 +355,6 @@ describe('services iff - async predicate', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -365,7 +376,6 @@ describe('services iff - async predicate', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -386,7 +396,6 @@ describe('services iff - async predicate', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); }); @@ -401,22 +410,12 @@ describe('services iff - runs multiple hooks', () => { }); it('runs successfully', (done: any) => { - iff(true, hookFcnSync, hookFcnAsync, hookFcn)(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCbCalls, 1); - assert.deepEqual(hook, hookAfter); - - done(); - }); - }); - - it('runs successfully with the array syntax', (done: any) => { - // @ts-ignore - iff(true, [hookFcnSync, hookFcnAsync, hookFcn])(hook) + iff( + true, + hookFcnSync, + hookFcnAsync, + hookFcn + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -432,6 +431,6 @@ describe('services iff - runs multiple hooks', () => { // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/iffelse.test.ts b/test/hooks/iffelse.test.ts index fe62afe3..e926c379 100755 --- a/test/hooks/iffelse.test.ts +++ b/test/hooks/iffelse.test.ts @@ -1,4 +1,3 @@ - import type { HookContext } from '@feathersjs/feathers'; import { assert } from 'chai'; import { iffElse, some, every } from '../../src'; @@ -9,7 +8,10 @@ let hookAfter: any; let hookFcnSyncCalls: any; let hookFcnAsyncCalls: any; let hookFcnCalls: any; -let predicateParam1: any; let predicateParam2: any; let predicateParam3: any; let predicateParam4: any; +let predicateParam1: any; +let predicateParam2: any; +let predicateParam3: any; +let predicateParam4: any; let context: any; let predicateTrueContext: any; let hookFcnSyncContext: any; @@ -44,13 +46,7 @@ const hookFcn = function (this: any, hook: any, _cb: any) { return hook; }; -const predicateTrue = function ( - this: any, - hook: any, - more2: any, - more3: any, - more4: any -): true { +const predicateTrue = function (this: any, hook: any, more2: any, more3: any, more4: any): true { predicateTrueContext = this; predicateParam1 = hook; @@ -72,95 +68,131 @@ describe('services iffElse', () => { describe('runs single hook', () => { it('when true', () => { - return iffElse(true, hookFcnSync, hookFcnAsync)(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 0); - assert.deepEqual(hook, hookAfter); - }); + return ( + iffElse( + true, + hookFcnSync, + hookFcnAsync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.equal(hookFcnAsyncCalls, 0); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('when false', () => { - return iffElse(false, hookFcnSync, hookFcnAsync)(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 0); - assert.equal(hookFcnAsyncCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + return ( + iffElse( + false, + hookFcnSync, + hookFcnAsync + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookAfter); + assert.equal(hookFcnSyncCalls, 0); + assert.equal(hookFcnAsyncCalls, 1); + assert.deepEqual(hook, hookAfter); + }) + ); }); }); describe('runs multiple hooks', () => { it('when true', () => { - // @ts-ignore - return iffElse(true, [hookFcnSync, hookFcnAsync, hookFcn], null)(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + return ( + iffElse( + true, + // @ts-ignore + [hookFcnSync, hookFcnAsync, hookFcn], + null + )(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.equal(hookFcnAsyncCalls, 1); + assert.equal(hookFcnCalls, 1); + assert.deepEqual(hook, hookAfter); + }) + ); }); it('when false', () => { - // @ts-ignore - return iffElse(false, null, [hookFcnSync, hookFcnAsync, hookFcn])(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 1); - assert.deepEqual(hook, hookAfter); - }); + return ( + // @ts-ignore + iffElse(false, null, [hookFcnSync, hookFcnAsync, hookFcn])(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.equal(hookFcnAsyncCalls, 1); + assert.equal(hookFcnCalls, 1); + assert.deepEqual(hook, hookAfter); + }) + ); }); }); describe('predicate gets right params', () => { it('when true', () => { - // @ts-ignore - return iffElse(predicateTrue, [hookFcnSync, hookFcnAsync, hookFcn], null)(hook) - // @ts-ignore - .then(() => { - assert.deepEqual(predicateParam1, hook, 'param1'); - assert.strictEqual(predicateParam2, undefined, 'param2'); - assert.strictEqual(predicateParam3, undefined, 'param3'); - assert.strictEqual(predicateParam4, undefined, 'param4'); - }); + return ( + iffElse( + // @ts-ignore + predicateTrue, + [hookFcnSync, hookFcnAsync, hookFcn], + null + )(hook) + // @ts-ignore + .then(() => { + assert.deepEqual(predicateParam1, hook, 'param1'); + assert.strictEqual(predicateParam2, undefined, 'param2'); + assert.strictEqual(predicateParam3, undefined, 'param3'); + assert.strictEqual(predicateParam4, undefined, 'param4'); + }) + ); }); it('every passes on correct params', () => { - return iffElse( - // @ts-ignore - every(predicateTrue), [hookFcnSync, hookFcnAsync, hookFcn], null - )(hook) - // @ts-ignore - .then(() => { - assert.deepEqual(predicateParam1, hook, 'param1'); - assert.strictEqual(predicateParam2, undefined, 'param2'); - assert.strictEqual(predicateParam3, undefined, 'param3'); - assert.strictEqual(predicateParam4, undefined, 'param4'); - }); + return ( + iffElse( + // @ts-ignore + every(predicateTrue), + // @ts-ignore + [hookFcnSync, hookFcnAsync, hookFcn], + null + )(hook) + // @ts-ignore + .then(() => { + assert.deepEqual(predicateParam1, hook, 'param1'); + assert.strictEqual(predicateParam2, undefined, 'param2'); + assert.strictEqual(predicateParam3, undefined, 'param3'); + assert.strictEqual(predicateParam4, undefined, 'param4'); + }) + ); }); it('some passes on correct params', () => { - return iffElse( - // @ts-ignore - some(predicateTrue), [hookFcnSync, hookFcnAsync, hookFcn], null - )(hook) - // @ts-ignore - .then(() => { - assert.deepEqual(predicateParam1, hook, 'param1'); - assert.strictEqual(predicateParam2, undefined, 'param2'); - assert.strictEqual(predicateParam3, undefined, 'param3'); - assert.strictEqual(predicateParam4, undefined, 'param4'); - }); + return ( + iffElse( + // @ts-ignore + some(predicateTrue), + // @ts-ignore + [hookFcnSync, hookFcnAsync, hookFcn], + null + )(hook) + // @ts-ignore + .then(() => { + assert.deepEqual(predicateParam1, hook, 'param1'); + assert.strictEqual(predicateParam2, undefined, 'param2'); + assert.strictEqual(predicateParam3, undefined, 'param3'); + assert.strictEqual(predicateParam4, undefined, 'param4'); + }) + ); }); }); @@ -174,27 +206,30 @@ describe('services iffElse', () => { }); it('services', () => { - // @ts-ignore - return iffElse(predicateTrue, [hookFcnSync, hookFcnAsync, hookFcn], null).call(context, hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 1); - assert.deepEqual(hook, hookAfter); - - assert.deepEqual(predicateTrueContext, { service: 'abc' }); - assert.deepEqual(hookFcnSyncContext, { service: 'abc' }); - assert.deepEqual(hookFcnAsyncContext, { service: 'abc' }); - assert.deepEqual(hookFcnContext, { service: 'abc' }); - }); + return ( + // @ts-ignore + iffElse(predicateTrue, [hookFcnSync, hookFcnAsync, hookFcn], null) + .call(context, hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookAfter); + assert.equal(hookFcnSyncCalls, 1); + assert.equal(hookFcnAsyncCalls, 1); + assert.equal(hookFcnCalls, 1); + assert.deepEqual(hook, hookAfter); + + assert.deepEqual(predicateTrueContext, { service: 'abc' }); + assert.deepEqual(hookFcnSyncContext, { service: 'abc' }); + assert.deepEqual(hookFcnAsyncContext, { service: 'abc' }); + assert.deepEqual(hookFcnContext, { service: 'abc' }); + }) + ); }); }); }); // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/is-provider.test.ts b/test/hooks/is-provider.test.ts index b31b15cd..1b050694 100755 --- a/test/hooks/is-provider.test.ts +++ b/test/hooks/is-provider.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { iff, isProvider } from '../../src'; import { isPromise } from '../../src/common'; @@ -94,17 +93,26 @@ describe('services isProvider - predicate', () => { describe('services isProvider - works with iff', () => { beforeEach(() => { hookBefore = { - type: 'before', method: 'create', data: { first: 'John' }, params: { provider: 'rest' } + type: 'before', + method: 'create', + data: { first: 'John' }, + params: { provider: 'rest' }, }; hookAfter = { - type: 'before', method: 'create', data: { first: 'john' }, params: { provider: 'rest' } + type: 'before', + method: 'create', + data: { first: 'john' }, + params: { provider: 'rest' }, }; hook = clone(hookBefore); hookFcnSyncCalls = 0; }); it('calls sync hook function if truthy', () => { - iff(isProvider('rest'), hookFcnSync)(hook) + iff( + isProvider('rest'), + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -128,6 +136,6 @@ describe('services isProvider - works with iff', () => { // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/keep-in-array.test.ts b/test/hooks/keep-in-array.test.ts index 2395c09a..d892ee07 100755 --- a/test/hooks/keep-in-array.test.ts +++ b/test/hooks/keep-in-array.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { keepInArray } from '../../src'; @@ -16,13 +15,13 @@ describe('services keepInArray', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { users: [{ first: 'John', last: 'Doe' }] } + data: { users: [{ first: 'John', last: 'Doe' }] }, }; hookAfter = { type: 'after', method: 'create', params: { provider: 'rest' }, - result: { users: [{ first: 'Jane', last: 'Doe' }] } + result: { users: [{ first: 'Jane', last: 'Doe' }] }, }; hookFindPaginate = { type: 'after', @@ -32,9 +31,9 @@ describe('services keepInArray', () => { total: 2, data: [ { users: [{ first: 'John', last: 'Doe' }] }, - { users: [{ first: 'Jane', last: 'Doe' }] } - ] - } + { users: [{ first: 'Jane', last: 'Doe' }] }, + ], + }, }; hookFind = { type: 'after', @@ -42,8 +41,8 @@ describe('services keepInArray', () => { params: { provider: 'rest' }, result: [ { users: [{ first: 'John', last: 'Doe' }] }, - { users: [{ first: 'Jane', last: 'Doe' }] } - ] + { users: [{ first: 'Jane', last: 'Doe' }] }, + ], }; }); @@ -61,7 +60,7 @@ describe('services keepInArray', () => { keepInArray('users', ['first'])(hookFindPaginate); assert.deepEqual(hookFindPaginate.result.data, [ { users: [{ first: 'John' }] }, - { users: [{ first: 'Jane' }] } + { users: [{ first: 'Jane' }] }, ]); }); @@ -69,7 +68,7 @@ describe('services keepInArray', () => { keepInArray('users', ['first'])(hookFind); assert.deepEqual(hookFind.result, [ { users: [{ first: 'John' }] }, - { users: [{ first: 'Jane' }] } + { users: [{ first: 'Jane' }] }, ]); }); @@ -89,7 +88,7 @@ describe('services keepInArray', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { users: [{ first: 'John', last: 'Doe' }] } + data: { users: [{ first: 'John', last: 'Doe' }] }, }; keepInArray('users', ['last', 'xx'])(hook); assert.deepEqual(hook.data, { users: [{ last: 'Doe' }] }); @@ -100,7 +99,7 @@ describe('services keepInArray', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { users: [{ first: undefined, last: 'Doe' }] } + data: { users: [{ first: undefined, last: 'Doe' }] }, }; keepInArray('users', ['first'])(hook); assert.deepEqual(hook.data, { users: [{ first: undefined }] }); @@ -111,7 +110,7 @@ describe('services keepInArray', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { users: [{ first: null, last: 'Doe' }] } + data: { users: [{ first: null, last: 'Doe' }] }, }; keepInArray('users', ['first'])(hook); assert.deepEqual(hook.data, { users: [{ first: null }] }); @@ -122,7 +121,7 @@ describe('services keepInArray', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { users: [{ first: false, last: 'Doe' }] } + data: { users: [{ first: false, last: 'Doe' }] }, }; keepInArray('users', ['first'])(hook); assert.deepEqual(hook.data, { users: [{ first: false }] }); @@ -133,7 +132,7 @@ describe('services keepInArray', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { users: [{ first: 0, last: 'Doe' }] } + data: { users: [{ first: 0, last: 'Doe' }] }, }; keepInArray('users', ['first'])(hook); assert.deepEqual(hook.data, { users: [{ first: 0 }] }); @@ -144,7 +143,7 @@ describe('services keepInArray', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { users: [{ first: '', last: 'Doe' }] } + data: { users: [{ first: '', last: 'Doe' }] }, }; keepInArray('users', ['first'])(hook); assert.deepEqual(hook.data, { users: [{ first: '' }] }); @@ -157,7 +156,9 @@ describe('services keepInArray', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }] } + data: { + users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }], + }, }; hookFindNested = { type: 'after', @@ -165,8 +166,8 @@ describe('services keepInArray', () => { params: { provider: 'rest' }, result: [ { account: { users: [{ first: 'John', last: 'Doe' }] } }, - { account: { users: [{ first: 'Jane', last: 'Doe' }] } } - ] + { account: { users: [{ first: 'Jane', last: 'Doe' }] } }, + ], }; }); @@ -174,36 +175,34 @@ describe('services keepInArray', () => { keepInArray('account.users', ['first'])(hookFindNested); assert.deepEqual(hookFindNested.result, [ { account: { users: [{ first: 'John' }] } }, - { account: { users: [{ first: 'Jane' }] } } + { account: { users: [{ first: 'Jane' }] } }, ]); }); it('prop with no dots', () => { keepInArray('users', ['empl'])(hookBefore); - assert.deepEqual(hookBefore.data, - { users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }] } - ); + assert.deepEqual(hookBefore.data, { + users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }], + }); }); it('prop with 1 dot', () => { keepInArray('users', ['empl.name', 'dept'])(hookBefore); - assert.deepEqual(hookBefore.data, - { users: [{ empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' }] } - ); + assert.deepEqual(hookBefore.data, { + users: [{ empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' }], + }); }); it('prop with 2 dots', () => { keepInArray('users', ['empl.name.last', 'empl.status', 'dept'])(hookBefore); - assert.deepEqual(hookBefore.data, - { users: [{ empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' }] } - ); + assert.deepEqual(hookBefore.data, { + users: [{ empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' }], + }); }); it('ignores bad or missing paths', () => { keepInArray('users', ['empl.name.first', 'empl.name.surname'])(hookBefore); - assert.deepEqual(hookBefore.data, - { users: [{ empl: { name: { first: 'John' } } }] } - ); + assert.deepEqual(hookBefore.data, { users: [{ empl: { name: { first: 'John' } } }] }); }); it('ignores bad or missing no dot path', () => { @@ -218,28 +217,58 @@ describe('services keepInArray', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: [{ users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, null, undefined, Infinity] }, null, undefined, Infinity] + data: [ + { + users: [ + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + null, + undefined, + Infinity, + ], + }, + null, + undefined, + Infinity, + ], }; hookAfter = { type: 'after', method: 'create', params: { provider: 'rest' }, - result: [{ users: [{ first: 'Jane', last: 'Doe' }, null, undefined, Infinity] }, null, undefined, Infinity] + result: [ + { users: [{ first: 'Jane', last: 'Doe' }, null, undefined, Infinity] }, + null, + undefined, + Infinity, + ], }; }); it('before', () => { keepInArray('users', ['empl'])(hookBefore); - assert.deepEqual(hookBefore.data, - [{ users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }, null, undefined, Infinity] }, null, undefined, Infinity] - ); + assert.deepEqual(hookBefore.data, [ + { + users: [ + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }, + null, + undefined, + Infinity, + ], + }, + null, + undefined, + Infinity, + ]); }); it('after', () => { keepInArray('users', ['first'])(hookAfter); - assert.deepEqual(hookAfter.result, - [{ users: [{ first: 'Jane' }, null, undefined, Infinity] }, null, undefined, Infinity] - ); + assert.deepEqual(hookAfter.result, [ + { users: [{ first: 'Jane' }, null, undefined, Infinity] }, + null, + undefined, + Infinity, + ]); }); }); }); diff --git a/test/hooks/keep-query-in-array.test.ts b/test/hooks/keep-query-in-array.test.ts index 76fb7a54..bfa496fd 100755 --- a/test/hooks/keep-query-in-array.test.ts +++ b/test/hooks/keep-query-in-array.test.ts @@ -11,7 +11,7 @@ describe('services keepQueryInArray', () => { type: 'before', method: 'find', params: { provider: 'rest' }, - query: { users: [{ first: 'John', last: 'Doe' }] } + query: { users: [{ first: 'John', last: 'Doe' }] }, }; }); @@ -30,7 +30,7 @@ describe('services keepQueryInArray', () => { type: 'before', method: 'find', params: { provider: 'rest' }, - query: { users: [{ first: 'John', last: 'Doe' }] } + query: { users: [{ first: 'John', last: 'Doe' }] }, }; keepQueryInArray('users', ['last', 'xx'])(hook); assert.deepEqual(hook.query, { users: [{ last: 'Doe' }] }); @@ -41,7 +41,7 @@ describe('services keepQueryInArray', () => { type: 'before', method: 'find', params: { provider: 'rest' }, - query: { users: [{ first: undefined, last: 'Doe' }] } + query: { users: [{ first: undefined, last: 'Doe' }] }, }; keepQueryInArray('users', ['first'])(hook); assert.deepEqual(hook.query, { users: [{ first: undefined }] }); @@ -52,7 +52,7 @@ describe('services keepQueryInArray', () => { type: 'before', method: 'find', params: { provider: 'rest' }, - query: { users: [{ first: null, last: 'Doe' }] } + query: { users: [{ first: null, last: 'Doe' }] }, }; keepQueryInArray('users', ['first'])(hook); assert.deepEqual(hook.query, { users: [{ first: null }] }); @@ -63,7 +63,7 @@ describe('services keepQueryInArray', () => { type: 'before', method: 'find', params: { provider: 'rest' }, - query: { users: [{ first: false, last: 'Doe' }] } + query: { users: [{ first: false, last: 'Doe' }] }, }; keepQueryInArray('users', ['first'])(hook); assert.deepEqual(hook.query, { users: [{ first: false }] }); @@ -74,7 +74,7 @@ describe('services keepQueryInArray', () => { type: 'before', method: 'find', params: { provider: 'rest' }, - query: { users: [{ first: 0, last: 'Doe' }] } + query: { users: [{ first: 0, last: 'Doe' }] }, }; keepQueryInArray('users', ['first'])(hook); assert.deepEqual(hook.query, { users: [{ first: 0 }] }); @@ -85,7 +85,7 @@ describe('services keepQueryInArray', () => { type: 'before', method: 'find', params: { provider: 'rest' }, - query: { users: [{ first: '', last: 'Doe' }] } + query: { users: [{ first: '', last: 'Doe' }] }, }; keepQueryInArray('users', ['first'])(hook); assert.deepEqual(hook.query, { users: [{ first: '' }] }); @@ -98,13 +98,15 @@ describe('services keepQueryInArray', () => { type: 'before', method: 'find', params: { provider: 'rest' }, - query: { users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }] } + query: { + users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }], + }, }; hookFindNested = { type: 'before', method: 'find', params: { provider: 'rest' }, - query: { account: { users: [{ first: 'John', last: 'Doe' }] } } + query: { account: { users: [{ first: 'John', last: 'Doe' }] } }, }; }); @@ -115,30 +117,28 @@ describe('services keepQueryInArray', () => { it('prop with no dots', () => { keepQueryInArray('users', ['empl'])(hookBefore); - assert.deepEqual(hookBefore.query, - { users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }] } - ); + assert.deepEqual(hookBefore.query, { + users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }], + }); }); it('prop with 1 dot', () => { keepQueryInArray('users', ['empl.name', 'dept'])(hookBefore); - assert.deepEqual(hookBefore.query, - { users: [{ empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' }] } - ); + assert.deepEqual(hookBefore.query, { + users: [{ empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' }], + }); }); it('prop with 2 dots', () => { keepQueryInArray('users', ['empl.name.last', 'empl.status', 'dept'])(hookBefore); - assert.deepEqual(hookBefore.query, - { users: [{ empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' }] } - ); + assert.deepEqual(hookBefore.query, { + users: [{ empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' }], + }); }); it('ignores bad or missing paths', () => { keepQueryInArray('users', ['empl.name.first', 'empl.name.surname'])(hookBefore); - assert.deepEqual(hookBefore.query, - { users: [{ empl: { name: { first: 'John' } } }] } - ); + assert.deepEqual(hookBefore.query, { users: [{ empl: { name: { first: 'John' } } }] }); }); it('ignores bad or missing no dot path', () => { @@ -153,15 +153,27 @@ describe('services keepQueryInArray', () => { type: 'before', method: 'find', params: { provider: 'rest' }, - query: { users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, null, undefined, Infinity] } + query: { + users: [ + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + null, + undefined, + Infinity, + ], + }, }; }); it('before', () => { keepQueryInArray('users', ['empl'])(hookBefore); - assert.deepEqual(hookBefore.query, - { users: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }, null, undefined, Infinity] } - ); + assert.deepEqual(hookBefore.query, { + users: [ + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }, + null, + undefined, + Infinity, + ], + }); }); }); }); diff --git a/test/hooks/keep-query.test.ts b/test/hooks/keep-query.test.ts index 51637ab3..61403b33 100755 --- a/test/hooks/keep-query.test.ts +++ b/test/hooks/keep-query.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { keepQuery } from '../../src'; @@ -11,7 +10,7 @@ describe('services keepQuery', () => { hookBefore = { type: 'before', method: 'create', - params: { query: { first: 'John', last: 'Doe' } } + params: { query: { first: 'John', last: 'Doe' } }, }; hookAfter = { type: 'after', method: 'create', result: { first: 'Jane', last: 'Doe' } }; }); @@ -27,7 +26,9 @@ describe('services keepQuery', () => { }); it('throws on hook after', () => { - assert.throws(() => { keepQuery('last')(hookAfter); }); + assert.throws(() => { + keepQuery('last')(hookAfter); + }); }); it('does not throw if field is missing', () => { @@ -42,44 +43,49 @@ describe('services keepQuery', () => { type: 'before', method: 'create', params: { - query: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct', 'owner.id': 1, 'owner.admin': false } - } + query: { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + 'owner.id': 1, + 'owner.admin': false, + }, + }, }; }); it('prop with no dots', () => { keepQuery('empl')(hookBefore); - assert.deepEqual(hookBefore.params.query, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } } - ); + assert.deepEqual(hookBefore.params.query, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + }); }); it('prop with 1 dot', () => { keepQuery('empl.name', 'dept', 'owner.id', 'owner.admin')(hookBefore); - assert.deepEqual(hookBefore.params.query, - { empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct', 'owner.id': 1, 'owner.admin': false } - ); + assert.deepEqual(hookBefore.params.query, { + empl: { name: { first: 'John', last: 'Doe' } }, + dept: 'Acct', + 'owner.id': 1, + 'owner.admin': false, + }); }); it('prop with 2 dots', () => { keepQuery('empl.name.last', 'empl.status', 'dept')(hookBefore); - assert.deepEqual(hookBefore.params.query, - { empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.params.query, { + empl: { name: { last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); it('ignores bad or missing paths', () => { keepQuery('empl.xx.first')(hookBefore); - assert.deepEqual(hookBefore.params.query, - {} - ); + assert.deepEqual(hookBefore.params.query, {}); }); it('ignores bad or missing no dot path', () => { keepQuery('xx')(hookBefore); - assert.deepEqual(hookBefore.params.query, - {} - ); + assert.deepEqual(hookBefore.params.query, {}); }); }); }); diff --git a/test/hooks/keep.test.ts b/test/hooks/keep.test.ts index a51fb439..77504b4d 100755 --- a/test/hooks/keep.test.ts +++ b/test/hooks/keep.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { keep } from '../../src'; @@ -14,13 +13,13 @@ describe('services keep', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe' } + data: { first: 'John', last: 'Doe' }, }; hookAfter = { type: 'after', method: 'create', params: { provider: 'rest' }, - result: { first: 'Jane', last: 'Doe' } + result: { first: 'Jane', last: 'Doe' }, }; hookFindPaginate = { type: 'after', @@ -30,9 +29,9 @@ describe('services keep', () => { total: 2, data: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] - } + { first: 'Jane', last: 'Doe' }, + ], + }, }; hookFind = { type: 'after', @@ -40,8 +39,8 @@ describe('services keep', () => { params: { provider: 'rest' }, result: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] + { first: 'Jane', last: 'Doe' }, + ], }; }); @@ -52,18 +51,12 @@ describe('services keep', () => { it('updates hook after::find with pagination', () => { keep('first')(hookFindPaginate); - assert.deepEqual(hookFindPaginate.result.data, [ - { first: 'John' }, - { first: 'Jane' } - ]); + assert.deepEqual(hookFindPaginate.result.data, [{ first: 'John' }, { first: 'Jane' }]); }); it('updates hook after::find with no pagination', () => { keep('first')(hookFind); - assert.deepEqual(hookFind.result, [ - { first: 'John' }, - { first: 'Jane' } - ]); + assert.deepEqual(hookFind.result, [{ first: 'John' }, { first: 'Jane' }]); }); it('updates hook after', () => { @@ -82,7 +75,7 @@ describe('services keep', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe' } + data: { first: 'John', last: 'Doe' }, }; keep('last', 'xx')(hook); assert.deepEqual(hook.data, { last: 'Doe' }); @@ -93,7 +86,7 @@ describe('services keep', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: undefined, last: 'Doe' } + data: { first: undefined, last: 'Doe' }, }; keep('first')(hook); assert.deepEqual(hook.data, { first: undefined }); @@ -104,7 +97,7 @@ describe('services keep', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: null, last: 'Doe' } + data: { first: null, last: 'Doe' }, }; keep('first')(hook); assert.deepEqual(hook.data, { first: null }); @@ -115,7 +108,7 @@ describe('services keep', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: false, last: 'Doe' } + data: { first: false, last: 'Doe' }, }; keep('first')(hook); assert.deepEqual(hook.data, { first: false }); @@ -126,7 +119,7 @@ describe('services keep', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: 0, last: 'Doe' } + data: { first: 0, last: 'Doe' }, }; keep('first')(hook); assert.deepEqual(hook.data, { first: 0 }); @@ -137,7 +130,7 @@ describe('services keep', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: '', last: 'Doe' } + data: { first: '', last: 'Doe' }, }; keep('first')(hook); assert.deepEqual(hook.data, { first: '' }); @@ -150,36 +143,36 @@ describe('services keep', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } + data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, }; }); it('prop with no dots', () => { keep('empl')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + }); }); it('prop with 1 dot', () => { keep('empl.name', 'dept')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' } }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' } }, + dept: 'Acct', + }); }); it('prop with 2 dots', () => { keep('empl.name.last', 'empl.status', 'dept')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); it('ignores bad or missing paths', () => { keep('empl.name.first', 'empl.name.surname')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John' } } } - ); + assert.deepEqual(hookBefore.data, { empl: { name: { first: 'John' } } }); }); it('ignores bad or missing no dot path', () => { @@ -194,28 +187,34 @@ describe('services keep', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, null, undefined, Infinity] + data: [ + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + null, + undefined, + Infinity, + ], }; hookAfter = { type: 'after', method: 'create', params: { provider: 'rest' }, - result: [{ first: 'Jane', last: 'Doe' }, null, undefined, Infinity] + result: [{ first: 'Jane', last: 'Doe' }, null, undefined, Infinity], }; }); it('before', () => { keep('empl')(hookBefore); - assert.deepEqual(hookBefore.data, - [{ empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }, null, undefined, Infinity] - ); + assert.deepEqual(hookBefore.data, [ + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' } }, + null, + undefined, + Infinity, + ]); }); it('after', () => { keep('first')(hookAfter); - assert.deepEqual(hookAfter.result, - [{ first: 'Jane' }, null, undefined, Infinity] - ); + assert.deepEqual(hookAfter.result, [{ first: 'Jane' }, null, undefined, Infinity]); }); }); }); diff --git a/test/hooks/lowercase.test.ts b/test/hooks/lowercase.test.ts index 2facf743..dc5eccda 100755 --- a/test/hooks/lowercase.test.ts +++ b/test/hooks/lowercase.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { lowerCase } from '../../src'; @@ -19,17 +18,17 @@ describe('services lowercase', () => { total: 2, data: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] - } + { first: 'Jane', last: 'Doe' }, + ], + }, }; hookFind = { type: 'after', method: 'find', result: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] + { first: 'Jane', last: 'Doe' }, + ], }; }); @@ -42,7 +41,7 @@ describe('services lowercase', () => { lowerCase('first', 'last')(hookFindPaginate); assert.deepEqual(hookFindPaginate.result.data, [ { first: 'john', last: 'doe' }, - { first: 'jane', last: 'doe' } + { first: 'jane', last: 'doe' }, ]); }); @@ -50,7 +49,7 @@ describe('services lowercase', () => { lowerCase('first', 'last')(hookFind); assert.deepEqual(hookFind.result, [ { first: 'john', last: 'doe' }, - { first: 'jane', last: 'doe' } + { first: 'jane', last: 'doe' }, ]); }); @@ -66,7 +65,11 @@ describe('services lowercase', () => { }); it('does not throw if field is undefined', () => { - const hook: any = { type: 'before', method: 'create', data: { first: undefined, last: 'Doe' } }; + const hook: any = { + type: 'before', + method: 'create', + data: { first: undefined, last: 'Doe' }, + }; lowerCase('first', 'last')(hook); assert.deepEqual(hook.data, { first: undefined, last: 'doe' }); }); @@ -79,7 +82,9 @@ describe('services lowercase', () => { it('throws if field is not a string', () => { const hook: any = { type: 'before', method: 'create', data: { first: 1, last: 'Doe' } }; - assert.throws(() => { lowerCase('first', 'last')(hook); }); + assert.throws(() => { + lowerCase('first', 'last')(hook); + }); }); }); @@ -88,43 +93,48 @@ describe('services lowercase', () => { hookBefore = { type: 'before', method: 'create', - data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } + data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, }; }); it('prop with no dots', () => { lowerCase('dept')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'acct', + }); }); it('prop with 1 dot', () => { lowerCase('empl.status')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'aa' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'aa' }, + dept: 'Acct', + }); }); it('prop with 2 dots', () => { lowerCase('empl.name.first')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'john', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'john', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); it('ignores bad or missing paths', () => { lowerCase('empl.xx.first')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); it('ignores bad or missing no dot path', () => { lowerCase('xx')(hookBefore); - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); }); }); diff --git a/test/hooks/mongo-keys.test.ts b/test/hooks/mongo-keys.test.ts index 49c5d81b..b351ca8f 100755 --- a/test/hooks/mongo-keys.test.ts +++ b/test/hooks/mongo-keys.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { ObjectId } from 'mongodb'; import { mongoKeys } from '../../src'; @@ -11,41 +10,29 @@ const s8 = '888888888888'; describe('services mongoKeys', () => { it('{ a: s1, c: s0 }', () => { - const newQuery = wrapper( - ['a'], - { a: s1, c: s0 } - ); + const newQuery = wrapper(['a'], { a: s1, c: s0 }); assert.instanceOf(newQuery.a, ObjectId, '"a" not ObjectID'); assert.isString(newQuery.c, '"c" not a string'); }); it('{ a: { b: s0 }, c: s0 }', () => { - const newQuery = wrapper( - ['a'], - { a: { b: s0 }, c: s0 } - ); + const newQuery = wrapper(['a'], { a: { b: s0 }, c: s0 }); assert.isString(newQuery.a.b, '"a.b" not a string'); assert.isString(newQuery.c, '"c" not a string'); }); it('{ a: { $in: [s1, s2] }, c: s0 }', () => { - const newQuery = wrapper( - ['a'], - { a: { $in: [s1, s2] }, c: s0 } - ); + const newQuery = wrapper(['a'], { a: { $in: [s1, s2] }, c: s0 }); assert.instanceOf(newQuery.a.$in[0], ObjectId, '"a.$in[0]" not ObjectID'); assert.instanceOf(newQuery.a.$in[1], ObjectId, '"a.$in[1]" not ObjectID'); assert.isString(newQuery.c, '"c" not a string'); }); - it('{ a: s1, b: \'111111111111\', c: s0 }', () => { - const newQuery = wrapper( - ['a', 'b'], - { a: s1, b: s2, c: s0 } - ); + it("{ a: s1, b: '111111111111', c: s0 }", () => { + const newQuery = wrapper(['a', 'b'], { a: s1, b: s2, c: s0 }); assert.instanceOf(newQuery.a, ObjectId, '"a" not ObjectID'); assert.instanceOf(newQuery.b, ObjectId, '"b" not ObjectID'); @@ -53,19 +40,16 @@ describe('services mongoKeys', () => { }); it('{ a: { x: s8 } }', () => { - const newQuery = wrapper( - ['a.x'], - { a: { x: s8 } } - ); + const newQuery = wrapper(['a.x'], { a: { x: s8 } }); assert.instanceOf(newQuery.a.x, ObjectId, '"a.x" not ObjectID'); }); it('{ $or: [{ a: { x: s8 } }, { b: s5 }, { c: s0 }], d: s0 }', () => { - const newQuery = wrapper( - ['a.x', 'b'], - { $or: [{ a: { x: s8 } }, { b: s5 }, { c: s0 }], d: s0 } - ); + const newQuery = wrapper(['a.x', 'b'], { + $or: [{ a: { x: s8 } }, { b: s5 }, { c: s0 }], + d: s0, + }); assert.instanceOf(newQuery.$or[0].a.x, ObjectId, '"$or[0].a.x" not ObjectID'); assert.instanceOf(newQuery.$or[1].b, ObjectId, '"$or[1].b" not ObjectID'); @@ -74,17 +58,17 @@ describe('services mongoKeys', () => { }); it('{ $or: [{ a: { x: s8 } }, { a: s5 }] } - questionable', () => { - const newQuery = wrapper( - ['a', 'a.x'], - { $or: [{ a: { x: s8 } }, { a: s5 }] } - ); + const newQuery = wrapper(['a', 'a.x'], { $or: [{ a: { x: s8 } }, { a: s5 }] }); assert.instanceOf(newQuery.$or[0].a.x, ObjectId, '"$or[0].a.x" not ObjectID'); assert.instanceOf(newQuery.$or[1].a, ObjectId, '"$or[1].a" not ObjectID'); }); }); -function wrapper (keys: any, query: any) { - const newContext: any = mongoKeys(ObjectId, keys)({ params: { query }, type: 'before', method: 'find' } as any); +function wrapper(keys: any, query: any) { + const newContext: any = mongoKeys( + ObjectId, + keys + )({ params: { query }, type: 'before', method: 'find' } as any); return newContext.params.query; } diff --git a/test/hooks/params-from-client.test.ts b/test/hooks/params-from-client.test.ts index 8246439c..ebfcd6e9 100755 --- a/test/hooks/params-from-client.test.ts +++ b/test/hooks/params-from-client.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { paramsFromClient } from '../../src'; @@ -23,9 +22,9 @@ describe('services params-from-client', () => { params: { query: { div: 'a', - dept: 'b' - } - } + dept: 'b', + }, + }, }; const hook1 = paramsFromClient('populate', 'serialize')(hook); @@ -33,9 +32,9 @@ describe('services params-from-client', () => { params: { query: { div: 'a', - dept: 'b' - } - } + dept: 'b', + }, + }, } as any); }); @@ -45,9 +44,9 @@ describe('services params-from-client', () => { query: { div: 'a', dept: 'b', - $client: 'z' - } - } + $client: 'z', + }, + }, }; const hook1 = paramsFromClient('populate', 'serialize')(hook); @@ -57,9 +56,9 @@ describe('services params-from-client', () => { query: { div: 'a', dept: 'b', - $client: 'z' - } - } + $client: 'z', + }, + }, } as any); }); }); @@ -71,9 +70,9 @@ describe('services params-from-client', () => { query: { div: 'a', dept: 'b', - $client: { populate: 'aa', serialize: 'bb' } - } - } + $client: { populate: 'aa', serialize: 'bb' }, + }, + }, }; const hook1 = paramsFromClient()(hook); @@ -82,9 +81,9 @@ describe('services params-from-client', () => { params: { query: { div: 'a', - dept: 'b' - } - } + dept: 'b', + }, + }, } as any); }); @@ -94,9 +93,9 @@ describe('services params-from-client', () => { query: { div: 'a', dept: 'b', - $client: { populate: 'aa', serialize: 'bb' } - } - } + $client: { populate: 'aa', serialize: 'bb' }, + }, + }, }; const hook1 = paramsFromClient('populate', 'serialize')(hook); @@ -105,11 +104,11 @@ describe('services params-from-client', () => { params: { query: { div: 'a', - dept: 'b' + dept: 'b', }, populate: 'aa', - serialize: 'bb' - } + serialize: 'bb', + }, } as any); }); @@ -119,9 +118,9 @@ describe('services params-from-client', () => { query: { div: 'a', dept: 'b', - $client: { populate: 'aa', serialize: 'bb' } - } - } + $client: { populate: 'aa', serialize: 'bb' }, + }, + }, }; const hook1 = paramsFromClient('a', 'populate', 'b', 'serialize', 'q', 'r')(hook); @@ -130,11 +129,11 @@ describe('services params-from-client', () => { params: { query: { div: 'a', - dept: 'b' + dept: 'b', }, populate: 'aa', - serialize: 'bb' - } + serialize: 'bb', + }, } as any); }); @@ -144,9 +143,9 @@ describe('services params-from-client', () => { query: { div: 'a', dept: 'b', - $client: { populate: 'aa', serialize: 'bb' } - } - } + $client: { populate: 'aa', serialize: 'bb' }, + }, + }, }; const hook1 = paramsFromClient('populate')(hook); @@ -155,10 +154,10 @@ describe('services params-from-client', () => { params: { query: { div: 'a', - dept: 'b' + dept: 'b', }, - populate: 'aa' - } + populate: 'aa', + }, } as any); }); @@ -168,9 +167,9 @@ describe('services params-from-client', () => { query: { div: 'a', dept: 'b', - $client: { populate: 'aa', serialize: 'bb' } - } - } + $client: { populate: 'aa', serialize: 'bb' }, + }, + }, }; const hook1 = paramsFromClient('q', 'q')(hook); @@ -178,9 +177,10 @@ describe('services params-from-client', () => { assert.deepEqual(hook1, { params: { query: { - div: 'a', dept: 'b' - } - } + div: 'a', + dept: 'b', + }, + }, } as any); }); }); diff --git a/test/hooks/populate-1deep-1child.test.ts b/test/hooks/populate-1deep-1child.test.ts index b4e80c7f..12e3340f 100755 --- a/test/hooks/populate-1deep-1child.test.ts +++ b/test/hooks/populate-1deep-1child.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import _set from 'lodash/set.js'; @@ -23,9 +22,11 @@ let provider: any; app.service('posts').hooks({ before: { all: [ - (hook: any) => { provider = hook.params.provider; } - ] - } + (hook: any) => { + provider = hook.params.provider; + }, + ], + }, }); hookAfter = { @@ -33,14 +34,14 @@ let provider: any; method: 'create', params: { provider: 'rest' }, path: 'recommendations', - result: recommendation['1'] + result: recommendation['1'], }; hookAfterArray = { type: 'after', method: 'create', params: { provider: 'rest' }, path: 'recommendations', - result: [recommendation['1'], recommendation['2'], recommendation['3']] + result: [recommendation['1'], recommendation['2'], recommendation['3']], }; }); @@ -54,16 +55,18 @@ let provider: any; service: 'posts', nameAs: 'post', parentField: 'postId', // we have no test for dot notation 'cause no such data - childField: 'id' - }) + childField: 'id', + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('post'); - assert.deepEqual(hook1.result, expected); - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('post'); + assert.deepEqual(hook1.result, expected); + }) + ); }); it('saves in nameAs using dot notation', () => { @@ -75,16 +78,18 @@ let provider: any; service: 'posts', nameAs: 'post.items', parentField: 'postId', // we have no test for dot notation 'cause no such data - childField: 'id' - }) + childField: 'id', + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('post.items'); - assert.deepEqual(hook1.result, expected); - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('post.items'); + assert.deepEqual(hook1.result, expected); + }) + ); }); it('saves in service as default', () => { @@ -95,16 +100,18 @@ let provider: any; include: makeInclude(type, { service: 'posts', parentField: 'postId', - childField: 'id' - }) + childField: 'id', + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); - assert.deepEqual(hook1.result, expected); - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); + assert.deepEqual(hook1.result, expected); + }) + ); }); it('ignores undefined parentField', () => { @@ -117,21 +124,23 @@ let provider: any; include: makeInclude(type, { service: 'posts', parentField: 'postId', - childField: 'id' - }) + childField: 'id', + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); - delete expected.postId; - delete expected.posts; - expected._include = []; + delete expected.postId; + delete expected.posts; + expected._include = []; - assert.deepEqual(hook1.result, expected); - }); + assert.deepEqual(hook1.result, expected); + }) + ); }); it('uses asArray', () => { @@ -143,16 +152,18 @@ let provider: any; service: 'posts', parentField: 'postId', childField: 'id', - asArray: true - }) + asArray: true, + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts', true); - assert.deepEqual(hook1.result, expected); - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts', true); + assert.deepEqual(hook1.result, expected); + }) + ); }); it('Stores null when no joined records and !asArray', () => { @@ -165,20 +176,22 @@ let provider: any; include: makeInclude(type, { service: 'posts', parentField: 'postId', - childField: 'id' - }) + childField: 'id', + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); - expected.postId = '999'; - expected.posts = null; + expected.postId = '999'; + expected.posts = null; - assert.deepEqual(hook1.result, expected); - }); + assert.deepEqual(hook1.result, expected); + }) + ); }); it('Stores [] when no joined records and asArray', () => { @@ -192,20 +205,22 @@ let provider: any; service: 'posts', parentField: 'postId', childField: 'id', - asArray: true - }) + asArray: true, + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); - expected.postId = '999'; - expected.posts = []; + expected.postId = '999'; + expected.posts = []; - assert.deepEqual(hook1.result, expected); - }); + assert.deepEqual(hook1.result, expected); + }) + ); }); it('query overridden by childField', () => { @@ -217,16 +232,18 @@ let provider: any; service: 'posts', parentField: 'postId', childField: 'id', - query: { id: 'aaaaaa' } - }) + query: { id: 'aaaaaa' }, + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); - assert.deepEqual(hook1.result, expected); - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); + assert.deepEqual(hook1.result, expected); + }) + ); }); it('Provider in joins defaults to method call', () => { @@ -238,17 +255,19 @@ let provider: any; service: 'posts', parentField: 'postId', childField: 'id', - query: { id: 'aaaaaa' } - }) + query: { id: 'aaaaaa' }, + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); - assert.deepEqual(hook1.result, expected); - assert.equal(provider, 'rest'); // Feathers default if not from WebSocket - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); + assert.deepEqual(hook1.result, expected); + assert.equal(provider, 'rest'); // Feathers default if not from WebSocket + }) + ); }); it('Provider in joins can be overridden', () => { @@ -261,17 +280,19 @@ let provider: any; parentField: 'postId', childField: 'id', query: { id: 'aaaaaa' }, - provider: undefined - }) + provider: undefined, + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); - assert.deepEqual(hook1.result, expected); - assert.equal(provider, undefined); - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); + assert.deepEqual(hook1.result, expected); + assert.equal(provider, undefined); + }) + ); }); it('Provider can be passed down from top level', () => { @@ -284,17 +305,19 @@ let provider: any; service: 'posts', parentField: 'postId', childField: 'id', - query: { id: 'aaaaaa' } - }) + query: { id: 'aaaaaa' }, + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); - assert.deepEqual(hook1.result, expected); - assert.equal(provider, 'global'); - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); + assert.deepEqual(hook1.result, expected); + assert.equal(provider, 'global'); + }) + ); }); it('Global provider can be overwritten at schema level', () => { @@ -308,17 +331,19 @@ let provider: any; parentField: 'postId', childField: 'id', query: { id: 'aaaaaa' }, - provider: 'socketio' - }) + provider: 'socketio', + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); - assert.deepEqual(hook1.result, expected); - assert.equal(provider, 'socketio'); - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); + assert.deepEqual(hook1.result, expected); + assert.equal(provider, 'socketio'); + }) + ); }); it('Falsy providers override default provider', () => { @@ -332,17 +357,19 @@ let provider: any; service: 'posts', parentField: 'postId', childField: 'id', - query: { id: 'aaaaaa' } - }) + query: { id: 'aaaaaa' }, + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); - assert.deepEqual(hook1.result, expected); - assert.equal(provider, undefined); - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); + assert.deepEqual(hook1.result, expected); + assert.equal(provider, undefined); + }) + ); }); it('childField overridden by select', () => { @@ -355,17 +382,19 @@ let provider: any; parentField: 'updatedAt', childField: 'id', select: (_hook: any, parent: any) => ({ - id: parent.postId - }) - }) + id: parent.postId, + }), + }), }; - return populate({ schema })(hook) - // @ts-ignore - .then((hook1: any) => { - const expected = recommendationPosts('posts'); - assert.deepEqual(hook1.result, expected); - }); + return ( + populate({ schema })(hook) + // @ts-ignore + .then((hook1: any) => { + const expected = recommendationPosts('posts'); + assert.deepEqual(hook1.result, expected); + }) + ); }); it('checks permissions', () => { @@ -385,23 +414,25 @@ let provider: any; nameAs: 'post', parentField: 'postId', childField: 'id', - permissions: 'for posts' - }) + permissions: 'for posts', + }), }; // @ts-ignore - return populate({ schema, checkPermissions })(hook) - // @ts-ignore - .then((hook1: any) => { - let expected = recommendationPosts('post'); - assert.deepEqual(hook1.result, expected); - - expected = [ - { service: 'recommendations', permissions: 'for root', depth: 0 }, - { service: 'posts', permissions: 'for posts', depth: 1 } - ]; - assert.deepEqual(spy, expected); - }); + return ( + populate({ schema, checkPermissions })(hook) + // @ts-ignore + .then((hook1: any) => { + let expected = recommendationPosts('post'); + assert.deepEqual(hook1.result, expected); + + expected = [ + { service: 'recommendations', permissions: 'for root', depth: 0 }, + { service: 'posts', permissions: 'for posts', depth: 1 }, + ]; + assert.deepEqual(spy, expected); + }) + ); }); it('throws on invalid permissions', () => { @@ -419,15 +450,21 @@ let provider: any; nameAs: 'post', parentField: 'postId', childField: 'id', - permissions: 'for posts' - }) + permissions: 'for posts', + }), }; // @ts-ignore - return populate({ schema, checkPermissions })(hook) - // @ts-ignore - .then(() => { throw new Error('was not supposed to succeed'); }) - .catch((err: any) => { assert.notEqual(err, undefined); }); + return ( + populate({ schema, checkPermissions })(hook) + // @ts-ignore + .then(() => { + throw new Error('was not supposed to succeed'); + }) + .catch((err: any) => { + assert.notEqual(err, undefined); + }) + ); }); it('stores elapsed time', () => { @@ -439,18 +476,20 @@ let provider: any; service: 'posts', nameAs: 'post', parentField: 'postId', - childField: 'id' - }) + childField: 'id', + }), }; - return populate({ schema, profile: true })(hook) - // @ts-ignore - .then((hook1: any) => { - const elapsed = hook1.result._elapsed; - assert.deepEqual(Object.keys(elapsed), ['post', 'total']); - assert.isAbove(elapsed.total, 999); - assert.isAtLeast(elapsed.total, elapsed.post); - }); + return ( + populate({ schema, profile: true })(hook) + // @ts-ignore + .then((hook1: any) => { + const elapsed = hook1.result._elapsed; + assert.deepEqual(Object.keys(elapsed), ['post', 'total']); + assert.isAbove(elapsed.total, 999); + assert.isAtLeast(elapsed.total, elapsed.post); + }) + ); }); it('allow non related field joins if query', () => { @@ -461,18 +500,20 @@ let provider: any; include: makeInclude(type, { service: 'posts', nameAs: 'post', - query: { id: hookAfter.result.postId } - }) + query: { id: hookAfter.result.postId }, + }), }; - return populate({ schema, profile: true })(hook) - // @ts-ignore - .then((hook1: any) => { - const elapsed = hook1.result._elapsed; - assert.deepEqual(Object.keys(elapsed), ['post', 'total']); - assert.isAbove(elapsed.total, 999); - assert.isAtLeast(elapsed.total, elapsed.post); - }); + return ( + populate({ schema, profile: true })(hook) + // @ts-ignore + .then((hook1: any) => { + const elapsed = hook1.result._elapsed; + assert.deepEqual(Object.keys(elapsed), ['post', 'total']); + assert.isAbove(elapsed.total, 999); + assert.isAtLeast(elapsed.total, elapsed.post); + }) + ); }); it('allow non related field joins if select', () => { @@ -484,19 +525,21 @@ let provider: any; service: 'posts', nameAs: 'post', select: (_hook: any, parentItem: any) => ({ - id: parentItem.postId - }) - }) + id: parentItem.postId, + }), + }), }; - return populate({ schema, profile: true })(hook) - // @ts-ignore - .then((hook1: any) => { - const elapsed = hook1.result._elapsed; - assert.deepEqual(Object.keys(elapsed), ['post', 'total']); - assert.isAbove(elapsed.total, 999); - assert.isAtLeast(elapsed.total, elapsed.post); - }); + return ( + populate({ schema, profile: true })(hook) + // @ts-ignore + .then((hook1: any) => { + const elapsed = hook1.result._elapsed; + assert.deepEqual(Object.keys(elapsed), ['post', 'total']); + assert.isAbove(elapsed.total, 999); + assert.isAtLeast(elapsed.total, elapsed.post); + }) + ); }); it('throws if no parentField option in related field join', () => { @@ -507,18 +550,20 @@ let provider: any; include: makeInclude(type, { service: 'posts', nameAs: 'post', - childField: 'id' - }) + childField: 'id', + }), }; - return populate({ schema, profile: true })(hook) - // @ts-ignore - .then(() => { - assert(false, 'unexpectedly succeeeded'); - }) - .catch((err: any) => { - assert.isObject(err, 'no error object'); - }); + return ( + populate({ schema, profile: true })(hook) + // @ts-ignore + .then(() => { + assert(false, 'unexpectedly succeeeded'); + }) + .catch((err: any) => { + assert.isObject(err, 'no error object'); + }) + ); }); it('throws if no parentField defined in related field join', () => { @@ -531,18 +576,20 @@ let provider: any; service: 'posts', nameAs: 'post', parentField: 'postId', - childField: 'id' - }) + childField: 'id', + }), }; - return populate({ schema, profile: true })(hook) - // @ts-ignore - .then(() => { - assert(false, 'unexpectedly succeeded'); - }) - .catch((err: any) => { - assert.isObject(err, 'no error object'); - }); + return ( + populate({ schema, profile: true })(hook) + // @ts-ignore + .then(() => { + assert(false, 'unexpectedly succeeded'); + }) + .catch((err: any) => { + assert.isObject(err, 'no error object'); + }) + ); }); }); @@ -556,15 +603,17 @@ let provider: any; service: 'posts', nameAs: 'post', parentField: 'postId', - childField: 'id' - }) + childField: 'id', + }), }; - return populate({ schema, profile: true })(hook) - // @ts-ignore - .then((hook1: any) => { - assert.equal(hook1.result.length, 3); - }); + return ( + populate({ schema, profile: true })(hook) + // @ts-ignore + .then((hook1: any) => { + assert.equal(hook1.result.length, 3); + }) + ); }); }); @@ -577,17 +626,19 @@ let provider: any; service: 'posts', nameAs: 'post', parentField: 'postId', - childField: 'id' + childField: 'id', }); const include = makeInclude(type, includeOptions()); const expected = makeInclude(type, includeOptions()); - return populate({ schema: { include }, profile: true })(hook) - // @ts-ignore - .then((hook1: any) => { - assert.deepEqual(include, expected); - }); + return ( + populate({ schema: { include }, profile: true })(hook) + // @ts-ignore + .then((hook1: any) => { + assert.deepEqual(include, expected); + }) + ); }); }); }); @@ -595,11 +646,11 @@ let provider: any; // Helpers -function makeInclude (type: any, obj: any) { +function makeInclude(type: any, obj: any) { return type === 'obj' ? obj : [obj]; } -function recommendationPosts (nameAs: any, asArray?: any, recommendation?: any, posts?: any) { +function recommendationPosts(nameAs: any, asArray?: any, recommendation?: any, posts?: any) { recommendation = recommendation || clone(getInitDb('recommendation').store['1']); posts = posts || clone(getInitDb('posts').store['1']); @@ -612,6 +663,6 @@ function recommendationPosts (nameAs: any, asArray?: any, recommendation?: any, return expected; } -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/populate-basics.test.ts b/test/hooks/populate-basics.test.ts index 81791556..c452295b 100755 --- a/test/hooks/populate-basics.test.ts +++ b/test/hooks/populate-basics.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { populate } from '../../src'; @@ -12,13 +11,16 @@ describe('services populate - finds items in hook', () => { type: 'after', method: 'create', params: { provider: 'rest' }, - result: { first: 'Jane2', last: 'Doe2' } + result: { first: 'Jane2', last: 'Doe2' }, }; hookAfterArray = { type: 'after', method: 'create', params: { provider: 'rest' }, - result: [{ first: 'John2', last: 'Doe2' }, { first: 'Jane', last: 'Doe' }] + result: [ + { first: 'John2', last: 'Doe2' }, + { first: 'Jane', last: 'Doe' }, + ], }; hookFindPaginate = { type: 'after', @@ -28,41 +30,48 @@ describe('services populate - finds items in hook', () => { total: 2, data: [ { first: 'John3', last: 'Doe3' }, - { first: 'Jane3', last: 'Doe3' } - ] - } + { first: 'Jane3', last: 'Doe3' }, + ], + }, }; }); it('one item', () => { const hook = clone(hookAfter); - return populate({ schema: {} })(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - }); + return ( + populate({ schema: {} })(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookAfter); + }) + ); }); it('item array', () => { const hook = clone(hookAfterArray); - return populate({ schema: {} })(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfterArray); - }); + return ( + populate({ schema: {} })(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookAfterArray); + }) + ); }); it('find paginated', () => { const hook = clone(hookFindPaginate); - return populate({ schema: {} })(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookFindPaginate); - }); + return ( + populate({ schema: {} })(hook) + // @ts-ignore + .then((hook: any) => { + assert.deepEqual(hook, hookFindPaginate); + }) + ); }); }); -describe('services populate - throws on bad params', () => { // run to increase code climate score +describe('services populate - throws on bad params', () => { + // run to increase code climate score let hookAfter: any; beforeEach(() => { @@ -70,36 +79,53 @@ describe('services populate - throws on bad params', () => { // run to increase type: 'after', method: 'create', params: { provider: 'rest' }, - result: { first: 'Jane2', last: 'Doe2' } + result: { first: 'Jane2', last: 'Doe2' }, }; }); it('schema', () => { - // @ts-expect-error - assert.throws(() => { populate({}); }); - // @ts-expect-error - assert.throws(() => { populate({ schema: 1 }); }); + assert.throws(() => { + // @ts-ignore + populate({}); + }); + assert.throws(() => { + // @ts-ignore + populate({ schema: 1 }); + }); }); it('permissions not func', () => { const hook = clone(hookAfter); // @ts-ignore - return populate({ schema: {}, checkPermissions: 1 })(hook) - // @ts-ignore - .then(() => { throw new Error('was not supposed to succeed'); }) - .catch((err: any) => { assert.notEqual(err, undefined); }); + return ( + // @ts-ignore + populate({ schema: {}, checkPermissions: 1 })(hook) + // @ts-ignore + .then(() => { + throw new Error('was not supposed to succeed'); + }) + .catch((err: any) => { + assert.notEqual(err, undefined); + }) + ); }); it('throws on invalid permissions', () => { const hook = clone(hookAfter); // @ts-ignore - return populate({ schema: {}, checkPermissions: () => false })(hook) - // @ts-ignore - .then(() => { throw new Error('was not supposed to succeed'); }) - .catch((err: any) => { assert.notEqual(err, undefined); }); + return ( + populate({ schema: {}, checkPermissions: () => false })(hook) + // @ts-ignore + .then(() => { + throw new Error('was not supposed to succeed'); + }) + .catch((err: any) => { + assert.notEqual(err, undefined); + }) + ); }); }); -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/populate-misc.test.ts b/test/hooks/populate-misc.test.ts index 5bfbed38..a28c5388 100755 --- a/test/hooks/populate-misc.test.ts +++ b/test/hooks/populate-misc.test.ts @@ -1,6 +1,5 @@ - import { assert } from 'chai'; -import feathers from '@feathersjs/feathers'; +import { feathers } from '@feathersjs/feathers'; import memory from 'feathers-memory'; import { iff, populate } from '../../src'; @@ -11,164 +10,190 @@ const userInit = { 2: { name: 'Jack Doe', key: 'a', id: 2, deleted: true }, 3: { name: 'Rick Doe', key: 'b', id: 3 }, 4: { name: 'Dick Doe', key: 'b', id: 4 }, - 5: { name: 'Dick Doe', key: 'b', id: 5, deleted: true } + 5: { name: 'Dick Doe', key: 'b', id: 5, deleted: true }, }; const teamId = 2; const teamInit = { 0: { team: 'Does', memberIds: [0, 1, 2], id: 0 }, - 1: { team: 'Dragons', memberIds: [3, 4, 5], id: 1 } + 1: { team: 'Dragons', memberIds: [3, 4, 5], id: 1 }, }; const schemaDefault = { - include: [{ - service: 'users', - nameAs: 'members', - parentField: 'memberIds', - childField: 'id' - }] + include: [ + { + service: 'users', + nameAs: 'members', + parentField: 'memberIds', + childField: 'id', + }, + ], }; -const resultDefault = [{ - team: 'Does', - memberIds: [0, 1, 2], - id: 0, - _include: ['members'], - members: [ - { name: 'Jane Doe', key: 'a', id: 0 }, - { name: 'Jack Doe', key: 'a', id: 1 }, - { name: 'Jack Doe', key: 'a', id: 2, deleted: true } - ] -} +const resultDefault = [ + { + team: 'Does', + memberIds: [0, 1, 2], + id: 0, + _include: ['members'], + members: [ + { name: 'Jane Doe', key: 'a', id: 0 }, + { name: 'Jack Doe', key: 'a', id: 1 }, + { name: 'Jack Doe', key: 'a', id: 2, deleted: true }, + ], + }, ]; const schemaDefaultTeams = { service: 'teams', - include: [{ - service: 'users', - nameAs: 'members', - parentField: 'memberIds', - childField: 'id' - }] + include: [ + { + service: 'users', + nameAs: 'members', + parentField: 'memberIds', + childField: 'id', + }, + ], }; const schemaDefaultXteams = { service: 'xteams', - include: [{ - service: 'users', - nameAs: 'members', - parentField: 'memberIds', - childField: 'id' - }] + include: [ + { + service: 'users', + nameAs: 'members', + parentField: 'memberIds', + childField: 'id', + }, + ], }; const schemaFalse = { - include: [{ - service: 'users', - nameAs: 'members', - parentField: 'memberIds', - childField: 'id', - paginate: false - }] + include: [ + { + service: 'users', + nameAs: 'members', + parentField: 'memberIds', + childField: 'id', + paginate: false, + }, + ], }; const schemaTrue = { - include: [{ - service: 'users', - nameAs: 'members', - parentField: 'memberIds', - childField: 'id', - paginate: true - }] + include: [ + { + service: 'users', + nameAs: 'members', + parentField: 'memberIds', + childField: 'id', + paginate: true, + }, + ], }; -const resultTrue = [{ - team: 'Does', - memberIds: [0, 1, 2], - id: 0, - _include: ['members'], - members: [ - { name: 'Jane Doe', key: 'a', id: 0 }, - { name: 'Jack Doe', key: 'a', id: 1 } - ] -} +const resultTrue = [ + { + team: 'Does', + memberIds: [0, 1, 2], + id: 0, + _include: ['members'], + members: [ + { name: 'Jane Doe', key: 'a', id: 0 }, + { name: 'Jack Doe', key: 'a', id: 1 }, + ], + }, ]; const schema1 = { - include: [{ - service: 'users', - nameAs: 'members', - parentField: 'memberIds', - childField: 'id', - paginate: 1 - }] + include: [ + { + service: 'users', + nameAs: 'members', + parentField: 'memberIds', + childField: 'id', + paginate: 1, + }, + ], }; -const result1 = [{ - team: 'Does', - memberIds: [0, 1, 2], - id: 0, - _include: ['members'], - members: { name: 'Jane Doe', key: 'a', id: 0 } -}]; +const result1 = [ + { + team: 'Does', + memberIds: [0, 1, 2], + id: 0, + _include: ['members'], + members: { name: 'Jane Doe', key: 'a', id: 0 }, + }, +]; let whichSchema: any; let userHookFlag1: any; let teamHookFlag1: any; let fcnOptions: any; -function schemaFcn (_hook: any, options: any) { +function schemaFcn(_hook: any, options: any) { fcnOptions = options; return schemaDefault; } -function services (this: any) { +function services(this: any) { const app = this; app.configure(user); app.configure(team); } -function user (this: any) { +function user(this: any) { const app = this; - app.use('/users', memory({ - store: clone(userInit), - startId: userId, - paginate: { - default: 2, - max: 2 - } - })); + app.use( + '/users', + memory({ + store: clone(userInit), + startId: userId, + paginate: { + default: 2, + max: 2, + }, + }) + ); app.service('users').hooks({ before: { all: [ - (hook: any) => { userHookFlag1 = hook.params.userHookFlag1; } - ] - } + (hook: any) => { + userHookFlag1 = hook.params.userHookFlag1; + }, + ], + }, }); } -function team (this: any) { +function team(this: any) { const app = this; - app.use('/teams', memory({ - store: clone(teamInit), - startId: teamId - })); + app.use( + '/teams', + memory({ + store: clone(teamInit), + startId: teamId, + }) + ); app.service('teams').hooks({ after: { all: [ - (hook: any) => { teamHookFlag1 = hook.params.teamHookFlag1; }, + (hook: any) => { + teamHookFlag1 = hook.params.teamHookFlag1; + }, iff(() => whichSchema === 'schemaDefault', populate({ schema: schemaDefault })), iff(() => whichSchema === 'schemaFalse', populate({ schema: schemaFalse })), iff(() => whichSchema === 'schemaTrue', populate({ schema: schemaTrue })), iff(() => whichSchema === 'schema1', populate({ schema: schema1 })), iff(() => whichSchema === 'schemaDefaultTeams', populate({ schema: schemaDefaultTeams })), iff(() => whichSchema === 'schemaDefaultXteams', populate({ schema: schemaDefaultXteams })), - iff(() => whichSchema === 'schemaDefaultFcn', populate({ schema: schemaFcn })) - ] - } + iff(() => whichSchema === 'schemaDefaultFcn', populate({ schema: schemaFcn })), + ], + }, }); } @@ -177,64 +202,58 @@ describe('services populate - hook.params passed to includes', () => { let teams: any; beforeEach(() => { - app = feathers() - .configure(services); + app = feathers().configure(services); teams = app.service('teams'); userHookFlag1 = null; }); it('hook.params passed to includes', () => { whichSchema = 'schemaDefault'; - return teams.find({ query: { id: 0 }, userHookFlag1: 'userHookFlag1' }) - .then((result: any) => { - assert.equal(userHookFlag1, 'userHookFlag1'); - assert.deepEqual(result, resultDefault); - }); + return teams.find({ query: { id: 0 }, userHookFlag1: 'userHookFlag1' }).then((result: any) => { + assert.equal(userHookFlag1, 'userHookFlag1'); + assert.deepEqual(result, resultDefault); + }); }); it('ignores pagination by default', () => { whichSchema = 'schemaDefault'; - return teams.find({ query: { id: 0 } }) - .then((result: any) => { - assert.deepEqual(result, resultDefault); - }); + return teams.find({ query: { id: 0 } }).then((result: any) => { + assert.deepEqual(result, resultDefault); + }); }); it('ignores pagination when paginate:false', () => { whichSchema = 'schemaFalse'; - return teams.find({ query: { id: 0 } }) - .then((result: any) => { - assert.deepEqual(result, resultDefault); - }); + return teams.find({ query: { id: 0 } }).then((result: any) => { + assert.deepEqual(result, resultDefault); + }); }); it('uses configuration when paginate:true', () => { whichSchema = 'schemaTrue'; - return teams.find({ query: { id: 0 } }) - .then((result: any) => { - assert.deepEqual(result, resultTrue); - }); + return teams.find({ query: { id: 0 } }).then((result: any) => { + assert.deepEqual(result, resultTrue); + }); }); it('can specify number of results to return', () => { whichSchema = 'schema1'; - return teams.find({ query: { id: 0 } }) - .then((result: any) => { - assert.deepEqual(result, result1); - }); + return teams.find({ query: { id: 0 } }).then((result: any) => { + assert.deepEqual(result, result1); + }); }); it('passes on correct base service', () => { whichSchema = 'schemaDefaultTeams'; - return teams.find({ query: { id: 0 } }) - .then((result: any) => { - assert.deepEqual(result, resultDefault); - }); + return teams.find({ query: { id: 0 } }).then((result: any) => { + assert.deepEqual(result, resultDefault); + }); }); it('throws on incorrect base service', () => { whichSchema = 'schemaDefaultXteams'; - return teams.find({ query: { id: 0 } }) + return teams + .find({ query: { id: 0 } }) .then(() => { assert.fail(true, false, 'unexpected succeeded'); }) @@ -249,8 +268,7 @@ describe('services populate - schema may be a function', () => { let teams: any; beforeEach(() => { - app = feathers() - .configure(services); + app = feathers().configure(services); teams = app.service('teams'); userHookFlag1 = null; fcnOptions = null; @@ -258,18 +276,16 @@ describe('services populate - schema may be a function', () => { it('calls the function', () => { whichSchema = 'schemaDefaultFcn'; - return teams.find({ query: { id: 0 }, userHookFlag1: 'userHookFlag1' }) - .then((result: any) => { - assert.equal(userHookFlag1, 'userHookFlag1'); - assert.deepEqual(result, resultDefault); - }); + return teams.find({ query: { id: 0 }, userHookFlag1: 'userHookFlag1' }).then((result: any) => { + assert.equal(userHookFlag1, 'userHookFlag1'); + assert.deepEqual(result, resultDefault); + }); }); it('function gets hook and options', () => { whichSchema = 'schemaDefaultFcn'; - return teams.find( - { query: { id: 0 }, userHookFlag1: 'userHookFlag1', teamHookFlag1: 'teamHookFlag1' } - ) + return teams + .find({ query: { id: 0 }, userHookFlag1: 'userHookFlag1', teamHookFlag1: 'teamHookFlag1' }) .then((result: any) => { assert.equal(teamHookFlag1, 'teamHookFlag1'); assert.strictEqual(fcnOptions.schema, schemaFcn); @@ -280,6 +296,6 @@ describe('services populate - schema may be a function', () => { }); }); -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/populate-relations.test.ts b/test/hooks/populate-relations.test.ts index e09b8571..fb3ea28b 100755 --- a/test/hooks/populate-relations.test.ts +++ b/test/hooks/populate-relations.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import configApp from '../helpers/config-app'; import getInitDb from '../helpers/get-init-db'; @@ -22,14 +21,14 @@ import { populate } from '../../src'; method: 'create', params: { provider: 'rest' }, path: 'recommendations', - result: recommendation['1'] + result: recommendation['1'], }; hookAfterArray = { type: 'after', method: 'create', params: { provider: 'rest' }, path: 'recommendations', - result: [recommendation['1'], recommendation['2'], recommendation['3']] + result: [recommendation['1'], recommendation['2'], recommendation['3']], }; schema = { @@ -40,38 +39,41 @@ import { populate } from '../../src'; parentField: 'postId', childField: 'id', include: [ - { // 1:1 + { + // 1:1 service: 'users', permissions: '', nameAs: 'authorInfo', parentField: 'author', - childField: 'id' + childField: 'id', }, - { // 1:m + { + // 1:m service: 'comments', permissions: '', nameAs: 'commentsInfo', parentField: 'id', childField: 'postId', select: (_hook: any, _parent: any) => ({ - $limit: 6 + $limit: 6, }), asArray: true, query: { $limit: 5, $select: ['title', 'content', 'postId'], - $sort: { createdAt: -1 } - } + $sort: { createdAt: -1 }, + }, }, - { // m:1 + { + // m:1 service: 'users', permissions: '', nameAs: 'readersInfo', parentField: 'readers', - childField: 'id' - } - ] - }) + childField: 'id', + }, + ], + }), }; }); @@ -80,18 +82,18 @@ import { populate } from '../../src'; hook.app = app; // app is a func and wouldn't be cloned // @ts-ignore - return populate({ schema, checkPermissions: () => true, profile: 'test' })(hook) + return ( // @ts-ignore - .then((hook1: any) => { - assert.deepEqual(hook1.result, - { + populate({ schema, checkPermissions: () => true, profile: 'test' })(hook) + // @ts-ignore + .then((hook1: any) => { + assert.deepEqual(hook1.result, { userId: 'as61389dadhga62343hads6712', postId: 1, updatedAt: 1480793101475, _include: ['post'], _elapsed: { post: 1, total: 1 }, - post: - { + post: { id: 1, title: 'Post 1', content: 'Lorem ipsum dolor sit amet 4', @@ -100,218 +102,221 @@ import { populate } from '../../src'; createdAt: 1480793101559, _include: ['authorInfo', 'commentsInfo', 'readersInfo'], _elapsed: { authorInfo: 2, commentsInfo: 2, readersInfo: 2, total: 2 }, - authorInfo: - { + authorInfo: { id: 'as61389dadhga62343hads6712', name: 'Author 1', email: 'author1@posties.com', password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 - }, - commentsInfo: - [{ - title: 'Comment 1', - content: 'Lorem ipsum dolor sit amet 1', - postId: 1 + age: 55, }, - { - title: 'Comment 3', - content: 'Lorem ipsum dolor sit amet 3', - postId: 1 - }], - readersInfo: - [{ - id: 'as61389dadhga62343hads6712', - name: 'Author 1', - email: 'author1@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 - }, - { - id: '167asdf3689348sdad7312131s', - name: 'Author 2', - email: 'author2@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 16 - }] - } - } - ); - }); + commentsInfo: [ + { + title: 'Comment 1', + content: 'Lorem ipsum dolor sit amet 1', + postId: 1, + }, + { + title: 'Comment 3', + content: 'Lorem ipsum dolor sit amet 3', + postId: 1, + }, + ], + readersInfo: [ + { + id: 'as61389dadhga62343hads6712', + name: 'Author 1', + email: 'author1@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 55, + }, + { + id: '167asdf3689348sdad7312131s', + name: 'Author 2', + email: 'author2@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 16, + }, + ], + }, + }); + }) + ); }); it('for an item array', () => { const hook = clone(hookAfterArray); hook.app = app; // app is a func and wouldn't be cloned - // @ts-ignore - return populate({ schema, checkPermissions: () => true, profile: 'test' })(hook) + return ( // @ts-ignore - .then((hook1: any) => { - assert.deepEqual(hook1.result, - [{ - userId: 'as61389dadhga62343hads6712', - postId: 1, - updatedAt: 1480793101475, - _include: ['post'], - _elapsed: { post: 1, total: 1 }, - post: + populate({ schema, checkPermissions: () => true, profile: 'test' })(hook) + // @ts-ignore + .then((hook1: any) => { + assert.deepEqual(hook1.result, [ { - id: 1, - title: 'Post 1', - content: 'Lorem ipsum dolor sit amet 4', - author: 'as61389dadhga62343hads6712', - readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559, - _include: ['authorInfo', 'commentsInfo', 'readersInfo'], - _elapsed: { authorInfo: 2, commentsInfo: 2, readersInfo: 2, total: 2 }, - authorInfo: - { - id: 'as61389dadhga62343hads6712', - name: 'Author 1', - email: 'author1@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 - }, - commentsInfo: - [{ - title: 'Comment 1', - content: 'Lorem ipsum dolor sit amet 1', - postId: 1 - }, - { - title: 'Comment 3', - content: 'Lorem ipsum dolor sit amet 3', - postId: 1 - }], - readersInfo: - [{ - id: 'as61389dadhga62343hads6712', - name: 'Author 1', - email: 'author1@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 + userId: 'as61389dadhga62343hads6712', + postId: 1, + updatedAt: 1480793101475, + _include: ['post'], + _elapsed: { post: 1, total: 1 }, + post: { + id: 1, + title: 'Post 1', + content: 'Lorem ipsum dolor sit amet 4', + author: 'as61389dadhga62343hads6712', + readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], + createdAt: 1480793101559, + _include: ['authorInfo', 'commentsInfo', 'readersInfo'], + _elapsed: { authorInfo: 2, commentsInfo: 2, readersInfo: 2, total: 2 }, + authorInfo: { + id: 'as61389dadhga62343hads6712', + name: 'Author 1', + email: 'author1@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 55, + }, + commentsInfo: [ + { + title: 'Comment 1', + content: 'Lorem ipsum dolor sit amet 1', + postId: 1, + }, + { + title: 'Comment 3', + content: 'Lorem ipsum dolor sit amet 3', + postId: 1, + }, + ], + readersInfo: [ + { + id: 'as61389dadhga62343hads6712', + name: 'Author 1', + email: 'author1@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 55, + }, + { + id: '167asdf3689348sdad7312131s', + name: 'Author 2', + email: 'author2@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 16, + }, + ], }, - { - id: '167asdf3689348sdad7312131s', - name: 'Author 2', - email: 'author2@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 16 - }] - } - }, - { - userId: 'as61389dadhga62343hads6712', - postId: 2, - updatedAt: 1480793101475, - _include: ['post'], - _elapsed: { post: 1, total: 1 }, - post: + }, { - id: 2, - title: 'Post 2', - content: 'Lorem ipsum dolor sit amet 5', - author: '167asdf3689348sdad7312131s', - readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559, - _include: ['authorInfo', 'commentsInfo', 'readersInfo'], - _elapsed: { authorInfo: 2, commentsInfo: 2, readersInfo: 2, total: 2 }, - authorInfo: - { - id: '167asdf3689348sdad7312131s', - name: 'Author 2', - email: 'author2@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 16 - }, - commentsInfo: - [{ - title: 'Comment 2', - content: 'Lorem ipsum dolor sit amet 2', - postId: 2 - }], - readersInfo: - [{ - id: 'as61389dadhga62343hads6712', - name: 'Author 1', - email: 'author1@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 + userId: 'as61389dadhga62343hads6712', + postId: 2, + updatedAt: 1480793101475, + _include: ['post'], + _elapsed: { post: 1, total: 1 }, + post: { + id: 2, + title: 'Post 2', + content: 'Lorem ipsum dolor sit amet 5', + author: '167asdf3689348sdad7312131s', + readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], + createdAt: 1480793101559, + _include: ['authorInfo', 'commentsInfo', 'readersInfo'], + _elapsed: { authorInfo: 2, commentsInfo: 2, readersInfo: 2, total: 2 }, + authorInfo: { + id: '167asdf3689348sdad7312131s', + name: 'Author 2', + email: 'author2@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 16, + }, + commentsInfo: [ + { + title: 'Comment 2', + content: 'Lorem ipsum dolor sit amet 2', + postId: 2, + }, + ], + readersInfo: [ + { + id: 'as61389dadhga62343hads6712', + name: 'Author 1', + email: 'author1@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 55, + }, + { + id: '167asdf3689348sdad7312131s', + name: 'Author 2', + email: 'author2@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 16, + }, + ], }, - { - id: '167asdf3689348sdad7312131s', - name: 'Author 2', - email: 'author2@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 16 - }] - } - }, - { - userId: '167asdf3689348sdad7312131s', - postId: 1, - updatedAt: 1480793101475, - _include: ['post'], - _elapsed: { post: 1, total: 1 }, - post: + }, { - id: 1, - title: 'Post 1', - content: 'Lorem ipsum dolor sit amet 4', - author: 'as61389dadhga62343hads6712', - readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], - createdAt: 1480793101559, - _include: ['authorInfo', 'commentsInfo', 'readersInfo'], - _elapsed: { authorInfo: 2, commentsInfo: 2, readersInfo: 2, total: 2 }, - authorInfo: - { - id: 'as61389dadhga62343hads6712', - name: 'Author 1', - email: 'author1@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 - }, - commentsInfo: - [{ - title: 'Comment 1', - content: 'Lorem ipsum dolor sit amet 1', - postId: 1 - }, - { - title: 'Comment 3', - content: 'Lorem ipsum dolor sit amet 3', - postId: 1 - }], - readersInfo: - [{ - id: 'as61389dadhga62343hads6712', - name: 'Author 1', - email: 'author1@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 + userId: '167asdf3689348sdad7312131s', + postId: 1, + updatedAt: 1480793101475, + _include: ['post'], + _elapsed: { post: 1, total: 1 }, + post: { + id: 1, + title: 'Post 1', + content: 'Lorem ipsum dolor sit amet 4', + author: 'as61389dadhga62343hads6712', + readers: ['as61389dadhga62343hads6712', '167asdf3689348sdad7312131s'], + createdAt: 1480793101559, + _include: ['authorInfo', 'commentsInfo', 'readersInfo'], + _elapsed: { authorInfo: 2, commentsInfo: 2, readersInfo: 2, total: 2 }, + authorInfo: { + id: 'as61389dadhga62343hads6712', + name: 'Author 1', + email: 'author1@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 55, + }, + commentsInfo: [ + { + title: 'Comment 1', + content: 'Lorem ipsum dolor sit amet 1', + postId: 1, + }, + { + title: 'Comment 3', + content: 'Lorem ipsum dolor sit amet 3', + postId: 1, + }, + ], + readersInfo: [ + { + id: 'as61389dadhga62343hads6712', + name: 'Author 1', + email: 'author1@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 55, + }, + { + id: '167asdf3689348sdad7312131s', + name: 'Author 2', + email: 'author2@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 16, + }, + ], }, - { - id: '167asdf3689348sdad7312131s', - name: 'Author 2', - email: 'author2@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 16 - }] - } - }] - ); - }); + }, + ]); + }) + ); }); }); }); // Helpers -function makeInclude (type: any, obj: any) { +function makeInclude(type: any, obj: any) { return type === 'obj' ? obj : [obj]; } -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/populate-scaffolding.test.ts b/test/hooks/populate-scaffolding.test.ts index b514947b..9b82e056 100755 --- a/test/hooks/populate-scaffolding.test.ts +++ b/test/hooks/populate-scaffolding.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import configApp from '../helpers/config-app'; @@ -7,7 +6,8 @@ describe('services populate - test scaffolding', () => { const app = configApp(['users', 'comments', 'posts', 'recommendation']); const users = app.service('users'); - users.find({ query: {} }) + users + .find({ query: {} }) .then((data: any) => { assert.equal(data.length, 2); }) diff --git a/test/hooks/prevent-changes.test.ts b/test/hooks/prevent-changes.test.ts index a9f497a9..04c382b1 100755 --- a/test/hooks/prevent-changes.test.ts +++ b/test/hooks/prevent-changes.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { preventChanges } from '../../src'; @@ -11,7 +10,7 @@ describe('services preventChanges', () => { type: 'before', method: 'patch', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe' } + data: { first: 'John', last: 'Doe' }, }; }); @@ -38,7 +37,12 @@ describe('services preventChanges', () => { type: 'before', method: 'patch', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe', 'name.first': 'John', a: { b: undefined, c: { d: { e: 1 } } } } + data: { + first: 'John', + last: 'Doe', + 'name.first': 'John', + a: { b: undefined, c: { d: { e: 1 } } }, + }, }; }); @@ -69,7 +73,7 @@ describe('services preventChanges', () => { type: 'before', method: 'patch', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe', a: { b: undefined, c: { d: { e: 1 } } } } + data: { first: 'John', last: 'Doe', a: { b: undefined, c: { d: { e: 1 } } } }, }; }); @@ -93,7 +97,7 @@ describe('services preventChanges', () => { type: 'before', method: 'patch', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe', a: { b: 'john', c: { d: { e: 1 } } } } + data: { first: 'John', last: 'Doe', a: { b: 'john', c: { d: { e: 1 } } } }, }; }); @@ -107,43 +111,37 @@ describe('services preventChanges', () => { it('deletes if props found', () => { let context: any = preventChanges(false, 'name', 'first')(clone(hookBefore)); - assert.deepEqual(context.data, - { last: 'Doe', a: { b: 'john', c: { d: { e: 1 } } } }, - '1'); + assert.deepEqual(context.data, { last: 'Doe', a: { b: 'john', c: { d: { e: 1 } } } }, '1'); context = preventChanges(false, 'name', 'a')(clone(hookBefore)); - assert.deepEqual(context.data, - { first: 'John', last: 'Doe' }, - '2'); + assert.deepEqual(context.data, { first: 'John', last: 'Doe' }, '2'); context = preventChanges(false, 'name', 'a.b')(clone(hookBefore)); - assert.deepEqual(context.data, + assert.deepEqual( + context.data, { first: 'John', last: 'Doe', a: { c: { d: { e: 1 } } } }, - '3'); + '3' + ); context = preventChanges(false, 'name', 'a.c')(clone(hookBefore)); - assert.deepEqual(context.data, - { first: 'John', last: 'Doe', a: { b: 'john' } }, - '4'); + assert.deepEqual(context.data, { first: 'John', last: 'Doe', a: { b: 'john' } }, '4'); context = preventChanges(false, 'name', 'a.c.d.e')(clone(hookBefore)); - assert.deepEqual(context.data, + assert.deepEqual( + context.data, { first: 'John', last: 'Doe', a: { b: 'john', c: { d: {} } } }, - '5'); + '5' + ); context = preventChanges(false, 'first', 'last')(clone(hookBefore)); - assert.deepEqual(context.data, - { a: { b: 'john', c: { d: { e: 1 } } } } - ); + assert.deepEqual(context.data, { a: { b: 'john', c: { d: { e: 1 } } } }); context = preventChanges(false, 'first', 'a.b', 'a.c.d.e')(clone(hookBefore)); - assert.deepEqual(context.data, - { last: 'Doe', a: { c: { d: { } } } } - ); + assert.deepEqual(context.data, { last: 'Doe', a: { c: { d: {} } } }); }); }); }); -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/required.test.ts b/test/hooks/required.test.ts index 5f3556cf..f470b8b7 100755 --- a/test/hooks/required.test.ts +++ b/test/hooks/required.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { required } from '../../src'; @@ -10,7 +9,7 @@ describe('services required', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } + data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, }; }); diff --git a/test/hooks/run-parallel.test.ts b/test/hooks/run-parallel.test.ts index 31765a4d..24ffd3fb 100755 --- a/test/hooks/run-parallel.test.ts +++ b/test/hooks/run-parallel.test.ts @@ -5,7 +5,7 @@ import { runParallel } from '../../src'; let contextBefore: any; let that: any; -function test (tester: any) { +function test(tester: any) { return function (this: any, contextCloned: any) { that = this; tester(contextCloned); @@ -20,32 +20,32 @@ describe('services runParallel', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe' } + data: { first: 'John', last: 'Doe' }, }; }); it('runs the func', (done: any) => { - runParallel(test(tester), clone, 0)(contextBefore); + runParallel(test(tester))(contextBefore); - function tester () { + function tester() { done(); } }); it('passes this', (done: any) => { - runParallel(test(tester), clone, 0).call({ bar: true }, contextBefore); + runParallel(test(tester)).call({ bar: true }, contextBefore); - function tester () { + function tester() { assert.strictEqual(that.bar, true); done(); } }); it('defaults to uncloned context', (done: any) => { - runParallel(test(tester), clone, 0)(contextBefore); + runParallel(test(tester))(contextBefore); contextBefore._foo = true; - function tester (contextCloned: any) { + function tester(contextCloned: any) { assert.property(contextCloned, '_foo'); done(); } @@ -55,7 +55,7 @@ describe('services runParallel', () => { runParallel(test(tester), clone)(contextBefore); contextBefore._foo = true; - function tester (contextCloned: any) { + function tester(contextCloned: any) { assert.notProperty(contextCloned, '_foo'); done(); } diff --git a/test/hooks/sequelize-convert.test.ts b/test/hooks/sequelize-convert.test.ts index 0882fea3..5e3d557d 100755 --- a/test/hooks/sequelize-convert.test.ts +++ b/test/hooks/sequelize-convert.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { sequelizeConvert } from '../../src'; @@ -9,12 +8,12 @@ const converts: any = { verifyChanges: 'json', resetExpires: 'date', mfaExpires: 'date', - passwordHistory: 'json' + passwordHistory: 'json', }; const convertDatetime = { sql: (dateNow: any) => new Date(dateNow).toISOString(), - js: (sqlDate: any) => new Date(sqlDate).valueOf() + js: (sqlDate: any) => new Date(sqlDate).valueOf(), }; describe('sequelize-convert.test.ts', function () { @@ -38,8 +37,8 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' - } + mfaType: '2fa', + }, }; contextArray = { @@ -58,8 +57,9 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' - }, { + mfaType: '2fa', + }, + { isInvitation: true, isVerified: false, verifyExpires: 11111, @@ -71,9 +71,9 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' - } - ] + mfaType: '2fa', + }, + ], }; }); @@ -92,40 +92,43 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' + mfaType: '2fa', }); }); it('converts array of objects', () => { const newContext: any = sequelizeConvert(converts)(contextArray); - assert.deepEqual(newContext.data, [{ - isInvitation: 0, - isVerified: 1, - verifyExpires: 11111, - verifyToken: '00000', - verifyShortToken: '00', - verifyChanges: '{"foo":"bar","baz":"bas"}', - resetExpires: 22222, - resetToken: '99999', - resetShortToken: '99', - mfaExpires: 33333, - mfaShortToken: '77777', - mfaType: '2fa' - }, { - isInvitation: 1, - isVerified: 0, - verifyExpires: 11111, - verifyToken: '00000', - verifyShortToken: '00', - verifyChanges: '{"foo":"bar","baz":"bas"}', - resetExpires: 22222, - resetToken: '99999', - resetShortToken: '99', - mfaExpires: 33333, - mfaShortToken: '77777', - mfaType: '2fa' - }]); + assert.deepEqual(newContext.data, [ + { + isInvitation: 0, + isVerified: 1, + verifyExpires: 11111, + verifyToken: '00000', + verifyShortToken: '00', + verifyChanges: '{"foo":"bar","baz":"bas"}', + resetExpires: 22222, + resetToken: '99999', + resetShortToken: '99', + mfaExpires: 33333, + mfaShortToken: '77777', + mfaType: '2fa', + }, + { + isInvitation: 1, + isVerified: 0, + verifyExpires: 11111, + verifyToken: '00000', + verifyShortToken: '00', + verifyChanges: '{"foo":"bar","baz":"bas"}', + resetExpires: 22222, + resetToken: '99999', + resetShortToken: '99', + mfaExpires: 33333, + mfaShortToken: '77777', + mfaType: '2fa', + }, + ]); }); it('uses datetime converter', () => { @@ -143,12 +146,16 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: '1970-01-01T00:00:33.333Z', mfaShortToken: '77777', - mfaType: '2fa' + mfaType: '2fa', }); }); it('respects fields to ignore', () => { - const newContext: any = sequelizeConvert(converts, ['isInvitation', 'isVerified', 'verifyChanges'])(context); + const newContext: any = sequelizeConvert(converts, [ + 'isInvitation', + 'isVerified', + 'verifyChanges', + ])(context); assert.deepEqual(newContext.data, { isInvitation: false, @@ -162,7 +169,7 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' + mfaType: '2fa', }); }); }); @@ -189,8 +196,8 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' - } + mfaType: '2fa', + }, }; contextISO = { @@ -208,8 +215,8 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: '1970-01-01T00:00:33.333Z', mfaShortToken: '77777', - mfaType: '2fa' - } + mfaType: '2fa', + }, }; contextArray = { @@ -228,8 +235,9 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' - }, { + mfaType: '2fa', + }, + { isInvitation: 1, isVerified: 0, verifyExpires: 11111, @@ -241,44 +249,46 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' - } - ] + mfaType: '2fa', + }, + ], }; contextPaginated = { type: 'after', method: 'find', result: { - data: [{ - isInvitation: 0, - isVerified: 1, - verifyExpires: 11111, - verifyToken: '00000', - verifyShortToken: '00', - verifyChanges: '{"foo":"bar","baz":"bas"}', - resetExpires: 22222, - resetToken: '99999', - resetShortToken: '99', - mfaExpires: 33333, - mfaShortToken: '77777', - mfaType: '2fa' - }, { - isInvitation: 1, - isVerified: 0, - verifyExpires: 11111, - verifyToken: '00000', - verifyShortToken: '00', - verifyChanges: '{"foo":"bar","baz":"bas"}', - resetExpires: 22222, - resetToken: '99999', - resetShortToken: '99', - mfaExpires: 33333, - mfaShortToken: '77777', - mfaType: '2fa' - } - ] - } + data: [ + { + isInvitation: 0, + isVerified: 1, + verifyExpires: 11111, + verifyToken: '00000', + verifyShortToken: '00', + verifyChanges: '{"foo":"bar","baz":"bas"}', + resetExpires: 22222, + resetToken: '99999', + resetShortToken: '99', + mfaExpires: 33333, + mfaShortToken: '77777', + mfaType: '2fa', + }, + { + isInvitation: 1, + isVerified: 0, + verifyExpires: 11111, + verifyToken: '00000', + verifyShortToken: '00', + verifyChanges: '{"foo":"bar","baz":"bas"}', + resetExpires: 22222, + resetToken: '99999', + resetShortToken: '99', + mfaExpires: 33333, + mfaShortToken: '77777', + mfaType: '2fa', + }, + ], + }, }; }); @@ -297,12 +307,14 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' + mfaType: '2fa', }); }); it('uses datetime converter', () => { - const newContext: any = sequelizeConvert(converts, null, { date: convertDatetime })(contextISO); + const newContext: any = sequelizeConvert(converts, null, { date: convertDatetime })( + contextISO + ); assert.deepEqual(newContext.result, { isInvitation: false, @@ -316,76 +328,86 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' + mfaType: '2fa', }); }); it('converts array of objects, not paginated', () => { const newContext: any = sequelizeConvert(converts)(contextArray); - assert.deepEqual(newContext.result, [{ - isInvitation: false, - isVerified: true, - verifyExpires: 11111, - verifyToken: '00000', - verifyShortToken: '00', - verifyChanges: { foo: 'bar', baz: 'bas' }, - resetExpires: 22222, - resetToken: '99999', - resetShortToken: '99', - mfaExpires: 33333, - mfaShortToken: '77777', - mfaType: '2fa' - }, { - isInvitation: true, - isVerified: false, - verifyExpires: 11111, - verifyToken: '00000', - verifyShortToken: '00', - verifyChanges: { foo: 'bar', baz: 'bas' }, - resetExpires: 22222, - resetToken: '99999', - resetShortToken: '99', - mfaExpires: 33333, - mfaShortToken: '77777', - mfaType: '2fa' - }]); + assert.deepEqual(newContext.result, [ + { + isInvitation: false, + isVerified: true, + verifyExpires: 11111, + verifyToken: '00000', + verifyShortToken: '00', + verifyChanges: { foo: 'bar', baz: 'bas' }, + resetExpires: 22222, + resetToken: '99999', + resetShortToken: '99', + mfaExpires: 33333, + mfaShortToken: '77777', + mfaType: '2fa', + }, + { + isInvitation: true, + isVerified: false, + verifyExpires: 11111, + verifyToken: '00000', + verifyShortToken: '00', + verifyChanges: { foo: 'bar', baz: 'bas' }, + resetExpires: 22222, + resetToken: '99999', + resetShortToken: '99', + mfaExpires: 33333, + mfaShortToken: '77777', + mfaType: '2fa', + }, + ]); }); it('converts array of objects, paginated', () => { const newContext: any = sequelizeConvert(converts)(contextPaginated); - assert.deepEqual(newContext.result.data, [{ - isInvitation: false, - isVerified: true, - verifyExpires: 11111, - verifyToken: '00000', - verifyShortToken: '00', - verifyChanges: { foo: 'bar', baz: 'bas' }, - resetExpires: 22222, - resetToken: '99999', - resetShortToken: '99', - mfaExpires: 33333, - mfaShortToken: '77777', - mfaType: '2fa' - }, { - isInvitation: true, - isVerified: false, - verifyExpires: 11111, - verifyToken: '00000', - verifyShortToken: '00', - verifyChanges: { foo: 'bar', baz: 'bas' }, - resetExpires: 22222, - resetToken: '99999', - resetShortToken: '99', - mfaExpires: 33333, - mfaShortToken: '77777', - mfaType: '2fa' - }]); + assert.deepEqual(newContext.result.data, [ + { + isInvitation: false, + isVerified: true, + verifyExpires: 11111, + verifyToken: '00000', + verifyShortToken: '00', + verifyChanges: { foo: 'bar', baz: 'bas' }, + resetExpires: 22222, + resetToken: '99999', + resetShortToken: '99', + mfaExpires: 33333, + mfaShortToken: '77777', + mfaType: '2fa', + }, + { + isInvitation: true, + isVerified: false, + verifyExpires: 11111, + verifyToken: '00000', + verifyShortToken: '00', + verifyChanges: { foo: 'bar', baz: 'bas' }, + resetExpires: 22222, + resetToken: '99999', + resetShortToken: '99', + mfaExpires: 33333, + mfaShortToken: '77777', + mfaType: '2fa', + }, + ]); }); it('respects fields to ignore', () => { - const newContext: any = sequelizeConvert(converts, ['isInvitation', 'isVerified', 'verifyChanges'])(context); + const newContext: any = sequelizeConvert(converts, [ + 'isInvitation', + 'isVerified', + 'verifyChanges', + ])(context); assert.deepEqual(newContext.result, { isInvitation: 0, @@ -399,7 +421,7 @@ describe('sequelize-convert.test.ts', function () { resetShortToken: '99', mfaExpires: 33333, mfaShortToken: '77777', - mfaType: '2fa' + mfaType: '2fa', }); }); }); diff --git a/test/hooks/serialize.test.ts b/test/hooks/serialize.test.ts index d9116c49..babd44c4 100755 --- a/test/hooks/serialize.test.ts +++ b/test/hooks/serialize.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { serialize } from '../../src'; @@ -12,30 +11,30 @@ describe('services serialize', () => { method: 'create', params: { provider: 'rest' }, path: 'recommendations', - result: {} + result: {}, }; schema = { only: ['updatedAt'], computed: { - commentsCount: (recommendation: any, _hook: any) => recommendation.post.commentsInfo.length + commentsCount: (recommendation: any, _hook: any) => recommendation.post.commentsInfo.length, }, post: { exclude: ['id', 'createdAt', 'author', 'readers', '_id'], authorInfo: { exclude: ['id', 'password', '_id', 'age'], computed: { - isUnder18: (authorInfo: any, _hook: any) => authorInfo.age < 18 - } + isUnder18: (authorInfo: any, _hook: any) => authorInfo.age < 18, + }, }, readersInfo: { - exclude: 'id' + exclude: 'id', }, commentsInfo: { only: ['title', 'content'], - exclude: 'content' - } - } + exclude: 'content', + }, + }, }; }); @@ -47,8 +46,7 @@ describe('services serialize', () => { updatedAt: 1480793101475, _include: ['post'], _elapsed: { post: 1, total: 1 }, - post: - { + post: { id: 1, title: 'Post 1', content: 'Lorem ipsum dolor sit amet 4', @@ -62,85 +60,81 @@ describe('services serialize', () => { name: 'Author 1', email: 'author1@posties.com', password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 + age: 55, }, - commentsInfo: - [ + commentsInfo: [ { title: 'Comment 1', content: 'Lorem ipsum dolor sit amet 1', - postId: 1 + postId: 1, }, { title: 'Comment 3', content: 'Lorem ipsum dolor sit amet 3', - postId: 1 - } + postId: 1, + }, ], - readersInfo: - [ + readersInfo: [ { id: 'as61389dadhga62343hads6712', name: 'Author 1', email: 'author1@posties.com', password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 + age: 55, }, { id: '167asdf3689348sdad7312131s', name: 'Author 2', email: 'author2@posties.com', password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 16 - } - ] - } + age: 16, + }, + ], + }, }; const hook1 = serialize(schema)(hook); - assert.deepEqual(hook1, - { - type: 'after', - method: 'create', - params: { provider: 'rest' }, - path: 'recommendations', - result: { - updatedAt: 1480793101475, - _include: ['post'], - _elapsed: { post: 1, total: 1 }, - post: { - title: 'Post 1', - content: 'Lorem ipsum dolor sit amet 4', - _include: ['authorInfo', 'commentsInfo', 'readersInfo'], - _elapsed: { authorInfo: 2, commentsInfo: 2, readersInfo: 2, total: 2 }, - authorInfo: { + assert.deepEqual(hook1, { + type: 'after', + method: 'create', + params: { provider: 'rest' }, + path: 'recommendations', + result: { + updatedAt: 1480793101475, + _include: ['post'], + _elapsed: { post: 1, total: 1 }, + post: { + title: 'Post 1', + content: 'Lorem ipsum dolor sit amet 4', + _include: ['authorInfo', 'commentsInfo', 'readersInfo'], + _elapsed: { authorInfo: 2, commentsInfo: 2, readersInfo: 2, total: 2 }, + authorInfo: { + name: 'Author 1', + email: 'author1@posties.com', + isUnder18: false, + _computed: ['isUnder18'], + }, + commentsInfo: [{ title: 'Comment 1' }, { title: 'Comment 3' }], + readersInfo: [ + { name: 'Author 1', email: 'author1@posties.com', - isUnder18: false, - _computed: ['isUnder18'] + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 55, }, - commentsInfo: [{ title: 'Comment 1' }, { title: 'Comment 3' }], - readersInfo: [ - { - name: 'Author 1', - email: 'author1@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 - }, - { - name: 'Author 2', - email: 'author2@posties.com', - password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 16 - } - ] - }, - commentsCount: 2, - _computed: ['commentsCount'] - } - } as any - ); + { + name: 'Author 2', + email: 'author2@posties.com', + password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', + age: 16, + }, + ], + }, + commentsCount: 2, + _computed: ['commentsCount'], + }, + } as any); }); it('schema param is not changed', () => { @@ -155,8 +149,7 @@ describe('services serialize', () => { updatedAt: 1480793101475, _include: ['post'], _elapsed: { post: 1, total: 1 }, - post: - { + post: { id: 1, title: 'Post 1', content: 'Lorem ipsum dolor sit amet 4', @@ -170,39 +163,37 @@ describe('services serialize', () => { name: 'Author 1', email: 'author1@posties.com', password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 + age: 55, }, - commentsInfo: - [ + commentsInfo: [ { title: 'Comment 1', content: 'Lorem ipsum dolor sit amet 1', - postId: 1 + postId: 1, }, { title: 'Comment 3', content: 'Lorem ipsum dolor sit amet 3', - postId: 1 - } + postId: 1, + }, ], - readersInfo: - [ + readersInfo: [ { id: 'as61389dadhga62343hads6712', name: 'Author 1', email: 'author1@posties.com', password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 55 + age: 55, }, { id: '167asdf3689348sdad7312131s', name: 'Author 2', email: 'author2@posties.com', password: '2347wjkadhad8y7t2eeiudhd98eu2rygr', - age: 16 - } - ] - } + age: 16, + }, + ], + }, }; assert.equal(typeof schema1, 'function'); @@ -219,6 +210,6 @@ describe('services serialize', () => { // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/set-field.test.ts b/test/hooks/set-field.test.ts index c7048613..c5c4906d 100644 --- a/test/hooks/set-field.test.ts +++ b/test/hooks/set-field.test.ts @@ -1,5 +1,5 @@ import assert from 'assert'; -import feathers from '@feathersjs/feathers'; +import { feathers } from '@feathersjs/feathers'; import memory from 'feathers-memory'; import { setField } from '../../src'; @@ -8,7 +8,7 @@ import type { Application } from '@feathersjs/feathers'; describe('setField', () => { const user = { id: 1, - name: 'David' + name: 'David', }; let app: Application; @@ -18,57 +18,69 @@ describe('setField', () => { app.use('/messages', memory()); app.service('messages').hooks({ before: { - all: [setField({ - from: 'params.user.id', - as: 'params.query.userId' - })] - } + all: [ + setField({ + from: 'params.user.id', + as: 'params.query.userId', + }), + ], + }, }); await app.service('messages').create({ id: 1, text: 'Message 1', - userId: 1 + userId: 1, }); await app.service('messages').create({ id: 2, text: 'Message 2', - userId: 2 + userId: 2, }); }); it('errors when options not set', () => { - assert.throws(() => app.service('messages').hooks({ - before: { - // @ts-expect-error - get: setField() - } - })); - assert.throws(() => app.service('messages').hooks({ - before: { - // @ts-expect-error - get: setField({ as: 'me' }) - } - })); - assert.throws(() => app.service('messages').hooks({ - before: { - // @ts-expect-error - get: setField({ from: 'you' }) - } - })); + assert.throws(() => + app.service('messages').hooks({ + before: { + // @ts-expect-error + get: setField(), + }, + }) + ); + assert.throws(() => + app.service('messages').hooks({ + before: { + // @ts-expect-error + get: setField({ as: 'me' }), + }, + }) + ); + assert.throws(() => + app.service('messages').hooks({ + before: { + // @ts-expect-error + get: setField({ from: 'you' }), + }, + }) + ); }); it('errors when used with wrong app version', async () => { app.version = '3.2.1'; - await assert.rejects(async () => { - await app.service('messages').get('testing'); - }, { - message: 'The \'setField\' hook only works with Feathers 4 and the latest database adapters' - }); + await assert.rejects( + async () => { + await app.service('messages').get('testing'); + }, + { + message: "The 'setField' hook only works with Feathers 4 and the latest database adapters", + } + ); }); it('find queries with user information, does not modify original objects', async () => { const query = {}; + // @ts-ignore const results = await app.service('messages').find({ query, user }); assert.equal(results.length, 1); @@ -76,19 +88,24 @@ describe('setField', () => { }); it('adds user information to get, throws NotFound event if record exists', async () => { - await assert.rejects(async () => { - await app.service('messages').get(2, { user }); - }, { - name: 'NotFound', - message: 'No record found for id \'2\'' - }); + await assert.rejects( + async () => { + // @ts-ignore + await app.service('messages').get(2, { user }); + }, + { + name: 'NotFound', + message: "No record found for id '2'", + } + ); + // @ts-ignore const result = await app.service('messages').get(1, { user }); assert.deepEqual(result, { id: 1, text: 'Message 1', - userId: 1 + userId: 1, }); }); @@ -99,14 +116,17 @@ describe('setField', () => { }); it('errors on external calls if value does not exists', async () => { - await assert.rejects(async () => { - await app.service('messages').find({ - provider: 'rest' - }); - }, { - name: 'Forbidden', - message: 'Expected field params.query.userId not available' - }); + await assert.rejects( + async () => { + await app.service('messages').find({ + provider: 'rest', + }); + }, + { + name: 'Forbidden', + message: 'Expected field params.query.userId not available', + } + ); }); it('errors when not used as a before hook', async () => { @@ -114,15 +134,18 @@ describe('setField', () => { after: { get: setField({ from: 'params.user.id', - as: 'params.query.userId' - }) - } + as: 'params.query.userId', + }), + }, }); - await assert.rejects(async () => { - await app.service('messages').get(1); - }, { - message: 'The \'setField\' hook can only be used as a \'before\' hook.' - }); + await assert.rejects( + async () => { + await app.service('messages').get(1); + }, + { + message: "The 'setField' hook can only be used as a 'before' hook.", + } + ); }); }); diff --git a/test/hooks/set-now.test.ts b/test/hooks/set-now.test.ts index cab4992b..c0e0165d 100755 --- a/test/hooks/set-now.test.ts +++ b/test/hooks/set-now.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { setNow } from '../../src'; @@ -20,17 +19,17 @@ describe('services setNow', () => { total: 2, data: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] - } + { first: 'Jane', last: 'Doe' }, + ], + }, }; hookFind = { type: 'after', method: 'find', result: [ { first: 'John', last: 'Doe' }, - { first: 'Jane', last: 'Doe' } - ] + { first: 'Jane', last: 'Doe' }, + ], }; }); @@ -79,7 +78,7 @@ describe('services setNow', () => { hookBefore = { type: 'before', method: 'create', - data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } + data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, }; hookBefore2 = { type: 'before', @@ -87,23 +86,27 @@ describe('services setNow', () => { data: { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct', - created: { where: 'NYC' } - } + created: { where: 'NYC' }, + }, }; }); it('prop with no dots', () => { setNow('madeAt')(hookBefore); - checkHook(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - , 'madeAt'); + checkHook( + hookBefore.data, + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + 'madeAt' + ); }); it('props with no dots', () => { setNow('madeAt', 'builtAt')(hookBefore); - checkHook(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - , ['madeAt', 'builtAt']); + checkHook( + hookBefore.data, + { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' }, + ['madeAt', 'builtAt'] + ); }); it('prop with 1 dot', () => { @@ -111,9 +114,10 @@ describe('services setNow', () => { assert.instanceOf(hookBefore.data.created.at, Date, 'not instance of Date'); assert.equal(Object.keys(hookBefore.data.created).length, 1); delete hookBefore.data.created; - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); it('prop with 1 dot in existing obj', () => { @@ -121,13 +125,11 @@ describe('services setNow', () => { assert.instanceOf(hookBefore2.data.created.at, Date, 'not instance of Date'); assert.equal(Object.keys(hookBefore2.data.created).length, 2); delete hookBefore2.data.created.at; - assert.deepEqual(hookBefore2.data, - { - empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, - dept: 'Acct', - created: { where: 'NYC' } - } - ); + assert.deepEqual(hookBefore2.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + created: { where: 'NYC' }, + }); }); it('prop with 2 dots', () => { @@ -136,9 +138,10 @@ describe('services setNow', () => { assert.equal(Object.keys(hookBefore.data.created.at).length, 1); assert.equal(Object.keys(hookBefore.data.created).length, 1); delete hookBefore.data.created; - assert.deepEqual(hookBefore.data, - { empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, dept: 'Acct' } - ); + assert.deepEqual(hookBefore.data, { + empl: { name: { first: 'John', last: 'Doe' }, status: 'AA' }, + dept: 'Acct', + }); }); }); @@ -162,7 +165,7 @@ describe('services setNow', () => { // Helpers -function checkHook (item: any, template: any, dateFields: any) { +function checkHook(item: any, template: any, dateFields: any) { const item1 = clone(item); if (typeof dateFields === 'string') { dateFields = [dateFields]; @@ -177,6 +180,6 @@ function checkHook (item: any, template: any, dateFields: any) { assert.deepEqual(item1, template, 'objects differ'); } -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/set-slug.test.ts b/test/hooks/set-slug.test.ts index 3aa3a9a4..2e2c349e 100755 --- a/test/hooks/set-slug.test.ts +++ b/test/hooks/set-slug.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { setSlug } from '../../src'; diff --git a/test/hooks/sifter.test.ts b/test/hooks/sifter.test.ts index 17b4fd6c..acffd49c 100755 --- a/test/hooks/sifter.test.ts +++ b/test/hooks/sifter.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import sift from 'sift'; @@ -6,12 +5,10 @@ import { sifter } from '../../src'; const dataCanada = [ { name: 'john', address: { city: 'montreal', country: 'canada' } }, - { name: 'david', address: { city: 'vancouver', country: 'canada' } } + { name: 'david', address: { city: 'vancouver', country: 'canada' } }, ]; -const dataUsa = [ - { name: 'marshall', address: { city: 'utah', country: 'usa' } } -]; +const dataUsa = [{ name: 'marshall', address: { city: 'utah', country: 'usa' } }]; const data = ([] as any[]).concat(dataCanada, dataUsa); @@ -20,7 +17,7 @@ const origHook = { type: 'after', method: 'find', result: data }; const origHookPaginated = { type: 'after', method: 'find', - result: { total: 1, limit: 10, skip: 0, data } + result: { total: 1, limit: 10, skip: 0, data }, }; const getCountry = (country: any) => (_hook: any) => sift({ 'address.country': country }); @@ -57,6 +54,6 @@ describe('services shifter', () => { // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/soft-delete.test.ts b/test/hooks/soft-delete.test.ts index af0e1f3b..af41f8f8 100755 --- a/test/hooks/soft-delete.test.ts +++ b/test/hooks/soft-delete.test.ts @@ -1,5 +1,5 @@ import assert from 'assert'; -import feathers from '@feathersjs/feathers'; +import { feathers } from '@feathersjs/feathers'; import memory from 'feathers-memory'; import { softDelete } from '../../src'; @@ -9,46 +9,43 @@ const initialUsers = [ { name: 'Jack Doe', key: 'a', deleted: true }, { name: 'Rick Doe', key: 'b' }, { name: 'Mick Doe', key: 'b' }, - { name: 'Mick Doe', key: 'b', deleted: true } + { name: 'Mick Doe', key: 'b', deleted: true }, ]; describe('services softDelete', () => { let userService: any; beforeEach(() => { - const app = feathers() - .use('/users', memory({ - multi: ['create', 'patch', 'remove'] - })); + const app = feathers().use( + '/users', + memory({ + multi: ['create', 'patch', 'remove'], + }) + ); userService = app.service('users'); userService.hooks({ before: { - all: [ - softDelete() - ] - } + all: [softDelete()], + }, }); userService.create(initialUsers); }); it('throws error on wrong app version', async () => { - const app = feathers() - .use('/users', memory()); + const app = feathers().use('/users', memory()); app.service('users').hooks({ before: { - all: [ - softDelete() - ] - } + all: [softDelete()], + }, }); app.version = '3.1.4'; await assert.rejects(() => app.service('users').find(), { - message: 'The softDelete hook requires Feathers 4.0.0 or later' + message: 'The softDelete hook requires Feathers 4.0.0 or later', }); }); @@ -60,13 +57,13 @@ describe('services softDelete', () => { { name: 'Jane Doe', key: 'a', id: 0 }, { name: 'Jack Doe', key: 'a', id: 1 }, { name: 'Rick Doe', key: 'b', id: 3 }, - { name: 'Mick Doe', key: 'b', id: 4 } + { name: 'Mick Doe', key: 'b', id: 4 }, ]); }); it('returns everything with params.disableSoftdelete', async () => { const users = await userService.find({ - disableSoftDelete: true + disableSoftDelete: true, }); assert.deepStrictEqual(users, [ @@ -75,7 +72,7 @@ describe('services softDelete', () => { { name: 'Jack Doe', key: 'a', deleted: true, id: 2 }, { name: 'Rick Doe', key: 'b', id: 3 }, { name: 'Mick Doe', key: 'b', id: 4 }, - { name: 'Mick Doe', key: 'b', deleted: true, id: 5 } + { name: 'Mick Doe', key: 'b', deleted: true, id: 5 }, ]); }); }); @@ -85,36 +82,47 @@ describe('services softDelete', () => { const user = await userService.get(0); assert.deepStrictEqual(user, { - name: 'Jane Doe', key: 'a', id: 0 + name: 'Jane Doe', + key: 'a', + id: 0, }); }); it('throws on deleted item', async () => { - assert.rejects(async () => { - await userService.get(2); - }, { - name: 'NotFound', - message: 'No record found for id \'2\'' - }); + assert.rejects( + async () => { + await userService.get(2); + }, + { + name: 'NotFound', + message: "No record found for id '2'", + } + ); }); it('returns deleted when params.disableSoftDelete is set', async () => { const user = await userService.get(2, { - disableSoftDelete: true + disableSoftDelete: true, }); assert.deepStrictEqual(user, { - name: 'Jack Doe', key: 'a', deleted: true, id: 2 + name: 'Jack Doe', + key: 'a', + deleted: true, + id: 2, }); }); it('throws on missing item', async () => { - await assert.rejects(async () => { - await userService.get(99); - }, { - name: 'NotFound', - message: 'No record found for id \'99\'' - }); + await assert.rejects( + async () => { + await userService.get(99); + }, + { + name: 'NotFound', + message: "No record found for id '99'", + } + ); }); }); @@ -126,12 +134,15 @@ describe('services softDelete', () => { }); it.skip('throws on deleted item', async () => { - await assert.rejects(async () => { - await userService.update(2, { y: 'y' }); - }, { - name: 'NotFound', - message: 'No record found for id \'2\'' - }); + await assert.rejects( + async () => { + await userService.update(2, { y: 'y' }); + }, + { + name: 'NotFound', + message: "No record found for id '2'", + } + ); }); }); @@ -140,14 +151,17 @@ describe('services softDelete', () => { const user = await userService.patch(0, { y: 'y' }); assert.deepStrictEqual(user, { - name: 'Jane Doe', key: 'a', id: 0, y: 'y' + name: 'Jane Doe', + key: 'a', + id: 0, + y: 'y', }); }); it('throws on deleted item', async () => { await assert.rejects(() => userService.patch(2, { y: 'y' }), { name: 'NotFound', - message: 'No record found for id \'2\'' + message: "No record found for id '2'", }); }); @@ -158,7 +172,7 @@ describe('services softDelete', () => { { name: 'Jane Doe', key: 'a', id: 0, x: 'x' }, { name: 'Jack Doe', key: 'a', id: 1, x: 'x' }, { name: 'Rick Doe', key: 'b', id: 3, x: 'x' }, - { name: 'Mick Doe', key: 'b', id: 4, x: 'x' } + { name: 'Mick Doe', key: 'b', id: 4, x: 'x' }, ]); }); }); @@ -168,17 +182,20 @@ describe('services softDelete', () => { const user = await userService.remove(0); assert.deepStrictEqual(user, { - name: 'Jane Doe', key: 'a', id: 0, deleted: true + name: 'Jane Doe', + key: 'a', + id: 0, + deleted: true, }); await assert.rejects(() => userService.get(0), { - name: 'NotFound' + name: 'NotFound', }); }); it('throws if item already deleted', async () => { await assert.rejects(() => userService.remove(2), { - name: 'NotFound' + name: 'NotFound', }); }); }); @@ -204,10 +221,12 @@ describe('services softDelete', () => { let peopleService: any; beforeEach(() => { - const app = feathers() - .use('/people', memory({ - multi: ['create', 'patch', 'remove'] - })); + const app = feathers().use( + '/people', + memory({ + multi: ['create', 'patch', 'remove'], + }) + ); peopleService = app.service('people'); peopleService.hooks({ @@ -219,15 +238,15 @@ describe('services softDelete', () => { }, removeData: async () => { return { deletedAt: new Date() }; - } - }) + }, + }), ], create: [ (context: any) => { context.data.deletedAt = null; - } - ] - } + }, + ], + }, }); }); @@ -238,7 +257,7 @@ describe('services softDelete', () => { assert.ok(deletedUser.deletedAt !== null); await assert.rejects(() => peopleService.get(user.id), { - name: 'NotFound' + name: 'NotFound', }); }); }); diff --git a/test/hooks/stash-before.test.ts b/test/hooks/stash-before.test.ts index e3ce108c..32d49d49 100755 --- a/test/hooks/stash-before.test.ts +++ b/test/hooks/stash-before.test.ts @@ -1,5 +1,5 @@ import { assert } from 'chai'; -import feathers from '@feathersjs/feathers'; +import { feathers } from '@feathersjs/feathers'; import memory from 'feathers-memory'; import { stashBefore } from '../../src'; @@ -10,27 +10,30 @@ const storeInit = { 2: { name: 'John Doe', key: 'a', id: 2 }, 3: { name: 'Rick Doe', key: 'b', id: 3 }, 4: { name: 'Dick Doe', key: 'b', id: 4 }, - 5: { name: 'Dork Doe', key: 'b', id: 5 } + 5: { name: 'Dork Doe', key: 'b', id: 5 }, }; let store; let finalParams: any; let innerCallParams: any; -function services (this: any) { +function services(this: any) { const app = this; app.configure(users); } -function users (this: any) { +function users(this: any) { const app = this; store = clone(storeInit); - app.use('users', memory({ - store, - startId, - multi: true - })); + app.use( + 'users', + memory({ + store, + startId, + multi: true, + }) + ); app.service('users').hooks({ before: { @@ -43,9 +46,9 @@ function users (this: any) { stashBefore(), (context: any) => { finalParams = context.params; - } - ] - } + }, + ], + }, }); } @@ -56,26 +59,23 @@ describe('services stash-before', () => { beforeEach(() => { innerCallParams = finalParams = null; - app = feathers() - .configure(services); + app = feathers().configure(services); users = app.service('users'); }); ['get', 'update', 'patch', 'remove'].forEach(method => { it(`stashes on ${method}`, () => { - return users[method](0, {}) - .then(() => { - assert.deepEqual(finalParams.before, storeInit[0]); - }); + return users[method](0, {}).then(() => { + assert.deepEqual(finalParams.before, storeInit[0]); + }); }); }); it('Do not stash when query is used in remove', () => { - return users.remove(null, { query: {} }) - .then(() => { - assert.notProperty(finalParams, 'before'); - }); + return users.remove(null, { query: {} }).then(() => { + assert.notProperty(finalParams, 'before'); + }); }); ['create', 'find'].forEach(method => { @@ -92,32 +92,30 @@ describe('services stash-before', () => { }); it('stashes on get with original params', () => { - return users.get(0, { provider: 'socketio', eyecatcher: -1 }) - .then(() => { - assert.equal(finalParams.provider, 'socketio'); - assert.equal(finalParams.eyecatcher, -1); - - assert.equal(innerCallParams.provider, 'socketio'); - assert.equal(innerCallParams.eyecatcher, -1); - assert.notProperty(innerCallParams, 'authenticated'); - assert.notProperty(innerCallParams, 'user'); - }); + return users.get(0, { provider: 'socketio', eyecatcher: -1 }).then(() => { + assert.equal(finalParams.provider, 'socketio'); + assert.equal(finalParams.eyecatcher, -1); + + assert.equal(innerCallParams.provider, 'socketio'); + assert.equal(innerCallParams.eyecatcher, -1); + assert.notProperty(innerCallParams, 'authenticated'); + assert.notProperty(innerCallParams, 'user'); + }); }); it('stashes on patch with custom params', () => { - return users.patch(0, {}, { provider: 'socketio', eyecatcher: -1 }) - .then(() => { - assert.equal(finalParams.provider, 'socketio'); - assert.equal(finalParams.eyecatcher, -1); - - assert.equal(innerCallParams.provider, 'socketio'); - assert.notProperty(innerCallParams, 'eyecatcher'); - assert.property(innerCallParams, 'authenticated'); - assert.property(innerCallParams, 'user'); - }); + return users.patch(0, {}, { provider: 'socketio', eyecatcher: -1 }).then(() => { + assert.equal(finalParams.provider, 'socketio'); + assert.equal(finalParams.eyecatcher, -1); + + assert.equal(innerCallParams.provider, 'socketio'); + assert.notProperty(innerCallParams, 'eyecatcher'); + assert.property(innerCallParams, 'authenticated'); + assert.property(innerCallParams, 'user'); + }); }); }); -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/unless.test.ts b/test/hooks/unless.test.ts index b405d7fa..3a4e8fd9 100755 --- a/test/hooks/unless.test.ts +++ b/test/hooks/unless.test.ts @@ -50,12 +50,13 @@ const hookFcnSync = (hook: HookContext): HookContext => { return hook; }; -const hookFcnAsync = (hook: HookContext) => new Promise(resolve => { - hookFcnAsyncCalls = +1; - hook.data.first = hook.data.first.toLowerCase(); +const hookFcnAsync = (hook: HookContext) => + new Promise(resolve => { + hookFcnAsyncCalls = +1; + hook.data.first = hook.data.first.toLowerCase(); - resolve(hook); -}); + resolve(hook); + }); const hookFcn = (hook: HookContext): HookContext => { hookFcnCalls = +1; @@ -73,7 +74,10 @@ describe('services unless - sync predicate, sync hook', () => { }); it('calls sync hook function if falsey non-function', () => { - unless(false, hookFcnSync)(hook) + unless( + false, + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -95,8 +99,11 @@ describe('services unless - sync predicate, sync hook', () => { }); it('calls sync hook function if sync predicate falsey', () => { - unless(() => false, hookFcnSync)(hook) - // @ts-ignore + unless( + () => false, + hookFcnSync + )(hook) + // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); assert.equal(hookFcnSyncCalls, 1); @@ -140,7 +147,6 @@ describe('services unless - sync predicate, async hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -169,7 +175,6 @@ describe('services unless - sync predicate, async hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); }); @@ -196,7 +201,6 @@ describe('services unless - async predicate, sync hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -213,7 +217,6 @@ describe('services unless - async predicate, sync hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); }); @@ -272,7 +275,10 @@ describe('services unless - sync predicate', () => { }); it('does not need to access hook', () => { - unless(() => false, hookFcnSync)(hook) + unless( + () => false, + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -282,7 +288,10 @@ describe('services unless - sync predicate', () => { }); it('is passed hook as param', () => { - unless(predicateSync, hookFcnSync)(hook) + unless( + predicateSync, + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(predicateHook, hookBefore); @@ -293,7 +302,10 @@ describe('services unless - sync predicate', () => { }); it('a higher order predicate can pass more options', () => { - unless(predicateSync2({ z: 'z' }), hookFcnSync)(hook) + unless( + predicateSync2({ z: 'z' }), + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(predicateOptions, { z: 'z' }); @@ -331,7 +343,6 @@ describe('services unless - async predicate', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -352,7 +363,6 @@ describe('services unless - async predicate', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -371,7 +381,6 @@ describe('services unless - async predicate', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); }); @@ -386,7 +395,12 @@ describe('services unless - runs multiple hooks', () => { }); it('runs successfully', (done: any) => { - unless(false, hookFcnSync, hookFcnAsync, hookFcn)(hook) + unless( + false, + hookFcnSync, + hookFcnAsync, + hookFcn + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -402,6 +416,6 @@ describe('services unless - runs multiple hooks', () => { // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/validate-schema.test.ts b/test/hooks/validate-schema.test.ts index c42a487d..f5bb3dd1 100755 --- a/test/hooks/validate-schema.test.ts +++ b/test/hooks/validate-schema.test.ts @@ -10,9 +10,9 @@ ajv.addSchema({ $id: 'syncSchema', properties: { first: { type: 'string', format: 'startWithJo' }, - last: { type: 'string' } + last: { type: 'string' }, }, - required: ['first', 'last'] + required: ['first', 'last'], }); describe('services validateSchema', () => { @@ -29,7 +29,7 @@ describe('services validateSchema', () => { type: 'before', method: 'create', params: { provider: 'rest' }, - data: { first: 'John', last: 'Doe' } + data: { first: 'John', last: 'Doe' }, }; hookBeforeArray = { type: 'before', @@ -38,8 +38,8 @@ describe('services validateSchema', () => { data: [ { first: 'John', last: 'Doe' }, { first: 'Jane', last: 'Doe' }, - { first: 'Joe', last: 'Doe' } - ] + { first: 'Joe', last: 'Doe' }, + ], }; hookBeforeArrayForAjvInstance = { type: 'before', @@ -48,22 +48,22 @@ describe('services validateSchema', () => { data: [ { first: 'John', last: 'Doe' }, { first: 'Josh', last: 'Doe' }, - { first: 'Joe', last: 'Doe' } - ] + { first: 'Joe', last: 'Doe' }, + ], }; schema = { properties: { first: { type: 'string' }, - last: { type: 'string' } + last: { type: 'string' }, }, - required: ['first', 'last'] + required: ['first', 'last'], }; schemaForAjvInstance = { properties: { first: { type: 'string', format: 'startWithJo' }, - last: { type: 'string' } + last: { type: 'string' }, }, - required: ['first', 'last'] + required: ['first', 'last'], }; }); @@ -72,9 +72,9 @@ describe('services validateSchema', () => { schema = { properties: { first: { type: 'string' }, - last: { type: 'string' } + last: { type: 'string' }, }, - required: ['first', 'last'] + required: ['first', 'last'], }; }); @@ -110,8 +110,8 @@ describe('services validateSchema', () => { assert.fail(true, false, 'test succeeds unexpectedly'); } catch (err: any) { assert.deepEqual(err.errors, [ - '\'first\' should be string', - 'should have required property \'last\'' + "'first' should be string", + "should have required property 'last'", ]); } }); @@ -125,9 +125,9 @@ describe('services validateSchema', () => { assert.fail(true, false, 'test succeeds unexpectedly'); } catch (err: any) { assert.deepEqual(err.errors, [ - '\'in row 1 of 3, first\' should be string', - 'in row 1 of 3, should have required property \'last\'', - 'in row 3 of 3, should have required property \'last\'' + "'in row 1 of 3, first' should be string", + "in row 1 of 3, should have required property 'last'", + "in row 3 of 3, should have required property 'last'", ]); } }); @@ -140,7 +140,7 @@ describe('services validateSchema', () => { } catch (err: any) { assert.deepEqual(err.errors, [ '\'first\' should match format "startWithJo"', - 'should have required property \'last\'' + "should have required property 'last'", ]); } }); @@ -155,9 +155,9 @@ describe('services validateSchema', () => { } catch (err: any) { assert.deepEqual(err.errors, [ '\'in row 1 of 3, first\' should match format "startWithJo"', - 'in row 1 of 3, should have required property \'last\'', + "in row 1 of 3, should have required property 'last'", '\'in row 2 of 3, first\' should match format "startWithJo"', - 'in row 3 of 3, should have required property \'last\'' + "in row 3 of 3, should have required property 'last'", ]); } }); @@ -170,27 +170,27 @@ describe('services validateSchema', () => { ajvAsync.addKeyword('equalsDoe', { async: true, schema: false, - validate: (item: any) => new Promise((resolve, reject) => { - setTimeout(() => { - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - item === 'Doe' - ? resolve(true) - // @ts-ignore - : reject(new Ajv.ValidationError([{ message: 'should be Doe' }])); - }, 50); - }) + validate: (item: any) => + new Promise((resolve, reject) => { + setTimeout(() => { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + item === 'Doe' + ? resolve(true) + : // @ts-ignore + reject(new Ajv.ValidationError([{ message: 'should be Doe' }])); + }, 50); + }), }); ajvAsync.addFormat('3or4chars', { async: true, - validate: (item: any) => new Promise((resolve, _reject) => { - setTimeout(() => { - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - (item.length === 3 || item.length === 4) - ? resolve(true) - : resolve(false); - }, 50); - }) + validate: (item: any) => + new Promise((resolve, _reject) => { + setTimeout(() => { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + item.length === 3 || item.length === 4 ? resolve(true) : resolve(false); + }, 50); + }), }); ajvAsync.addSchema({ @@ -199,14 +199,14 @@ describe('services validateSchema', () => { properties: { first: { type: 'string', - format: '3or4chars' + format: '3or4chars', }, last: { type: 'string', - equalsDoe: true - } + equalsDoe: true, + }, }, - required: ['first', 'last'] + required: ['first', 'last'], }); }); @@ -216,20 +216,23 @@ describe('services validateSchema', () => { properties: { first: { type: 'string', - format: '3or4chars' + format: '3or4chars', }, last: { type: 'string', - equalsDoe: true - } + equalsDoe: true, + }, }, - required: ['first', 'last'] + required: ['first', 'last'], }; }); it('works with string schema id', (next: any) => { // @ts-ignore - validateSchema('asyncSchema', ajvAsync)(hookBefore) + validateSchema( + 'asyncSchema', + ajvAsync + )(hookBefore) // @ts-ignore .then(() => { next(); @@ -242,7 +245,10 @@ describe('services validateSchema', () => { it('works with valid single item', (next: any) => { // @ts-ignore - validateSchema(asyncSchema, ajvAsync)(hookBefore) + validateSchema( + asyncSchema, + ajvAsync + )(hookBefore) // @ts-ignore .then(() => { next(); @@ -255,7 +261,10 @@ describe('services validateSchema', () => { it('works with array of valid items', (next: any) => { // @ts-ignore - validateSchema(asyncSchema, ajvAsync)(hookBeforeArray) + validateSchema( + asyncSchema, + ajvAsync + )(hookBeforeArray) // @ts-ignore .then(() => { next(); @@ -269,7 +278,10 @@ describe('services validateSchema', () => { hookBefore.data = { first: '1' }; // @ts-ignore - validateSchema(asyncSchema, ajvAsync)(hookBefore) + validateSchema( + asyncSchema, + ajvAsync + )(hookBefore) // @ts-ignore .then(() => { assert.fail(true, false, 'test succeeds unexpectedly'); @@ -277,7 +289,7 @@ describe('services validateSchema', () => { .catch((err: any) => { assert.deepEqual(err.errors, [ '\'first\' should match format "3or4chars"', - 'should have required property \'last\'' + "should have required property 'last'", ]); next(); }); @@ -288,15 +300,18 @@ describe('services validateSchema', () => { delete hookBeforeArray.data[2].last; // @ts-ignore - validateSchema(asyncSchema, ajvAsync)(hookBeforeArray) + validateSchema( + asyncSchema, + ajvAsync + )(hookBeforeArray) // @ts-ignore .then(() => { assert.fail(true, false, 'test succeeds unexpectedly'); }) .catch((err: any) => { assert.deepEqual(err.errors, [ - 'in row 3 of 3, should have required property \'last\'', - '\'in row 1 of 3, last\' should be Doe' + "in row 3 of 3, should have required property 'last'", + "'in row 1 of 3, last' should be Doe", ]); next(); }); diff --git a/test/hooks/validate.test.ts b/test/hooks/validate.test.ts index 2550819e..62c1b00c 100755 --- a/test/hooks/validate.test.ts +++ b/test/hooks/validate.test.ts @@ -1,7 +1,6 @@ import { assert } from 'chai'; import { validate } from '../../src'; -import errors from '@feathersjs/errors'; -const { BadRequest } = errors; +import { BadRequest } from '@feathersjs/errors'; let fcnSync: any; let fcnPromise: any; @@ -54,21 +53,22 @@ describe('services validate', () => { // eslint-disable-next-line @typescript-eslint/no-unused-expressions values.email.trim() ? resolve() - // @ts-ignore - : reject(new BadRequest({ email: 'Email is invalid' })); + : // @ts-ignore + reject(new BadRequest({ email: 'Email is invalid' })); }, 100); }); }; - fcnPromiseSanitize = (values: any) => new Promise((resolve, reject) => { - setTimeout(() => { - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - values.email.trim() - ? resolve(Object.assign(values, { email: values.email.trim() })) - // @ts-ignore - : reject(new BadRequest({ email: 'Email is invalid' })); - }, 100); - }); + fcnPromiseSanitize = (values: any) => + new Promise((resolve, reject) => { + setTimeout(() => { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + values.email.trim() + ? resolve(Object.assign(values, { email: values.email.trim() })) + : // @ts-ignore + reject(new BadRequest({ email: 'Email is invalid' })); + }, 100); + }); }); it('test passes on correct data', (next: any) => { @@ -105,6 +105,6 @@ describe('services validate', () => { // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/hooks/when.test.ts b/test/hooks/when.test.ts index be07656d..9b7fc095 100755 --- a/test/hooks/when.test.ts +++ b/test/hooks/when.test.ts @@ -50,12 +50,13 @@ const hookFcnSync = (hook: HookContext) => { return hook; }; -const hookFcnAsync = (hook: HookContext) => new Promise(resolve => { - hookFcnAsyncCalls = +1; - hook.data.first = hook.data.first.toLowerCase(); +const hookFcnAsync = (hook: HookContext) => + new Promise(resolve => { + hookFcnAsyncCalls = +1; + hook.data.first = hook.data.first.toLowerCase(); - resolve(hook); -}); + resolve(hook); + }); const hookFcn = (hook: any) => { hookFcnCalls = +1; @@ -73,8 +74,11 @@ describe('services when - sync predicate, sync hook', () => { }); it('calls sync hook function if truthy non-function', () => { - // @ts-ignore - when('a', hookFcnSync)(hook) + when( + // @ts-ignore + 'a', + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -97,8 +101,11 @@ describe('services when - sync predicate, sync hook', () => { }); it('calls sync hook function if sync predicate truthy', () => { - // @ts-ignore - when(() => 'a', hookFcnSync)(hook) + when( + // @ts-ignore + () => 'a', + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -144,7 +151,6 @@ describe('services when - sync predicate, async hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -173,7 +179,6 @@ describe('services when - sync predicate, async hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); }); @@ -200,7 +205,6 @@ describe('services when - async predicate, sync hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -217,7 +221,6 @@ describe('services when - async predicate, sync hook', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); }); @@ -276,8 +279,11 @@ describe('services when - sync predicate', () => { }); it('does not need to access hook', () => { - // @ts-ignore - when(() => 'a', hookFcnSync)(hook) + when( + // @ts-ignore + () => 'a', + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -287,7 +293,10 @@ describe('services when - sync predicate', () => { }); it('is passed hook as param', () => { - when(predicateSync, hookFcnSync)(hook) + when( + predicateSync, + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(predicateHook, hookBefore); @@ -298,7 +307,10 @@ describe('services when - sync predicate', () => { }); it('a higher order predicate can pass more options', () => { - when(predicateSync2({ z: 'z' }), hookFcnSync)(hook) + when( + predicateSync2({ z: 'z' }), + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(predicateOptions, { z: 'z' }); @@ -337,7 +349,6 @@ describe('services when - async predicate', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -358,7 +369,6 @@ describe('services when - async predicate', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); @@ -378,7 +388,6 @@ describe('services when - async predicate', () => { }); } else { assert.fail(true, false, 'promise unexpectedly not returned'); - } }); }); @@ -393,22 +402,12 @@ describe('services when - runs multiple hooks', () => { }); it('runs successfully', (done: any) => { - when(true, hookFcnSync, hookFcnAsync, hookFcn)(hook) - // @ts-ignore - .then((hook: any) => { - assert.deepEqual(hook, hookAfter); - assert.equal(hookFcnSyncCalls, 1); - assert.equal(hookFcnAsyncCalls, 1); - assert.equal(hookFcnCalls, 1); - assert.deepEqual(hook, hookAfter); - - done(); - }); - }); - - it('runs successfully with the array syntax', (done: any) => { - // @ts-ignore - when(true, [hookFcnSync, hookFcnAsync, hookFcn])(hook) + when( + true, + hookFcnSync, + hookFcnAsync, + hookFcn + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -424,6 +423,6 @@ describe('services when - runs multiple hooks', () => { // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/index.test.ts b/test/index.test.ts index d8224de6..b48b2e1f 100755 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import * as allExported from '../src'; @@ -21,6 +20,7 @@ const members = [ 'fastJoin', 'fgraphql', 'getItems', + 'hookTypes', 'isProvider', 'keep', 'keepInArray', @@ -28,6 +28,7 @@ const members = [ 'keepQueryInArray', 'lowerCase', 'makeCallingParams', + 'methodNames', 'mongoKeys', 'paramsForServer', 'paramsFromClient', @@ -58,14 +59,7 @@ const members = [ ].sort(); describe('services exposed hooks', () => { - it('expected hooks are exposed', () => { - - }); - it('no unexpected hooks', () => { - assert.deepEqual( - Object.keys(allExported).sort(), - [].concat(members).sort() - ); + assert.deepEqual(Object.keys(allExported).sort(), [].concat(members).sort()); }); }); diff --git a/test/utils/calling-params-1.test.ts b/test/utils/calling-params-1.test.ts index c890e36c..a143ad04 100755 --- a/test/utils/calling-params-1.test.ts +++ b/test/utils/calling-params-1.test.ts @@ -1,30 +1,70 @@ - import { assert } from 'chai'; import { callingParamsDefaults, callingParams } from '../../src'; -let context1: any; let context2: any; let context3: any; let context4: any; +let context1: any; +let context2: any; +let context3: any; +let context4: any; describe('util calling-params-1.test.js', () => { describe('has defaults', () => { beforeEach(() => { - context1 = { params: { query: { aaa: 'bbb' }, foo: 'bar', baz: 'faz', user: { name: 'Matt' }, authenticated: true, provider: 'socketio' } }; - context2 = { params: { query: { aaa: 'bbb' }, foo: 'bar', baz: 'faz', user: { name: 'Matt' }, authenticated: true } }; - context3 = { params: { query: { aaa: 'bbb' }, foo: 'bar', baz: 'faz', user: { name: 'Matt' }, authenticated: true, provider: undefined } }; - context4 = { params: { query: { aaa: 'bbb' }, foo: 'bar', baz: 'faz', user: { name: 'Matt' }, authenticated: true, provider: null } }; + context1 = { + params: { + query: { aaa: 'bbb' }, + foo: 'bar', + baz: 'faz', + user: { name: 'Matt' }, + authenticated: true, + provider: 'socketio', + }, + }; + context2 = { + params: { + query: { aaa: 'bbb' }, + foo: 'bar', + baz: 'faz', + user: { name: 'Matt' }, + authenticated: true, + }, + }; + context3 = { + params: { + query: { aaa: 'bbb' }, + foo: 'bar', + baz: 'faz', + user: { name: 'Matt' }, + authenticated: true, + provider: undefined, + }, + }; + context4 = { + params: { + query: { aaa: 'bbb' }, + foo: 'bar', + baz: 'faz', + user: { name: 'Matt' }, + authenticated: true, + provider: null, + }, + }; }); it('standard defaults', () => { const res = callingParams()(context1); + // @ts-ignore assert.deepEqual(res, { user: { name: 'Matt' }, authenticated: true, provider: 'socketio' }); }); it('ignores missing', () => { const res = callingParams()(context2); + // @ts-ignore assert.deepEqual(res, { user: { name: 'Matt' }, authenticated: true }); }); it('ignores undefined', () => { const res = callingParams()(context3); + // @ts-ignore assert.deepEqual(res, { user: { name: 'Matt' }, authenticated: true }); }); @@ -37,19 +77,30 @@ describe('util calling-params-1.test.js', () => { describe('can reset defaults', () => { beforeEach(() => { - context1 = { params: { query: { aaa: 'bbb' }, foo: 'bar', baz: 'faz', user: { name: 'Matt' }, authenticated: true, provider: 'socketio' } }; + context1 = { + params: { + query: { aaa: 'bbb' }, + foo: 'bar', + baz: 'faz', + user: { name: 'Matt' }, + authenticated: true, + provider: 'socketio', + }, + }; callingParamsDefaults(['provider', 'authenticated', 'user'], {}); }); it('check reset to standard defaults', () => { const res = callingParams()(context1); + // @ts-ignore assert.deepEqual(res, { user: { name: 'Matt' }, authenticated: true, provider: 'socketio' }); }); it('change default propNames', () => { callingParamsDefaults(['foo', 'user.name', 'query.aaa']); const res = callingParams()(context1); + // @ts-ignore assert.deepEqual(res, { foo: 'bar', user: { name: 'Matt' }, query: { aaa: 'bbb' } }); }); @@ -57,20 +108,40 @@ describe('util calling-params-1.test.js', () => { // @ts-ignore callingParamsDefaults(null, { bar: 'foo' }); const res = callingParams()(context1); - assert.deepEqual(res, { user: { name: 'Matt' }, authenticated: true, provider: 'socketio', bar: 'foo' }); + assert.deepEqual(res, { + // @ts-ignore + user: { name: 'Matt' }, + authenticated: true, + provider: 'socketio', + bar: 'foo', + }); }); it('change both defaults', () => { callingParamsDefaults(['foo', 'user.name', 'query.aaa'], { bar: 'foo', qqq: 'rrr' }); const res = callingParams()(context1); - assert.deepEqual(res, { foo: 'bar', user: { name: 'Matt' }, query: { aaa: 'bbb' }, bar: 'foo', qqq: 'rrr' }); + assert.deepEqual(res, { + // @ts-ignore + foo: 'bar', + user: { name: 'Matt' }, + query: { aaa: 'bbb' }, + bar: 'foo', + qqq: 'rrr', + }); }); }); describe('can call', () => { beforeEach(() => { context1 = { - params: { query: { aa: 'a1', bb: 'b1' }, foo: 'bar', baz: 'faz', user: { name: 'Matt' }, authenticated: true, provider: 'socketio' } + params: { + query: { aa: 'a1', bb: 'b1' }, + foo: 'bar', + baz: 'faz', + user: { name: 'Matt' }, + authenticated: true, + provider: 'socketio', + }, }; callingParamsDefaults(['provider', 'authenticated', 'user'], {}); @@ -79,63 +150,84 @@ describe('util calling-params-1.test.js', () => { it('default call made by common hooks', () => { const res = callingParams()(context1); assert.deepEqual(res, { - authenticated: true, provider: 'socketio', user: { name: 'Matt' } + // @ts-ignore + authenticated: true, + provider: 'socketio', + user: { name: 'Matt' }, }); }); it('with query', () => { const res = callingParams({ - query: { id: 1 } + query: { id: 1 }, })(context1); assert.deepEqual(res, { - authenticated: true, provider: 'socketio', user: { name: 'Matt' }, query: { id: 1 } + // @ts-ignore + authenticated: true, + provider: 'socketio', + user: { name: 'Matt' }, + query: { id: 1 }, }); }); it('with propNames', () => { const res = callingParams({ - propNames: ['foo', 'baz', 'query.aa', 'query.cc'] + propNames: ['foo', 'baz', 'query.aa', 'query.cc'], })(context1); assert.deepEqual(res, { - authenticated: true, provider: 'socketio', user: { name: 'Matt' }, foo: 'bar', baz: 'faz', query: { aa: 'a1' } + // @ts-ignore + authenticated: true, + provider: 'socketio', + user: { name: 'Matt' }, + foo: 'bar', + baz: 'faz', + query: { aa: 'a1' }, }); }); it('disable 1 hook', () => { const res = callingParams({ - hooksToDisable: ['populate'] + hooksToDisable: ['populate'], })(context1); assert.deepEqual(res, { - authenticated: true, provider: 'socketio', user: { name: 'Matt' }, _populate: 'skip' + // @ts-ignore + authenticated: true, + provider: 'socketio', + user: { name: 'Matt' }, + _populate: 'skip', }); }); it('disable multiple hooks', () => { const res = callingParams({ - hooksToDisable: ['populate', 'fastJoin', 'softDelete', 'stashBefore'] + hooksToDisable: ['populate', 'fastJoin', 'softDelete', 'stashBefore'], })(context1); assert.deepEqual(res, { + // @ts-ignore authenticated: true, provider: 'socketio', user: { name: 'Matt' }, _populate: 'skip', disableStashBefore: true, - query: { $disableSoftDelete: true } + query: { $disableSoftDelete: true }, }); }); it('ignore defaults', () => { let res = callingParams({ - ignoreDefaults: true + ignoreDefaults: true, })(context1); assert.deepEqual(res, {}); res = callingParams({ propNames: ['foo', 'baz', 'query.aa', 'query.cc'], - ignoreDefaults: true + ignoreDefaults: true, })(context1); assert.deepEqual(res, { - foo: 'bar', baz: 'faz', query: { aa: 'a1' } + // @ts-ignore + foo: 'bar', + baz: 'faz', + query: { aa: 'a1' }, }); }); @@ -143,9 +235,10 @@ describe('util calling-params-1.test.js', () => { const res = callingParams({ query: { id: 1 }, propNames: ['foo', 'baz', 'query.aa', 'query.cc'], - hooksToDisable: ['populate', 'fastJoin', 'softDelete', 'stashBefore'] + hooksToDisable: ['populate', 'fastJoin', 'softDelete', 'stashBefore'], })(context1); assert.deepEqual(res, { + // @ts-ignore disableStashBefore: true, query: { id: 1, aa: 'a1', $disableSoftDelete: true }, foo: 'bar', @@ -153,7 +246,7 @@ describe('util calling-params-1.test.js', () => { _populate: 'skip', user: { name: 'Matt' }, authenticated: true, - provider: 'socketio' + provider: 'socketio', }); }); }); diff --git a/test/utils/calling-params-2.test.ts b/test/utils/calling-params-2.test.ts index eb14e829..11586a49 100755 --- a/test/utils/calling-params-2.test.ts +++ b/test/utils/calling-params-2.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { makeCallingParams } from '../../src'; @@ -6,48 +5,68 @@ let context: any; describe('util calling-params-2.test.js', () => { beforeEach(() => { - context = { query: { aaa: 'bbb' }, params: { foo: 'bar', baz: 'faz', user: { name: 'Matt' }, authenticated: true, provider: 'socketio' } }; + context = { + query: { aaa: 'bbb' }, + params: { + foo: 'bar', + baz: 'faz', + user: { name: 'Matt' }, + authenticated: true, + provider: 'socketio', + }, + }; }); it('retains default context', () => { - const res = makeCallingParams(context); - assert.deepEqual(res, { _populate: 'skip', user: { name: 'Matt' }, authenticated: true, provider: 'socketio' }); + const res: any = makeCallingParams(context); + assert.deepEqual(res, { + _populate: 'skip', + user: { name: 'Matt' }, + authenticated: true, + provider: 'socketio', + }); }); it('sets query', () => { - const res = makeCallingParams(context, { a: 1 }); - assert.deepEqual(res, { query: { a: 1 }, _populate: 'skip', user: { name: 'Matt' }, authenticated: true, provider: 'socketio' }); + const res: any = makeCallingParams(context, { a: 1 }); + assert.deepEqual(res, { + query: { a: 1 }, + _populate: 'skip', + user: { name: 'Matt' }, + authenticated: true, + provider: 'socketio', + }); }); it('sets include string', () => { - const res = makeCallingParams(context, null, 'foo'); + const res: any = makeCallingParams(context, null, 'foo'); assert.deepEqual(res, { foo: 'bar', _populate: 'skip' }); }); it('sets include array', () => { - const res = makeCallingParams(context, null, ['foo', 'baz']); + const res: any = makeCallingParams(context, null, ['foo', 'baz']); assert.deepEqual(res, { foo: 'bar', baz: 'faz', _populate: 'skip' }); }); it('sets include skip missing names', () => { - const res = makeCallingParams(context, null, ['foo', 'baz', 'x']); + const res: any = makeCallingParams(context, null, ['foo', 'baz', 'x']); assert.deepEqual(res, { foo: 'bar', baz: 'faz', _populate: 'skip' }); }); it('injects', () => { // @ts-ignore - const res = makeCallingParams(context, null, null, { aa: 2 }); + const res: any = makeCallingParams(context, null, null, { aa: 2 }); assert.deepEqual(res, { aa: 2, _populate: 'skip' }); }); it('injects overwrites _populate', () => { // @ts-ignore - const res = makeCallingParams(context, null, null, { _populate: false }); + const res: any = makeCallingParams(context, null, null, { _populate: false }); assert.deepEqual(res, { _populate: false }); }); it('all work together', () => { - const res = makeCallingParams(context, { a: 1 }, ['foo', 'baz', 'x'], { aa: 2 }); + const res: any = makeCallingParams(context, { a: 1 }, ['foo', 'baz', 'x'], { aa: 2 }); assert.deepEqual(res, { query: { a: 1 }, foo: 'bar', baz: 'faz', aa: 2, _populate: 'skip' }); }); }); diff --git a/test/utils/check-context.test.ts b/test/utils/check-context.test.ts index 98e3c176..b9cce324 100755 --- a/test/utils/check-context.test.ts +++ b/test/utils/check-context.test.ts @@ -1,9 +1,6 @@ - import { assert } from 'chai'; -import { - checkContext -} from '../../src'; +import { checkContext } from '../../src'; describe('util checkContext', () => { var hook: any; // eslint-disable-line no-var @@ -23,7 +20,9 @@ describe('util checkContext', () => { it('handles unexpected type', () => { hook.type = 'after'; - assert.throws(() => { checkContext(hook, 'before'); }); + assert.throws(() => { + checkContext(hook, 'before'); + }); }); it('handles undefined type', () => { @@ -43,7 +42,9 @@ describe('util checkContext', () => { it('handles unexpected type as array', () => { hook.type = 'error'; - assert.throws(() => { checkContext(hook, ['before', 'after']); }); + assert.throws(() => { + checkContext(hook, ['before', 'after']); + }); }); it('handles expected method as string', () => { @@ -53,7 +54,9 @@ describe('util checkContext', () => { it('handles unexpected method as string', () => { hook.method = 'patch'; - assert.throws(() => { checkContext(hook, null, 'create'); }); + assert.throws(() => { + checkContext(hook, null, 'create'); + }); }); it('handles expected method as array', () => { @@ -64,8 +67,12 @@ describe('util checkContext', () => { it('handles unexpected method as array', () => { hook.method = 'patch'; - assert.throws(() => { checkContext(hook, null, ['create']); }); - assert.throws(() => { checkContext(hook, null, ['create', 'update', 'remove']); }); + assert.throws(() => { + checkContext(hook, null, ['create']); + }); + assert.throws(() => { + checkContext(hook, null, ['create', 'update', 'remove']); + }); }); it('handles undefined method', () => { diff --git a/test/utils/combine.test.ts b/test/utils/combine.test.ts index cd28d9da..6ee7e69f 100755 --- a/test/utils/combine.test.ts +++ b/test/utils/combine.test.ts @@ -1,6 +1,5 @@ - import { assert } from 'chai'; -import feathers from '@feathersjs/feathers'; +import { feathers } from '@feathersjs/feathers'; import memory from 'feathers-memory'; import { combine } from '../../src'; @@ -11,16 +10,16 @@ const storeInit = { 2: { name: 'Jack Doe', key: 'a', id: 2, deleted: true }, 3: { name: 'Rick Doe', key: 'b', id: 3 }, 4: { name: 'Dick Doe', key: 'b', id: 4 }, - 5: { name: 'Dick Doe', key: 'b', id: 5, deleted: true } + 5: { name: 'Dick Doe', key: 'b', id: 5, deleted: true }, }; let store; -function services (this: any) { +function services(this: any) { const app = this; app.configure(user); } -function user (this: any) { +function user(this: any) { const app = this; let service: any; let hookId: any; @@ -28,16 +27,21 @@ function user (this: any) { let hookParamsQuery: any; store = clone(storeInit); - app.use('/users', memory({ - store, - startId - })); + app.use( + '/users', + memory({ + store, + startId, + }) + ); app.service('users').hooks({ before: { all: [ function (this: any, hook: any) { - if (hook.app !== app) { throw new Error('App wrong 0.'); } + if (hook.app !== app) { + throw new Error('App wrong 0.'); + } service = this; hook.data = { a: 'a' }; @@ -50,51 +54,77 @@ function user (this: any) { }, combine( function (this: any, hook: any) { - if (hook.app !== app) { throw new Error('App wrong 1.'); } - if (service !== this) { throw new Error('Service wrong 1.'); } + if (hook.app !== app) { + throw new Error('App wrong 1.'); + } + if (service !== this) { + throw new Error('Service wrong 1.'); + } hook.params.trace = ['sync1']; return hook; }, function (this: any, hook: any) { - if (hook.app !== app) { throw new Error('App wrong 2.'); } - if (service !== this) { throw new Error('Service wrong 2.'); } + if (hook.app !== app) { + throw new Error('App wrong 2.'); + } + if (service !== this) { + throw new Error('Service wrong 2.'); + } - if (hook.params.query.key === 'b') { throw new Error('Requested throw.'); } + if (hook.params.query.key === 'b') { + throw new Error('Requested throw.'); + } hook.params.trace.push('promise1'); return Promise.resolve(hook); }, function (this: any, hook: any) { - if (hook.app !== app) { throw new Error('App wrong 3.'); } - if (service !== this) { throw new Error('Service wrong 3.'); } + if (hook.app !== app) { + throw new Error('App wrong 3.'); + } + if (service !== this) { + throw new Error('Service wrong 3.'); + } hook.params.trace.push('sync2'); }, function (this: any, hook: any) { - if (hook.app !== app) { throw new Error('App wrong 4.'); } - if (service !== this) { throw new Error('Service wrong 4.'); } + if (hook.app !== app) { + throw new Error('App wrong 4.'); + } + if (service !== this) { + throw new Error('Service wrong 4.'); + } hook.params.trace.push('cb1'); return hook; }, function (this: any, hook: any) { - if (hook.app !== app) { throw new Error('App wrong 5.'); } - if (service !== this) { throw new Error('Service wrong 5.'); } + if (hook.app !== app) { + throw new Error('App wrong 5.'); + } + if (service !== this) { + throw new Error('Service wrong 5.'); + } hook.params.trace.push('sync3'); return hook; } ), function (this: any, hook: any) { - if (hook.app !== app) { throw new Error('App wrong 9.'); } - if (service !== this) { throw new Error('Service wrong 9.'); } + if (hook.app !== app) { + throw new Error('App wrong 9.'); + } + if (service !== this) { + throw new Error('Service wrong 9.'); + } assert.equal(hook.id, hookId); assert.deepEqual(hook.data, hookData); assert.deepEqual(hook.params.query, hookParamsQuery); assert.deepEqual(hook.params.trace, ['sync1', 'promise1', 'sync2', 'cb1', 'sync3']); - } - ] - } + }, + ], + }, }); } @@ -103,29 +133,24 @@ describe('util combine', () => { let user: any; beforeEach(() => { - app = feathers() - .configure(services); + app = feathers().configure(services); user = app.service('users'); }); - it('runs successful hooks', (done: any) => { - user.find({ query: { key: 'a' } }) - .then((_data: any) => { - done(); - }); + it('runs successful hooks', async () => { + await user.find({ query: { key: 'a' } }); }); - it('throws on unsuccessful hook', (done: any) => { - user.find({ query: { key: 'b' } }) - .catch(() => { - done(); - }) + it('throws on unsuccessful hook', async () => { + await user + .find({ query: { key: 'b' } }) .then((_data: any) => { assert.fail(true, false); - }); + }) + .catch(() => {}); }); }); -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/utils/every.test.ts b/test/utils/every.test.ts index 49868fc7..f42bffe8 100755 --- a/test/utils/every.test.ts +++ b/test/utils/every.test.ts @@ -1,5 +1,5 @@ import { assert } from 'chai'; -import feathers from '@feathersjs/feathers'; +import { feathers } from '@feathersjs/feathers'; import memory from 'feathers-memory'; import { iff, every, isNot } from '../../src'; @@ -7,8 +7,7 @@ describe('util every', () => { let app: any; beforeEach(() => { - app = feathers() - .use('/users', memory()); + app = feathers().use('/users', memory()); }); describe('when all hooks are truthy', () => { @@ -25,16 +24,19 @@ describe('util every', () => { (_hook: any) => Promise.resolve(true) ), (hook: any) => Promise.resolve(hook) - ) - ] - } + ), + ], + }, }); }); it('returns true', () => { - return app.service('users').find().then((result: any) => { - assert.deepEqual(result, []); - }); + return app + .service('users') + .find() + .then((result: any) => { + assert.deepEqual(result, []); + }); }); }); @@ -52,16 +54,19 @@ describe('util every', () => { (_hook: any) => true ), (hook: any) => Promise.resolve(hook) - ) - ] - } + ), + ], + }, }); }); it('rejects with the error', () => { - return app.service('users').find().catch((error: any) => { - assert.equal(error.message, 'Hook 2 errored'); - }); + return app + .service('users') + .find() + .catch((error: any) => { + assert.equal(error.message, 'Hook 2 errored'); + }); }); }); @@ -77,16 +82,19 @@ describe('util every', () => { (_hook: any) => true ), (hook: any) => Promise.resolve(hook) - ) - ] - } + ), + ], + }, }); }); it('rejects with the error', () => { - return app.service('users').find().catch((error: any) => { - assert.equal(error.message, 'Hook 2 errored'); - }); + return app + .service('users') + .find() + .catch((error: any) => { + assert.equal(error.message, 'Hook 2 errored'); + }); }); }); @@ -110,16 +118,19 @@ describe('util every', () => { ) ), () => Promise.reject(new Error('A hook returned false')) - ) - ] - } + ), + ], + }, }); }); it('returns false', () => { - return app.service('users').find().catch((error: any) => { - assert.equal(error.message, 'A hook returned false'); - }); + return app + .service('users') + .find() + .catch((error: any) => { + assert.equal(error.message, 'A hook returned false'); + }); }); }); }); diff --git a/test/utils/is-not.test.ts b/test/utils/is-not.test.ts index 1308d783..ebe9e19c 100755 --- a/test/utils/is-not.test.ts +++ b/test/utils/is-not.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { iff, isNot, isProvider } from '../../src'; import { isPromise } from '../../src/common'; @@ -15,10 +14,13 @@ const predicateSync = (value: any) => () => { return value; }; -const predicateAsync = (value: T) => () => new Promise(resolve => { - predicateCalls = +1; - return resolve(value); -}); +const predicateAsync = + (value: T) => + () => + new Promise(resolve => { + predicateCalls = +1; + return resolve(value); + }); const hookFcnSync = (hook: any) => { hookFcnSyncCalls = +1; @@ -34,8 +36,10 @@ describe('util isNot - predicate', () => { }); it('expects a function param', () => { - // @ts-expect-error - assert.throws(() => { isNot('not a function'); }); + assert.throws(() => { + // @ts-ignore + isNot('not a function'); + }); }); it('negates a sync function 1', () => { @@ -87,17 +91,26 @@ describe('util isNot - predicate', () => { describe('services isNot - works with iff and isProvider', () => { beforeEach(() => { hookBefore = { - type: 'before', method: 'create', data: { first: 'John' }, params: { provider: 'rest' } + type: 'before', + method: 'create', + data: { first: 'John' }, + params: { provider: 'rest' }, }; hookAfter = { - type: 'before', method: 'create', data: { first: 'john' }, params: { provider: 'rest' } + type: 'before', + method: 'create', + data: { first: 'john' }, + params: { provider: 'rest' }, }; hook = clone(hookBefore); hookFcnSyncCalls = 0; }); it('calls sync hook function if truthy', () => { - iff(isNot(isProvider('server')), hookFcnSync)(hook) + iff( + isNot(isProvider('server')), + hookFcnSync + )(hook) // @ts-ignore .then((hook: any) => { assert.deepEqual(hook, hookAfter); @@ -121,6 +134,6 @@ describe('services isNot - works with iff and isProvider', () => { // Helpers -function clone (obj: any) { +function clone(obj: any) { return JSON.parse(JSON.stringify(obj)); } diff --git a/test/utils/params-for-server.test.ts b/test/utils/params-for-server.test.ts index 06b0c39d..0fe20d32 100755 --- a/test/utils/params-for-server.test.ts +++ b/test/utils/params-for-server.test.ts @@ -1,9 +1,6 @@ - import { assert } from 'chai'; -import { - paramsForServer -} from '../../src'; +import { paramsForServer } from '../../src'; describe('util paramsToServer', () => { it('handles empty params', () => { @@ -17,22 +14,22 @@ describe('util paramsToServer', () => { }); it('copies all params without query', () => { - const res = paramsForServer({ a: 'a', b: 1 }); + const res: any = paramsForServer({ a: 'a', b: 1 } as any); assert.deepEqual(res, { query: { $client: { a: 'a', b: 1 } } }); }); it('copies all params with query', () => { - const res = paramsForServer({ query: { x: 'x', y: 1 }, a: 'a', b: 1 }); + const res: any = paramsForServer({ query: { x: 'x', y: 1 }, a: 'a', b: 1 } as any); assert.deepEqual(res, { query: { x: 'x', y: 1, $client: { a: 'a', b: 1 } } }); }); it('copies whitelist props', () => { - const res = paramsForServer({ a: 'a', b: 1 }, 'a', 'b'); + const res: any = paramsForServer({ a: 'a', b: 1 } as any, 'a', 'b'); assert.deepEqual(res, { query: { $client: { a: 'a', b: 1 } } }); }); it('ignores non whitelist props', () => { - const res = paramsForServer({ a: 'a', b: 1 }, 'b'); + const res: any = paramsForServer({ a: 'a', b: 1 } as any, 'b'); assert.deepEqual(res, { query: { $client: { b: 1 } } }); }); }); diff --git a/test/utils/run-hook.test.ts b/test/utils/run-hook.test.ts index 6eddc1c1..52b4eb6b 100755 --- a/test/utils/run-hook.test.ts +++ b/test/utils/run-hook.test.ts @@ -1,4 +1,3 @@ - import { assert } from 'chai'; import { fastJoin, keep, runHook } from '../../src'; @@ -29,9 +28,18 @@ describe('util runHooks', () => { .then(runHooks1(testHook)) .then(result => { assert.deepEqual(result, data, 'test result'); - assert.deepEqual(hook, { - app, params, service, _called: 'called', result: data, type: 'after' - }, 'test hook'); + assert.deepEqual( + hook, + { + app, + params, + service, + _called: 'called', + result: data, + type: 'after', + }, + 'test hook' + ); }); }); @@ -56,7 +64,9 @@ describe('util runHooks', () => { }); it('test using keep hook', () => { - const data: any[] = [{ name: 'John', job: 'dev', address: { city: 'Montreal', postal: 'H4T 2A1' } }]; + const data: any[] = [ + { name: 'John', job: 'dev', address: { city: 'Montreal', postal: 'H4T 2A1' } }, + ]; return Promise.resolve(data) .then(runHooks2(keep('name', 'address.city'))) @@ -72,23 +82,21 @@ describe('util runHooks', () => { { _id: 103, amount: 110, patientId: 1 }, { _id: 104, amount: 115, patientId: 2 }, { _id: 105, amount: 120, patientId: 3 }, - { _id: 106, amount: 125, patientId: 3 } + { _id: 106, amount: 125, patientId: 3 }, ]; const patientsRecords = [ { _id: 1, name: 'John' }, { _id: 2, name: 'Marshall' }, - { _id: 3, name: 'David' } + { _id: 3, name: 'David' }, ]; const paymentResolvers = { joins: { patient: () => (payment: any) => { - payment.patient = ( - patientsRecords.filter(patient => patient._id === payment.patientId) - )[0]; - } - } + payment.patient = patientsRecords.filter(patient => patient._id === payment.patientId)[0]; + }, + }, }; const expected = [ @@ -97,13 +105,16 @@ describe('util runHooks', () => { { _id: 103, amount: 110, patientId: 1, patient: { _id: 1, name: 'John' } }, { _id: 104, amount: 115, patientId: 2, patient: { _id: 2, name: 'Marshall' } }, { _id: 105, amount: 120, patientId: 3, patient: { _id: 3, name: 'David' } }, - { _id: 106, amount: 125, patientId: 3, patient: { _id: 3, name: 'David' } }]; + { _id: 106, amount: 125, patientId: 3, patient: { _id: 3, name: 'David' } }, + ]; - return Promise.resolve(paymentsRecords) - // @ts-ignore - .then(runHooks2(fastJoin(paymentResolvers))) - .then(result => { - assert.deepEqual(result, expected); - }); + return ( + Promise.resolve(paymentsRecords) + // @ts-ignore + .then(runHooks2(fastJoin(paymentResolvers))) + .then(result => { + assert.deepEqual(result, expected); + }) + ); }); }); diff --git a/test/utils/some.test.ts b/test/utils/some.test.ts index 144bcbb7..e176f2c5 100755 --- a/test/utils/some.test.ts +++ b/test/utils/some.test.ts @@ -1,6 +1,5 @@ - import { assert } from 'chai'; -import feathers from '@feathersjs/feathers'; +import { feathers } from '@feathersjs/feathers'; import memory from 'feathers-memory'; import { iff, some, isNot } from '../../src'; @@ -8,8 +7,7 @@ describe('util some', () => { let app: any; beforeEach(() => { - app = feathers() - .use('/users', memory()); + app = feathers().use('/users', memory()); }); describe('when at least 1 hook is truthy', () => { @@ -28,16 +26,19 @@ describe('util some', () => { (_hook: any) => {} ), (hook: any) => Promise.resolve(hook) - ) - ] - } + ), + ], + }, }); }); it('returns true', () => { - return app.service('users').find().then((result: any) => { - assert.deepEqual(result, []); - }); + return app + .service('users') + .find() + .then((result: any) => { + assert.deepEqual(result, []); + }); }); }); @@ -55,16 +56,19 @@ describe('util some', () => { (_hook: any) => true ), (hook: any) => Promise.resolve(hook) - ) - ] - } + ), + ], + }, }); }); it('rejects with the error', () => { - return app.service('users').find().catch((error: any) => { - assert.equal(error.message, 'Hook 2 errored'); - }); + return app + .service('users') + .find() + .catch((error: any) => { + assert.equal(error.message, 'Hook 2 errored'); + }); }); }); @@ -80,16 +84,19 @@ describe('util some', () => { (_hook: any) => true ), (hook: any) => Promise.resolve(hook) - ) - ] - } + ), + ], + }, }); }); it('rejects with the error', () => { - return app.service('users').find().catch((error: any) => { - assert.equal(error.message, 'Hook 2 errored'); - }); + return app + .service('users') + .find() + .catch((error: any) => { + assert.equal(error.message, 'Hook 2 errored'); + }); }); }); @@ -111,16 +118,19 @@ describe('util some', () => { ) ), () => Promise.reject(new Error('All hooks returned false')) - ) - ] - } + ), + ], + }, }); }); it('returns false', () => { - return app.service('users').find().catch((error: any) => { - assert.equal(error.message, 'All hooks returned false'); - }); + return app + .service('users') + .find() + .catch((error: any) => { + assert.equal(error.message, 'All hooks returned false'); + }); }); }); }); From 8990a3da929cdefdb7a2b42e367df0d0ca5b96c7 Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Tue, 27 Sep 2022 21:30:22 +0200 Subject: [PATCH 2/9] chore: add premajor script --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f778b0d6..2f0b94eb 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "docs:build": "vitepress build docs", "prepublishOnly": "npm run compile", "publish": "git push origin --tags && npm run changelog && git push origin", - "release:prerelease": "npm version prerelease && npm publish --tag pre", + "release:prerelease": "npm version prerelease --preid pre && npm publish --tag pre", + "release:premajor": "npm version premajor --preid pre && npm publish --tag pre", "release:patch": "npm version patch && npm publish", "release:minor": "npm version minor && npm publish", "release:major": "npm version major && npm publish", From 26c9017afc0371ea8450fd868a47a2382cb9626c Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Tue, 27 Sep 2022 21:30:28 +0200 Subject: [PATCH 3/9] 7.0.0-pre.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ddbc2e2f..5d39eb5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "feathers-hooks-common", - "version": "6.1.5", + "version": "7.0.0-pre.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "feathers-hooks-common", - "version": "6.1.5", + "version": "7.0.0-pre.0", "license": "MIT", "dependencies": { "@feathers-plus/batch-loader": "^0.3.6", diff --git a/package.json b/package.json index 2f0b94eb..2105fc69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "feathers-hooks-common", - "version": "6.1.5", + "version": "7.0.0-pre.0", "description": "Useful hooks for use with Feathersjs services.", "main": "./dist/index.js", "module": "./dist/index.mjs", From c591d9d497709e9ef489acc5c259e860f9463a99 Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Tue, 27 Sep 2022 21:31:38 +0200 Subject: [PATCH 4/9] Updating changelog --- CHANGELOG.md | 49 +++++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01d7018e..1ed17007 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,23 @@ ## [Unreleased](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/HEAD) -[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v6.1.5...HEAD) +[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v7.0.0-pre.0...HEAD) **Merged pull requests:** -- fix: add js extension to lodash imports [\#684](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/684) ([fratzinger](https://github.com/fratzinger)) -- Update hooks documentation - setField [\#683](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/683) ([arnoldtkl](https://github.com/arnoldtkl)) +- docs: add version to navbar [\#690](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/690) ([fratzinger](https://github.com/fratzinger)) +- docs: add socialLinks [\#689](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/689) ([fratzinger](https://github.com/fratzinger)) +- docs: move to vitepress [\#688](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/688) ([fratzinger](https://github.com/fratzinger)) +- chore\(dependencies\): Update all dependencies [\#686](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/686) ([daffl](https://github.com/daffl)) +- chore\(dependencies\): Update all dependencies [\#685](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/685) ([daffl](https://github.com/daffl)) + +## [v7.0.0-pre.0](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v7.0.0-pre.0) (2022-09-27) + +[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v6.1.5...v7.0.0-pre.0) + +**Closed issues:** + +- Compatibility with future v5 \(aka Dove\) [\#687](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/687) ## [v6.1.5](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v6.1.5) (2022-07-31) @@ -17,6 +28,11 @@ - Wrong lodash imports [\#674](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/674) +**Merged pull requests:** + +- fix: add js extension to lodash imports [\#684](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/684) ([fratzinger](https://github.com/fratzinger)) +- Update hooks documentation - setField [\#683](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/683) ([arnoldtkl](https://github.com/arnoldtkl)) + ## [v6.1.4](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v6.1.4) (2022-07-24) [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v6.1.3...v6.1.4) @@ -213,10 +229,6 @@ [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v5.0.0...v5.0.1) -**Implemented enhancements:** - -- Doument fgraphql [\#466](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/466) - **Closed issues:** - TypeScript definition for fastJoin don't reflect examples for recursive resolvers [\#521](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/521) @@ -383,7 +395,6 @@ - update names and fix the options property [\#481](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/481) ([NickBolles](https://github.com/NickBolles)) - add typings for dialablePhoneNumber hook, add libphonenumber-js as a dependency [\#477](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/477) ([j2L4e](https://github.com/j2L4e)) - Add initial types for fgraphql [\#469](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/469) ([NickBolles](https://github.com/NickBolles)) -- remove dtslint workaround in favor of npx [\#463](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/463) ([j2L4e](https://github.com/j2L4e)) ## [v4.19.5](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v4.19.5) (2018-12-13) @@ -392,7 +403,6 @@ **Closed issues:** - TS for keepQueryInArray [\#468](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/468) -- dtslint-build folder in installed package? [\#461](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/461) ## [v4.19.4](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v4.19.4) (2018-11-29) @@ -435,15 +445,6 @@ [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v4.17.14...v4.18.0) -**Implemented enhancements:** - -- Document KeepQueryInarray [\#465](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/465) - -**Closed issues:** - -- Difference between serialize and alterItems [\#464](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/464) -- softDelete2 returns error on delete [\#462](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/462) - ## [v4.17.14](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v4.17.14) (2018-11-01) [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v4.17.13...v4.17.14) @@ -452,26 +453,14 @@ [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v4.17.12...v4.17.13) -**Merged pull requests:** - -- Added support for dePopulate to fgraphql hook. [\#459](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/459) ([eddyystop](https://github.com/eddyystop)) - ## [v4.17.12](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v4.17.12) (2018-10-29) [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v4.17.11...v4.17.12) -**Merged pull requests:** - -- Added custom dePopulate func to dePopulate hook.' [\#458](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/458) ([eddyystop](https://github.com/eddyystop)) - ## [v4.17.11](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v4.17.11) (2018-10-26) [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v4.17.10...v4.17.11) -**Merged pull requests:** - -- Added fgraphql hook. [\#457](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/457) ([eddyystop](https://github.com/eddyystop)) - ## [v4.17.10](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v4.17.10) (2018-09-26) [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v4.17.9...v4.17.10) From b268d2a5d67d2f3ce74e248a1d70c3ddb8d9c07c Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Wed, 28 Sep 2022 13:28:21 +0200 Subject: [PATCH 5/9] fix: use generic for iff predicate --- src/hooks/iff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/iff.ts b/src/hooks/iff.ts index e7523706..8012d633 100755 --- a/src/hooks/iff.ts +++ b/src/hooks/iff.ts @@ -11,7 +11,7 @@ export interface IffHook extends HookFuncti * @see https://hooks-common.feathersjs.com/hooks.html#iff */ export function iff( - predicate: boolean | PredicateFn, + predicate: boolean | PredicateFn, ...hooks: HookFunction[] ): IffHook { if (hooks.length && Array.isArray(hooks[0])) { From 65fbd0e2bebfb9881e37ea499ad0abf7821ead96 Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Wed, 28 Sep 2022 13:28:50 +0200 Subject: [PATCH 6/9] 7.0.0-pre.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5d39eb5b..9c999c75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "feathers-hooks-common", - "version": "7.0.0-pre.0", + "version": "7.0.0-pre.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "feathers-hooks-common", - "version": "7.0.0-pre.0", + "version": "7.0.0-pre.1", "license": "MIT", "dependencies": { "@feathers-plus/batch-loader": "^0.3.6", diff --git a/package.json b/package.json index 2105fc69..491c89b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "feathers-hooks-common", - "version": "7.0.0-pre.0", + "version": "7.0.0-pre.1", "description": "Useful hooks for use with Feathersjs services.", "main": "./dist/index.js", "module": "./dist/index.mjs", From c25b750612dbb05463e72bdb650d81a663df91d0 Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Wed, 28 Sep 2022 13:29:50 +0200 Subject: [PATCH 7/9] Updating changelog --- CHANGELOG.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ed17007..9f9c5e0c 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## [Unreleased](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/HEAD) -[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v7.0.0-pre.0...HEAD) +[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v7.0.0-pre.1...HEAD) **Merged pull requests:** @@ -12,6 +12,15 @@ - chore\(dependencies\): Update all dependencies [\#686](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/686) ([daffl](https://github.com/daffl)) - chore\(dependencies\): Update all dependencies [\#685](https://github.com/feathersjs-ecosystem/feathers-hooks-common/pull/685) ([daffl](https://github.com/daffl)) +## [v7.0.0-pre.1](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v7.0.0-pre.1) (2022-09-28) + +[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v7.0.0-pre.0...v7.0.0-pre.1) + +**Closed issues:** + +- Types for populate don't account for the function param [\#629](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/629) +- Babel compile error [\#582](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/582) + ## [v7.0.0-pre.0](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v7.0.0-pre.0) (2022-09-27) [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v6.1.5...v7.0.0-pre.0) @@ -375,7 +384,6 @@ - @feathersjs/commons dependency [\#492](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/492) - Validation hook for restful api [\#491](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/491) -- TS for keep fgraphql [\#467](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/467) **Merged pull requests:** @@ -400,10 +408,6 @@ [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v4.19.4...v4.19.5) -**Closed issues:** - -- TS for keepQueryInArray [\#468](https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/468) - ## [v4.19.4](https://github.com/feathersjs-ecosystem/feathers-hooks-common/tree/v4.19.4) (2018-11-29) [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/compare/v4.19.3...v4.19.4) From 506933b52666cf3c438953c1cc9ddd80c9599377 Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Wed, 8 Feb 2023 21:16:22 +0100 Subject: [PATCH 8/9] chore: update dependencies --- package-lock.json | 8626 ++++++++++++++++++++++++++------------------- package.json | 56 +- 2 files changed, 5117 insertions(+), 3565 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9c999c75..9a8a7360 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,218 +10,218 @@ "license": "MIT", "dependencies": { "@feathers-plus/batch-loader": "^0.3.6", - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", "ajv": "^6.12.6", "debug": "^4.3.4", "graphql": "^16.6.0", "lodash": "^4.17.21", - "traverse": "^0.6.6" + "traverse": "^0.6.7" }, "devDependencies": { "@feathers-plus/cache": "^1.4.0", "@feathers-plus/graphql": "^1.10.0", - "@feathersjs/authentication": "^5.0.0-pre.29", - "@feathersjs/authentication-local": "^5.0.0-pre.29", - "@feathersjs/client": "^5.0.0-pre.29", - "@feathersjs/express": "^5.0.0-pre.29", - "@feathersjs/socketio": "^5.0.0-pre.29", - "@feathersjs/socketio-client": "^5.0.0-pre.29", - "@types/chai": "^4.3.3", + "@feathersjs/authentication": "^5.0.0-pre.36", + "@feathersjs/authentication-local": "^5.0.0-pre.36", + "@feathersjs/client": "^5.0.0-pre.36", + "@feathersjs/express": "^5.0.0-pre.36", + "@feathersjs/socketio": "^5.0.0-pre.36", + "@feathersjs/socketio-client": "^5.0.0-pre.36", + "@types/chai": "^4.3.4", "@types/clone": "^2.1.1", "@types/debug": "^4.1.7", - "@types/lodash": "^4.14.185", - "@types/mocha": "^9.1.1", - "@types/node": "^18.7.18", + "@types/lodash": "^4.14.191", + "@types/mocha": "^10.0.1", + "@types/node": "^18.13.0", "@types/traverse": "^0.6.32", - "@typescript-eslint/eslint-plugin": "^5.37.0", - "@typescript-eslint/parser": "^5.37.0", + "@typescript-eslint/eslint-plugin": "^5.51.0", + "@typescript-eslint/parser": "^5.51.0", "c8": "^7.12.0", - "chai": "^4.3.6", + "chai": "^4.3.7", "clone": "^2.1.2", - "eslint": "^8.23.1", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-import": "^2.26.0", + "eslint": "^8.33.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-prefer-arrow": "^1.2.3", "eslint-plugin-prettier": "^4.2.1", "feathers-memory": "^4.1.0", - "mocha": "^10.0.0", - "mongodb": "^4.9.1", - "npm-check-updates": "^16.1.3", - "prettier": "^2.7.1", + "mocha": "^10.2.0", + "mongodb": "^5.0.1", + "npm-check-updates": "^16.6.5", + "prettier": "^2.8.4", "shx": "^0.3.4", - "sift": "^16.0.0", + "sift": "^16.0.1", "ts-node": "^10.9.1", - "tsup": "^6.2.3", - "typescript": "^4.8.3", - "vitepress": "^1.0.0-alpha.14" + "tsup": "^6.6.0", + "typescript": "^4.9.5", + "vitepress": "^1.0.0-alpha.45" }, "engines": { "node": ">= 14" } }, "node_modules/@algolia/autocomplete-core": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.1.tgz", - "integrity": "sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.4.tgz", + "integrity": "sha512-daoLpQ3ps/VTMRZDEBfU8ixXd+amZcNJ4QSP3IERGyzqnL5Ch8uSRFt/4G8pUvW9c3o6GA4vtVv4I4lmnkdXyg==", "dev": true, "dependencies": { - "@algolia/autocomplete-shared": "1.7.1" + "@algolia/autocomplete-shared": "1.7.4" } }, "node_modules/@algolia/autocomplete-preset-algolia": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.1.tgz", - "integrity": "sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.4.tgz", + "integrity": "sha512-s37hrvLEIfcmKY8VU9LsAXgm2yfmkdHT3DnA3SgHaY93yjZ2qL57wzb5QweVkYuEBZkT2PIREvRoLXC2sxTbpQ==", "dev": true, "dependencies": { - "@algolia/autocomplete-shared": "1.7.1" + "@algolia/autocomplete-shared": "1.7.4" }, "peerDependencies": { - "@algolia/client-search": "^4.9.1", - "algoliasearch": "^4.9.1" + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" } }, "node_modules/@algolia/autocomplete-shared": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.1.tgz", - "integrity": "sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.4.tgz", + "integrity": "sha512-2VGCk7I9tA9Ge73Km99+Qg87w0wzW4tgUruvWAn/gfey1ZXgmxZtyIRBebk35R1O8TbK77wujVtCnpsGpRy1kg==", "dev": true }, "node_modules/@algolia/cache-browser-local-storage": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.2.tgz", - "integrity": "sha512-FRweBkK/ywO+GKYfAWbrepewQsPTIEirhi1BdykX9mxvBPtGNKccYAxvGdDCumU1jL4r3cayio4psfzKMejBlA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.3.tgz", + "integrity": "sha512-hWH1yCxgG3+R/xZIscmUrWAIBnmBFHH5j30fY/+aPkEZWt90wYILfAHIOZ1/Wxhho5SkPfwFmT7ooX2d9JeQBw==", "dev": true, "dependencies": { - "@algolia/cache-common": "4.14.2" + "@algolia/cache-common": "4.14.3" } }, "node_modules/@algolia/cache-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.14.2.tgz", - "integrity": "sha512-SbvAlG9VqNanCErr44q6lEKD2qoK4XtFNx9Qn8FK26ePCI8I9yU7pYB+eM/cZdS9SzQCRJBbHUumVr4bsQ4uxg==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.14.3.tgz", + "integrity": "sha512-oZJofOoD9FQOwiGTzyRnmzvh3ZP8WVTNPBLH5xU5JNF7drDbRT0ocVT0h/xB2rPHYzOeXRrLaQQBwRT/CKom0Q==", "dev": true }, "node_modules/@algolia/cache-in-memory": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.14.2.tgz", - "integrity": "sha512-HrOukWoop9XB/VFojPv1R5SVXowgI56T9pmezd/djh2JnVN/vXswhXV51RKy4nCpqxyHt/aGFSq2qkDvj6KiuQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.14.3.tgz", + "integrity": "sha512-ES0hHQnzWjeioLQf5Nq+x1AWdZJ50znNPSH3puB/Y4Xsg4Av1bvLmTJe7SY2uqONaeMTvL0OaVcoVtQgJVw0vg==", "dev": true, "dependencies": { - "@algolia/cache-common": "4.14.2" + "@algolia/cache-common": "4.14.3" } }, "node_modules/@algolia/client-account": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.14.2.tgz", - "integrity": "sha512-WHtriQqGyibbb/Rx71YY43T0cXqyelEU0lB2QMBRXvD2X0iyeGl4qMxocgEIcbHyK7uqE7hKgjT8aBrHqhgc1w==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.14.3.tgz", + "integrity": "sha512-PBcPb0+f5Xbh5UfLZNx2Ow589OdP8WYjB4CnvupfYBrl9JyC1sdH4jcq/ri8osO/mCZYjZrQsKAPIqW/gQmizQ==", "dev": true, "dependencies": { - "@algolia/client-common": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.14.3", + "@algolia/client-search": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "node_modules/@algolia/client-analytics": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.14.2.tgz", - "integrity": "sha512-yBvBv2mw+HX5a+aeR0dkvUbFZsiC4FKSnfqk9rrfX+QrlNOKEhCG0tJzjiOggRW4EcNqRmaTULIYvIzQVL2KYQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.14.3.tgz", + "integrity": "sha512-eAwQq0Hb/aauv9NhCH5Dp3Nm29oFx28sayFN2fdOWemwSeJHIl7TmcsxVlRsO50fsD8CtPcDhtGeD3AIFLNvqw==", "dev": true, "dependencies": { - "@algolia/client-common": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.14.3", + "@algolia/client-search": "4.14.3", + "@algolia/requester-common": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "node_modules/@algolia/client-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.14.2.tgz", - "integrity": "sha512-43o4fslNLcktgtDMVaT5XwlzsDPzlqvqesRi4MjQz2x4/Sxm7zYg5LRYFol1BIhG6EwxKvSUq8HcC/KxJu3J0Q==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.14.3.tgz", + "integrity": "sha512-jkPPDZdi63IK64Yg4WccdCsAP4pHxSkr4usplkUZM5C1l1oEpZXsy2c579LQ0rvwCs5JFmwfNG4ahOszidfWPw==", "dev": true, "dependencies": { - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/requester-common": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "node_modules/@algolia/client-personalization": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.14.2.tgz", - "integrity": "sha512-ACCoLi0cL8CBZ1W/2juehSltrw2iqsQBnfiu/Rbl9W2yE6o2ZUb97+sqN/jBqYNQBS+o0ekTMKNkQjHHAcEXNw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.14.3.tgz", + "integrity": "sha512-UCX1MtkVNgaOL9f0e22x6tC9e2H3unZQlSUdnVaSKpZ+hdSChXGaRjp2UIT7pxmPqNCyv51F597KEX5WT60jNg==", "dev": true, "dependencies": { - "@algolia/client-common": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.14.3", + "@algolia/requester-common": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "node_modules/@algolia/client-search": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.14.2.tgz", - "integrity": "sha512-L5zScdOmcZ6NGiVbLKTvP02UbxZ0njd5Vq9nJAmPFtjffUSOGEp11BmD2oMJ5QvARgx2XbX4KzTTNS5ECYIMWw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.14.3.tgz", + "integrity": "sha512-I2U7xBx5OPFdPLA8AXKUPPxGY3HDxZ4r7+mlZ8ZpLbI8/ri6fnu6B4z3wcL7sgHhDYMwnAE8Xr0AB0h3Hnkp4A==", "dev": true, "dependencies": { - "@algolia/client-common": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.14.3", + "@algolia/requester-common": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "node_modules/@algolia/logger-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.14.2.tgz", - "integrity": "sha512-/JGlYvdV++IcMHBnVFsqEisTiOeEr6cUJtpjz8zc0A9c31JrtLm318Njc72p14Pnkw3A/5lHHh+QxpJ6WFTmsA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.14.3.tgz", + "integrity": "sha512-kUEAZaBt/J3RjYi8MEBT2QEexJR2kAE2mtLmezsmqMQZTV502TkHCxYzTwY2dE7OKcUTxi4OFlMuS4GId9CWPw==", "dev": true }, "node_modules/@algolia/logger-console": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.14.2.tgz", - "integrity": "sha512-8S2PlpdshbkwlLCSAB5f8c91xyc84VM9Ar9EdfE9UmX+NrKNYnWR1maXXVDQQoto07G1Ol/tYFnFVhUZq0xV/g==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.14.3.tgz", + "integrity": "sha512-ZWqAlUITktiMN2EiFpQIFCJS10N96A++yrexqC2Z+3hgF/JcKrOxOdT4nSCQoEPvU4Ki9QKbpzbebRDemZt/hw==", "dev": true, "dependencies": { - "@algolia/logger-common": "4.14.2" + "@algolia/logger-common": "4.14.3" } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.2.tgz", - "integrity": "sha512-CEh//xYz/WfxHFh7pcMjQNWgpl4wFB85lUMRyVwaDPibNzQRVcV33YS+63fShFWc2+42YEipFGH2iPzlpszmDw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.3.tgz", + "integrity": "sha512-AZeg2T08WLUPvDncl2XLX2O67W5wIO8MNaT7z5ii5LgBTuk/rU4CikTjCe2xsUleIZeFl++QrPAi4Bdxws6r/Q==", "dev": true, "dependencies": { - "@algolia/requester-common": "4.14.2" + "@algolia/requester-common": "4.14.3" } }, "node_modules/@algolia/requester-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.14.2.tgz", - "integrity": "sha512-73YQsBOKa5fvVV3My7iZHu1sUqmjjfs9TteFWwPwDmnad7T0VTCopttcsM3OjLxZFtBnX61Xxl2T2gmG2O4ehg==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.14.3.tgz", + "integrity": "sha512-RrRzqNyKFDP7IkTuV3XvYGF9cDPn9h6qEDl595lXva3YUk9YSS8+MGZnnkOMHvjkrSCKfoLeLbm/T4tmoIeclw==", "dev": true }, "node_modules/@algolia/requester-node-http": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.14.2.tgz", - "integrity": "sha512-oDbb02kd1o5GTEld4pETlPZLY0e+gOSWjWMJHWTgDXbv9rm/o2cF7japO6Vj1ENnrqWvLBmW1OzV9g6FUFhFXg==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.14.3.tgz", + "integrity": "sha512-O5wnPxtDRPuW2U0EaOz9rMMWdlhwP0J0eSL1Z7TtXF8xnUeeUyNJrdhV5uy2CAp6RbhM1VuC3sOJcIR6Av+vbA==", "dev": true, "dependencies": { - "@algolia/requester-common": "4.14.2" + "@algolia/requester-common": "4.14.3" } }, "node_modules/@algolia/transporter": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.14.2.tgz", - "integrity": "sha512-t89dfQb2T9MFQHidjHcfhh6iGMNwvuKUvojAj+JsrHAGbuSy7yE4BylhLX6R0Q1xYRoC4Vvv+O5qIw/LdnQfsQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.14.3.tgz", + "integrity": "sha512-2qlKlKsnGJ008exFRb5RTeTOqhLZj0bkMCMVskxoqWejs2Q2QtWmsiH98hDfpw0fmnyhzHEt0Z7lqxBYp8bW2w==", "dev": true, "dependencies": { - "@algolia/cache-common": "4.14.2", - "@algolia/logger-common": "4.14.2", - "@algolia/requester-common": "4.14.2" + "@algolia/cache-common": "4.14.3", + "@algolia/logger-common": "4.14.3", + "@algolia/requester-common": "4.14.3" } }, "node_modules/@babel/parser": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.1.tgz", - "integrity": "sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==", + "version": "7.20.15", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.15.tgz", + "integrity": "sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -230,6 +230,18 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/runtime": { + "version": "7.20.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz", + "integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -249,30 +261,30 @@ } }, "node_modules/@docsearch/css": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.2.1.tgz", - "integrity": "sha512-gaP6TxxwQC+K8D6TRx5WULUWKrcbzECOPA2KCVMuI+6C7dNiGUk5yXXzVhc5sld79XKYLnO9DRTI4mjXDYkh+g==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.3.3.tgz", + "integrity": "sha512-6SCwI7P8ao+se1TUsdZ7B4XzL+gqeQZnBc+2EONZlcVa0dVrk0NjETxozFKgMv0eEGH8QzP1fkN+A1rH61l4eg==", "dev": true }, "node_modules/@docsearch/js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.2.1.tgz", - "integrity": "sha512-H1PekEtSeS0msetR2YGGey2w7jQ2wAKfGODJvQTygSwMgUZ+2DHpzUgeDyEBIXRIfaBcoQneqrzsljM62pm6Xg==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.3.3.tgz", + "integrity": "sha512-2xAv2GFuHzzmG0SSZgf8wHX0qZX8n9Y1ZirKUk5Wrdc+vH9CL837x2hZIUdwcPZI9caBA+/CzxsS68O4waYjUQ==", "dev": true, "dependencies": { - "@docsearch/react": "3.2.1", + "@docsearch/react": "3.3.3", "preact": "^10.0.0" } }, "node_modules/@docsearch/react": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.2.1.tgz", - "integrity": "sha512-EzTQ/y82s14IQC5XVestiK/kFFMe2aagoYFuTAIfIb/e+4FU7kSMKonRtLwsCiLQHmjvNQq+HO+33giJ5YVtaQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.3.3.tgz", + "integrity": "sha512-pLa0cxnl+G0FuIDuYlW+EBK6Rw2jwLw9B1RHIeS4N4s2VhsfJ/wzeCi3CWcs5yVfxLd5ZK50t//TMA5e79YT7Q==", "dev": true, "dependencies": { - "@algolia/autocomplete-core": "1.7.1", - "@algolia/autocomplete-preset-algolia": "1.7.1", - "@docsearch/css": "3.2.1", + "@algolia/autocomplete-core": "1.7.4", + "@algolia/autocomplete-preset-algolia": "1.7.4", + "@docsearch/css": "3.3.3", "algoliasearch": "^4.0.0" }, "peerDependencies": { @@ -293,9 +305,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.8.tgz", - "integrity": "sha512-CyEWALmn+no/lbgbAJsbuuhT8s2J19EJGHkeyAwjbFJMrj80KJ9zuYsoAvidPTU7BgBf87r/sgae8Tw0dbOc4Q==", + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.6.tgz", + "integrity": "sha512-bSC9YVUjADDy1gae8RrioINU6e1lCkg3VGVwm0QQ2E1CWcC4gnMce9+B6RpxuSsrsXsk1yojn7sp1fnG8erE2g==", "cpu": [ "arm" ], @@ -304,17 +316,158 @@ "os": [ "android" ], - "dependencies": { - "esbuild-wasm": "0.15.8" - }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.6.tgz", + "integrity": "sha512-YnYSCceN/dUzUr5kdtUzB+wZprCafuD89Hs0Aqv9QSdwhYQybhXTaSTcrl6X/aWThn1a/j0eEpUBGOE7269REg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.6.tgz", + "integrity": "sha512-MVcYcgSO7pfu/x34uX9u2QIZHmXAB7dEiLQC5bBl5Ryqtpj9lT2sg3gNDEsrPEmimSJW2FXIaxqSQ501YLDsZQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.6.tgz", + "integrity": "sha512-bsDRvlbKMQMt6Wl08nHtFz++yoZHsyTOxnjfB2Q95gato+Yi4WnRl13oC2/PJJA9yLCoRv9gqT/EYX0/zDsyMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.6.tgz", + "integrity": "sha512-xh2A5oPrYRfMFz74QXIQTQo8uA+hYzGWJFoeTE8EvoZGHb+idyV4ATaukaUvnnxJiauhs/fPx3vYhU4wiGfosg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.6.tgz", + "integrity": "sha512-EnUwjRc1inT4ccZh4pB3v1cIhohE2S4YXlt1OvI7sw/+pD+dIE4smwekZlEPIwY6PhU6oDWwITrQQm5S2/iZgg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.6.tgz", + "integrity": "sha512-Uh3HLWGzH6FwpviUcLMKPCbZUAFzv67Wj5MTwK6jn89b576SR2IbEp+tqUHTr8DIl0iDmBAf51MVaP7pw6PY5Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.6.tgz", + "integrity": "sha512-7YdGiurNt7lqO0Bf/U9/arrPWPqdPqcV6JCZda4LZgEn+PTQ5SMEI4MGR52Bfn3+d6bNEGcWFzlIxiQdS48YUw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.6.tgz", + "integrity": "sha512-bUR58IFOMJX523aDVozswnlp5yry7+0cRLCXDsxnUeQYJik1DukMY+apBsLOZJblpH+K7ox7YrKrHmJoWqVR9w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.6.tgz", + "integrity": "sha512-ujp8uoQCM9FRcbDfkqECoARsLnLfCUhKARTP56TFPog8ie9JG83D5GVKjQ6yVrEVdMie1djH86fm98eY3quQkQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.8.tgz", - "integrity": "sha512-pE5RQsOTSERCtfZdfCT25wzo7dfhOSlhAXcsZmuvRYhendOv7djcdvtINdnDp2DAjP17WXlBB4nBO6sHLczmsg==", + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.6.tgz", + "integrity": "sha512-y2NX1+X/Nt+izj9bLoiaYB9YXT/LoaQFYvCkVD77G/4F+/yuVXYCWz4SE9yr5CBMbOxOfBcy/xFL4LlOeNlzYQ==", "cpu": [ "loong64" ], @@ -327,16 +480,192 @@ "node": ">=12" } }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.6.tgz", + "integrity": "sha512-09AXKB1HDOzXD+j3FdXCiL/MWmZP0Ex9eR8DLMBVcHorrWJxWmY8Nms2Nm41iRM64WVx7bA/JVHMv081iP2kUA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.6.tgz", + "integrity": "sha512-AmLhMzkM8JuqTIOhxnX4ubh0XWJIznEynRnZAVdA2mMKE6FAfwT2TWKTwdqMG+qEaeyDPtfNoZRpJbD4ZBv0Tg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.6.tgz", + "integrity": "sha512-Y4Ri62PfavhLQhFbqucysHOmRamlTVK10zPWlqjNbj2XMea+BOs4w6ASKwQwAiqf9ZqcY9Ab7NOU4wIgpxwoSQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.6.tgz", + "integrity": "sha512-SPUiz4fDbnNEm3JSdUW8pBJ/vkop3M1YwZAVwvdwlFLoJwKEZ9L98l3tzeyMzq27CyepDQ3Qgoba44StgbiN5Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.6.tgz", + "integrity": "sha512-a3yHLmOodHrzuNgdpB7peFGPx1iJ2x6m+uDvhP2CKdr2CwOaqEFMeSqYAHU7hG+RjCq8r2NFujcd/YsEsFgTGw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.6.tgz", + "integrity": "sha512-EanJqcU/4uZIBreTrnbnre2DXgXSa+Gjap7ifRfllpmyAU7YMvaXmljdArptTHmjrkkKm9BK6GH5D5Yo+p6y5A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.6.tgz", + "integrity": "sha512-xaxeSunhQRsTNGFanoOkkLtnmMn5QbA0qBhNet/XLVsc+OVkpIWPHcr3zTW2gxVU5YOHFbIHR9ODuaUdNza2Vw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.6.tgz", + "integrity": "sha512-gnMnMPg5pfMkZvhHee21KbKdc6W3GR8/JuE0Da1kjwpK6oiFU3nqfHuVPgUX2rsOx9N2SadSQTIYV1CIjYG+xw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.6.tgz", + "integrity": "sha512-G95n7vP1UnGJPsVdKXllAJPtqjMvFYbN20e8RK8LVLhlTiSOH1sd7+Gt7rm70xiG+I5tM58nYgwWrLs6I1jHqg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.6.tgz", + "integrity": "sha512-96yEFzLhq5bv9jJo5JhTs1gI+1cKQ83cUpyxHuGqXVwQtY5Eq54ZEsKs8veKtiKwlrNimtckHEkj4mRh4pPjsg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.6.tgz", + "integrity": "sha512-n6d8MOyUrNp6G4VSpRcgjs5xj4A91svJSaiwLIDWVWEsZtpN5FA9NlBbZHDmAJc2e8e6SF4tkBD3HAvPF+7igA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint/eslintrc": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", - "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", + "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.4.0", - "globals": "^13.15.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -523,8 +852,14 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/@feathers-plus/graphql/node_modules/uuid": { - "version": "3.4.0", + "node_modules/@feathers-plus/graphql/node_modules/traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw==", + "dev": true + }, + "node_modules/@feathers-plus/graphql/node_modules/uuid": { + "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", @@ -596,18 +931,19 @@ } }, "node_modules/@feathersjs/authentication": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-5.0.0-pre.29.tgz", - "integrity": "sha512-vol00wb2b+zhvvkrbPkDqrMga5dSmLydzhixt+Sh3vY5jp7uWrWRqqrTXrysXLSfisQMGVFbTNNxc5maCU+pKg==", - "dev": true, - "dependencies": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@feathersjs/schema": "^5.0.0-pre.29", - "@feathersjs/transport-commons": "^5.0.0-pre.29", - "@types/jsonwebtoken": "^8.5.9", - "jsonwebtoken": "^8.5.1", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-5.0.0-pre.36.tgz", + "integrity": "sha512-taVg/Kgfk8ShiOFFsFb8OH9poKhhBuP5unCLpfH/dzcjCEM78WjiKAdOmY5sJOK8Ye8u2zA2Ecn9YH/GxA1tvQ==", + "dev": true, + "dependencies": { + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@feathersjs/hooks": "^0.7.6", + "@feathersjs/schema": "^5.0.0-pre.36", + "@feathersjs/transport-commons": "^5.0.0-pre.36", + "@types/jsonwebtoken": "^9.0.1", + "jsonwebtoken": "^9.0.0", "lodash": "^4.17.21", "long-timeout": "^0.1.1", "uuid": "^9.0.0" @@ -621,15 +957,15 @@ } }, "node_modules/@feathersjs/authentication-client": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication-client/-/authentication-client-5.0.0-pre.29.tgz", - "integrity": "sha512-QcHlyOUGUqfgO+SIkFFASHzGdCrAX4yTI9i/4l6AKgWpPX2MoKnfWGOn8N/3xFR89pvnS3A9hU/NO0T8B0KVjw==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication-client/-/authentication-client-5.0.0-pre.36.tgz", + "integrity": "sha512-Rg+1KkuDFdhcrbQqWwR6yjl5Z4FH+SpsEA3dab/h8iIeHaqg4QSiPXjE33ltw0hkOc+tDbPL045WIXsdeIbo4A==", "dev": true, "dependencies": { - "@feathersjs/authentication": "^5.0.0-pre.29", - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29" + "@feathersjs/authentication": "^5.0.0-pre.36", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36" }, "engines": { "node": ">= 12" @@ -640,15 +976,15 @@ } }, "node_modules/@feathersjs/authentication-local": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication-local/-/authentication-local-5.0.0-pre.29.tgz", - "integrity": "sha512-j6o0iKz1dFTU5/pp7GGX53Vyo/lMLyBgm1A4ebihDVRBt2oXWRW2FUHLwGRANKrjUVR7F9s59XYz3OYhpbs+CA==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication-local/-/authentication-local-5.0.0-pre.36.tgz", + "integrity": "sha512-2YVh+ZX4KfCC7iurnf1JD/FY7DXShhhBqyy/xjoau0TwGIGK15lVFdMyDpiYDUkqQ1TARoQuOLqYSbEaTrl2NQ==", "dev": true, "dependencies": { - "@feathersjs/authentication": "^5.0.0-pre.29", - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/authentication": "^5.0.0-pre.36", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", "bcryptjs": "^2.4.3", "lodash": "^4.17.21" }, @@ -661,16 +997,16 @@ } }, "node_modules/@feathersjs/client": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/client/-/client-5.0.0-pre.29.tgz", - "integrity": "sha512-JfqNabQsw/kxj4RgfhA6lsuUmH1H8m1JxHCH98mfCWhCzE/r263ZqAOCSulvWL57VArdyR4a03rbV+jp/JTqqQ==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/client/-/client-5.0.0-pre.36.tgz", + "integrity": "sha512-JhYbCUtQ6XXt2tQ0YZKXtMw3tPEpNERgdP4Qg7qijugRrQMvEn3ZH91z/MOUOpnRO5eU4WJISECMXFFuWrUmxA==", "dev": true, "dependencies": { - "@feathersjs/authentication-client": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@feathersjs/rest-client": "^5.0.0-pre.29", - "@feathersjs/socketio-client": "^5.0.0-pre.29" + "@feathersjs/authentication-client": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@feathersjs/rest-client": "^5.0.0-pre.36", + "@feathersjs/socketio-client": "^5.0.0-pre.36" }, "engines": { "node": ">= 12" @@ -681,9 +1017,9 @@ } }, "node_modules/@feathersjs/commons": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-5.0.0-pre.29.tgz", - "integrity": "sha512-BlGRPYPsMEANKrOM2fprmMixmyca9P3CNvJYxhGSaFZLt1+USAxFfx02d0/s8KkHtO+qEg2bz/TmR8BdsABrmg==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-5.0.0-pre.36.tgz", + "integrity": "sha512-qTHGVyJBuXBIo1ecgCGAPuwu6jZLasFSKvLh3yldVdMb6DWYHgxv8IDCDBjds1aPxcifLNrJpwTVrbMJidwOCA==", "engines": { "node": ">= 12" }, @@ -693,28 +1029,30 @@ } }, "node_modules/@feathersjs/errors": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-5.0.0-pre.29.tgz", - "integrity": "sha512-0gb/px3/ict6FQ8ebqYAiqAxG2s+oLmrhs9Wr+4cnE96BlEH5lgyUTK0px7aDMFkkhjr25egtxBnM1RCoL36fg==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-5.0.0-pre.36.tgz", + "integrity": "sha512-El7h2lUR3WznZcsF+Oyjbwx04IitB8HqwqTPDjJcr1yoWu3l6csySaaz34+nTV40Wjpo9nHErjK4Bu4T4WhtwQ==", "engines": { "node": ">= 12" } }, "node_modules/@feathersjs/express": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-5.0.0-pre.29.tgz", - "integrity": "sha512-47xpo0WXAhAagSAPwtPYFPDDTiy4o2bZMSU745otDhG0gXik26757QEnkS3OuZwdE0ztJGaH2IYv7AGQWbFSbA==", - "dev": true, - "dependencies": { - "@feathersjs/authentication": "^5.0.0-pre.29", - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@feathersjs/transport-commons": "^5.0.0-pre.29", - "@types/express": "^4.17.13", - "@types/express-serve-static-core": "^4.17.30", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-5.0.0-pre.36.tgz", + "integrity": "sha512-ZgLrFPWya2jmEpHt0mRNU+BF0V9ELzUplIjw/vauvFjz4CPjwxoHibCSUhbuQMXa8slQZYLqJLmxH49Gfj37+Q==", + "dev": true, + "dependencies": { + "@feathersjs/authentication": "^5.0.0-pre.36", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@feathersjs/transport-commons": "^5.0.0-pre.36", + "@types/compression": "^1.7.2", + "@types/express": "^4.17.16", + "@types/express-serve-static-core": "^4.17.33", + "compression": "^1.7.4", "cors": "^2.8.5", - "express": "^4.18.1" + "express": "^4.18.2" }, "engines": { "node": ">= 12" @@ -725,12 +1063,12 @@ } }, "node_modules/@feathersjs/feathers": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-5.0.0-pre.29.tgz", - "integrity": "sha512-cRuGDTlkqhKLgc23gV1ohZ0HjdsnrOBxDmp9pPBeTGuFT69fyqSuUJfcipfaF0hP3C0WDI//92wXfRblAod24g==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-5.0.0-pre.36.tgz", + "integrity": "sha512-h6Ir765i29DSH4whCNGx6EQXyXLxD4A0dnU2ABaPUjGAc07M9n2AieHtAxWiPY63RSw3ECsG9A/45BWDiCe4KQ==", "dependencies": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/hooks": "^0.7.5", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/hooks": "^0.7.6", "events": "^3.3.0" }, "engines": { @@ -742,23 +1080,23 @@ } }, "node_modules/@feathersjs/hooks": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@feathersjs/hooks/-/hooks-0.7.5.tgz", - "integrity": "sha512-xHbWPCJ5upr9eDdRSuJgWSKgCLN07YLvVjS7PdDqWrEz/iz5YBqoIQOzHhNPsWXOA6T7v+ArifrTUitG+ZzIRA==", + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/@feathersjs/hooks/-/hooks-0.7.6.tgz", + "integrity": "sha512-MgEW8HKLbnaawjIuTUAkloeosKMtej4bw7eZWszASRPL4SUfEao34mTwSlIoNuPRew4WJG/NZGRah1qqU1JvhA==", "engines": { "node": ">= 14" } }, "node_modules/@feathersjs/rest-client": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/rest-client/-/rest-client-5.0.0-pre.29.tgz", - "integrity": "sha512-PgBIwEIEMocgFK4GIVyougNWKD+M38a3mg9e0dWxxZXBlERjX8A+Vavcbb84ZxAvQnG3H/IPD3zy8HNEOlt1ZA==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/rest-client/-/rest-client-5.0.0-pre.36.tgz", + "integrity": "sha512-JQVUeJ8HOetTKuSX1kZgT2sDBmbEY8jg37nlIEd6vGD6l8V8oTw9ZtfYb7rqpHGordOuj6QNH77DljJeraIMIA==", "dev": true, "dependencies": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@types/superagent": "^4.1.15", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@types/superagent": "^4.1.16", "qs": "^6.11.0" }, "engines": { @@ -770,19 +1108,20 @@ } }, "node_modules/@feathersjs/schema": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/schema/-/schema-5.0.0-pre.29.tgz", - "integrity": "sha512-GIko7iC3mnemal4lxXvdFWtHuS2xvfb12AQruuaIQ2WiB7DyVn3HEENgaOj5RfI8mU+8jWjYozPE7oOjCKv0NQ==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/schema/-/schema-5.0.0-pre.36.tgz", + "integrity": "sha512-TxoTRJS3FgfGI/hWiEI/xy/IDTwx/5UwX1s1xbfzKRxSppvA4EVKdBi9+YnsPPS/k849TP8airmvIz2WukcguA==", "dev": true, "dependencies": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@feathersjs/hooks": "^0.7.5", + "@feathersjs/adapter-commons": "^5.0.0-pre.36", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@feathersjs/hooks": "^0.7.6", "@types/json-schema": "^7.0.11", - "ajv": "^8.11.0", - "json-schema": "^0.4.0", - "json-schema-to-ts": "^2.5.5" + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "json-schema-to-ts": "^2.6.2" }, "engines": { "node": ">= 12" @@ -792,10 +1131,28 @@ "url": "https://github.com/sponsors/daffl" } }, + "node_modules/@feathersjs/schema/node_modules/@feathersjs/adapter-commons": { + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/adapter-commons/-/adapter-commons-5.0.0-pre.36.tgz", + "integrity": "sha512-POi+/5QQ3BR7W15I9GKm6/Y+t+JQcXh2HL9WxY2ZR7LWY9kEWliuTpZzrZfjoph0B97DbT+YrGe79mWXb+KVuQ==", + "dev": true, + "dependencies": { + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36" + }, + "engines": { + "node": ">= 12" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/feathers" + } + }, "node_modules/@feathersjs/schema/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", @@ -815,16 +1172,15 @@ "dev": true }, "node_modules/@feathersjs/socketio": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/socketio/-/socketio-5.0.0-pre.29.tgz", - "integrity": "sha512-AV+buawaO58ZWj86V4EfXmn/wxae6H2CUfEo97X+OwEJULrmTdZLGAOrx5R5AQxzZYsPMA3YZZ9mRd5PVEEttg==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/socketio/-/socketio-5.0.0-pre.36.tgz", + "integrity": "sha512-KOR/mwRg6sZEuAeVSxlwClt1xbsQxxRlVwvGqAogxGlxaQFMO6vWHKM9OT0K/jWBZuAXofGxkx24eb2IWsR/GA==", "dev": true, "dependencies": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@feathersjs/hooks": "^0.7.5", - "@feathersjs/transport-commons": "^5.0.0-pre.29", - "socket.io": "^4.5.2" + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@feathersjs/transport-commons": "^5.0.0-pre.36", + "socket.io": "^4.5.4" }, "engines": { "node": ">= 12" @@ -835,12 +1191,12 @@ } }, "node_modules/@feathersjs/socketio-client": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/socketio-client/-/socketio-client-5.0.0-pre.29.tgz", - "integrity": "sha512-hbOsPBOdVCUUCfS8obCl0N5zn1LkJrKRryBi0IR2qRURnc992YqT7gBVfP705gzkTrEe58ETjm7qC0meA+FStw==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/socketio-client/-/socketio-client-5.0.0-pre.36.tgz", + "integrity": "sha512-D+q1r3PNuQZKe5xu/Hgd72lnsDZ9oslAFgMs9d/2LU6uKvP70k/zatuM+ncCFhqWwXIdHUnx9clGtNc4YVzRAg==", "dev": true, "dependencies": { - "@feathersjs/transport-commons": "^5.0.0-pre.29" + "@feathersjs/transport-commons": "^5.0.0-pre.36" }, "engines": { "node": ">= 12" @@ -851,14 +1207,14 @@ } }, "node_modules/@feathersjs/transport-commons": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-5.0.0-pre.29.tgz", - "integrity": "sha512-jy0ltjjrPuMas6vukLMB/9lnjL6aKpSSpN0X8gWGbQqZBDJ6VE7AHDj+6eKdcPiEtWmkj3kZQ0pwbD9DzE7vhA==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-5.0.0-pre.36.tgz", + "integrity": "sha512-6Ra8J4l2NCvo6j9CIoY7BzE2zYxvwpc1yX6E8qBZ3XWmH896MQxR3RsR1dOw//01Z3Y3rhZHVe9AdC+Z3XfC1w==", "dev": true, "dependencies": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", "encodeurl": "^1.0.2", "lodash": "^4.17.21" }, @@ -877,29 +1233,19 @@ "dev": true }, "node_modules/@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -989,67 +1335,82 @@ } }, "node_modules/@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", "dev": true, "dependencies": { - "@gar/promisify": "^1.1.3", "semver": "^7.3.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/git": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.2.tgz", - "integrity": "sha512-CAcd08y3DWBJqJDpfuVL0uijlq5oaXaOJEKHKc4wqrjd00gkvTZB+nFuLn+doOOKddaQS9JfqtNoFCO2LCvA3w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz", + "integrity": "sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA==", "dev": true, "dependencies": { - "@npmcli/promise-spawn": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", "lru-cache": "^7.4.4", "mkdirp": "^1.0.4", - "npm-pick-manifest": "^7.0.0", - "proc-log": "^2.0.0", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", - "which": "^2.0.2" + "which": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/git/node_modules/lru-cache": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.0.tgz", - "integrity": "sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true, "engines": { "node": ">=12" } }, + "node_modules/@npmcli/git/node_modules/which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/@npmcli/installed-package-contents": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", - "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz", + "integrity": "sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA==", "dev": true, "dependencies": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "bin": { - "installed-package-contents": "index.js" + "installed-package-contents": "lib/index.js" }, "engines": { - "node": ">= 10" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/move-file": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "deprecated": "This functionality has been moved to @npmcli/fs", "dev": true, "dependencies": { "mkdirp": "^1.0.4", @@ -1060,40 +1421,70 @@ } }, "node_modules/@npmcli/node-gyp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-2.0.0.tgz", - "integrity": "sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/promise-spawn": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", + "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", + "dev": true, + "dependencies": { + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/which": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-3.0.0.tgz", - "integrity": "sha512-s9SgS+p3a9Eohe68cSI3fi+hpcZUmXq5P7w0kMlAsWVtR7XbK3ptkZqKT2cK1zLDObJ3sR+8P59sJE0w/KTL1g==", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", "dev": true, "dependencies": { - "infer-owner": "^1.0.4" + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/run-script": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.2.1.tgz", - "integrity": "sha512-7dqywvVudPSrRCW5nTHpHgeWnbBtz8cFkOuKrecm6ih+oO9ciydhWt6OF7HlqupRRmB8Q/gECVdB9LMfToJbRg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz", + "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==", "dev": true, "dependencies": { - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/promise-spawn": "^3.0.0", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", "node-gyp": "^9.0.0", - "read-package-json-fast": "^2.0.3", - "which": "^2.0.2" + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script/node_modules/which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@pnpm/network.ca-file": { @@ -1210,9 +1601,9 @@ } }, "node_modules/@types/chai": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", - "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", "dev": true }, "node_modules/@types/clone": { @@ -1221,6 +1612,15 @@ "integrity": "sha512-BZIU34bSYye0j/BFcPraiDZ5ka6MJADjcDVELGf7glr9K+iE8NYVjFslJFVWzskSxkLLyCrSPScE82/UUoBSvg==", "dev": true }, + "node_modules/@types/compression": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@types/compression/-/compression-1.7.2.tgz", + "integrity": "sha512-lwEL4M/uAGWngWFLSG87ZDr2kLrbuR8p7X+QZB1OQlT+qkHsCPDVFnHPyXf4Vyl4yDDorNY+mAhosxkCvppatg==", + "dev": true, + "dependencies": { + "@types/express": "*" + } + }, "node_modules/@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -1243,10 +1643,13 @@ "dev": true }, "node_modules/@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", - "dev": true + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } }, "node_modules/@types/debug": { "version": "4.1.7", @@ -1258,21 +1661,21 @@ } }, "node_modules/@types/express": { - "version": "4.17.14", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz", - "integrity": "sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==", + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", "dev": true, "dependencies": { "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.18", + "@types/express-serve-static-core": "^4.17.33", "@types/qs": "*", "@types/serve-static": "*" } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.31", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz", - "integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==", + "version": "4.17.33", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz", + "integrity": "sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==", "dev": true, "dependencies": { "@types/node": "*", @@ -1306,18 +1709,18 @@ "dev": true }, "node_modules/@types/jsonwebtoken": { - "version": "8.5.9", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.9.tgz", - "integrity": "sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", + "integrity": "sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/lodash": { - "version": "4.14.185", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.185.tgz", - "integrity": "sha512-evMDG1bC4rgQg4ku9tKpuMh5iBNEwNa3tf9zRHdP1qlv+1WUg44xat4IxCE14gIpZRGUUWAx2VhItCZc25NfMA==", + "version": "4.14.191", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz", + "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==", "dev": true }, "node_modules/@types/mime": { @@ -1327,9 +1730,9 @@ "dev": true }, "node_modules/@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", "dev": true }, "node_modules/@types/ms": { @@ -1339,9 +1742,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.7.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", - "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==", + "version": "18.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", + "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==", "dev": true }, "node_modules/@types/qs": { @@ -1356,6 +1759,12 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", "dev": true }, + "node_modules/@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true + }, "node_modules/@types/serve-static": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz", @@ -1367,9 +1776,9 @@ } }, "node_modules/@types/superagent": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.15.tgz", - "integrity": "sha512-mu/N4uvfDN2zVQQ5AYJI/g4qxn2bHB6521t1UuH09ShNWjebTqN0ZFuYK9uYjcgmI0dTQEs+Owi1EO6U0OkOZQ==", + "version": "4.1.16", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.16.tgz", + "integrity": "sha512-tLfnlJf6A5mB6ddqF159GqcDizfzbMUB1/DeT59/wBNqzRTNNKsaw79A/1TZ84X+f/EwWH8FeuSkjlCLyqS/zQ==", "dev": true, "dependencies": { "@types/cookiejar": "*", @@ -1383,9 +1792,9 @@ "dev": true }, "node_modules/@types/web-bluetooth": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.15.tgz", - "integrity": "sha512-w7hEHXnPMEZ+4nGKl/KDRVpxkwYxYExuHOYXyzIzCDzEZ9ZCGMAewulr9IqJu2LR4N37fcnb1XVeuZ09qgOxhA==", + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz", + "integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==", "dev": true }, "node_modules/@types/webidl-conversions": { @@ -1405,16 +1814,18 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.38.0.tgz", - "integrity": "sha512-GgHi/GNuUbTOeoJiEANi0oI6fF3gBQc3bGFYj40nnAPCbhrtEDf2rjBmefFadweBmO1Du1YovHeDP2h5JLhtTQ==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.51.0.tgz", + "integrity": "sha512-wcAwhEWm1RgNd7dxD/o+nnLW8oH+6RK1OGnmbmkj/GGoDPV1WWMVP0FXYQBivKHdwM1pwii3bt//RC62EriIUQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.38.0", - "@typescript-eslint/type-utils": "5.38.0", - "@typescript-eslint/utils": "5.38.0", + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/type-utils": "5.51.0", + "@typescript-eslint/utils": "5.51.0", "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", "regexpp": "^3.2.0", "semver": "^7.3.7", "tsutils": "^3.21.0" @@ -1437,14 +1848,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.38.0.tgz", - "integrity": "sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.51.0.tgz", + "integrity": "sha512-fEV0R9gGmfpDeRzJXn+fGQKcl0inIeYobmmUWijZh9zA7bxJ8clPhV9up2ZQzATxAiFAECqPQyMDB4o4B81AaA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.38.0", - "@typescript-eslint/types": "5.38.0", - "@typescript-eslint/typescript-estree": "5.38.0", + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/typescript-estree": "5.51.0", "debug": "^4.3.4" }, "engines": { @@ -1464,13 +1875,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.38.0.tgz", - "integrity": "sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.51.0.tgz", + "integrity": "sha512-gNpxRdlx5qw3yaHA0SFuTjW4rxeYhpHxt491PEcKF8Z6zpq0kMhe0Tolxt0qjlojS+/wArSDlj/LtE69xUJphQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.38.0", - "@typescript-eslint/visitor-keys": "5.38.0" + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/visitor-keys": "5.51.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1481,13 +1892,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.38.0.tgz", - "integrity": "sha512-iZq5USgybUcj/lfnbuelJ0j3K9dbs1I3RICAJY9NZZpDgBYXmuUlYQGzftpQA9wC8cKgtS6DASTvF3HrXwwozA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.51.0.tgz", + "integrity": "sha512-QHC5KKyfV8sNSyHqfNa0UbTbJ6caB8uhcx2hYcWVvJAZYJRBo5HyyZfzMdRx8nvS+GyMg56fugMzzWnojREuQQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.38.0", - "@typescript-eslint/utils": "5.38.0", + "@typescript-eslint/typescript-estree": "5.51.0", + "@typescript-eslint/utils": "5.51.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1508,9 +1919,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.38.0.tgz", - "integrity": "sha512-HHu4yMjJ7i3Cb+8NUuRCdOGu2VMkfmKyIJsOr9PfkBVYLYrtMCK/Ap50Rpov+iKpxDTfnqvDbuPLgBE5FwUNfA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.51.0.tgz", + "integrity": "sha512-SqOn0ANn/v6hFn0kjvLwiDi4AzR++CBZz0NV5AnusT2/3y32jdc0G4woXPWHCumWtUXZKPAS27/9vziSsC9jnw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1521,13 +1932,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.0.tgz", - "integrity": "sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.51.0.tgz", + "integrity": "sha512-TSkNupHvNRkoH9FMA3w7TazVFcBPveAAmb7Sz+kArY6sLT86PA5Vx80cKlYmd8m3Ha2SwofM1KwraF24lM9FvA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.38.0", - "@typescript-eslint/visitor-keys": "5.38.0", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/visitor-keys": "5.51.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1548,17 +1959,19 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.38.0.tgz", - "integrity": "sha512-6sdeYaBgk9Fh7N2unEXGz+D+som2QCQGPAf1SxrkEr+Z32gMreQ0rparXTNGRRfYUWk/JzbGdcM8NSSd6oqnTA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.51.0.tgz", + "integrity": "sha512-76qs+5KWcaatmwtwsDJvBk4H76RJQBFe+Gext0EfJdC3Vd2kpY2Pf//OHHzHp84Ciw0/rYoGTDnIAr3uWhhJYw==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.38.0", - "@typescript-eslint/types": "5.38.0", - "@typescript-eslint/typescript-estree": "5.38.0", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/typescript-estree": "5.51.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1572,12 +1985,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.0.tgz", - "integrity": "sha512-MxnrdIyArnTi+XyFLR+kt/uNAcdOnmT+879os7qDRI+EYySR4crXJq9BXPfRzzLGq0wgxkwidrCJ9WCAoacm1w==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.51.0.tgz", + "integrity": "sha512-Oh2+eTdjHjOFjKA27sxESlA87YPSOJafGCR0md5oeMdh1ZcCfAGCIOL216uTBAkAIptvLIfKQhl7lHxMJet4GQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.38.0", + "@typescript-eslint/types": "5.51.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1588,59 +2001,53 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "node_modules/@vitejs/plugin-vue": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-3.1.0.tgz", - "integrity": "sha512-fmxtHPjSOEIRg6vHYDaem+97iwCUg/uSIaTzp98lhELt2ISOQuDo2hbkBdXod0g15IhfPMQmAxh4heUks2zvDA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-4.0.0.tgz", + "integrity": "sha512-e0X4jErIxAB5oLtDqbHvHpJe/uWNkdpYV83AOG2xo2tEVSzCzewgJMtREZM30wXnM5ls90hxiOtAuVU6H5JgbA==", "dev": true, "engines": { "node": "^14.18.0 || >=16.0.0" }, "peerDependencies": { - "vite": "^3.0.0", + "vite": "^4.0.0", "vue": "^3.2.25" } }, "node_modules/@vue/compiler-core": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.39.tgz", - "integrity": "sha512-mf/36OWXqWn0wsC40nwRRGheR/qoID+lZXbIuLnr4/AngM0ov8Xvv8GHunC0rKRIkh60bTqydlqTeBo49rlbqw==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.47.tgz", + "integrity": "sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==", "dev": true, "dependencies": { "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.39", + "@vue/shared": "3.2.47", "estree-walker": "^2.0.2", "source-map": "^0.6.1" } }, "node_modules/@vue/compiler-dom": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.39.tgz", - "integrity": "sha512-HMFI25Be1C8vLEEv1hgEO1dWwG9QQ8LTTPmCkblVJY/O3OvWx6r1+zsox5mKPMGvqYEZa6l8j+xgOfUspgo7hw==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.47.tgz", + "integrity": "sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==", "dev": true, "dependencies": { - "@vue/compiler-core": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-core": "3.2.47", + "@vue/shared": "3.2.47" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.39.tgz", - "integrity": "sha512-fqAQgFs1/BxTUZkd0Vakn3teKUt//J3c420BgnYgEOoVdTwYpBTSXCMJ88GOBCylmUBbtquGPli9tVs7LzsWIA==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.47.tgz", + "integrity": "sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==", "dev": true, "dependencies": { "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.39", - "@vue/compiler-dom": "3.2.39", - "@vue/compiler-ssr": "3.2.39", - "@vue/reactivity-transform": "3.2.39", - "@vue/shared": "3.2.39", + "@vue/compiler-core": "3.2.47", + "@vue/compiler-dom": "3.2.47", + "@vue/compiler-ssr": "3.2.47", + "@vue/reactivity-transform": "3.2.47", + "@vue/shared": "3.2.47", "estree-walker": "^2.0.2", "magic-string": "^0.25.7", "postcss": "^8.1.10", @@ -1648,92 +2055,92 @@ } }, "node_modules/@vue/compiler-ssr": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.39.tgz", - "integrity": "sha512-EoGCJ6lincKOZGW+0Ky4WOKsSmqL7hp1ZYgen8M7u/mlvvEQUaO9tKKOy7K43M9U2aA3tPv0TuYYQFrEbK2eFQ==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.47.tgz", + "integrity": "sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==", "dev": true, "dependencies": { - "@vue/compiler-dom": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-dom": "3.2.47", + "@vue/shared": "3.2.47" } }, "node_modules/@vue/devtools-api": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.2.1.tgz", - "integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.0.tgz", + "integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==", "dev": true }, "node_modules/@vue/reactivity": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.39.tgz", - "integrity": "sha512-vlaYX2a3qMhIZfrw3Mtfd+BuU+TZmvDrPMa+6lpfzS9k/LnGxkSuf0fhkP0rMGfiOHPtyKoU9OJJJFGm92beVQ==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.47.tgz", + "integrity": "sha512-7khqQ/75oyyg+N/e+iwV6lpy1f5wq759NdlS1fpAhFXa8VeAIKGgk2E/C4VF59lx5b+Ezs5fpp/5WsRYXQiKxQ==", "dev": true, "dependencies": { - "@vue/shared": "3.2.39" + "@vue/shared": "3.2.47" } }, "node_modules/@vue/reactivity-transform": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.39.tgz", - "integrity": "sha512-HGuWu864zStiWs9wBC6JYOP1E00UjMdDWIG5W+FpUx28hV3uz9ODOKVNm/vdOy/Pvzg8+OcANxAVC85WFBbl3A==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.47.tgz", + "integrity": "sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==", "dev": true, "dependencies": { "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.39", - "@vue/shared": "3.2.39", + "@vue/compiler-core": "3.2.47", + "@vue/shared": "3.2.47", "estree-walker": "^2.0.2", "magic-string": "^0.25.7" } }, "node_modules/@vue/runtime-core": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.39.tgz", - "integrity": "sha512-xKH5XP57JW5JW+8ZG1khBbuLakINTgPuINKL01hStWLTTGFOrM49UfCFXBcFvWmSbci3gmJyLl2EAzCaZWsx8g==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.47.tgz", + "integrity": "sha512-RZxbLQIRB/K0ev0K9FXhNbBzT32H9iRtYbaXb0ZIz2usLms/D55dJR2t6cIEUn6vyhS3ALNvNthI+Q95C+NOpA==", "dev": true, "dependencies": { - "@vue/reactivity": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/reactivity": "3.2.47", + "@vue/shared": "3.2.47" } }, "node_modules/@vue/runtime-dom": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.39.tgz", - "integrity": "sha512-4G9AEJP+sLhsqf5wXcyKVWQKUhI+iWfy0hWQgea+CpaTD7BR0KdQzvoQdZhwCY6B3oleSyNLkLAQwm0ya/wNoA==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.47.tgz", + "integrity": "sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==", "dev": true, "dependencies": { - "@vue/runtime-core": "3.2.39", - "@vue/shared": "3.2.39", + "@vue/runtime-core": "3.2.47", + "@vue/shared": "3.2.47", "csstype": "^2.6.8" } }, "node_modules/@vue/server-renderer": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.39.tgz", - "integrity": "sha512-1yn9u2YBQWIgytFMjz4f/t0j43awKytTGVptfd3FtBk76t1pd8mxbek0G/DrnjJhd2V7mSTb5qgnxMYt8Z5iSQ==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.47.tgz", + "integrity": "sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==", "dev": true, "dependencies": { - "@vue/compiler-ssr": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-ssr": "3.2.47", + "@vue/shared": "3.2.47" }, "peerDependencies": { - "vue": "3.2.39" + "vue": "3.2.47" } }, "node_modules/@vue/shared": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.39.tgz", - "integrity": "sha512-D3dl2ZB9qE6mTuWPk9RlhDeP1dgNRUKC3NJxji74A4yL8M2MwlhLKUC/49WHjrNzSPug58fWx/yFbaTzGAQSBw==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.47.tgz", + "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==", "dev": true }, "node_modules/@vueuse/core": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.2.0.tgz", - "integrity": "sha512-/MZ6qpz6uSyaXrtoeBWQzAKRG3N7CvfVWvQxiM3ei3Xe5ydOjjtVbo7lGl9p8dECV93j7W8s63A8H0kFLpLyxg==", + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.12.0.tgz", + "integrity": "sha512-h/Di8Bvf6xRcvS/PvUVheiMYYz3U0tH3X25YxONSaAUBa841ayMwxkuzx/DGUMCW/wHWzD8tRy2zYmOC36r4sg==", "dev": true, "dependencies": { - "@types/web-bluetooth": "^0.0.15", - "@vueuse/metadata": "9.2.0", - "@vueuse/shared": "9.2.0", + "@types/web-bluetooth": "^0.0.16", + "@vueuse/metadata": "9.12.0", + "@vueuse/shared": "9.12.0", "vue-demi": "*" }, "funding": { @@ -1767,18 +2174,18 @@ } }, "node_modules/@vueuse/metadata": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.2.0.tgz", - "integrity": "sha512-exN4KE6iquxDCdt72BgEhb3tlOpECtD61AUdXnUqBTIUCl70x1Ar/QXo3bYcvxmdMS2/peQyfeTzBjRTpvL5xw==", + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.12.0.tgz", + "integrity": "sha512-9oJ9MM9lFLlmvxXUqsR1wLt1uF7EVbP5iYaHJYqk+G2PbMjY6EXvZeTjbdO89HgoF5cI6z49o2zT/jD9SVoNpQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/shared": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.2.0.tgz", - "integrity": "sha512-NnRp/noSWuXW0dKhZK5D0YLrDi0nmZ18UeEgwXQq7Ul5TTP93lcNnKjrHtd68j2xFB/l59yPGFlCryL692bnrA==", + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.12.0.tgz", + "integrity": "sha512-TWuJLACQ0BVithVTRbex4Wf1a1VaRuSpVeyEd4vMUWl54PzlE0ciFUshKCXnlLuD0lxIaLK4Ypj3NXYzZh4+SQ==", "dev": true, "dependencies": { "vue-demi": "*" @@ -1925,26 +2332,65 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/algoliasearch": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.14.2.tgz", - "integrity": "sha512-ngbEQonGEmf8dyEh5f+uOIihv4176dgbuOZspiuhmTTBRBuzWu3KCGHre6uHj5YyuC7pNvQGzB6ZNJyZi0z+Sg==", - "dev": true, - "dependencies": { - "@algolia/cache-browser-local-storage": "4.14.2", - "@algolia/cache-common": "4.14.2", - "@algolia/cache-in-memory": "4.14.2", - "@algolia/client-account": "4.14.2", - "@algolia/client-analytics": "4.14.2", - "@algolia/client-common": "4.14.2", - "@algolia/client-personalization": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/logger-common": "4.14.2", - "@algolia/logger-console": "4.14.2", - "@algolia/requester-browser-xhr": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/requester-node-http": "4.14.2", - "@algolia/transporter": "4.14.2" + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.14.3.tgz", + "integrity": "sha512-GZTEuxzfWbP/vr7ZJfGzIl8fOsoxN916Z6FY2Egc9q2TmZ6hvq5KfAxY89pPW01oW/2HDEKA8d30f9iAH9eXYg==", + "dev": true, + "dependencies": { + "@algolia/cache-browser-local-storage": "4.14.3", + "@algolia/cache-common": "4.14.3", + "@algolia/cache-in-memory": "4.14.3", + "@algolia/client-account": "4.14.3", + "@algolia/client-analytics": "4.14.3", + "@algolia/client-common": "4.14.3", + "@algolia/client-personalization": "4.14.3", + "@algolia/client-search": "4.14.3", + "@algolia/logger-common": "4.14.3", + "@algolia/logger-console": "4.14.3", + "@algolia/requester-browser-xhr": "4.14.3", + "@algolia/requester-common": "4.14.3", + "@algolia/requester-node-http": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "node_modules/ansi-align": { @@ -1974,6 +2420,12 @@ "node": ">=8" } }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", + "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==", + "dev": true + }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2046,15 +2498,15 @@ "dev": true }, "node_modules/array-includes": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", - "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5", - "get-intrinsic": "^1.1.1", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", "is-string": "^1.0.7" }, "engines": { @@ -2074,14 +2526,32 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", - "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -2100,32 +2570,24 @@ "node": "*" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", @@ -2151,9 +2613,9 @@ } }, "node_modules/body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dev": true, "dependencies": { "bytes": "3.1.2", @@ -2164,7 +2626,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.10.3", + "qs": "6.11.0", "raw-body": "2.5.1", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -2174,6 +2636,15 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/body-parser/node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/body-parser/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2189,21 +2660,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/body-scroll-lock": { "version": "4.0.0-beta.0", "resolved": "https://registry.npmjs.org/body-scroll-lock/-/body-scroll-lock-4.0.0-beta.0.tgz", @@ -2335,39 +2791,12 @@ "dev": true }, "node_modules/bson": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", - "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.0.0.tgz", + "integrity": "sha512-EL2KpZdyhshyyptj6pnQfnFKPoncD9KwZYvgmj/FXQiOUU1HWTHWmBOP4TZXU3YzStcI5qgpIl68YnMo16s26A==", "dev": true, - "dependencies": { - "buffer": "^5.6.0" - }, "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "node": ">=14.20.1" } }, "node_modules/buffer-equal-constant-time": { @@ -2392,24 +2821,24 @@ } }, "node_modules/bundle-require": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-3.1.0.tgz", - "integrity": "sha512-IIXtAO7fKcwPHNPt9kY/WNVJqy7NDy6YqJvv6ENH0TOZoJ+yjpEsn1w40WKZbR2ibfu5g1rfgJTvmFHpm5aOMA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.0.tgz", + "integrity": "sha512-5xjxGtR06579D7UcTBhcQO7Zg3A7ji5xuIUl7kNHSvVJ7/CmAs3bCosfYWNuD/Xm5k0jS9VFuPipSpm5S+ZlKw==", "dev": true, "dependencies": { - "load-tsconfig": "^0.2.0" + "load-tsconfig": "^0.2.3" }, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "peerDependencies": { - "esbuild": ">=0.13" + "esbuild": ">=0.17" } }, "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "dev": true, "engines": { "node": ">= 0.8" @@ -2451,32 +2880,27 @@ } }, "node_modules/cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "version": "17.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.4.tgz", + "integrity": "sha512-Z/nL3gU+zTUjz5pCA5vVjYM8pmaw2kxM7JEiE0fv3w77Wj+sFbi70CrBruUWH0uNcEdvLDixFpgA2JM4F4DBjA==", "dev": true, "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", "glob": "^8.0.1", - "infer-owner": "^1.0.4", "lru-cache": "^7.7.1", - "minipass": "^3.1.6", + "minipass": "^4.0.0", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", "p-map": "^4.0.0", "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11", - "unique-filename": "^2.0.0" + "unique-filename": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/cacache/node_modules/brace-expansion": { @@ -2489,9 +2913,9 @@ } }, "node_modules/cacache/node_modules/glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -2508,18 +2932,18 @@ } }, "node_modules/cacache/node_modules/lru-cache": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.0.tgz", - "integrity": "sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true, "engines": { "node": ">=12" } }, "node_modules/cacache/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -2589,14 +3013,14 @@ } }, "node_modules/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", - "deep-eql": "^3.0.1", + "deep-eql": "^4.1.2", "get-func-name": "^2.0.0", "loupe": "^2.3.1", "pathval": "^1.1.1", @@ -2802,31 +3226,82 @@ } }, "node_modules/commander": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", - "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", "dev": true, "engines": { "node": "^12.20.0 || >=14" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" } }, - "node_modules/config-chain/node_modules/ini": { + "node_modules/compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "dependencies": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/compression/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "node_modules/config-chain/node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", @@ -2870,9 +3345,9 @@ } }, "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, "engines": { "node": ">= 0.6" @@ -3030,15 +3505,15 @@ } }, "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, "dependencies": { "type-detect": "^4.0.0" }, "engines": { - "node": ">=0.12" + "node": ">=6" } }, "node_modules/deep-extend": { @@ -3087,15 +3562,6 @@ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true }, - "node_modules/denque": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", - "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -3235,9 +3701,9 @@ } }, "node_modules/engine.io": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.0.tgz", - "integrity": "sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.0.tgz", + "integrity": "sha512-OgxY1c/RuCSeO/rTr8DIFXx76IzUUft86R7/P7MMbbkuzeqJoTNw2lmeD91IyGz41QYleIIjWeMJGgug043sfQ==", "dev": true, "dependencies": { "@types/cookie": "^0.4.1", @@ -3249,16 +3715,16 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" + "ws": "~8.11.0" }, "engines": { "node": ">=10.0.0" } }, "node_modules/engine.io-parser": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", - "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz", + "integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==", "dev": true, "engines": { "node": ">=10.0.0" @@ -3289,34 +3755,44 @@ "dev": true }, "node_modules/es-abstract": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", - "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz", + "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", "dev": true, "dependencies": { + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.2", + "get-intrinsic": "^1.1.3", "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", + "internal-slot": "^1.0.4", + "is-array-buffer": "^3.0.1", + "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", "is-weakref": "^1.0.2", "object-inspect": "^1.12.2", "object-keys": "^1.1.1", "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.4.3", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" }, "engines": { "node": ">= 0.4" @@ -3325,6 +3801,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-shim-unscopables": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", @@ -3352,9 +3842,9 @@ } }, "node_modules/esbuild": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.8.tgz", - "integrity": "sha512-Remsk2dmr1Ia65sU+QasE6svJbsHe62lzR+CnjpUvbZ+uSYo1SitiOWPRfZQkCu82YWZBBKXiD/j0i//XWMZ+Q==", + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.6.tgz", + "integrity": "sha512-TKFRp9TxrJDdRWfSsSERKEovm6v30iHnrjlcGhLBOtReE28Yp1VSBRfO3GTaOFMoxsNerx4TjrhzSuma9ha83Q==", "dev": true, "hasInstallScript": true, "bin": { @@ -3364,546 +3854,515 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.15.8", - "@esbuild/linux-loong64": "0.15.8", - "esbuild-android-64": "0.15.8", - "esbuild-android-arm64": "0.15.8", - "esbuild-darwin-64": "0.15.8", - "esbuild-darwin-arm64": "0.15.8", - "esbuild-freebsd-64": "0.15.8", - "esbuild-freebsd-arm64": "0.15.8", - "esbuild-linux-32": "0.15.8", - "esbuild-linux-64": "0.15.8", - "esbuild-linux-arm": "0.15.8", - "esbuild-linux-arm64": "0.15.8", - "esbuild-linux-mips64le": "0.15.8", - "esbuild-linux-ppc64le": "0.15.8", - "esbuild-linux-riscv64": "0.15.8", - "esbuild-linux-s390x": "0.15.8", - "esbuild-netbsd-64": "0.15.8", - "esbuild-openbsd-64": "0.15.8", - "esbuild-sunos-64": "0.15.8", - "esbuild-windows-32": "0.15.8", - "esbuild-windows-64": "0.15.8", - "esbuild-windows-arm64": "0.15.8" - } - }, - "node_modules/esbuild-android-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.8.tgz", - "integrity": "sha512-bVh8FIKOolF7/d4AMzt7xHlL0Ljr+mYKSHI39TJWDkybVWHdn6+4ODL3xZGHOxPpdRpitemXA1WwMKYBsw8dGw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "dependencies": { - "esbuild-wasm": "0.15.8" - }, - "engines": { - "node": ">=12" + "@esbuild/android-arm": "0.17.6", + "@esbuild/android-arm64": "0.17.6", + "@esbuild/android-x64": "0.17.6", + "@esbuild/darwin-arm64": "0.17.6", + "@esbuild/darwin-x64": "0.17.6", + "@esbuild/freebsd-arm64": "0.17.6", + "@esbuild/freebsd-x64": "0.17.6", + "@esbuild/linux-arm": "0.17.6", + "@esbuild/linux-arm64": "0.17.6", + "@esbuild/linux-ia32": "0.17.6", + "@esbuild/linux-loong64": "0.17.6", + "@esbuild/linux-mips64el": "0.17.6", + "@esbuild/linux-ppc64": "0.17.6", + "@esbuild/linux-riscv64": "0.17.6", + "@esbuild/linux-s390x": "0.17.6", + "@esbuild/linux-x64": "0.17.6", + "@esbuild/netbsd-x64": "0.17.6", + "@esbuild/openbsd-x64": "0.17.6", + "@esbuild/sunos-x64": "0.17.6", + "@esbuild/win32-arm64": "0.17.6", + "@esbuild/win32-ia32": "0.17.6", + "@esbuild/win32-x64": "0.17.6" } }, - "node_modules/esbuild-android-arm64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.8.tgz", - "integrity": "sha512-ReAMDAHuo0H1h9LxRabI6gwYPn8k6WiUeyxuMvx17yTrJO+SCnIfNc/TSPFvDwtK9MiyiKG/2dBYHouT/M0BXQ==", - "cpu": [ - "arm64" - ], + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, - "optional": true, - "os": [ - "android" - ], "engines": { - "node": ">=12" + "node": ">=6" } }, - "node_modules/esbuild-darwin-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.8.tgz", - "integrity": "sha512-KaKcGfJ+yto7Fo5gAj3xwxHMd1fBIKatpCHK8znTJLVv+9+NN2/tIPBqA4w5rBwjX0UqXDeIE2v1xJP+nGEXgA==", - "cpu": [ - "x64" - ], + "node_modules/escape-goat": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", + "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", "dev": true, - "optional": true, - "os": [ - "darwin" - ], "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.8.tgz", - "integrity": "sha512-8tjEaBgAKnXCkP7bhEJmEqdG9HEV6oLkF36BrMzpfW2rgaw0c48Zrxe+9RlfeGvs6gDF4w+agXyTjikzsS3izw==", - "cpu": [ - "arm64" - ], + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": ">=12" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/esbuild-freebsd-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.8.tgz", - "integrity": "sha512-jaxcsGHYzn2L0/lffON2WfH4Nc+d/EwozVTP5K2v016zxMb5UQMhLoJzvLgBqHT1SG0B/mO+a+THnJCMVg15zw==", - "cpu": [ - "x64" - ], + "node_modules/eslint": { + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.33.0.tgz", + "integrity": "sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==", "dev": true, - "optional": true, - "os": [ - "freebsd" - ], + "dependencies": { + "@eslint/eslintrc": "^1.4.1", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/esbuild-freebsd-arm64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.8.tgz", - "integrity": "sha512-2xp2UlljMvX8HExtcg7VHaeQk8OBU0CSl1j18B5CcZmSDkLF9p3utuMXIopG3a08fr9Hv+Dz6+seSXUow/G51w==", - "cpu": [ - "arm64" - ], + "node_modules/eslint-config-prettier": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", + "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "node_modules/esbuild-linux-32": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.8.tgz", - "integrity": "sha512-9u1E54BRz1FQMl86iaHK146+4ID2KYNxL3trLZT4QLLx3M7Q9n4lGG3lrzqUatGR2cKy8c33b0iaCzsItZWkFg==", - "cpu": [ - "ia32" - ], + "node_modules/eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" } }, - "node_modules/esbuild-linux-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.8.tgz", - "integrity": "sha512-4HxrsN9eUzJXdVGMTYA5Xler82FuZUu21bXKN42zcLHHNKCAMPUzD62I+GwDhsdgUBAUj0tRXDdsQHgaP6v0HA==", - "cpu": [ - "x64" - ], + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "dependencies": { + "ms": "^2.1.1" } }, - "node_modules/esbuild-linux-arm": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.8.tgz", - "integrity": "sha512-7DVBU9SFjX4+vBwt8tHsUCbE6Vvl6y6FQWHAgyw1lybC5gULqn/WnjHYHN2/LJaZRsDBvxWT4msEgwLGq1Wd3Q==", - "cpu": [ - "arm" - ], + "node_modules/eslint-module-utils": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", "dev": true, - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "debug": "^3.2.7" + }, "engines": { - "node": ">=12" + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, - "node_modules/esbuild-linux-arm64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.8.tgz", - "integrity": "sha512-1OCm7Aq0tEJT70PbxmHSGYDLYP8DKH8r4Nk7/XbVzWaduo9beCjGBB+tGZIHK6DdTQ3h00/4Tb/70YMH/bOtKg==", - "cpu": [ - "arm64" - ], + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "dependencies": { + "ms": "^2.1.1" } }, - "node_modules/esbuild-linux-mips64le": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.8.tgz", - "integrity": "sha512-yeFoNPVFPEzZvFYBfUQNG2TjGRaCyV1E27OcOg4LOtnGrxb2wA+mkW3luckyv1CEyd00mpAg7UdHx8nlx3ghgA==", - "cpu": [ - "mips64el" - ], + "node_modules/eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", "dev": true, - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" + }, "engines": { - "node": ">=12" + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, - "node_modules/esbuild-linux-ppc64le": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.8.tgz", - "integrity": "sha512-CEyMMUUNabXibw8OSNmBXhOIGhnjNVl5Lpseiuf00iKN0V47oqDrbo4dsHz1wH62m49AR8iG8wpDlTqfYgKbtg==", - "cpu": [ - "ppc64" - ], + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "dependencies": { + "ms": "^2.1.1" } }, - "node_modules/esbuild-linux-riscv64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.8.tgz", - "integrity": "sha512-OCGSOaspMUjexSCU8ZiA0UnV/NiRU+s2vIfEcAQWQ6u32R+2luyfh/4ZaY6jFbylJE07Esc/yRvb9Q5fXuClXA==", - "cpu": [ - "riscv64" - ], + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "esutils": "^2.0.2" + }, "engines": { - "node": ">=12" + "node": ">=0.10.0" } }, - "node_modules/esbuild-linux-s390x": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.8.tgz", - "integrity": "sha512-RHdpdfxRTSrZXZJlFSLazFU4YwXLB5Rgf6Zr5rffqSsO4y9JybgtKO38bFwxZNlDXliYISXN/YROKrG9s7mZQA==", - "cpu": [ - "s390x" - ], + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/esbuild-netbsd-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.8.tgz", - "integrity": "sha512-VolFFRatBH09T5QMWhiohAWCOien1R1Uz9K0BRVVTBgBaVBt7eArsXTKxVhUgRf2vwu2c2SXkuP0r7HLG0eozw==", - "cpu": [ - "x64" - ], + "node_modules/eslint-plugin-prefer-arrow": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz", + "integrity": "sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==", "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" + "peerDependencies": { + "eslint": ">=2.0.0" } }, - "node_modules/esbuild-openbsd-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.8.tgz", - "integrity": "sha512-HTAPlg+n4kUeE/isQxlCfsOz0xJGNoT5LJ9oYZWFKABfVf4Ycu7Zlf5ITgOnrdheTkz8JeL/gISIOCFAoOXrSA==", - "cpu": [ - "x64" - ], + "node_modules/eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", "dev": true, - "optional": true, - "os": [ - "openbsd" - ], + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, "engines": { - "node": ">=12" + "node": ">=12.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } } }, - "node_modules/esbuild-sunos-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.8.tgz", - "integrity": "sha512-qMP/jR/FzcIOwKj+W+Lb+8Cfr8GZHbHUJxAPi7DUhNZMQ/6y7sOgRzlOSpRrbbUntrRZh0MqOyDhJ3Gpo6L1QA==", - "cpu": [ - "x64" - ], + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, - "optional": true, - "os": [ - "sunos" - ], + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, "engines": { - "node": ">=12" + "node": ">=8.0.0" } }, - "node_modules/esbuild-wasm": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.15.8.tgz", - "integrity": "sha512-Y7uCl5RNO4URjlemjdx++ukVHEMt5s5AfMWYUnMiK4Sry+pPCvQIctzXq6r6FKCyGKjX6/NGMCqR2OX6aLxj0w==", + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, - "optional": true, - "bin": { - "esbuild": "bin/esbuild" + "dependencies": { + "eslint-visitor-keys": "^2.0.0" }, "engines": { - "node": ">=12" + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" } }, - "node_modules/esbuild-windows-32": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.8.tgz", - "integrity": "sha512-RKR1QHh4iWzjUhkP8Yqi75PPz/KS+b8zw3wUrzw6oAkj+iU5Qtyj61ZDaSG3Qf2vc6hTIUiPqVTqBH0NpXFNwg==", - "cpu": [ - "ia32" - ], + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, - "optional": true, - "os": [ - "win32" - ], "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/esbuild-windows-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.8.tgz", - "integrity": "sha512-ag9ptYrsizgsR+PQE8QKeMqnosLvAMonQREpLw4evA4FFgOBMLEat/dY/9txbpozTw9eEOYyD3a4cE9yTu20FA==", - "cpu": [ - "x64" - ], + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, - "optional": true, - "os": [ - "win32" - ], "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/esbuild-windows-arm64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.8.tgz", - "integrity": "sha512-dbpAb0VyPaUs9mgw65KRfQ9rqiWCHpNzrJusoPu+LpEoswosjt/tFxN7cd2l68AT4qWdBkzAjDLRon7uqMeWcg==", - "cpu": [ - "arm64" - ], + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, - "optional": true, - "os": [ - "win32" - ], + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { - "node": ">=6" + "node": ">=4.0" } }, - "node_modules/escape-goat": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", - "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", + "node_modules/eslint/node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/espree": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4.0" } }, - "node_modules/eslint": { - "version": "8.23.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.1.tgz", - "integrity": "sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", - "@humanwhocodes/module-importer": "^1.0.1", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" + "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=4.0" } }, - "node_modules/eslint-config-prettier": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", - "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" + "engines": { + "node": ">=4.0" } }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, - "dependencies": { - "debug": "^3.2.7", - "resolve": "^1.20.0" + "engines": { + "node": ">=4.0" } }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "dependencies": { - "ms": "^2.1.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/eslint-module-utils": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", - "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true, - "dependencies": { - "debug": "^3.2.7" - }, "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } + "node": ">= 0.6" } }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/eslint-plugin-import": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", - "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dev": true, "dependencies": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.3", - "has": "^1.0.3", - "is-core-module": "^2.8.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.values": "^1.1.5", - "resolve": "^1.22.0", - "tsconfig-paths": "^3.14.1" + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" }, "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + "node": ">= 0.10.0" } }, - "node_modules/eslint-plugin-import/node_modules/debug": { + "node_modules/express/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", @@ -3912,297 +4371,264 @@ "ms": "2.0.0" } }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/ms": { + "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/eslint-plugin-prefer-arrow": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz", - "integrity": "sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==", - "dev": true, - "peerDependencies": { - "eslint": ">=2.0.0" - } + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, - "node_modules/eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", - "dev": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } - } + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" }, "engines": { - "node": ">=8.0.0" + "node": ">=8.6.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^2.0.0" + "is-glob": "^4.0.1" }, "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" + "node": ">= 6" } }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fast-memoize": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", + "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "dependencies": { + "reusify": "^1.0.4" } }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "node_modules/feathers-hooks-common": { + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/feathers-hooks-common/-/feathers-hooks-common-4.5.6.tgz", + "integrity": "sha512-z0KZP/igmHvEJX46x0f6UC/pSYFXUt/2OfgMwumElGqxwFYU4JrAnK8FbGwCo8MYowMDfpMk72ju+axbq9MV1Q==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "@feathers-plus/batch-loader": "0.3.0", + "@feathersjs/commons": "^1.2.0", + "@feathersjs/errors": "^3.0.0", + "ajv": "^5.2.0", + "debug": "^3.0.0", + "process": "0.11.10", + "traverse": "^0.6.6" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">= 6" } }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/feathers-hooks-common/node_modules/@feathers-plus/batch-loader": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@feathers-plus/batch-loader/-/batch-loader-0.3.0.tgz", + "integrity": "sha512-buElwyOZKVI34kD7jHt+czIDv1brjXLBPJ+7is+RC98JK+TyqWIUuBJ4E0ZMjPxwwkAJIN6IATyPgvhSXhkaxw==", "dev": true, "engines": { - "node": ">=4.0" + "node": ">= 6.0.0" } }, - "node_modules/eslint/node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "node_modules/feathers-hooks-common/node_modules/@feathersjs/commons": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-1.4.4.tgz", + "integrity": "sha512-ZPpzyZA3CPfoa9AuFv3BJUI/ubzaaXixp8T/pqeMFPT6DOaU/6oF7lz1RxwimzfJNna4gy/HByt0EoLSI3BKWg==", "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">= 6" } }, - "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "node_modules/feathers-hooks-common/node_modules/@feathersjs/errors": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-3.3.6.tgz", + "integrity": "sha512-VCohY/AQU13xYyZGl6rfdUgE+2bjaI76a4aEb6reIphHKgb4mnjYlg2PzS1/hcU1qUNi515kY9yQa5HsE7J1dQ==", "dev": true, "dependencies": { - "estraverse": "^5.1.0" + "debug": "^4.0.0" }, "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" + "node": ">= 6" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "node_modules/feathers-hooks-common/node_modules/@feathersjs/errors/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "estraverse": "^5.2.0" + "ms": "2.1.2" }, "engines": { - "node": ">=4.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/feathers-hooks-common/node_modules/ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha512-Ajr4IcMXq/2QmMkEmSvxqfLN5zGmJ92gHXAeOXq1OekoH2rfDNsgdDoL2f7QaRCy7G/E6TpxBVdRuNraMztGHw==", "dev": true, - "engines": { - "node": ">=4.0" + "dependencies": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "node_modules/feathers-hooks-common/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "engines": { - "node": ">=4.0" + "dependencies": { + "ms": "^2.1.1" } }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "node_modules/feathers-hooks-common/node_modules/fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha512-fueX787WZKCV0Is4/T2cyAdM4+x1S3MXXOAhavE1ys/W42SHAPacLTQhucja22QBYrfGw50M2sRiXPtTGv9Ymw==", "dev": true }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/feathers-hooks-common/node_modules/json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha512-4JD/Ivzg7PoW8NzdrBSr3UFwC9mHgvI7Z6z3QGBsSHgKaRTUDmyZAAKJo2UbG1kUVfS9WS8bi36N49U1xw43DA==", + "dev": true + }, + "node_modules/feathers-memory": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/feathers-memory/-/feathers-memory-4.1.0.tgz", + "integrity": "sha512-tR8DFqLsSk2w7tpSdHjA5RgPHTu3X5R3L3Kob2K+E3b/Q5cDkI6AYQarDQOiwekAyqxkkp/fm7Fg0qYdu4Ua6Q==", "dev": true, + "dependencies": { + "@feathersjs/adapter-commons": "^4.3.6", + "@feathersjs/commons": "^4.3.0", + "@feathersjs/errors": "^4.3.4", + "sift": "^8.5.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "node_modules/feathers-memory/node_modules/@feathersjs/commons": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-4.5.15.tgz", + "integrity": "sha512-eVEcLJL3GcPQBQcD77jI3fZ4MMx+iD02Px2Z1lDw+cn/iGCeQkWWAPQs4Tp+HGR1rTL5JO+unyhzN8V9X7OYmw==", "dev": true, "engines": { - "node": ">= 0.6" + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/daffl" } }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "node_modules/feathers-memory/node_modules/@feathersjs/errors": { + "version": "4.5.15", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-4.5.15.tgz", + "integrity": "sha512-EJAYWMsWZlUA/halbgZBc6eP2d3HPkHi5GzprYEK58GCh51KJ36VjX7VKVEnMjgBSED+PE00tpr3ZvUC4nUR+Q==", + "dev": true, + "dependencies": { + "debug": "^4.3.3" + }, "engines": { - "node": ">=0.8.x" + "node": ">= 10" } }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "node_modules/feathers-memory/node_modules/sift": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-8.5.1.tgz", + "integrity": "sha512-um2rEdXrc4YcRMzIliuip4i2o92mJONh5W1VD9vJlm1e0apVqMK4P2ZUijz8BIe1/oYLWmXwXaKFM+fOaO3Ysg==", + "dev": true + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=10" + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "engines": { + "node": ">=8" } }, - "node_modules/express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dev": true, "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.0", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.10.3", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" + "unpipe": "~1.0.0" }, "engines": { - "node": ">= 0.10.0" + "node": ">= 0.8" } }, - "node_modules/express/node_modules/debug": { + "node_modules/finalhandler/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", @@ -4211,449 +4637,177 @@ "ms": "2.0.0" } }, - "node_modules/express/node_modules/ms": { + "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/express/node_modules/qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "side-channel": "^1.0.4" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=0.6" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" + "bin": { + "flat": "cli.js" } }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "engines": { - "node": ">= 6" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fast-memoize": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", - "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==", + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, "dependencies": { - "reusify": "^1.0.4" + "is-callable": "^1.1.3" } }, - "node_modules/feathers-hooks-common": { - "version": "4.5.6", - "resolved": "https://registry.npmjs.org/feathers-hooks-common/-/feathers-hooks-common-4.5.6.tgz", - "integrity": "sha512-z0KZP/igmHvEJX46x0f6UC/pSYFXUt/2OfgMwumElGqxwFYU4JrAnK8FbGwCo8MYowMDfpMk72ju+axbq9MV1Q==", + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, "dependencies": { - "@feathers-plus/batch-loader": "0.3.0", - "@feathersjs/commons": "^1.2.0", - "@feathersjs/errors": "^3.0.0", - "ajv": "^5.2.0", - "debug": "^3.0.0", - "process": "0.11.10", - "traverse": "^0.6.6" + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" }, "engines": { - "node": ">= 6" + "node": ">=8.0.0" } }, - "node_modules/feathers-hooks-common/node_modules/@feathers-plus/batch-loader": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@feathers-plus/batch-loader/-/batch-loader-0.3.0.tgz", - "integrity": "sha512-buElwyOZKVI34kD7jHt+czIDv1brjXLBPJ+7is+RC98JK+TyqWIUuBJ4E0ZMjPxwwkAJIN6IATyPgvhSXhkaxw==", + "node_modules/form-data-encoder": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.2.tgz", + "integrity": "sha512-FCaIOVTRA9E0siY6FeXid7D5yrCqpsErplUkE2a1BEiKj1BE9z6FbKB4ntDTwC4NVLie9p+4E9nX4mWwEOT05A==", "dev": true, "engines": { - "node": ">= 6.0.0" + "node": ">= 14.17" } }, - "node_modules/feathers-hooks-common/node_modules/@feathersjs/commons": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-1.4.4.tgz", - "integrity": "sha512-ZPpzyZA3CPfoa9AuFv3BJUI/ubzaaXixp8T/pqeMFPT6DOaU/6oF7lz1RxwimzfJNna4gy/HByt0EoLSI3BKWg==", + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true, "engines": { - "node": ">= 6" + "node": ">= 0.6" } }, - "node_modules/feathers-hooks-common/node_modules/@feathersjs/errors": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-3.3.6.tgz", - "integrity": "sha512-VCohY/AQU13xYyZGl6rfdUgE+2bjaI76a4aEb6reIphHKgb4mnjYlg2PzS1/hcU1qUNi515kY9yQa5HsE7J1dQ==", + "node_modules/fp-and-or": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz", + "integrity": "sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g==", "dev": true, - "dependencies": { - "debug": "^4.0.0" - }, "engines": { - "node": ">= 6" + "node": ">=10" } }, - "node_modules/feathers-hooks-common/node_modules/@feathersjs/errors/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true, - "dependencies": { - "ms": "2.1.2" - }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">= 0.6" } }, - "node_modules/feathers-hooks-common/node_modules/ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha512-Ajr4IcMXq/2QmMkEmSvxqfLN5zGmJ92gHXAeOXq1OekoH2rfDNsgdDoL2f7QaRCy7G/E6TpxBVdRuNraMztGHw==", + "node_modules/fs-minipass": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.1.tgz", + "integrity": "sha512-MhaJDcFRTuLidHrIttu0RDGyyXs/IYHVmlcxfLAEFIWjc1vdLAkdwT7Ace2u7DbitWC0toKMl5eJZRYNVreIMw==", "dev": true, "dependencies": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "minipass": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/feathers-hooks-common/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "dependencies": { - "ms": "^2.1.1" + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/feathers-hooks-common/node_modules/fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha512-fueX787WZKCV0Is4/T2cyAdM4+x1S3MXXOAhavE1ys/W42SHAPacLTQhucja22QBYrfGw50M2sRiXPtTGv9Ymw==", - "dev": true - }, - "node_modules/feathers-hooks-common/node_modules/json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha512-4JD/Ivzg7PoW8NzdrBSr3UFwC9mHgvI7Z6z3QGBsSHgKaRTUDmyZAAKJo2UbG1kUVfS9WS8bi36N49U1xw43DA==", + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "node_modules/feathers-memory": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/feathers-memory/-/feathers-memory-4.1.0.tgz", - "integrity": "sha512-tR8DFqLsSk2w7tpSdHjA5RgPHTu3X5R3L3Kob2K+E3b/Q5cDkI6AYQarDQOiwekAyqxkkp/fm7Fg0qYdu4Ua6Q==", + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", "dev": true, "dependencies": { - "@feathersjs/adapter-commons": "^4.3.6", - "@feathersjs/commons": "^4.3.0", - "@feathersjs/errors": "^4.3.4", - "sift": "^8.5.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" }, "engines": { - "node": ">= 8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/feathers-memory/node_modules/@feathersjs/commons": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-4.5.15.tgz", - "integrity": "sha512-eVEcLJL3GcPQBQcD77jI3fZ4MMx+iD02Px2Z1lDw+cn/iGCeQkWWAPQs4Tp+HGR1rTL5JO+unyhzN8V9X7OYmw==", + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, - "engines": { - "node": ">= 10" - }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/daffl" - } - }, - "node_modules/feathers-memory/node_modules/@feathersjs/errors": { - "version": "4.5.15", - "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-4.5.15.tgz", - "integrity": "sha512-EJAYWMsWZlUA/halbgZBc6eP2d3HPkHi5GzprYEK58GCh51KJ36VjX7VKVEnMjgBSED+PE00tpr3ZvUC4nUR+Q==", - "dev": true, - "dependencies": { - "debug": "^4.3.3" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/feathers-memory/node_modules/sift": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/sift/-/sift-8.5.1.tgz", - "integrity": "sha512-um2rEdXrc4YcRMzIliuip4i2o92mJONh5W1VD9vJlm1e0apVqMK4P2ZUijz8BIe1/oYLWmXwXaKFM+fOaO3Ysg==", - "dev": true - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "node_modules/foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/form-data-encoder": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.2.tgz", - "integrity": "sha512-FCaIOVTRA9E0siY6FeXid7D5yrCqpsErplUkE2a1BEiKj1BE9z6FbKB4ntDTwC4NVLie9p+4E9nX4mWwEOT05A==", - "dev": true, - "engines": { - "node": ">= 14.17" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fp-and-or": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz", - "integrity": "sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/gauge": { @@ -4703,9 +4857,9 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", "dev": true, "dependencies": { "function-bind": "^1.1.1", @@ -4804,9 +4958,9 @@ } }, "node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -4818,6 +4972,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -4838,6 +5007,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/got": { "version": "12.5.0", "resolved": "https://registry.npmjs.org/got/-/got-12.5.0.tgz", @@ -4943,10 +5124,22 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, "engines": { "node": ">= 0.4" @@ -5004,9 +5197,9 @@ } }, "node_modules/hosted-git-info": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.1.0.tgz", - "integrity": "sha512-Ek+QmMEqZF8XrbFdwoDjSbm7rT23pCgEMOJmz6GPk/s4yH//RQfNPArhIxbguNxROq/+5lNBwCDHMhA903Kx1Q==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", + "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", "dev": true, "dependencies": { "lru-cache": "^7.5.1" @@ -5016,9 +5209,9 @@ } }, "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.0.tgz", - "integrity": "sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true, "engines": { "node": ">=12" @@ -5031,9 +5224,9 @@ "dev": true }, "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true }, "node_modules/http-errors": { @@ -5122,26 +5315,6 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", @@ -5152,15 +5325,15 @@ } }, "node_modules/ignore-walk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", - "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.1.tgz", + "integrity": "sha512-/c8MxUAqpRccq+LyDOecwF+9KqajueJHh8fz7g3YqjMZt+NSfJzx05zrKiXwa2sKwFCzaiZ5qUVfRj0pmxixEA==", "dev": true, "dependencies": { - "minimatch": "^5.0.1" + "minimatch": "^6.1.6" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/ignore-walk/node_modules/brace-expansion": { @@ -5173,15 +5346,18 @@ } }, "node_modules/ignore-walk/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.1.6.tgz", + "integrity": "sha512-6bR3UIeh/DF8+p6A9Spyuy67ShOq42rOkHWi7eUe3Ua99Zo5lZfGC6lJJWkeoK4k9jQFT3Pl7czhTXimG2XheA==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/import-fresh": { @@ -5259,12 +5435,12 @@ } }, "node_modules/internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", + "integrity": "sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.0", + "get-intrinsic": "^1.1.3", "has": "^1.0.3", "side-channel": "^1.0.4" }, @@ -5296,6 +5472,20 @@ "node": ">= 0.10" } }, + "node_modules/is-array-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", + "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -5337,9 +5527,9 @@ } }, "node_modules/is-callable": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.6.tgz", - "integrity": "sha512-krO72EO2NptOGAX2KYyqbP9vYMlNAXdB53rq6f8LXY6RY7JdSR/3BD6wLUlPHSAesmY9vstNrjvqGaCiRK/91Q==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "engines": { "node": ">= 0.4" @@ -5361,9 +5551,9 @@ } }, "node_modules/is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -5584,6 +5774,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -5711,10 +5920,13 @@ "dev": true }, "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/json-parse-helpfulerror": { "version": "1.0.3", @@ -5725,21 +5937,19 @@ "jju": "^1.1.0" } }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, "node_modules/json-schema-to-ts": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-2.5.5.tgz", - "integrity": "sha512-GFD5t0fUnX/B0gE9xbHjxv2BwFXRJND2+OKoLoMElJ3XRJ7dOBlLT7KXpg96aETeZ0RJbAZOfqHALBf5k4aIIA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-2.6.2.tgz", + "integrity": "sha512-RrcvhZUcTAtfMVSvHIq3h/tELToha68V/1kGeQ2ggBv/4Bv31Zjbqis+b+Hiwibj6GO5WLA9PE4X93C8VTJ1TA==", "dev": true, "dependencies": { + "@babel/runtime": "^7.18.3", "@types/json-schema": "^7.0.9", "ts-algebra": "^1.1.1", "ts-toolbelt": "^9.6.0" + }, + "engines": { + "node": ">=16" } }, "node_modules/json-schema-traverse": { @@ -5754,9 +5964,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -5787,34 +5997,19 @@ ] }, "node_modules/jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", "dev": true, "dependencies": { "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", + "lodash": "^4.17.21", "ms": "^2.1.1", - "semver": "^5.6.0" + "semver": "^7.3.8" }, "engines": { - "node": ">=4", - "npm": ">=1.4.28" - } - }, - "node_modules/jsonwebtoken/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" + "node": ">=12", + "npm": ">=6" } }, "node_modules/jwa": { @@ -5928,54 +6123,12 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "node_modules/lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", - "dev": true - }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", - "dev": true - }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", - "dev": true - }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", - "dev": true - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true - }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", - "dev": true - }, "node_modules/lodash.merge": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==", "dev": true }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "dev": true - }, "node_modules/lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -6101,15 +6254,163 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/make-fetch-happen/node_modules/@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "dev": true, + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "dev": true, + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/make-fetch-happen/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/make-fetch-happen/node_modules/lru-cache": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.0.tgz", - "integrity": "sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true, "engines": { "node": ">=12" } }, + "node_modules/make-fetch-happen/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-fetch-happen/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/make-fetch-happen/node_modules/ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "dev": true, + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "dev": true, + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -6242,13 +6543,10 @@ "dev": true }, "node_modules/minipass": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz", - "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.3.tgz", + "integrity": "sha512-OW2r4sQ0sI+z5ckEt5c1Tri4xTgZwYDxpE54eqWlQloQRoWtXjqt9udJ5Z4dSv7wK+nfFI7FRXyCpBSft+gpFw==", "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { "node": ">=8" } @@ -6265,6 +6563,24 @@ "node": ">= 8" } }, + "node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-collect/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/minipass-fetch": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", @@ -6282,9 +6598,27 @@ "encoding": "^0.1.13" } }, - "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "node_modules/minipass-fetch/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-fetch/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dev": true, "dependencies": { @@ -6294,6 +6628,24 @@ "node": ">= 8" } }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/minipass-json-stream": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", @@ -6304,6 +6656,24 @@ "minipass": "^3.0.0" } }, + "node_modules/minipass-json-stream/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-json-stream/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/minipass-pipeline": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", @@ -6316,6 +6686,24 @@ "node": ">=8" } }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/minipass-sized": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", @@ -6328,7 +6716,19 @@ "node": ">=8" } }, - "node_modules/minipass/node_modules/yallist": { + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", @@ -6347,6 +6747,18 @@ "node": ">= 8" } }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minizlib/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -6366,12 +6778,11 @@ } }, "node_modules/mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "dependencies": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", @@ -6464,27 +6875,42 @@ "dev": true }, "node_modules/mongodb": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.10.0.tgz", - "integrity": "sha512-My2QxLTw0Cc1O9gih0mz4mqo145Jq4rLAQx0Glk/Ha9iYBzYpt4I2QFNRIh35uNFNfe8KFQcdwY1/HKxXBkinw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.0.1.tgz", + "integrity": "sha512-KpjtY+NWFmcic6UDYEdfn768ZTuKyv7CRaui7ZSd6q/0/o1AURMC7KygTUwB1Cl8V10Pe5NiP+Y2eBMCDs/ygQ==", "dev": true, "dependencies": { - "bson": "^4.7.0", - "denque": "^2.1.0", - "mongodb-connection-string-url": "^2.5.3", - "socks": "^2.7.0" + "bson": "^5.0.0", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" }, "engines": { - "node": ">=12.9.0" + "node": ">=14.20.1" }, "optionalDependencies": { "saslprep": "^1.0.3" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.201.0", + "mongodb-client-encryption": "^2.3.0", + "snappy": "^7.2.2" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + } } }, "node_modules/mongodb-connection-string-url": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", - "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", + "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", "dev": true, "dependencies": { "@types/whatwg-url": "^8.2.1", @@ -6525,6 +6951,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -6535,16 +6967,16 @@ } }, "node_modules/node-gyp": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.1.0.tgz", - "integrity": "sha512-HkmN0ZpQJU7FLbJauJTHkHlSVAXlNGDAzH/VYFZGDOnFyn/Na3GlNJfkudmufOdS6/jNFhy88ObzL7ERz9es1g==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", + "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", "dev": true, "dependencies": { "env-paths": "^2.2.0", "glob": "^7.1.4", "graceful-fs": "^4.2.6", "make-fetch-happen": "^10.0.3", - "nopt": "^5.0.0", + "nopt": "^6.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", "semver": "^7.3.5", @@ -6555,37 +6987,58 @@ "node-gyp": "bin/node-gyp.js" }, "engines": { - "node": "^12.22 || ^14.13 || >=16" + "node": "^12.13 || ^14.13 || >=16" } }, "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", "dev": true, "dependencies": { - "abbrev": "1" + "abbrev": "^1.0.0" }, "bin": { "nopt": "bin/nopt.js" }, "engines": { - "node": ">=6" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/normalize-package-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.1.tgz", - "integrity": "sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", "dev": true, "dependencies": { - "hosted-git-info": "^5.0.0", + "hosted-git-info": "^6.0.0", "is-core-module": "^2.8.1", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/normalize-package-data/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/normalize-package-data/node_modules/lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "dev": true, + "engines": { + "node": ">=12" } }, "node_modules/normalize-path": { @@ -6610,48 +7063,52 @@ } }, "node_modules/npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", "dev": true, "dependencies": { - "npm-normalize-package-bin": "^1.0.1" + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-check-updates": { - "version": "16.2.1", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.2.1.tgz", - "integrity": "sha512-WPKs8BZeSQMFfK9ABk4ZtdcWYG1J9LjtQ8nOBZ2aZc0kejlJtBchZHkyezuQbWcJQDW06zyforgjG5/ts+zh4w==", + "version": "16.6.5", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.6.5.tgz", + "integrity": "sha512-2bgM6NfqampA3HrKbYVqLvryli48Cz9Ae2uSZN9tfsVJ1ftTpBEoXahU6H5eYOJT5oZ/DMY+Z014daNcWqjGmQ==", "dev": true, "dependencies": { - "chalk": "^5.0.1", + "chalk": "^5.2.0", "cli-table": "^0.3.11", - "commander": "^9.4.0", + "commander": "^9.4.1", "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^0.1.3", "get-stdin": "^8.0.0", "globby": "^11.0.4", "hosted-git-info": "^5.1.0", + "ini": "^3.0.1", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "lodash": "^4.17.21", - "minimatch": "^5.1.0", + "minimatch": "^5.1.2", "p-map": "^4.0.0", - "pacote": "^13.6.2", + "pacote": "15.0.8", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts-ncu": "^2.5.1", - "rc-config-loader": "^4.1.0", + "rc-config-loader": "^4.1.1", "remote-git-tags": "^3.0.0", "rimraf": "^3.0.2", - "semver": "^7.3.7", + "semver": "^7.3.8", "semver-utils": "^1.1.4", "source-map-support": "^0.5.21", - "spawn-please": "^1.0.0", + "spawn-please": "^2.0.1", "untildify": "^4.0.0", "update-notifier": "^6.0.2", - "yaml": "^2.1.1" + "yaml": "^2.2.0" }, "bin": { "ncu": "build/src/bin/cli.js", @@ -6671,9 +7128,9 @@ } }, "node_modules/npm-check-updates/node_modules/chalk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", - "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", "dev": true, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -6682,10 +7139,19 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/npm-check-updates/node_modules/ini": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", + "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/npm-check-updates/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -6695,157 +7161,157 @@ } }, "node_modules/npm-install-checks": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz", - "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz", + "integrity": "sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q==", "dev": true, "dependencies": { "semver": "^7.1.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz", + "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/npm-package-arg": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.0.tgz", - "integrity": "sha512-4J0GL+u2Nh6OnhvUKXRr2ZMG4lR8qtLp+kv7UiV00Y+nGiSxtttCyIRHCt5L5BNkXQld/RceYItau3MDOoGiBw==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "dev": true, "dependencies": { - "hosted-git-info": "^5.0.0", - "proc-log": "^2.0.1", + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", "semver": "^7.3.5", - "validate-npm-package-name": "^4.0.0" + "validate-npm-package-name": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-packlist": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz", - "integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==", + "node_modules/npm-package-arg/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, "dependencies": { - "glob": "^8.0.1", - "ignore-walk": "^5.0.1", - "npm-bundled": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0" - }, - "bin": { - "npm-packlist": "bin/index.js" + "lru-cache": "^7.5.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-packlist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/npm-package-arg/node_modules/lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" + "engines": { + "node": ">=12" } }, - "node_modules/npm-packlist/node_modules/glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "node_modules/npm-packlist": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "ignore-walk": "^6.0.0" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-packlist/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "node_modules/npm-pick-manifest": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz", + "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" }, "engines": { - "node": ">=10" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-packlist/node_modules/npm-bundled": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-2.0.1.tgz", - "integrity": "sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==", + "node_modules/npm-registry-fetch": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz", + "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==", "dev": true, "dependencies": { - "npm-normalize-package-bin": "^2.0.0" + "make-fetch-happen": "^11.0.0", + "minipass": "^4.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-packlist/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", + "node_modules/npm-registry-fetch/node_modules/lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/npm-pick-manifest": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.2.tgz", - "integrity": "sha512-gk37SyRmlIjvTfcYl6RzDbSmS9Y4TOBXfsPnoYqTHARNgWbyDiCSMLUpmALDj4jjcTZpURiEfsSHJj9k7EV4Rw==", + "node_modules/npm-registry-fetch/node_modules/make-fetch-happen": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.3.tgz", + "integrity": "sha512-oPLh5m10lRNNZDjJ2kP8UpboUx2uFXVaVweVe/lWut4iHWcQEmfqSVJt2ihZsFI8HbpwyyocaXbCAWf0g1ukIA==", "dev": true, "dependencies": { - "npm-install-checks": "^5.0.0", - "npm-normalize-package-bin": "^2.0.0", - "npm-package-arg": "^9.0.0", - "semver": "^7.3.5" + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-registry-fetch": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.3.1.tgz", - "integrity": "sha512-eukJPi++DKRTjSBRcDZSDDsGqRK3ehbxfFUcgaRd0Yp6kRwOwh2WVn0r+8rMB4nnuzvAk6rQVzl6K5CkYOmnvw==", + "node_modules/npm-registry-fetch/node_modules/minipass-fetch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz", + "integrity": "sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw==", "dev": true, "dependencies": { - "make-fetch-happen": "^10.0.6", - "minipass": "^3.1.6", - "minipass-fetch": "^2.0.3", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.1", - "proc-log": "^2.0.0" + "minipass": "^4.0.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" } }, "node_modules/npm-run-path": { @@ -6875,12 +7341,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/nprogress": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", - "integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==", - "dev": true - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -6891,9 +7351,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6927,14 +7387,14 @@ } }, "node_modules/object.values": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", - "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "engines": { "node": ">= 0.4" @@ -6955,6 +7415,15 @@ "node": ">= 0.8" } }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -7069,38 +7538,34 @@ } }, "node_modules/pacote": { - "version": "13.6.2", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.6.2.tgz", - "integrity": "sha512-Gu8fU3GsvOPkak2CkbojR7vjs3k3P9cA6uazKTHdsdV0gpCEQq2opelnEv30KRQWgVzP5Vd/5umjcedma3MKtg==", - "dev": true, - "dependencies": { - "@npmcli/git": "^3.0.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/run-script": "^4.1.0", - "cacache": "^16.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "infer-owner": "^1.0.4", - "minipass": "^3.1.6", - "mkdirp": "^1.0.4", - "npm-package-arg": "^9.0.0", - "npm-packlist": "^5.1.0", - "npm-pick-manifest": "^7.0.0", - "npm-registry-fetch": "^13.0.1", - "proc-log": "^2.0.0", + "version": "15.0.8", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.8.tgz", + "integrity": "sha512-UlcumB/XS6xyyIMwg/WwMAyUmga+RivB5KgkRwA1hZNtrx+0Bt41KxHCvg1kr0pZ/ZeD8qjhW4fph6VaYRCbLw==", + "dev": true, + "dependencies": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^4.0.0", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", "promise-retry": "^2.0.1", - "read-package-json": "^5.0.0", - "read-package-json-fast": "^2.0.3", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11" }, "bin": { "pacote": "lib/bin.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/parent-module": { @@ -7221,9 +7686,9 @@ } }, "node_modules/postcss": { - "version": "8.4.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", - "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", "dev": true, "funding": [ { @@ -7295,9 +7760,9 @@ } }, "node_modules/preact": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.11.0.tgz", - "integrity": "sha512-Fk6+vB2kb6mSJfDgODq0YDhMfl0HNtK5+Uc9QqECO4nlyPAQwCI+BKyWO//idA7ikV7o+0Fm6LQmNuQi1wXI1w==", + "version": "10.12.0", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.12.0.tgz", + "integrity": "sha512-+w8ix+huD8CNZemheC53IPjMUFk921i02o30u0K6h53spMX41y/QhVDnG/nU2k42/69tvqWmVsgNLIiwRAcmxg==", "dev": true, "funding": { "type": "opencollective", @@ -7314,9 +7779,9 @@ } }, "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -7341,12 +7806,12 @@ } }, "node_modules/proc-log": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", - "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/process": { @@ -7527,6 +7992,15 @@ "node": ">= 0.8" } }, + "node_modules/raw-body/node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -7543,14 +8017,14 @@ } }, "node_modules/rc-config-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.0.tgz", - "integrity": "sha512-aW+kX4qy0CiM9L4fG4Us3oEOpIrOrXzWykAn+xldD07Y9PXWjTH744oHbv0Kc9ZwWaylw3jMjxaf14RgStrNrA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.2.tgz", + "integrity": "sha512-qKTnVWFl9OQYKATPzdfaZIbTxcHziQl92zYSxYC6umhOqyAsoj8H8Gq/+aFjAso68sBdjTz3A7omqeAkkF1MWg==", "dev": true, "dependencies": { - "debug": "^4.1.1", - "js-yaml": "^4.0.0", - "json5": "^2.1.2", + "debug": "^4.3.4", + "js-yaml": "^4.1.0", + "json5": "^2.2.2", "require-from-string": "^2.0.2" } }, @@ -7570,31 +8044,31 @@ } }, "node_modules/read-package-json": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.2.tgz", - "integrity": "sha512-BSzugrt4kQ/Z0krro8zhTwV1Kd79ue25IhNN/VtHFy1mG/6Tluyi+msc0UpwaoQzxSHa28mntAjIZY6kEgfR9Q==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz", + "integrity": "sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==", "dev": true, "dependencies": { "glob": "^8.0.1", - "json-parse-even-better-errors": "^2.3.1", - "normalize-package-data": "^4.0.0", - "npm-normalize-package-bin": "^2.0.0" + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json-fast": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", - "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", "dev": true, "dependencies": { - "json-parse-even-better-errors": "^2.3.0", - "npm-normalize-package-bin": "^1.0.1" + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "engines": { - "node": ">=10" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json/node_modules/brace-expansion": { @@ -7607,9 +8081,9 @@ } }, "node_modules/read-package-json/node_modules/glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -7626,9 +8100,9 @@ } }, "node_modules/read-package-json/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -7637,15 +8111,6 @@ "node": ">=10" } }, - "node_modules/read-package-json/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, "node_modules/readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -7684,6 +8149,12 @@ "node": ">= 0.10" } }, + "node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "dev": true + }, "node_modules/regexp.prototype.flags": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", @@ -7849,15 +8320,16 @@ } }, "node_modules/rollup": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.0.tgz", - "integrity": "sha512-x4KsrCgwQ7ZJPcFA/SUu6QVcYlO7uRLfLAy0DSA4NS2eG8japdbpM50ToH7z4iObodRYOJ0soneF0iaQRJ6zhA==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.14.0.tgz", + "integrity": "sha512-o23sdgCLcLSe3zIplT9nQ1+r97okuaiR+vmAPZPTDYB7/f3tgWIYNyiQveMsZwshBT0is4eGax/HH83Q7CG+/Q==", "dev": true, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=10.0.0" + "node": ">=14.18.0", + "npm": ">=8.0.0" }, "optionalDependencies": { "fsevents": "~2.3.2" @@ -7906,6 +8378,20 @@ } ] }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -7926,9 +8412,9 @@ } }, "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -8099,14 +8585,15 @@ } }, "node_modules/shiki": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.11.1.tgz", - "integrity": "sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.0.tgz", + "integrity": "sha512-fb9Fg1Yx/ElVJcTqPQIEOSfn7mSZlrT1W3CkymY08lL2Jsi+t7jPcZzKO1lCsQwlSDuyNhHvolnyA2OI4EgJNg==", "dev": true, "dependencies": { - "jsonc-parser": "^3.0.0", - "vscode-oniguruma": "^1.6.1", - "vscode-textmate": "^6.0.0" + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" } }, "node_modules/short-hash": { @@ -8149,9 +8636,9 @@ } }, "node_modules/sift": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz", - "integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", + "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==", "dev": true }, "node_modules/signal-exit": { @@ -8186,32 +8673,35 @@ } }, "node_modules/socket.io": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", - "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.0.tgz", + "integrity": "sha512-b65bp6INPk/BMMrIgVvX12x3Q+NqlGqSlTuvKQWt0BUJ3Hyy3JangBl7fEoWZTXbOKlCqNPbQ6MbWgok/km28w==", "dev": true, "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" + "engine.io": "~6.4.0", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.1" }, "engines": { "node": ">=10.0.0" } }, "node_modules/socket.io-adapter": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", - "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==", - "dev": true + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", + "dev": true, + "dependencies": { + "ws": "~8.11.0" + } }, "node_modules/socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.2.tgz", + "integrity": "sha512-DJtziuKypFkMMHCm2uIshOYC7QaylbtzQwiMYDuCKy3OPkjLzu4B2vAhTlqipRHHzrI0NJeBAizTK7X+6m1jVw==", "dev": true, "dependencies": { "@socket.io/component-emitter": "~3.1.0", @@ -8222,9 +8712,9 @@ } }, "node_modules/socks": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", - "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", "dev": true, "dependencies": { "ip": "^2.0.0", @@ -8293,6 +8783,7 @@ "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", "dev": true }, "node_modules/sparse-bitfield": { @@ -8306,12 +8797,15 @@ } }, "node_modules/spawn-please": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-1.0.0.tgz", - "integrity": "sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-2.0.1.tgz", + "integrity": "sha512-W+cFbZR2q2mMTfjz5ZGvhBAiX+e/zczFCNlbS9mxiSdYswBXwUuBUT+a0urH+xZZa8f/bs0mXHyZsZHR9hKogA==", "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3" + }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/spdx-correct": { @@ -8347,15 +8841,15 @@ "dev": true }, "node_modules/ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz", + "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==", "dev": true, "dependencies": { - "minipass": "^3.1.1" + "minipass": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/statuses": { @@ -8391,28 +8885,28 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8535,20 +9029,44 @@ } }, "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", "dev": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^4.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "engines": { - "node": ">= 10" + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/tar/node_modules/yallist": { @@ -8632,9 +9150,12 @@ } }, "node_modules/traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw==" + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", + "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/tree-kill": { "version": "1.2.2", @@ -8749,22 +9270,22 @@ "dev": true }, "node_modules/tsup": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.2.3.tgz", - "integrity": "sha512-J5Pu2Dx0E1wlpIEsVFv9ryzP1pZ1OYsJ2cBHZ7GrKteytNdzaSz5hmLX7/nAxtypq+jVkVvA79d7S83ETgHQ5w==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.6.0.tgz", + "integrity": "sha512-HxZE7Hj5yNxLFftCXdcJ+Jsax8dI4oKb0bt8fIvd1g/W0FZ46sU1pFBVo15WpOERFcEMH7Hykey/Q+hKO4s9RQ==", "dev": true, "dependencies": { - "bundle-require": "^3.1.0", + "bundle-require": "^4.0.0", "cac": "^6.7.12", "chokidar": "^3.5.1", "debug": "^4.3.1", - "esbuild": "^0.15.1", + "esbuild": "^0.17.6", "execa": "^5.0.0", "globby": "^11.0.3", "joycon": "^3.0.1", "postcss-load-config": "^3.0.1", "resolve-from": "^5.0.0", - "rollup": "^2.74.1", + "rollup": "^3.2.5", "source-map": "0.8.0-beta.0", "sucrase": "^3.20.3", "tree-kill": "^1.2.2" @@ -8882,361 +9403,756 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uberproto": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/uberproto/-/uberproto-2.0.6.tgz", + "integrity": "sha512-68H97HffZoFaa3HFtpstahWorN9dSp5uTU6jo3GjIQ6JkJBR3hC2Nx/e/HFOoYHdUyT/Z1MRWfxN1EiQJZUyCQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dev": true, + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-string": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", + "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", + "dev": true, + "dependencies": { + "crypto-random-string": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/update-notifier": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz", + "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==", + "dev": true, + "dependencies": { + "boxen": "^7.0.0", + "chalk": "^5.0.1", + "configstore": "^6.0.0", + "has-yarn": "^3.0.0", + "import-lazy": "^4.0.0", + "is-ci": "^3.0.1", + "is-installed-globally": "^0.4.0", + "is-npm": "^6.0.0", + "is-yarn-global": "^0.4.0", + "latest-version": "^7.0.0", + "pupa": "^3.1.0", + "semver": "^7.3.7", + "semver-diff": "^4.0.0", + "xdg-basedir": "^5.1.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/yeoman/update-notifier?sponsor=1" + } + }, + "node_modules/update-notifier/node_modules/chalk": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", + "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", + "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dev": true, + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vite": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.1.tgz", + "integrity": "sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==", + "dev": true, + "dependencies": { + "esbuild": "^0.16.14", + "postcss": "^8.4.21", + "resolve": "^1.22.1", + "rollup": "^3.10.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", + "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", + "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">= 0.6" + "node": ">=12" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", + "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", + "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", + "cpu": [ + "arm64" + ], "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=4.2.0" + "node": ">=12" } }, - "node_modules/uberproto": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/uberproto/-/uberproto-2.0.6.tgz", - "integrity": "sha512-68H97HffZoFaa3HFtpstahWorN9dSp5uTU6jo3GjIQ6JkJBR3hC2Nx/e/HFOoYHdUyT/Z1MRWfxN1EiQJZUyCQ==", + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", + "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": "*" + "node": ">=12" } }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", + "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", + "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "unique-slug": "^3.0.0" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", + "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/unique-string": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", - "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", + "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "crypto-random-string": "^4.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", + "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", + "cpu": [ + "ia32" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 0.8" + "node": ">=12" } }, - "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", + "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", + "cpu": [ + "loong64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/update-notifier": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz", - "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==", + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", + "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", + "cpu": [ + "mips64el" + ], "dev": true, - "dependencies": { - "boxen": "^7.0.0", - "chalk": "^5.0.1", - "configstore": "^6.0.0", - "has-yarn": "^3.0.0", - "import-lazy": "^4.0.0", - "is-ci": "^3.0.1", - "is-installed-globally": "^0.4.0", - "is-npm": "^6.0.0", - "is-yarn-global": "^0.4.0", - "latest-version": "^7.0.0", - "pupa": "^3.1.0", - "semver": "^7.3.7", - "semver-diff": "^4.0.0", - "xdg-basedir": "^5.1.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" + "node": ">=12" } }, - "node_modules/update-notifier/node_modules/chalk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", - "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", + "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", + "cpu": [ + "ppc64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=12" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dependencies": { - "punycode": "^2.1.0" + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", + "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", + "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", + "cpu": [ + "s390x" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 0.4.0" + "node": ">=12" } }, - "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", + "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", + "cpu": [ + "x64" + ], "dev": true, - "bin": { - "uuid": "dist/bin/uuid" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, - "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", + "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">=10.12.0" + "node": ">=12" } }, - "node_modules/v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", + "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", + "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" } }, - "node_modules/validate-npm-package-name": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", - "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", + "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "builtins": "^5.0.0" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", + "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", + "cpu": [ + "ia32" + ], "dev": true, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">= 0.8" + "node": ">=12" } }, - "node_modules/vite": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.3.tgz", - "integrity": "sha512-/3XWiktaopByM5bd8dqvHxRt5EEgRikevnnrpND0gRfNkrMrPaGGexhtLCzv15RcCMtV2CLw+BPas8YFeSG0KA==", + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", + "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "esbuild": "^0.15.6", - "postcss": "^8.4.16", - "resolve": "^1.22.1", - "rollup": "~2.78.0" - }, - "bin": { - "vite": "bin/vite.js" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "less": "*", - "sass": "*", - "stylus": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "terser": { - "optional": true - } + "node": ">=12" } }, - "node_modules/vite/node_modules/rollup": { - "version": "2.78.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz", - "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", + "node_modules/vite/node_modules/esbuild": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", + "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", "dev": true, + "hasInstallScript": true, "bin": { - "rollup": "dist/bin/rollup" + "esbuild": "bin/esbuild" }, "engines": { - "node": ">=10.0.0" + "node": ">=12" }, "optionalDependencies": { - "fsevents": "~2.3.2" + "@esbuild/android-arm": "0.16.17", + "@esbuild/android-arm64": "0.16.17", + "@esbuild/android-x64": "0.16.17", + "@esbuild/darwin-arm64": "0.16.17", + "@esbuild/darwin-x64": "0.16.17", + "@esbuild/freebsd-arm64": "0.16.17", + "@esbuild/freebsd-x64": "0.16.17", + "@esbuild/linux-arm": "0.16.17", + "@esbuild/linux-arm64": "0.16.17", + "@esbuild/linux-ia32": "0.16.17", + "@esbuild/linux-loong64": "0.16.17", + "@esbuild/linux-mips64el": "0.16.17", + "@esbuild/linux-ppc64": "0.16.17", + "@esbuild/linux-riscv64": "0.16.17", + "@esbuild/linux-s390x": "0.16.17", + "@esbuild/linux-x64": "0.16.17", + "@esbuild/netbsd-x64": "0.16.17", + "@esbuild/openbsd-x64": "0.16.17", + "@esbuild/sunos-x64": "0.16.17", + "@esbuild/win32-arm64": "0.16.17", + "@esbuild/win32-ia32": "0.16.17", + "@esbuild/win32-x64": "0.16.17" } }, "node_modules/vitepress": { - "version": "1.0.0-alpha.15", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.15.tgz", - "integrity": "sha512-+pHJQCpnv0wVgLRyonisrj7Y77PVhbns2nTLxV9GkH3T+RTY/W2JmRatzBg5WciMaPyO8Ms6F3YElO5PULVv3w==", - "dev": true, - "dependencies": { - "@docsearch/css": "^3.2.1", - "@docsearch/js": "^3.2.1", - "@vitejs/plugin-vue": "^3.1.0", - "@vue/devtools-api": "^6.2.1", - "@vueuse/core": "^9.1.1", - "body-scroll-lock": "^4.0.0-beta.0", - "nprogress": "^0.2.0", - "shiki": "^0.11.1", - "vite": "^3.1.0", - "vue": "^3.2.38" + "version": "1.0.0-alpha.45", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.45.tgz", + "integrity": "sha512-8AVWdymQqBUPmXmAbpapDDg18iDmkNJ47l5eOklBlAjj3n8P3zDAsBhOWSQ6+Nvm6+/GaZATyAvsrg47JD5Idw==", + "dev": true, + "dependencies": { + "@docsearch/css": "^3.3.2", + "@docsearch/js": "^3.3.2", + "@vitejs/plugin-vue": "^4.0.0", + "@vue/devtools-api": "^6.5.0", + "@vueuse/core": "^9.12.0", + "body-scroll-lock": "4.0.0-beta.0", + "shiki": "^0.14.0", + "vite": "^4.0.4", + "vue": "^3.2.45" }, "bin": { "vitepress": "bin/vitepress.js" } }, "node_modules/vscode-oniguruma": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", - "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", "dev": true }, "node_modules/vscode-textmate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-6.0.0.tgz", - "integrity": "sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", "dev": true }, "node_modules/vue": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.39.tgz", - "integrity": "sha512-tRkguhRTw9NmIPXhzk21YFBqXHT2t+6C6wPOgQ50fcFVWnPdetmRqbmySRHznrYjX2E47u0cGlKGcxKZJ38R/g==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.47.tgz", + "integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==", "dev": true, "dependencies": { - "@vue/compiler-dom": "3.2.39", - "@vue/compiler-sfc": "3.2.39", - "@vue/runtime-dom": "3.2.39", - "@vue/server-renderer": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-dom": "3.2.47", + "@vue/compiler-sfc": "3.2.47", + "@vue/runtime-dom": "3.2.47", + "@vue/server-renderer": "3.2.47", + "@vue/shared": "3.2.47" } }, "node_modules/webidl-conversions": { @@ -9292,6 +10208,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -9479,9 +10415,9 @@ } }, "node_modules/ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "dev": true, "engines": { "node": ">=10.0.0" @@ -9527,9 +10463,9 @@ "dev": true }, "node_modules/yaml": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", - "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.1.tgz", + "integrity": "sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==", "dev": true, "engines": { "node": ">= 14" @@ -9622,164 +10558,173 @@ }, "dependencies": { "@algolia/autocomplete-core": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.1.tgz", - "integrity": "sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.4.tgz", + "integrity": "sha512-daoLpQ3ps/VTMRZDEBfU8ixXd+amZcNJ4QSP3IERGyzqnL5Ch8uSRFt/4G8pUvW9c3o6GA4vtVv4I4lmnkdXyg==", "dev": true, "requires": { - "@algolia/autocomplete-shared": "1.7.1" + "@algolia/autocomplete-shared": "1.7.4" } }, "@algolia/autocomplete-preset-algolia": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.1.tgz", - "integrity": "sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.4.tgz", + "integrity": "sha512-s37hrvLEIfcmKY8VU9LsAXgm2yfmkdHT3DnA3SgHaY93yjZ2qL57wzb5QweVkYuEBZkT2PIREvRoLXC2sxTbpQ==", "dev": true, "requires": { - "@algolia/autocomplete-shared": "1.7.1" + "@algolia/autocomplete-shared": "1.7.4" } }, "@algolia/autocomplete-shared": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.1.tgz", - "integrity": "sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.4.tgz", + "integrity": "sha512-2VGCk7I9tA9Ge73Km99+Qg87w0wzW4tgUruvWAn/gfey1ZXgmxZtyIRBebk35R1O8TbK77wujVtCnpsGpRy1kg==", "dev": true }, "@algolia/cache-browser-local-storage": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.2.tgz", - "integrity": "sha512-FRweBkK/ywO+GKYfAWbrepewQsPTIEirhi1BdykX9mxvBPtGNKccYAxvGdDCumU1jL4r3cayio4psfzKMejBlA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.3.tgz", + "integrity": "sha512-hWH1yCxgG3+R/xZIscmUrWAIBnmBFHH5j30fY/+aPkEZWt90wYILfAHIOZ1/Wxhho5SkPfwFmT7ooX2d9JeQBw==", "dev": true, "requires": { - "@algolia/cache-common": "4.14.2" + "@algolia/cache-common": "4.14.3" } }, "@algolia/cache-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.14.2.tgz", - "integrity": "sha512-SbvAlG9VqNanCErr44q6lEKD2qoK4XtFNx9Qn8FK26ePCI8I9yU7pYB+eM/cZdS9SzQCRJBbHUumVr4bsQ4uxg==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.14.3.tgz", + "integrity": "sha512-oZJofOoD9FQOwiGTzyRnmzvh3ZP8WVTNPBLH5xU5JNF7drDbRT0ocVT0h/xB2rPHYzOeXRrLaQQBwRT/CKom0Q==", "dev": true }, "@algolia/cache-in-memory": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.14.2.tgz", - "integrity": "sha512-HrOukWoop9XB/VFojPv1R5SVXowgI56T9pmezd/djh2JnVN/vXswhXV51RKy4nCpqxyHt/aGFSq2qkDvj6KiuQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.14.3.tgz", + "integrity": "sha512-ES0hHQnzWjeioLQf5Nq+x1AWdZJ50znNPSH3puB/Y4Xsg4Av1bvLmTJe7SY2uqONaeMTvL0OaVcoVtQgJVw0vg==", "dev": true, "requires": { - "@algolia/cache-common": "4.14.2" + "@algolia/cache-common": "4.14.3" } }, "@algolia/client-account": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.14.2.tgz", - "integrity": "sha512-WHtriQqGyibbb/Rx71YY43T0cXqyelEU0lB2QMBRXvD2X0iyeGl4qMxocgEIcbHyK7uqE7hKgjT8aBrHqhgc1w==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.14.3.tgz", + "integrity": "sha512-PBcPb0+f5Xbh5UfLZNx2Ow589OdP8WYjB4CnvupfYBrl9JyC1sdH4jcq/ri8osO/mCZYjZrQsKAPIqW/gQmizQ==", "dev": true, "requires": { - "@algolia/client-common": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.14.3", + "@algolia/client-search": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "@algolia/client-analytics": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.14.2.tgz", - "integrity": "sha512-yBvBv2mw+HX5a+aeR0dkvUbFZsiC4FKSnfqk9rrfX+QrlNOKEhCG0tJzjiOggRW4EcNqRmaTULIYvIzQVL2KYQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.14.3.tgz", + "integrity": "sha512-eAwQq0Hb/aauv9NhCH5Dp3Nm29oFx28sayFN2fdOWemwSeJHIl7TmcsxVlRsO50fsD8CtPcDhtGeD3AIFLNvqw==", "dev": true, "requires": { - "@algolia/client-common": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.14.3", + "@algolia/client-search": "4.14.3", + "@algolia/requester-common": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "@algolia/client-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.14.2.tgz", - "integrity": "sha512-43o4fslNLcktgtDMVaT5XwlzsDPzlqvqesRi4MjQz2x4/Sxm7zYg5LRYFol1BIhG6EwxKvSUq8HcC/KxJu3J0Q==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.14.3.tgz", + "integrity": "sha512-jkPPDZdi63IK64Yg4WccdCsAP4pHxSkr4usplkUZM5C1l1oEpZXsy2c579LQ0rvwCs5JFmwfNG4ahOszidfWPw==", "dev": true, "requires": { - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/requester-common": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "@algolia/client-personalization": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.14.2.tgz", - "integrity": "sha512-ACCoLi0cL8CBZ1W/2juehSltrw2iqsQBnfiu/Rbl9W2yE6o2ZUb97+sqN/jBqYNQBS+o0ekTMKNkQjHHAcEXNw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.14.3.tgz", + "integrity": "sha512-UCX1MtkVNgaOL9f0e22x6tC9e2H3unZQlSUdnVaSKpZ+hdSChXGaRjp2UIT7pxmPqNCyv51F597KEX5WT60jNg==", "dev": true, "requires": { - "@algolia/client-common": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.14.3", + "@algolia/requester-common": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "@algolia/client-search": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.14.2.tgz", - "integrity": "sha512-L5zScdOmcZ6NGiVbLKTvP02UbxZ0njd5Vq9nJAmPFtjffUSOGEp11BmD2oMJ5QvARgx2XbX4KzTTNS5ECYIMWw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.14.3.tgz", + "integrity": "sha512-I2U7xBx5OPFdPLA8AXKUPPxGY3HDxZ4r7+mlZ8ZpLbI8/ri6fnu6B4z3wcL7sgHhDYMwnAE8Xr0AB0h3Hnkp4A==", "dev": true, "requires": { - "@algolia/client-common": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.14.3", + "@algolia/requester-common": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "@algolia/logger-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.14.2.tgz", - "integrity": "sha512-/JGlYvdV++IcMHBnVFsqEisTiOeEr6cUJtpjz8zc0A9c31JrtLm318Njc72p14Pnkw3A/5lHHh+QxpJ6WFTmsA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.14.3.tgz", + "integrity": "sha512-kUEAZaBt/J3RjYi8MEBT2QEexJR2kAE2mtLmezsmqMQZTV502TkHCxYzTwY2dE7OKcUTxi4OFlMuS4GId9CWPw==", "dev": true }, "@algolia/logger-console": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.14.2.tgz", - "integrity": "sha512-8S2PlpdshbkwlLCSAB5f8c91xyc84VM9Ar9EdfE9UmX+NrKNYnWR1maXXVDQQoto07G1Ol/tYFnFVhUZq0xV/g==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.14.3.tgz", + "integrity": "sha512-ZWqAlUITktiMN2EiFpQIFCJS10N96A++yrexqC2Z+3hgF/JcKrOxOdT4nSCQoEPvU4Ki9QKbpzbebRDemZt/hw==", "dev": true, "requires": { - "@algolia/logger-common": "4.14.2" + "@algolia/logger-common": "4.14.3" } }, "@algolia/requester-browser-xhr": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.2.tgz", - "integrity": "sha512-CEh//xYz/WfxHFh7pcMjQNWgpl4wFB85lUMRyVwaDPibNzQRVcV33YS+63fShFWc2+42YEipFGH2iPzlpszmDw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.3.tgz", + "integrity": "sha512-AZeg2T08WLUPvDncl2XLX2O67W5wIO8MNaT7z5ii5LgBTuk/rU4CikTjCe2xsUleIZeFl++QrPAi4Bdxws6r/Q==", "dev": true, "requires": { - "@algolia/requester-common": "4.14.2" + "@algolia/requester-common": "4.14.3" } }, "@algolia/requester-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.14.2.tgz", - "integrity": "sha512-73YQsBOKa5fvVV3My7iZHu1sUqmjjfs9TteFWwPwDmnad7T0VTCopttcsM3OjLxZFtBnX61Xxl2T2gmG2O4ehg==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.14.3.tgz", + "integrity": "sha512-RrRzqNyKFDP7IkTuV3XvYGF9cDPn9h6qEDl595lXva3YUk9YSS8+MGZnnkOMHvjkrSCKfoLeLbm/T4tmoIeclw==", "dev": true }, "@algolia/requester-node-http": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.14.2.tgz", - "integrity": "sha512-oDbb02kd1o5GTEld4pETlPZLY0e+gOSWjWMJHWTgDXbv9rm/o2cF7japO6Vj1ENnrqWvLBmW1OzV9g6FUFhFXg==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.14.3.tgz", + "integrity": "sha512-O5wnPxtDRPuW2U0EaOz9rMMWdlhwP0J0eSL1Z7TtXF8xnUeeUyNJrdhV5uy2CAp6RbhM1VuC3sOJcIR6Av+vbA==", "dev": true, "requires": { - "@algolia/requester-common": "4.14.2" + "@algolia/requester-common": "4.14.3" } }, "@algolia/transporter": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.14.2.tgz", - "integrity": "sha512-t89dfQb2T9MFQHidjHcfhh6iGMNwvuKUvojAj+JsrHAGbuSy7yE4BylhLX6R0Q1xYRoC4Vvv+O5qIw/LdnQfsQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.14.3.tgz", + "integrity": "sha512-2qlKlKsnGJ008exFRb5RTeTOqhLZj0bkMCMVskxoqWejs2Q2QtWmsiH98hDfpw0fmnyhzHEt0Z7lqxBYp8bW2w==", "dev": true, "requires": { - "@algolia/cache-common": "4.14.2", - "@algolia/logger-common": "4.14.2", - "@algolia/requester-common": "4.14.2" + "@algolia/cache-common": "4.14.3", + "@algolia/logger-common": "4.14.3", + "@algolia/requester-common": "4.14.3" } }, "@babel/parser": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.1.tgz", - "integrity": "sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==", + "version": "7.20.15", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.15.tgz", + "integrity": "sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg==", "dev": true }, + "@babel/runtime": { + "version": "7.20.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz", + "integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.11" + } + }, "@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -9796,60 +10741,197 @@ } }, "@docsearch/css": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.2.1.tgz", - "integrity": "sha512-gaP6TxxwQC+K8D6TRx5WULUWKrcbzECOPA2KCVMuI+6C7dNiGUk5yXXzVhc5sld79XKYLnO9DRTI4mjXDYkh+g==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.3.3.tgz", + "integrity": "sha512-6SCwI7P8ao+se1TUsdZ7B4XzL+gqeQZnBc+2EONZlcVa0dVrk0NjETxozFKgMv0eEGH8QzP1fkN+A1rH61l4eg==", "dev": true }, "@docsearch/js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.2.1.tgz", - "integrity": "sha512-H1PekEtSeS0msetR2YGGey2w7jQ2wAKfGODJvQTygSwMgUZ+2DHpzUgeDyEBIXRIfaBcoQneqrzsljM62pm6Xg==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.3.3.tgz", + "integrity": "sha512-2xAv2GFuHzzmG0SSZgf8wHX0qZX8n9Y1ZirKUk5Wrdc+vH9CL837x2hZIUdwcPZI9caBA+/CzxsS68O4waYjUQ==", "dev": true, "requires": { - "@docsearch/react": "3.2.1", + "@docsearch/react": "3.3.3", "preact": "^10.0.0" } }, "@docsearch/react": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.2.1.tgz", - "integrity": "sha512-EzTQ/y82s14IQC5XVestiK/kFFMe2aagoYFuTAIfIb/e+4FU7kSMKonRtLwsCiLQHmjvNQq+HO+33giJ5YVtaQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.3.3.tgz", + "integrity": "sha512-pLa0cxnl+G0FuIDuYlW+EBK6Rw2jwLw9B1RHIeS4N4s2VhsfJ/wzeCi3CWcs5yVfxLd5ZK50t//TMA5e79YT7Q==", "dev": true, "requires": { - "@algolia/autocomplete-core": "1.7.1", - "@algolia/autocomplete-preset-algolia": "1.7.1", - "@docsearch/css": "3.2.1", + "@algolia/autocomplete-core": "1.7.4", + "@algolia/autocomplete-preset-algolia": "1.7.4", + "@docsearch/css": "3.3.3", "algoliasearch": "^4.0.0" } }, "@esbuild/android-arm": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.8.tgz", - "integrity": "sha512-CyEWALmn+no/lbgbAJsbuuhT8s2J19EJGHkeyAwjbFJMrj80KJ9zuYsoAvidPTU7BgBf87r/sgae8Tw0dbOc4Q==", + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.6.tgz", + "integrity": "sha512-bSC9YVUjADDy1gae8RrioINU6e1lCkg3VGVwm0QQ2E1CWcC4gnMce9+B6RpxuSsrsXsk1yojn7sp1fnG8erE2g==", "dev": true, - "optional": true, - "requires": { - "esbuild-wasm": "0.15.8" - } + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.6.tgz", + "integrity": "sha512-YnYSCceN/dUzUr5kdtUzB+wZprCafuD89Hs0Aqv9QSdwhYQybhXTaSTcrl6X/aWThn1a/j0eEpUBGOE7269REg==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.6.tgz", + "integrity": "sha512-MVcYcgSO7pfu/x34uX9u2QIZHmXAB7dEiLQC5bBl5Ryqtpj9lT2sg3gNDEsrPEmimSJW2FXIaxqSQ501YLDsZQ==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.6.tgz", + "integrity": "sha512-bsDRvlbKMQMt6Wl08nHtFz++yoZHsyTOxnjfB2Q95gato+Yi4WnRl13oC2/PJJA9yLCoRv9gqT/EYX0/zDsyMA==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.6.tgz", + "integrity": "sha512-xh2A5oPrYRfMFz74QXIQTQo8uA+hYzGWJFoeTE8EvoZGHb+idyV4ATaukaUvnnxJiauhs/fPx3vYhU4wiGfosg==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.6.tgz", + "integrity": "sha512-EnUwjRc1inT4ccZh4pB3v1cIhohE2S4YXlt1OvI7sw/+pD+dIE4smwekZlEPIwY6PhU6oDWwITrQQm5S2/iZgg==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.6.tgz", + "integrity": "sha512-Uh3HLWGzH6FwpviUcLMKPCbZUAFzv67Wj5MTwK6jn89b576SR2IbEp+tqUHTr8DIl0iDmBAf51MVaP7pw6PY5Q==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.6.tgz", + "integrity": "sha512-7YdGiurNt7lqO0Bf/U9/arrPWPqdPqcV6JCZda4LZgEn+PTQ5SMEI4MGR52Bfn3+d6bNEGcWFzlIxiQdS48YUw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.6.tgz", + "integrity": "sha512-bUR58IFOMJX523aDVozswnlp5yry7+0cRLCXDsxnUeQYJik1DukMY+apBsLOZJblpH+K7ox7YrKrHmJoWqVR9w==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.6.tgz", + "integrity": "sha512-ujp8uoQCM9FRcbDfkqECoARsLnLfCUhKARTP56TFPog8ie9JG83D5GVKjQ6yVrEVdMie1djH86fm98eY3quQkQ==", + "dev": true, + "optional": true }, "@esbuild/linux-loong64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.8.tgz", - "integrity": "sha512-pE5RQsOTSERCtfZdfCT25wzo7dfhOSlhAXcsZmuvRYhendOv7djcdvtINdnDp2DAjP17WXlBB4nBO6sHLczmsg==", + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.6.tgz", + "integrity": "sha512-y2NX1+X/Nt+izj9bLoiaYB9YXT/LoaQFYvCkVD77G/4F+/yuVXYCWz4SE9yr5CBMbOxOfBcy/xFL4LlOeNlzYQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.6.tgz", + "integrity": "sha512-09AXKB1HDOzXD+j3FdXCiL/MWmZP0Ex9eR8DLMBVcHorrWJxWmY8Nms2Nm41iRM64WVx7bA/JVHMv081iP2kUA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.6.tgz", + "integrity": "sha512-AmLhMzkM8JuqTIOhxnX4ubh0XWJIznEynRnZAVdA2mMKE6FAfwT2TWKTwdqMG+qEaeyDPtfNoZRpJbD4ZBv0Tg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.6.tgz", + "integrity": "sha512-Y4Ri62PfavhLQhFbqucysHOmRamlTVK10zPWlqjNbj2XMea+BOs4w6ASKwQwAiqf9ZqcY9Ab7NOU4wIgpxwoSQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.6.tgz", + "integrity": "sha512-SPUiz4fDbnNEm3JSdUW8pBJ/vkop3M1YwZAVwvdwlFLoJwKEZ9L98l3tzeyMzq27CyepDQ3Qgoba44StgbiN5Q==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.6.tgz", + "integrity": "sha512-a3yHLmOodHrzuNgdpB7peFGPx1iJ2x6m+uDvhP2CKdr2CwOaqEFMeSqYAHU7hG+RjCq8r2NFujcd/YsEsFgTGw==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.6.tgz", + "integrity": "sha512-EanJqcU/4uZIBreTrnbnre2DXgXSa+Gjap7ifRfllpmyAU7YMvaXmljdArptTHmjrkkKm9BK6GH5D5Yo+p6y5A==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.6.tgz", + "integrity": "sha512-xaxeSunhQRsTNGFanoOkkLtnmMn5QbA0qBhNet/XLVsc+OVkpIWPHcr3zTW2gxVU5YOHFbIHR9ODuaUdNza2Vw==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.6.tgz", + "integrity": "sha512-gnMnMPg5pfMkZvhHee21KbKdc6W3GR8/JuE0Da1kjwpK6oiFU3nqfHuVPgUX2rsOx9N2SadSQTIYV1CIjYG+xw==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.6.tgz", + "integrity": "sha512-G95n7vP1UnGJPsVdKXllAJPtqjMvFYbN20e8RK8LVLhlTiSOH1sd7+Gt7rm70xiG+I5tM58nYgwWrLs6I1jHqg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.6.tgz", + "integrity": "sha512-96yEFzLhq5bv9jJo5JhTs1gI+1cKQ83cUpyxHuGqXVwQtY5Eq54ZEsKs8veKtiKwlrNimtckHEkj4mRh4pPjsg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.6.tgz", + "integrity": "sha512-n6d8MOyUrNp6G4VSpRcgjs5xj4A91svJSaiwLIDWVWEsZtpN5FA9NlBbZHDmAJc2e8e6SF4tkBD3HAvPF+7igA==", "dev": true, "optional": true }, "@eslint/eslintrc": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", - "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", + "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.4.0", - "globals": "^13.15.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -9991,6 +11073,12 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw==", + "dev": true + }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -10040,137 +11128,152 @@ } }, "@feathersjs/authentication": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-5.0.0-pre.29.tgz", - "integrity": "sha512-vol00wb2b+zhvvkrbPkDqrMga5dSmLydzhixt+Sh3vY5jp7uWrWRqqrTXrysXLSfisQMGVFbTNNxc5maCU+pKg==", - "dev": true, - "requires": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@feathersjs/schema": "^5.0.0-pre.29", - "@feathersjs/transport-commons": "^5.0.0-pre.29", - "@types/jsonwebtoken": "^8.5.9", - "jsonwebtoken": "^8.5.1", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-5.0.0-pre.36.tgz", + "integrity": "sha512-taVg/Kgfk8ShiOFFsFb8OH9poKhhBuP5unCLpfH/dzcjCEM78WjiKAdOmY5sJOK8Ye8u2zA2Ecn9YH/GxA1tvQ==", + "dev": true, + "requires": { + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@feathersjs/hooks": "^0.7.6", + "@feathersjs/schema": "^5.0.0-pre.36", + "@feathersjs/transport-commons": "^5.0.0-pre.36", + "@types/jsonwebtoken": "^9.0.1", + "jsonwebtoken": "^9.0.0", "lodash": "^4.17.21", "long-timeout": "^0.1.1", "uuid": "^9.0.0" } }, "@feathersjs/authentication-client": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication-client/-/authentication-client-5.0.0-pre.29.tgz", - "integrity": "sha512-QcHlyOUGUqfgO+SIkFFASHzGdCrAX4yTI9i/4l6AKgWpPX2MoKnfWGOn8N/3xFR89pvnS3A9hU/NO0T8B0KVjw==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication-client/-/authentication-client-5.0.0-pre.36.tgz", + "integrity": "sha512-Rg+1KkuDFdhcrbQqWwR6yjl5Z4FH+SpsEA3dab/h8iIeHaqg4QSiPXjE33ltw0hkOc+tDbPL045WIXsdeIbo4A==", "dev": true, "requires": { - "@feathersjs/authentication": "^5.0.0-pre.29", - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29" + "@feathersjs/authentication": "^5.0.0-pre.36", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36" } }, "@feathersjs/authentication-local": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication-local/-/authentication-local-5.0.0-pre.29.tgz", - "integrity": "sha512-j6o0iKz1dFTU5/pp7GGX53Vyo/lMLyBgm1A4ebihDVRBt2oXWRW2FUHLwGRANKrjUVR7F9s59XYz3OYhpbs+CA==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication-local/-/authentication-local-5.0.0-pre.36.tgz", + "integrity": "sha512-2YVh+ZX4KfCC7iurnf1JD/FY7DXShhhBqyy/xjoau0TwGIGK15lVFdMyDpiYDUkqQ1TARoQuOLqYSbEaTrl2NQ==", "dev": true, "requires": { - "@feathersjs/authentication": "^5.0.0-pre.29", - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/authentication": "^5.0.0-pre.36", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", "bcryptjs": "^2.4.3", "lodash": "^4.17.21" } }, "@feathersjs/client": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/client/-/client-5.0.0-pre.29.tgz", - "integrity": "sha512-JfqNabQsw/kxj4RgfhA6lsuUmH1H8m1JxHCH98mfCWhCzE/r263ZqAOCSulvWL57VArdyR4a03rbV+jp/JTqqQ==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/client/-/client-5.0.0-pre.36.tgz", + "integrity": "sha512-JhYbCUtQ6XXt2tQ0YZKXtMw3tPEpNERgdP4Qg7qijugRrQMvEn3ZH91z/MOUOpnRO5eU4WJISECMXFFuWrUmxA==", "dev": true, "requires": { - "@feathersjs/authentication-client": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@feathersjs/rest-client": "^5.0.0-pre.29", - "@feathersjs/socketio-client": "^5.0.0-pre.29" + "@feathersjs/authentication-client": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@feathersjs/rest-client": "^5.0.0-pre.36", + "@feathersjs/socketio-client": "^5.0.0-pre.36" } }, "@feathersjs/commons": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-5.0.0-pre.29.tgz", - "integrity": "sha512-BlGRPYPsMEANKrOM2fprmMixmyca9P3CNvJYxhGSaFZLt1+USAxFfx02d0/s8KkHtO+qEg2bz/TmR8BdsABrmg==" + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-5.0.0-pre.36.tgz", + "integrity": "sha512-qTHGVyJBuXBIo1ecgCGAPuwu6jZLasFSKvLh3yldVdMb6DWYHgxv8IDCDBjds1aPxcifLNrJpwTVrbMJidwOCA==" }, "@feathersjs/errors": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-5.0.0-pre.29.tgz", - "integrity": "sha512-0gb/px3/ict6FQ8ebqYAiqAxG2s+oLmrhs9Wr+4cnE96BlEH5lgyUTK0px7aDMFkkhjr25egtxBnM1RCoL36fg==" + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-5.0.0-pre.36.tgz", + "integrity": "sha512-El7h2lUR3WznZcsF+Oyjbwx04IitB8HqwqTPDjJcr1yoWu3l6csySaaz34+nTV40Wjpo9nHErjK4Bu4T4WhtwQ==" }, "@feathersjs/express": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-5.0.0-pre.29.tgz", - "integrity": "sha512-47xpo0WXAhAagSAPwtPYFPDDTiy4o2bZMSU745otDhG0gXik26757QEnkS3OuZwdE0ztJGaH2IYv7AGQWbFSbA==", - "dev": true, - "requires": { - "@feathersjs/authentication": "^5.0.0-pre.29", - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@feathersjs/transport-commons": "^5.0.0-pre.29", - "@types/express": "^4.17.13", - "@types/express-serve-static-core": "^4.17.30", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-5.0.0-pre.36.tgz", + "integrity": "sha512-ZgLrFPWya2jmEpHt0mRNU+BF0V9ELzUplIjw/vauvFjz4CPjwxoHibCSUhbuQMXa8slQZYLqJLmxH49Gfj37+Q==", + "dev": true, + "requires": { + "@feathersjs/authentication": "^5.0.0-pre.36", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@feathersjs/transport-commons": "^5.0.0-pre.36", + "@types/compression": "^1.7.2", + "@types/express": "^4.17.16", + "@types/express-serve-static-core": "^4.17.33", + "compression": "^1.7.4", "cors": "^2.8.5", - "express": "^4.18.1" + "express": "^4.18.2" } }, "@feathersjs/feathers": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-5.0.0-pre.29.tgz", - "integrity": "sha512-cRuGDTlkqhKLgc23gV1ohZ0HjdsnrOBxDmp9pPBeTGuFT69fyqSuUJfcipfaF0hP3C0WDI//92wXfRblAod24g==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-5.0.0-pre.36.tgz", + "integrity": "sha512-h6Ir765i29DSH4whCNGx6EQXyXLxD4A0dnU2ABaPUjGAc07M9n2AieHtAxWiPY63RSw3ECsG9A/45BWDiCe4KQ==", "requires": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/hooks": "^0.7.5", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/hooks": "^0.7.6", "events": "^3.3.0" } }, "@feathersjs/hooks": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@feathersjs/hooks/-/hooks-0.7.5.tgz", - "integrity": "sha512-xHbWPCJ5upr9eDdRSuJgWSKgCLN07YLvVjS7PdDqWrEz/iz5YBqoIQOzHhNPsWXOA6T7v+ArifrTUitG+ZzIRA==" + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/@feathersjs/hooks/-/hooks-0.7.6.tgz", + "integrity": "sha512-MgEW8HKLbnaawjIuTUAkloeosKMtej4bw7eZWszASRPL4SUfEao34mTwSlIoNuPRew4WJG/NZGRah1qqU1JvhA==" }, "@feathersjs/rest-client": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/rest-client/-/rest-client-5.0.0-pre.29.tgz", - "integrity": "sha512-PgBIwEIEMocgFK4GIVyougNWKD+M38a3mg9e0dWxxZXBlERjX8A+Vavcbb84ZxAvQnG3H/IPD3zy8HNEOlt1ZA==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/rest-client/-/rest-client-5.0.0-pre.36.tgz", + "integrity": "sha512-JQVUeJ8HOetTKuSX1kZgT2sDBmbEY8jg37nlIEd6vGD6l8V8oTw9ZtfYb7rqpHGordOuj6QNH77DljJeraIMIA==", "dev": true, "requires": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@types/superagent": "^4.1.15", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@types/superagent": "^4.1.16", "qs": "^6.11.0" } }, "@feathersjs/schema": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/schema/-/schema-5.0.0-pre.29.tgz", - "integrity": "sha512-GIko7iC3mnemal4lxXvdFWtHuS2xvfb12AQruuaIQ2WiB7DyVn3HEENgaOj5RfI8mU+8jWjYozPE7oOjCKv0NQ==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/schema/-/schema-5.0.0-pre.36.tgz", + "integrity": "sha512-TxoTRJS3FgfGI/hWiEI/xy/IDTwx/5UwX1s1xbfzKRxSppvA4EVKdBi9+YnsPPS/k849TP8airmvIz2WukcguA==", "dev": true, "requires": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@feathersjs/hooks": "^0.7.5", + "@feathersjs/adapter-commons": "^5.0.0-pre.36", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@feathersjs/hooks": "^0.7.6", "@types/json-schema": "^7.0.11", - "ajv": "^8.11.0", - "json-schema": "^0.4.0", - "json-schema-to-ts": "^2.5.5" + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "json-schema-to-ts": "^2.6.2" }, "dependencies": { + "@feathersjs/adapter-commons": { + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/adapter-commons/-/adapter-commons-5.0.0-pre.36.tgz", + "integrity": "sha512-POi+/5QQ3BR7W15I9GKm6/Y+t+JQcXh2HL9WxY2ZR7LWY9kEWliuTpZzrZfjoph0B97DbT+YrGe79mWXb+KVuQ==", + "dev": true, + "requires": { + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36" + } + }, "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -10188,36 +11291,35 @@ } }, "@feathersjs/socketio": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/socketio/-/socketio-5.0.0-pre.29.tgz", - "integrity": "sha512-AV+buawaO58ZWj86V4EfXmn/wxae6H2CUfEo97X+OwEJULrmTdZLGAOrx5R5AQxzZYsPMA3YZZ9mRd5PVEEttg==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/socketio/-/socketio-5.0.0-pre.36.tgz", + "integrity": "sha512-KOR/mwRg6sZEuAeVSxlwClt1xbsQxxRlVwvGqAogxGlxaQFMO6vWHKM9OT0K/jWBZuAXofGxkx24eb2IWsR/GA==", "dev": true, "requires": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", - "@feathersjs/hooks": "^0.7.5", - "@feathersjs/transport-commons": "^5.0.0-pre.29", - "socket.io": "^4.5.2" + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", + "@feathersjs/transport-commons": "^5.0.0-pre.36", + "socket.io": "^4.5.4" } }, "@feathersjs/socketio-client": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/socketio-client/-/socketio-client-5.0.0-pre.29.tgz", - "integrity": "sha512-hbOsPBOdVCUUCfS8obCl0N5zn1LkJrKRryBi0IR2qRURnc992YqT7gBVfP705gzkTrEe58ETjm7qC0meA+FStw==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/socketio-client/-/socketio-client-5.0.0-pre.36.tgz", + "integrity": "sha512-D+q1r3PNuQZKe5xu/Hgd72lnsDZ9oslAFgMs9d/2LU6uKvP70k/zatuM+ncCFhqWwXIdHUnx9clGtNc4YVzRAg==", "dev": true, "requires": { - "@feathersjs/transport-commons": "^5.0.0-pre.29" + "@feathersjs/transport-commons": "^5.0.0-pre.36" } }, "@feathersjs/transport-commons": { - "version": "5.0.0-pre.29", - "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-5.0.0-pre.29.tgz", - "integrity": "sha512-jy0ltjjrPuMas6vukLMB/9lnjL6aKpSSpN0X8gWGbQqZBDJ6VE7AHDj+6eKdcPiEtWmkj3kZQ0pwbD9DzE7vhA==", + "version": "5.0.0-pre.36", + "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-5.0.0-pre.36.tgz", + "integrity": "sha512-6Ra8J4l2NCvo6j9CIoY7BzE2zYxvwpc1yX6E8qBZ3XWmH896MQxR3RsR1dOw//01Z3Y3rhZHVe9AdC+Z3XfC1w==", "dev": true, "requires": { - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", "encodeurl": "^1.0.2", "lodash": "^4.17.21" } @@ -10229,22 +11331,16 @@ "dev": true }, "@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" } }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true - }, "@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -10312,48 +11408,56 @@ } }, "@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", "dev": true, "requires": { - "@gar/promisify": "^1.1.3", "semver": "^7.3.5" } }, "@npmcli/git": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.2.tgz", - "integrity": "sha512-CAcd08y3DWBJqJDpfuVL0uijlq5oaXaOJEKHKc4wqrjd00gkvTZB+nFuLn+doOOKddaQS9JfqtNoFCO2LCvA3w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz", + "integrity": "sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA==", "dev": true, "requires": { - "@npmcli/promise-spawn": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", "lru-cache": "^7.4.4", "mkdirp": "^1.0.4", - "npm-pick-manifest": "^7.0.0", - "proc-log": "^2.0.0", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", - "which": "^2.0.2" + "which": "^3.0.0" }, "dependencies": { "lru-cache": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.0.tgz", - "integrity": "sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true + }, + "which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, "@npmcli/installed-package-contents": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", - "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz", + "integrity": "sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA==", "dev": true, "requires": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" } }, "@npmcli/move-file": { @@ -10367,31 +11471,53 @@ } }, "@npmcli/node-gyp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-2.0.0.tgz", - "integrity": "sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", "dev": true }, "@npmcli/promise-spawn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-3.0.0.tgz", - "integrity": "sha512-s9SgS+p3a9Eohe68cSI3fi+hpcZUmXq5P7w0kMlAsWVtR7XbK3ptkZqKT2cK1zLDObJ3sR+8P59sJE0w/KTL1g==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", + "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", "dev": true, "requires": { - "infer-owner": "^1.0.4" + "which": "^3.0.0" + }, + "dependencies": { + "which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } } }, "@npmcli/run-script": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.2.1.tgz", - "integrity": "sha512-7dqywvVudPSrRCW5nTHpHgeWnbBtz8cFkOuKrecm6ih+oO9ciydhWt6OF7HlqupRRmB8Q/gECVdB9LMfToJbRg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz", + "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==", "dev": true, "requires": { - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/promise-spawn": "^3.0.0", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", "node-gyp": "^9.0.0", - "read-package-json-fast": "^2.0.3", - "which": "^2.0.2" + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + }, + "dependencies": { + "which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } } }, "@pnpm/network.ca-file": { @@ -10492,9 +11618,9 @@ } }, "@types/chai": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", - "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", "dev": true }, "@types/clone": { @@ -10503,6 +11629,15 @@ "integrity": "sha512-BZIU34bSYye0j/BFcPraiDZ5ka6MJADjcDVELGf7glr9K+iE8NYVjFslJFVWzskSxkLLyCrSPScE82/UUoBSvg==", "dev": true }, + "@types/compression": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@types/compression/-/compression-1.7.2.tgz", + "integrity": "sha512-lwEL4M/uAGWngWFLSG87ZDr2kLrbuR8p7X+QZB1OQlT+qkHsCPDVFnHPyXf4Vyl4yDDorNY+mAhosxkCvppatg==", + "dev": true, + "requires": { + "@types/express": "*" + } + }, "@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -10525,10 +11660,13 @@ "dev": true }, "@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", - "dev": true + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "requires": { + "@types/node": "*" + } }, "@types/debug": { "version": "4.1.7", @@ -10540,21 +11678,21 @@ } }, "@types/express": { - "version": "4.17.14", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz", - "integrity": "sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==", + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", "dev": true, "requires": { "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.18", + "@types/express-serve-static-core": "^4.17.33", "@types/qs": "*", "@types/serve-static": "*" } }, "@types/express-serve-static-core": { - "version": "4.17.31", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz", - "integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==", + "version": "4.17.33", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz", + "integrity": "sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==", "dev": true, "requires": { "@types/node": "*", @@ -10588,18 +11726,18 @@ "dev": true }, "@types/jsonwebtoken": { - "version": "8.5.9", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.9.tgz", - "integrity": "sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", + "integrity": "sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==", "dev": true, "requires": { "@types/node": "*" } }, "@types/lodash": { - "version": "4.14.185", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.185.tgz", - "integrity": "sha512-evMDG1bC4rgQg4ku9tKpuMh5iBNEwNa3tf9zRHdP1qlv+1WUg44xat4IxCE14gIpZRGUUWAx2VhItCZc25NfMA==", + "version": "4.14.191", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz", + "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==", "dev": true }, "@types/mime": { @@ -10609,9 +11747,9 @@ "dev": true }, "@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", "dev": true }, "@types/ms": { @@ -10621,9 +11759,9 @@ "dev": true }, "@types/node": { - "version": "18.7.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", - "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==", + "version": "18.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", + "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==", "dev": true }, "@types/qs": { @@ -10638,6 +11776,12 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", "dev": true }, + "@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true + }, "@types/serve-static": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz", @@ -10649,9 +11793,9 @@ } }, "@types/superagent": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.15.tgz", - "integrity": "sha512-mu/N4uvfDN2zVQQ5AYJI/g4qxn2bHB6521t1UuH09ShNWjebTqN0ZFuYK9uYjcgmI0dTQEs+Owi1EO6U0OkOZQ==", + "version": "4.1.16", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.16.tgz", + "integrity": "sha512-tLfnlJf6A5mB6ddqF159GqcDizfzbMUB1/DeT59/wBNqzRTNNKsaw79A/1TZ84X+f/EwWH8FeuSkjlCLyqS/zQ==", "dev": true, "requires": { "@types/cookiejar": "*", @@ -10665,9 +11809,9 @@ "dev": true }, "@types/web-bluetooth": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.15.tgz", - "integrity": "sha512-w7hEHXnPMEZ+4nGKl/KDRVpxkwYxYExuHOYXyzIzCDzEZ9ZCGMAewulr9IqJu2LR4N37fcnb1XVeuZ09qgOxhA==", + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz", + "integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==", "dev": true }, "@types/webidl-conversions": { @@ -10687,69 +11831,71 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.38.0.tgz", - "integrity": "sha512-GgHi/GNuUbTOeoJiEANi0oI6fF3gBQc3bGFYj40nnAPCbhrtEDf2rjBmefFadweBmO1Du1YovHeDP2h5JLhtTQ==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.51.0.tgz", + "integrity": "sha512-wcAwhEWm1RgNd7dxD/o+nnLW8oH+6RK1OGnmbmkj/GGoDPV1WWMVP0FXYQBivKHdwM1pwii3bt//RC62EriIUQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.38.0", - "@typescript-eslint/type-utils": "5.38.0", - "@typescript-eslint/utils": "5.38.0", + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/type-utils": "5.51.0", + "@typescript-eslint/utils": "5.51.0", "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", "regexpp": "^3.2.0", "semver": "^7.3.7", "tsutils": "^3.21.0" } }, "@typescript-eslint/parser": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.38.0.tgz", - "integrity": "sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.51.0.tgz", + "integrity": "sha512-fEV0R9gGmfpDeRzJXn+fGQKcl0inIeYobmmUWijZh9zA7bxJ8clPhV9up2ZQzATxAiFAECqPQyMDB4o4B81AaA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.38.0", - "@typescript-eslint/types": "5.38.0", - "@typescript-eslint/typescript-estree": "5.38.0", + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/typescript-estree": "5.51.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.38.0.tgz", - "integrity": "sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.51.0.tgz", + "integrity": "sha512-gNpxRdlx5qw3yaHA0SFuTjW4rxeYhpHxt491PEcKF8Z6zpq0kMhe0Tolxt0qjlojS+/wArSDlj/LtE69xUJphQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.38.0", - "@typescript-eslint/visitor-keys": "5.38.0" + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/visitor-keys": "5.51.0" } }, "@typescript-eslint/type-utils": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.38.0.tgz", - "integrity": "sha512-iZq5USgybUcj/lfnbuelJ0j3K9dbs1I3RICAJY9NZZpDgBYXmuUlYQGzftpQA9wC8cKgtS6DASTvF3HrXwwozA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.51.0.tgz", + "integrity": "sha512-QHC5KKyfV8sNSyHqfNa0UbTbJ6caB8uhcx2hYcWVvJAZYJRBo5HyyZfzMdRx8nvS+GyMg56fugMzzWnojREuQQ==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.38.0", - "@typescript-eslint/utils": "5.38.0", + "@typescript-eslint/typescript-estree": "5.51.0", + "@typescript-eslint/utils": "5.51.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.38.0.tgz", - "integrity": "sha512-HHu4yMjJ7i3Cb+8NUuRCdOGu2VMkfmKyIJsOr9PfkBVYLYrtMCK/Ap50Rpov+iKpxDTfnqvDbuPLgBE5FwUNfA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.51.0.tgz", + "integrity": "sha512-SqOn0ANn/v6hFn0kjvLwiDi4AzR++CBZz0NV5AnusT2/3y32jdc0G4woXPWHCumWtUXZKPAS27/9vziSsC9jnw==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.0.tgz", - "integrity": "sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.51.0.tgz", + "integrity": "sha512-TSkNupHvNRkoH9FMA3w7TazVFcBPveAAmb7Sz+kArY6sLT86PA5Vx80cKlYmd8m3Ha2SwofM1KwraF24lM9FvA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.38.0", - "@typescript-eslint/visitor-keys": "5.38.0", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/visitor-keys": "5.51.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -10758,76 +11904,72 @@ } }, "@typescript-eslint/utils": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.38.0.tgz", - "integrity": "sha512-6sdeYaBgk9Fh7N2unEXGz+D+som2QCQGPAf1SxrkEr+Z32gMreQ0rparXTNGRRfYUWk/JzbGdcM8NSSd6oqnTA==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.51.0.tgz", + "integrity": "sha512-76qs+5KWcaatmwtwsDJvBk4H76RJQBFe+Gext0EfJdC3Vd2kpY2Pf//OHHzHp84Ciw0/rYoGTDnIAr3uWhhJYw==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.38.0", - "@typescript-eslint/types": "5.38.0", - "@typescript-eslint/typescript-estree": "5.38.0", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.51.0", + "@typescript-eslint/types": "5.51.0", + "@typescript-eslint/typescript-estree": "5.51.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "5.38.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.0.tgz", - "integrity": "sha512-MxnrdIyArnTi+XyFLR+kt/uNAcdOnmT+879os7qDRI+EYySR4crXJq9BXPfRzzLGq0wgxkwidrCJ9WCAoacm1w==", + "version": "5.51.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.51.0.tgz", + "integrity": "sha512-Oh2+eTdjHjOFjKA27sxESlA87YPSOJafGCR0md5oeMdh1ZcCfAGCIOL216uTBAkAIptvLIfKQhl7lHxMJet4GQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.38.0", + "@typescript-eslint/types": "5.51.0", "eslint-visitor-keys": "^3.3.0" } }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "@vitejs/plugin-vue": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-3.1.0.tgz", - "integrity": "sha512-fmxtHPjSOEIRg6vHYDaem+97iwCUg/uSIaTzp98lhELt2ISOQuDo2hbkBdXod0g15IhfPMQmAxh4heUks2zvDA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-4.0.0.tgz", + "integrity": "sha512-e0X4jErIxAB5oLtDqbHvHpJe/uWNkdpYV83AOG2xo2tEVSzCzewgJMtREZM30wXnM5ls90hxiOtAuVU6H5JgbA==", "dev": true, "requires": {} }, "@vue/compiler-core": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.39.tgz", - "integrity": "sha512-mf/36OWXqWn0wsC40nwRRGheR/qoID+lZXbIuLnr4/AngM0ov8Xvv8GHunC0rKRIkh60bTqydlqTeBo49rlbqw==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.47.tgz", + "integrity": "sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==", "dev": true, "requires": { "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.39", + "@vue/shared": "3.2.47", "estree-walker": "^2.0.2", "source-map": "^0.6.1" } }, "@vue/compiler-dom": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.39.tgz", - "integrity": "sha512-HMFI25Be1C8vLEEv1hgEO1dWwG9QQ8LTTPmCkblVJY/O3OvWx6r1+zsox5mKPMGvqYEZa6l8j+xgOfUspgo7hw==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.47.tgz", + "integrity": "sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==", "dev": true, "requires": { - "@vue/compiler-core": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-core": "3.2.47", + "@vue/shared": "3.2.47" } }, "@vue/compiler-sfc": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.39.tgz", - "integrity": "sha512-fqAQgFs1/BxTUZkd0Vakn3teKUt//J3c420BgnYgEOoVdTwYpBTSXCMJ88GOBCylmUBbtquGPli9tVs7LzsWIA==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.47.tgz", + "integrity": "sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==", "dev": true, "requires": { "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.39", - "@vue/compiler-dom": "3.2.39", - "@vue/compiler-ssr": "3.2.39", - "@vue/reactivity-transform": "3.2.39", - "@vue/shared": "3.2.39", + "@vue/compiler-core": "3.2.47", + "@vue/compiler-dom": "3.2.47", + "@vue/compiler-ssr": "3.2.47", + "@vue/reactivity-transform": "3.2.47", + "@vue/shared": "3.2.47", "estree-walker": "^2.0.2", "magic-string": "^0.25.7", "postcss": "^8.1.10", @@ -10835,89 +11977,89 @@ } }, "@vue/compiler-ssr": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.39.tgz", - "integrity": "sha512-EoGCJ6lincKOZGW+0Ky4WOKsSmqL7hp1ZYgen8M7u/mlvvEQUaO9tKKOy7K43M9U2aA3tPv0TuYYQFrEbK2eFQ==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.47.tgz", + "integrity": "sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==", "dev": true, "requires": { - "@vue/compiler-dom": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-dom": "3.2.47", + "@vue/shared": "3.2.47" } }, "@vue/devtools-api": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.2.1.tgz", - "integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.0.tgz", + "integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==", "dev": true }, "@vue/reactivity": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.39.tgz", - "integrity": "sha512-vlaYX2a3qMhIZfrw3Mtfd+BuU+TZmvDrPMa+6lpfzS9k/LnGxkSuf0fhkP0rMGfiOHPtyKoU9OJJJFGm92beVQ==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.47.tgz", + "integrity": "sha512-7khqQ/75oyyg+N/e+iwV6lpy1f5wq759NdlS1fpAhFXa8VeAIKGgk2E/C4VF59lx5b+Ezs5fpp/5WsRYXQiKxQ==", "dev": true, "requires": { - "@vue/shared": "3.2.39" + "@vue/shared": "3.2.47" } }, "@vue/reactivity-transform": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.39.tgz", - "integrity": "sha512-HGuWu864zStiWs9wBC6JYOP1E00UjMdDWIG5W+FpUx28hV3uz9ODOKVNm/vdOy/Pvzg8+OcANxAVC85WFBbl3A==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.47.tgz", + "integrity": "sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==", "dev": true, "requires": { "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.39", - "@vue/shared": "3.2.39", + "@vue/compiler-core": "3.2.47", + "@vue/shared": "3.2.47", "estree-walker": "^2.0.2", "magic-string": "^0.25.7" } }, "@vue/runtime-core": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.39.tgz", - "integrity": "sha512-xKH5XP57JW5JW+8ZG1khBbuLakINTgPuINKL01hStWLTTGFOrM49UfCFXBcFvWmSbci3gmJyLl2EAzCaZWsx8g==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.47.tgz", + "integrity": "sha512-RZxbLQIRB/K0ev0K9FXhNbBzT32H9iRtYbaXb0ZIz2usLms/D55dJR2t6cIEUn6vyhS3ALNvNthI+Q95C+NOpA==", "dev": true, "requires": { - "@vue/reactivity": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/reactivity": "3.2.47", + "@vue/shared": "3.2.47" } }, "@vue/runtime-dom": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.39.tgz", - "integrity": "sha512-4G9AEJP+sLhsqf5wXcyKVWQKUhI+iWfy0hWQgea+CpaTD7BR0KdQzvoQdZhwCY6B3oleSyNLkLAQwm0ya/wNoA==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.47.tgz", + "integrity": "sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==", "dev": true, "requires": { - "@vue/runtime-core": "3.2.39", - "@vue/shared": "3.2.39", + "@vue/runtime-core": "3.2.47", + "@vue/shared": "3.2.47", "csstype": "^2.6.8" } }, "@vue/server-renderer": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.39.tgz", - "integrity": "sha512-1yn9u2YBQWIgytFMjz4f/t0j43awKytTGVptfd3FtBk76t1pd8mxbek0G/DrnjJhd2V7mSTb5qgnxMYt8Z5iSQ==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.47.tgz", + "integrity": "sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==", "dev": true, "requires": { - "@vue/compiler-ssr": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-ssr": "3.2.47", + "@vue/shared": "3.2.47" } }, "@vue/shared": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.39.tgz", - "integrity": "sha512-D3dl2ZB9qE6mTuWPk9RlhDeP1dgNRUKC3NJxji74A4yL8M2MwlhLKUC/49WHjrNzSPug58fWx/yFbaTzGAQSBw==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.47.tgz", + "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==", "dev": true }, "@vueuse/core": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.2.0.tgz", - "integrity": "sha512-/MZ6qpz6uSyaXrtoeBWQzAKRG3N7CvfVWvQxiM3ei3Xe5ydOjjtVbo7lGl9p8dECV93j7W8s63A8H0kFLpLyxg==", + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.12.0.tgz", + "integrity": "sha512-h/Di8Bvf6xRcvS/PvUVheiMYYz3U0tH3X25YxONSaAUBa841ayMwxkuzx/DGUMCW/wHWzD8tRy2zYmOC36r4sg==", "dev": true, "requires": { - "@types/web-bluetooth": "^0.0.15", - "@vueuse/metadata": "9.2.0", - "@vueuse/shared": "9.2.0", + "@types/web-bluetooth": "^0.0.16", + "@vueuse/metadata": "9.12.0", + "@vueuse/shared": "9.12.0", "vue-demi": "*" }, "dependencies": { @@ -10931,15 +12073,15 @@ } }, "@vueuse/metadata": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.2.0.tgz", - "integrity": "sha512-exN4KE6iquxDCdt72BgEhb3tlOpECtD61AUdXnUqBTIUCl70x1Ar/QXo3bYcvxmdMS2/peQyfeTzBjRTpvL5xw==", + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.12.0.tgz", + "integrity": "sha512-9oJ9MM9lFLlmvxXUqsR1wLt1uF7EVbP5iYaHJYqk+G2PbMjY6EXvZeTjbdO89HgoF5cI6z49o2zT/jD9SVoNpQ==", "dev": true }, "@vueuse/shared": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.2.0.tgz", - "integrity": "sha512-NnRp/noSWuXW0dKhZK5D0YLrDi0nmZ18UeEgwXQq7Ul5TTP93lcNnKjrHtd68j2xFB/l59yPGFlCryL692bnrA==", + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.12.0.tgz", + "integrity": "sha512-TWuJLACQ0BVithVTRbex4Wf1a1VaRuSpVeyEd4vMUWl54PzlE0ciFUshKCXnlLuD0lxIaLK4Ypj3NXYzZh4+SQ==", "dev": true, "requires": { "vue-demi": "*" @@ -11038,26 +12180,55 @@ "uri-js": "^4.2.2" } }, + "ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "requires": { + "ajv": "^8.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, "algoliasearch": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.14.2.tgz", - "integrity": "sha512-ngbEQonGEmf8dyEh5f+uOIihv4176dgbuOZspiuhmTTBRBuzWu3KCGHre6uHj5YyuC7pNvQGzB6ZNJyZi0z+Sg==", - "dev": true, - "requires": { - "@algolia/cache-browser-local-storage": "4.14.2", - "@algolia/cache-common": "4.14.2", - "@algolia/cache-in-memory": "4.14.2", - "@algolia/client-account": "4.14.2", - "@algolia/client-analytics": "4.14.2", - "@algolia/client-common": "4.14.2", - "@algolia/client-personalization": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/logger-common": "4.14.2", - "@algolia/logger-console": "4.14.2", - "@algolia/requester-browser-xhr": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/requester-node-http": "4.14.2", - "@algolia/transporter": "4.14.2" + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.14.3.tgz", + "integrity": "sha512-GZTEuxzfWbP/vr7ZJfGzIl8fOsoxN916Z6FY2Egc9q2TmZ6hvq5KfAxY89pPW01oW/2HDEKA8d30f9iAH9eXYg==", + "dev": true, + "requires": { + "@algolia/cache-browser-local-storage": "4.14.3", + "@algolia/cache-common": "4.14.3", + "@algolia/cache-in-memory": "4.14.3", + "@algolia/client-account": "4.14.3", + "@algolia/client-analytics": "4.14.3", + "@algolia/client-common": "4.14.3", + "@algolia/client-personalization": "4.14.3", + "@algolia/client-search": "4.14.3", + "@algolia/logger-common": "4.14.3", + "@algolia/logger-console": "4.14.3", + "@algolia/requester-browser-xhr": "4.14.3", + "@algolia/requester-common": "4.14.3", + "@algolia/requester-node-http": "4.14.3", + "@algolia/transporter": "4.14.3" } }, "ansi-align": { @@ -11081,6 +12252,12 @@ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, + "ansi-sequence-parser": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", + "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==", + "dev": true + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -11141,15 +12318,15 @@ "dev": true }, "array-includes": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", - "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5", - "get-intrinsic": "^1.1.1", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", "is-string": "^1.0.7" } }, @@ -11160,14 +12337,26 @@ "dev": true }, "array.prototype.flat": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", - "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + } + }, + "array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", "es-shim-unscopables": "^1.0.0" } }, @@ -11177,18 +12366,18 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, "base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", @@ -11208,9 +12397,9 @@ "dev": true }, "body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dev": true, "requires": { "bytes": "3.1.2", @@ -11221,12 +12410,18 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.10.3", + "qs": "6.11.0", "raw-body": "2.5.1", "type-is": "~1.6.18", "unpipe": "1.0.0" }, "dependencies": { + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -11241,15 +12436,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true - }, - "qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } } } }, @@ -11347,23 +12533,10 @@ "dev": true }, "bson": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", - "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", - "dev": true, - "requires": { - "buffer": "^5.6.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.0.0.tgz", + "integrity": "sha512-EL2KpZdyhshyyptj6pnQfnFKPoncD9KwZYvgmj/FXQiOUU1HWTHWmBOP4TZXU3YzStcI5qgpIl68YnMo16s26A==", + "dev": true }, "buffer-equal-constant-time": { "version": "1.0.1", @@ -11387,18 +12560,18 @@ } }, "bundle-require": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-3.1.0.tgz", - "integrity": "sha512-IIXtAO7fKcwPHNPt9kY/WNVJqy7NDy6YqJvv6ENH0TOZoJ+yjpEsn1w40WKZbR2ibfu5g1rfgJTvmFHpm5aOMA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.0.tgz", + "integrity": "sha512-5xjxGtR06579D7UcTBhcQO7Zg3A7ji5xuIUl7kNHSvVJ7/CmAs3bCosfYWNuD/Xm5k0jS9VFuPipSpm5S+ZlKw==", "dev": true, "requires": { - "load-tsconfig": "^0.2.0" + "load-tsconfig": "^0.2.3" } }, "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "dev": true }, "c8": { @@ -11428,29 +12601,24 @@ "dev": true }, "cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "version": "17.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.4.tgz", + "integrity": "sha512-Z/nL3gU+zTUjz5pCA5vVjYM8pmaw2kxM7JEiE0fv3w77Wj+sFbi70CrBruUWH0uNcEdvLDixFpgA2JM4F4DBjA==", "dev": true, "requires": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", "glob": "^8.0.1", - "infer-owner": "^1.0.4", "lru-cache": "^7.7.1", - "minipass": "^3.1.6", + "minipass": "^4.0.0", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", "p-map": "^4.0.0", "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11", - "unique-filename": "^2.0.0" + "unique-filename": "^3.0.0" }, "dependencies": { "brace-expansion": { @@ -11463,9 +12631,9 @@ } }, "glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -11476,15 +12644,15 @@ } }, "lru-cache": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.0.tgz", - "integrity": "sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true }, "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -11535,14 +12703,14 @@ "dev": true }, "chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", "dev": true, "requires": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", - "deep-eql": "^3.0.1", + "deep-eql": "^4.1.2", "get-func-name": "^2.0.0", "loupe": "^2.3.1", "pathval": "^1.1.1", @@ -11689,11 +12857,58 @@ "dev": true }, "commander": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", - "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", "dev": true }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "requires": { + "mime-db": ">= 1.43.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -11747,9 +12962,9 @@ } }, "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true }, "convert-source-map": { @@ -11863,9 +13078,9 @@ } }, "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, "requires": { "type-detect": "^4.0.0" @@ -11905,12 +13120,6 @@ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true }, - "denque": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", - "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", - "dev": true - }, "depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -12024,9 +13233,9 @@ } }, "engine.io": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.0.tgz", - "integrity": "sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.0.tgz", + "integrity": "sha512-OgxY1c/RuCSeO/rTr8DIFXx76IzUUft86R7/P7MMbbkuzeqJoTNw2lmeD91IyGz41QYleIIjWeMJGgug043sfQ==", "dev": true, "requires": { "@types/cookie": "^0.4.1", @@ -12038,7 +13247,7 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" + "ws": "~8.11.0" }, "dependencies": { "cookie": { @@ -12050,9 +13259,9 @@ } }, "engine.io-parser": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", - "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz", + "integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==", "dev": true }, "env-paths": { @@ -12068,34 +13277,55 @@ "dev": true }, "es-abstract": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", - "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz", + "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", "dev": true, "requires": { + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.2", + "get-intrinsic": "^1.1.3", "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", + "internal-slot": "^1.0.4", + "is-array-buffer": "^3.0.1", + "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", "is-weakref": "^1.0.2", "object-inspect": "^1.12.2", "object-keys": "^1.1.1", "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.4.3", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + } + }, + "es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" } }, "es-shim-unscopables": { @@ -12119,185 +13349,35 @@ } }, "esbuild": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.8.tgz", - "integrity": "sha512-Remsk2dmr1Ia65sU+QasE6svJbsHe62lzR+CnjpUvbZ+uSYo1SitiOWPRfZQkCu82YWZBBKXiD/j0i//XWMZ+Q==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.15.8", - "@esbuild/linux-loong64": "0.15.8", - "esbuild-android-64": "0.15.8", - "esbuild-android-arm64": "0.15.8", - "esbuild-darwin-64": "0.15.8", - "esbuild-darwin-arm64": "0.15.8", - "esbuild-freebsd-64": "0.15.8", - "esbuild-freebsd-arm64": "0.15.8", - "esbuild-linux-32": "0.15.8", - "esbuild-linux-64": "0.15.8", - "esbuild-linux-arm": "0.15.8", - "esbuild-linux-arm64": "0.15.8", - "esbuild-linux-mips64le": "0.15.8", - "esbuild-linux-ppc64le": "0.15.8", - "esbuild-linux-riscv64": "0.15.8", - "esbuild-linux-s390x": "0.15.8", - "esbuild-netbsd-64": "0.15.8", - "esbuild-openbsd-64": "0.15.8", - "esbuild-sunos-64": "0.15.8", - "esbuild-windows-32": "0.15.8", - "esbuild-windows-64": "0.15.8", - "esbuild-windows-arm64": "0.15.8" - } - }, - "esbuild-android-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.8.tgz", - "integrity": "sha512-bVh8FIKOolF7/d4AMzt7xHlL0Ljr+mYKSHI39TJWDkybVWHdn6+4ODL3xZGHOxPpdRpitemXA1WwMKYBsw8dGw==", - "dev": true, - "optional": true, - "requires": { - "esbuild-wasm": "0.15.8" + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.6.tgz", + "integrity": "sha512-TKFRp9TxrJDdRWfSsSERKEovm6v30iHnrjlcGhLBOtReE28Yp1VSBRfO3GTaOFMoxsNerx4TjrhzSuma9ha83Q==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.17.6", + "@esbuild/android-arm64": "0.17.6", + "@esbuild/android-x64": "0.17.6", + "@esbuild/darwin-arm64": "0.17.6", + "@esbuild/darwin-x64": "0.17.6", + "@esbuild/freebsd-arm64": "0.17.6", + "@esbuild/freebsd-x64": "0.17.6", + "@esbuild/linux-arm": "0.17.6", + "@esbuild/linux-arm64": "0.17.6", + "@esbuild/linux-ia32": "0.17.6", + "@esbuild/linux-loong64": "0.17.6", + "@esbuild/linux-mips64el": "0.17.6", + "@esbuild/linux-ppc64": "0.17.6", + "@esbuild/linux-riscv64": "0.17.6", + "@esbuild/linux-s390x": "0.17.6", + "@esbuild/linux-x64": "0.17.6", + "@esbuild/netbsd-x64": "0.17.6", + "@esbuild/openbsd-x64": "0.17.6", + "@esbuild/sunos-x64": "0.17.6", + "@esbuild/win32-arm64": "0.17.6", + "@esbuild/win32-ia32": "0.17.6", + "@esbuild/win32-x64": "0.17.6" } }, - "esbuild-android-arm64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.8.tgz", - "integrity": "sha512-ReAMDAHuo0H1h9LxRabI6gwYPn8k6WiUeyxuMvx17yTrJO+SCnIfNc/TSPFvDwtK9MiyiKG/2dBYHouT/M0BXQ==", - "dev": true, - "optional": true - }, - "esbuild-darwin-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.8.tgz", - "integrity": "sha512-KaKcGfJ+yto7Fo5gAj3xwxHMd1fBIKatpCHK8znTJLVv+9+NN2/tIPBqA4w5rBwjX0UqXDeIE2v1xJP+nGEXgA==", - "dev": true, - "optional": true - }, - "esbuild-darwin-arm64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.8.tgz", - "integrity": "sha512-8tjEaBgAKnXCkP7bhEJmEqdG9HEV6oLkF36BrMzpfW2rgaw0c48Zrxe+9RlfeGvs6gDF4w+agXyTjikzsS3izw==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.8.tgz", - "integrity": "sha512-jaxcsGHYzn2L0/lffON2WfH4Nc+d/EwozVTP5K2v016zxMb5UQMhLoJzvLgBqHT1SG0B/mO+a+THnJCMVg15zw==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-arm64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.8.tgz", - "integrity": "sha512-2xp2UlljMvX8HExtcg7VHaeQk8OBU0CSl1j18B5CcZmSDkLF9p3utuMXIopG3a08fr9Hv+Dz6+seSXUow/G51w==", - "dev": true, - "optional": true - }, - "esbuild-linux-32": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.8.tgz", - "integrity": "sha512-9u1E54BRz1FQMl86iaHK146+4ID2KYNxL3trLZT4QLLx3M7Q9n4lGG3lrzqUatGR2cKy8c33b0iaCzsItZWkFg==", - "dev": true, - "optional": true - }, - "esbuild-linux-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.8.tgz", - "integrity": "sha512-4HxrsN9eUzJXdVGMTYA5Xler82FuZUu21bXKN42zcLHHNKCAMPUzD62I+GwDhsdgUBAUj0tRXDdsQHgaP6v0HA==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.8.tgz", - "integrity": "sha512-7DVBU9SFjX4+vBwt8tHsUCbE6Vvl6y6FQWHAgyw1lybC5gULqn/WnjHYHN2/LJaZRsDBvxWT4msEgwLGq1Wd3Q==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.8.tgz", - "integrity": "sha512-1OCm7Aq0tEJT70PbxmHSGYDLYP8DKH8r4Nk7/XbVzWaduo9beCjGBB+tGZIHK6DdTQ3h00/4Tb/70YMH/bOtKg==", - "dev": true, - "optional": true - }, - "esbuild-linux-mips64le": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.8.tgz", - "integrity": "sha512-yeFoNPVFPEzZvFYBfUQNG2TjGRaCyV1E27OcOg4LOtnGrxb2wA+mkW3luckyv1CEyd00mpAg7UdHx8nlx3ghgA==", - "dev": true, - "optional": true - }, - "esbuild-linux-ppc64le": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.8.tgz", - "integrity": "sha512-CEyMMUUNabXibw8OSNmBXhOIGhnjNVl5Lpseiuf00iKN0V47oqDrbo4dsHz1wH62m49AR8iG8wpDlTqfYgKbtg==", - "dev": true, - "optional": true - }, - "esbuild-linux-riscv64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.8.tgz", - "integrity": "sha512-OCGSOaspMUjexSCU8ZiA0UnV/NiRU+s2vIfEcAQWQ6u32R+2luyfh/4ZaY6jFbylJE07Esc/yRvb9Q5fXuClXA==", - "dev": true, - "optional": true - }, - "esbuild-linux-s390x": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.8.tgz", - "integrity": "sha512-RHdpdfxRTSrZXZJlFSLazFU4YwXLB5Rgf6Zr5rffqSsO4y9JybgtKO38bFwxZNlDXliYISXN/YROKrG9s7mZQA==", - "dev": true, - "optional": true - }, - "esbuild-netbsd-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.8.tgz", - "integrity": "sha512-VolFFRatBH09T5QMWhiohAWCOien1R1Uz9K0BRVVTBgBaVBt7eArsXTKxVhUgRf2vwu2c2SXkuP0r7HLG0eozw==", - "dev": true, - "optional": true - }, - "esbuild-openbsd-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.8.tgz", - "integrity": "sha512-HTAPlg+n4kUeE/isQxlCfsOz0xJGNoT5LJ9oYZWFKABfVf4Ycu7Zlf5ITgOnrdheTkz8JeL/gISIOCFAoOXrSA==", - "dev": true, - "optional": true - }, - "esbuild-sunos-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.8.tgz", - "integrity": "sha512-qMP/jR/FzcIOwKj+W+Lb+8Cfr8GZHbHUJxAPi7DUhNZMQ/6y7sOgRzlOSpRrbbUntrRZh0MqOyDhJ3Gpo6L1QA==", - "dev": true, - "optional": true - }, - "esbuild-wasm": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.15.8.tgz", - "integrity": "sha512-Y7uCl5RNO4URjlemjdx++ukVHEMt5s5AfMWYUnMiK4Sry+pPCvQIctzXq6r6FKCyGKjX6/NGMCqR2OX6aLxj0w==", - "dev": true, - "optional": true - }, - "esbuild-windows-32": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.8.tgz", - "integrity": "sha512-RKR1QHh4iWzjUhkP8Yqi75PPz/KS+b8zw3wUrzw6oAkj+iU5Qtyj61ZDaSG3Qf2vc6hTIUiPqVTqBH0NpXFNwg==", - "dev": true, - "optional": true - }, - "esbuild-windows-64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.8.tgz", - "integrity": "sha512-ag9ptYrsizgsR+PQE8QKeMqnosLvAMonQREpLw4evA4FFgOBMLEat/dY/9txbpozTw9eEOYyD3a4cE9yTu20FA==", - "dev": true, - "optional": true - }, - "esbuild-windows-arm64": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.8.tgz", - "integrity": "sha512-dbpAb0VyPaUs9mgw65KRfQ9rqiWCHpNzrJusoPu+LpEoswosjt/tFxN7cd2l68AT4qWdBkzAjDLRon7uqMeWcg==", - "dev": true, - "optional": true - }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -12323,15 +13403,15 @@ "dev": true }, "eslint": { - "version": "8.23.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.1.tgz", - "integrity": "sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==", + "version": "8.33.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.33.0.tgz", + "integrity": "sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@eslint/eslintrc": "^1.4.1", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -12347,14 +13427,14 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", @@ -12394,20 +13474,21 @@ } }, "eslint-config-prettier": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", - "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", + "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", "dev": true, "requires": {} }, "eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", "dev": true, "requires": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" }, "dependencies": { "debug": { @@ -12442,33 +13523,35 @@ } }, "eslint-plugin-import": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", - "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", "dev": true, "requires": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.3", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", "has": "^1.0.3", - "is-core-module": "^2.8.1", + "is-core-module": "^2.11.0", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.values": "^1.1.5", - "resolve": "^1.22.0", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", "tsconfig-paths": "^3.14.1" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "doctrine": { @@ -12480,10 +13563,10 @@ "esutils": "^2.0.2" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } @@ -12538,9 +13621,9 @@ "dev": true }, "espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", "dev": true, "requires": { "acorn": "^8.8.0", @@ -12629,14 +13712,14 @@ } }, "express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dev": true, "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.0", + "body-parser": "1.20.1", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.5.0", @@ -12655,7 +13738,7 @@ "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.10.3", + "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "0.18.0", @@ -12681,15 +13764,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true - }, - "qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } } } }, @@ -12953,6 +14027,15 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, "foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -12987,13 +14070,13 @@ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "fs-minipass": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.1.tgz", + "integrity": "sha512-MhaJDcFRTuLidHrIttu0RDGyyXs/IYHVmlcxfLAEFIWjc1vdLAkdwT7Ace2u7DbitWC0toKMl5eJZRYNVreIMw==", "dev": true, "requires": { - "minipass": "^3.0.0" + "minipass": "^4.0.0" } }, "fs.realpath": { @@ -13068,9 +14151,9 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", "dev": true, "requires": { "function-bind": "^1.1.1", @@ -13133,14 +14216,23 @@ } }, "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3" + } + }, "globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -13155,6 +14247,15 @@ "slash": "^3.0.0" } }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "got": { "version": "12.5.0", "resolved": "https://registry.npmjs.org/got/-/got-12.5.0.tgz", @@ -13234,6 +14335,12 @@ "get-intrinsic": "^1.1.1" } }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -13274,18 +14381,18 @@ "dev": true }, "hosted-git-info": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.1.0.tgz", - "integrity": "sha512-Ek+QmMEqZF8XrbFdwoDjSbm7rT23pCgEMOJmz6GPk/s4yH//RQfNPArhIxbguNxROq/+5lNBwCDHMhA903Kx1Q==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", + "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", "dev": true, "requires": { "lru-cache": "^7.5.1" }, "dependencies": { "lru-cache": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.0.tgz", - "integrity": "sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true } } @@ -13297,9 +14404,9 @@ "dev": true }, "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true }, "http-errors": { @@ -13370,12 +14477,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, "ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", @@ -13383,12 +14484,12 @@ "dev": true }, "ignore-walk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", - "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.1.tgz", + "integrity": "sha512-/c8MxUAqpRccq+LyDOecwF+9KqajueJHh8fz7g3YqjMZt+NSfJzx05zrKiXwa2sKwFCzaiZ5qUVfRj0pmxixEA==", "dev": true, "requires": { - "minimatch": "^5.0.1" + "minimatch": "^6.1.6" }, "dependencies": { "brace-expansion": { @@ -13401,9 +14502,9 @@ } }, "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.1.6.tgz", + "integrity": "sha512-6bR3UIeh/DF8+p6A9Spyuy67ShOq42rOkHWi7eUe3Ua99Zo5lZfGC6lJJWkeoK4k9jQFT3Pl7czhTXimG2XheA==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -13468,12 +14569,12 @@ "dev": true }, "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", + "integrity": "sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==", "dev": true, "requires": { - "get-intrinsic": "^1.1.0", + "get-intrinsic": "^1.1.3", "has": "^1.0.3", "side-channel": "^1.0.4" } @@ -13496,6 +14597,17 @@ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true }, + "is-array-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", + "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + } + }, "is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -13525,9 +14637,9 @@ } }, "is-callable": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.6.tgz", - "integrity": "sha512-krO72EO2NptOGAX2KYyqbP9vYMlNAXdB53rq6f8LXY6RY7JdSR/3BD6wLUlPHSAesmY9vstNrjvqGaCiRK/91Q==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true }, "is-ci": { @@ -13540,9 +14652,9 @@ } }, "is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "requires": { "has": "^1.0.3" @@ -13682,6 +14794,19 @@ "has-symbols": "^1.0.2" } }, + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -13782,9 +14907,9 @@ "dev": true }, "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", "dev": true }, "json-parse-helpfulerror": { @@ -13796,18 +14921,13 @@ "jju": "^1.1.0" } }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, "json-schema-to-ts": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-2.5.5.tgz", - "integrity": "sha512-GFD5t0fUnX/B0gE9xbHjxv2BwFXRJND2+OKoLoMElJ3XRJ7dOBlLT7KXpg96aETeZ0RJbAZOfqHALBf5k4aIIA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-2.6.2.tgz", + "integrity": "sha512-RrcvhZUcTAtfMVSvHIq3h/tELToha68V/1kGeQ2ggBv/4Bv31Zjbqis+b+Hiwibj6GO5WLA9PE4X93C8VTJ1TA==", "dev": true, "requires": { + "@babel/runtime": "^7.18.3", "@types/json-schema": "^7.0.9", "ts-algebra": "^1.1.1", "ts-toolbelt": "^9.6.0" @@ -13825,9 +14945,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "jsonc-parser": { @@ -13849,29 +14969,15 @@ "dev": true }, "jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", "dev": true, "requires": { "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", + "lodash": "^4.17.21", "ms": "^2.1.1", - "semver": "^5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "semver": "^7.3.8" } }, "jwa": { @@ -13961,54 +15067,12 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", - "dev": true - }, - "lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", - "dev": true - }, - "lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", - "dev": true - }, - "lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", - "dev": true - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", - "dev": true - }, "lodash.merge": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==", "dev": true }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "dev": true - }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -14112,10 +15176,128 @@ "ssri": "^9.0.0" }, "dependencies": { + "@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "dev": true, + "requires": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + } + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "dev": true, + "requires": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + } + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, "lru-cache": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.0.tgz", - "integrity": "sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "dev": true + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "dev": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "dev": true, + "requires": { + "unique-slug": "^3.0.0" + } + }, + "unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } @@ -14216,14 +15398,29 @@ "dev": true }, "minipass": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz", - "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.3.tgz", + "integrity": "sha512-OW2r4sQ0sI+z5ckEt5c1Tri4xTgZwYDxpE54eqWlQloQRoWtXjqt9udJ5Z4dSv7wK+nfFI7FRXyCpBSft+gpFw==", + "dev": true + }, + "minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", "dev": true, "requires": { - "yallist": "^4.0.0" + "minipass": "^3.0.0" }, "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -14232,15 +15429,6 @@ } } }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, "minipass-fetch": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", @@ -14251,6 +15439,23 @@ "minipass": "^3.1.6", "minipass-sized": "^1.0.3", "minizlib": "^2.1.2" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "minipass-flush": { @@ -14260,6 +15465,23 @@ "dev": true, "requires": { "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "minipass-json-stream": { @@ -14270,6 +15492,23 @@ "requires": { "jsonparse": "^1.3.1", "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "minipass-pipeline": { @@ -14279,6 +15518,23 @@ "dev": true, "requires": { "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "minipass-sized": { @@ -14288,6 +15544,23 @@ "dev": true, "requires": { "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "minizlib": { @@ -14300,6 +15573,15 @@ "yallist": "^4.0.0" }, "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -14315,12 +15597,11 @@ "dev": true }, "mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "requires": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", @@ -14392,22 +15673,21 @@ "dev": true }, "mongodb": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.10.0.tgz", - "integrity": "sha512-My2QxLTw0Cc1O9gih0mz4mqo145Jq4rLAQx0Glk/Ha9iYBzYpt4I2QFNRIh35uNFNfe8KFQcdwY1/HKxXBkinw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.0.1.tgz", + "integrity": "sha512-KpjtY+NWFmcic6UDYEdfn768ZTuKyv7CRaui7ZSd6q/0/o1AURMC7KygTUwB1Cl8V10Pe5NiP+Y2eBMCDs/ygQ==", "dev": true, "requires": { - "bson": "^4.7.0", - "denque": "^2.1.0", - "mongodb-connection-string-url": "^2.5.3", + "bson": "^5.0.0", + "mongodb-connection-string-url": "^2.6.0", "saslprep": "^1.0.3", - "socks": "^2.7.0" + "socks": "^2.7.1" } }, "mongodb-connection-string-url": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.3.tgz", - "integrity": "sha512-f+/WsED+xF4B74l3k9V/XkTVj5/fxFH2o5ToKXd8Iyi5UhM+sO9u0Ape17Mvl/GkZaFtM0HQnzAG5OTmhKw+tQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", + "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", "dev": true, "requires": { "@types/whatwg-url": "^8.2.1", @@ -14442,6 +15722,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -14449,16 +15735,16 @@ "dev": true }, "node-gyp": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.1.0.tgz", - "integrity": "sha512-HkmN0ZpQJU7FLbJauJTHkHlSVAXlNGDAzH/VYFZGDOnFyn/Na3GlNJfkudmufOdS6/jNFhy88ObzL7ERz9es1g==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", + "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", "dev": true, "requires": { "env-paths": "^2.2.0", "glob": "^7.1.4", "graceful-fs": "^4.2.6", "make-fetch-happen": "^10.0.3", - "nopt": "^5.0.0", + "nopt": "^6.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", "semver": "^7.3.5", @@ -14467,24 +15753,41 @@ } }, "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", "dev": true, "requires": { - "abbrev": "1" + "abbrev": "^1.0.0" } }, "normalize-package-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.1.tgz", - "integrity": "sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", "dev": true, "requires": { - "hosted-git-info": "^5.0.0", + "hosted-git-info": "^6.0.0", "is-core-module": "^2.8.1", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" + }, + "dependencies": { + "hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "requires": { + "lru-cache": "^7.5.1" + } + }, + "lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "dev": true + } } }, "normalize-path": { @@ -14500,48 +15803,49 @@ "dev": true }, "npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", "dev": true, "requires": { - "npm-normalize-package-bin": "^1.0.1" + "npm-normalize-package-bin": "^3.0.0" } }, "npm-check-updates": { - "version": "16.2.1", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.2.1.tgz", - "integrity": "sha512-WPKs8BZeSQMFfK9ABk4ZtdcWYG1J9LjtQ8nOBZ2aZc0kejlJtBchZHkyezuQbWcJQDW06zyforgjG5/ts+zh4w==", + "version": "16.6.5", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.6.5.tgz", + "integrity": "sha512-2bgM6NfqampA3HrKbYVqLvryli48Cz9Ae2uSZN9tfsVJ1ftTpBEoXahU6H5eYOJT5oZ/DMY+Z014daNcWqjGmQ==", "dev": true, "requires": { - "chalk": "^5.0.1", + "chalk": "^5.2.0", "cli-table": "^0.3.11", - "commander": "^9.4.0", + "commander": "^9.4.1", "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^0.1.3", "get-stdin": "^8.0.0", "globby": "^11.0.4", "hosted-git-info": "^5.1.0", + "ini": "^3.0.1", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "lodash": "^4.17.21", - "minimatch": "^5.1.0", + "minimatch": "^5.1.2", "p-map": "^4.0.0", - "pacote": "^13.6.2", + "pacote": "15.0.8", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts-ncu": "^2.5.1", - "rc-config-loader": "^4.1.0", + "rc-config-loader": "^4.1.1", "remote-git-tags": "^3.0.0", "rimraf": "^3.0.2", - "semver": "^7.3.7", + "semver": "^7.3.8", "semver-utils": "^1.1.4", "source-map-support": "^0.5.21", - "spawn-please": "^1.0.0", + "spawn-please": "^2.0.1", "untildify": "^4.0.0", "update-notifier": "^6.0.2", - "yaml": "^2.1.1" + "yaml": "^2.2.0" }, "dependencies": { "brace-expansion": { @@ -14554,15 +15858,21 @@ } }, "chalk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", - "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "dev": true + }, + "ini": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", + "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", "dev": true }, "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -14571,125 +15881,126 @@ } }, "npm-install-checks": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz", - "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz", + "integrity": "sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q==", "dev": true, "requires": { "semver": "^7.1.1" } }, "npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz", + "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==", "dev": true }, "npm-package-arg": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.0.tgz", - "integrity": "sha512-4J0GL+u2Nh6OnhvUKXRr2ZMG4lR8qtLp+kv7UiV00Y+nGiSxtttCyIRHCt5L5BNkXQld/RceYItau3MDOoGiBw==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "dev": true, "requires": { - "hosted-git-info": "^5.0.0", - "proc-log": "^2.0.1", + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", "semver": "^7.3.5", - "validate-npm-package-name": "^4.0.0" - } - }, - "npm-packlist": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz", - "integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==", - "dev": true, - "requires": { - "glob": "^8.0.1", - "ignore-walk": "^5.0.1", - "npm-bundled": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0" + "validate-npm-package-name": "^5.0.0" }, "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - } - }, - "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "npm-bundled": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-2.0.1.tgz", - "integrity": "sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==", + "hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, "requires": { - "npm-normalize-package-bin": "^2.0.0" + "lru-cache": "^7.5.1" } }, - "npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", + "lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true } } }, + "npm-packlist": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", + "dev": true, + "requires": { + "ignore-walk": "^6.0.0" + } + }, "npm-pick-manifest": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.2.tgz", - "integrity": "sha512-gk37SyRmlIjvTfcYl6RzDbSmS9Y4TOBXfsPnoYqTHARNgWbyDiCSMLUpmALDj4jjcTZpURiEfsSHJj9k7EV4Rw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz", + "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==", "dev": true, "requires": { - "npm-install-checks": "^5.0.0", - "npm-normalize-package-bin": "^2.0.0", - "npm-package-arg": "^9.0.0", + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", "semver": "^7.3.5" - }, - "dependencies": { - "npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true - } } }, "npm-registry-fetch": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.3.1.tgz", - "integrity": "sha512-eukJPi++DKRTjSBRcDZSDDsGqRK3ehbxfFUcgaRd0Yp6kRwOwh2WVn0r+8rMB4nnuzvAk6rQVzl6K5CkYOmnvw==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz", + "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==", "dev": true, "requires": { - "make-fetch-happen": "^10.0.6", - "minipass": "^3.1.6", - "minipass-fetch": "^2.0.3", + "make-fetch-happen": "^11.0.0", + "minipass": "^4.0.0", + "minipass-fetch": "^3.0.0", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.1", - "proc-log": "^2.0.0" + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "dev": true + }, + "make-fetch-happen": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.3.tgz", + "integrity": "sha512-oPLh5m10lRNNZDjJ2kP8UpboUx2uFXVaVweVe/lWut4iHWcQEmfqSVJt2ihZsFI8HbpwyyocaXbCAWf0g1ukIA==", + "dev": true, + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + } + }, + "minipass-fetch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz", + "integrity": "sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw==", + "dev": true, + "requires": { + "encoding": "^0.1.13", + "minipass": "^4.0.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + } + } } }, "npm-run-path": { @@ -14713,12 +16024,6 @@ "set-blocking": "^2.0.0" } }, - "nprogress": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", - "integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==", - "dev": true - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -14726,9 +16031,9 @@ "dev": true }, "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true }, "object-keys": { @@ -14750,14 +16055,14 @@ } }, "object.values": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", - "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" } }, "on-finished": { @@ -14769,6 +16074,12 @@ "ee-first": "1.1.1" } }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -14847,31 +16158,27 @@ } }, "pacote": { - "version": "13.6.2", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.6.2.tgz", - "integrity": "sha512-Gu8fU3GsvOPkak2CkbojR7vjs3k3P9cA6uazKTHdsdV0gpCEQq2opelnEv30KRQWgVzP5Vd/5umjcedma3MKtg==", - "dev": true, - "requires": { - "@npmcli/git": "^3.0.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/run-script": "^4.1.0", - "cacache": "^16.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "infer-owner": "^1.0.4", - "minipass": "^3.1.6", - "mkdirp": "^1.0.4", - "npm-package-arg": "^9.0.0", - "npm-packlist": "^5.1.0", - "npm-pick-manifest": "^7.0.0", - "npm-registry-fetch": "^13.0.1", - "proc-log": "^2.0.0", + "version": "15.0.8", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.8.tgz", + "integrity": "sha512-UlcumB/XS6xyyIMwg/WwMAyUmga+RivB5KgkRwA1hZNtrx+0Bt41KxHCvg1kr0pZ/ZeD8qjhW4fph6VaYRCbLw==", + "dev": true, + "requires": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^4.0.0", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", "promise-retry": "^2.0.1", - "read-package-json": "^5.0.0", - "read-package-json-fast": "^2.0.3", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11" } }, @@ -14957,9 +16264,9 @@ "dev": true }, "postcss": { - "version": "8.4.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", - "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", "dev": true, "requires": { "nanoid": "^3.3.4", @@ -14994,9 +16301,9 @@ } }, "preact": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.11.0.tgz", - "integrity": "sha512-Fk6+vB2kb6mSJfDgODq0YDhMfl0HNtK5+Uc9QqECO4nlyPAQwCI+BKyWO//idA7ikV7o+0Fm6LQmNuQi1wXI1w==", + "version": "10.12.0", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.12.0.tgz", + "integrity": "sha512-+w8ix+huD8CNZemheC53IPjMUFk921i02o30u0K6h53spMX41y/QhVDnG/nU2k42/69tvqWmVsgNLIiwRAcmxg==", "dev": true }, "prelude-ls": { @@ -15006,9 +16313,9 @@ "dev": true }, "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", "dev": true }, "prettier-linter-helpers": { @@ -15021,9 +16328,9 @@ } }, "proc-log": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", - "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", "dev": true }, "process": { @@ -15146,6 +16453,14 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true + } } }, "rc": { @@ -15175,27 +16490,27 @@ } }, "rc-config-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.0.tgz", - "integrity": "sha512-aW+kX4qy0CiM9L4fG4Us3oEOpIrOrXzWykAn+xldD07Y9PXWjTH744oHbv0Kc9ZwWaylw3jMjxaf14RgStrNrA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.2.tgz", + "integrity": "sha512-qKTnVWFl9OQYKATPzdfaZIbTxcHziQl92zYSxYC6umhOqyAsoj8H8Gq/+aFjAso68sBdjTz3A7omqeAkkF1MWg==", "dev": true, "requires": { - "debug": "^4.1.1", - "js-yaml": "^4.0.0", - "json5": "^2.1.2", + "debug": "^4.3.4", + "js-yaml": "^4.1.0", + "json5": "^2.2.2", "require-from-string": "^2.0.2" } }, "read-package-json": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.2.tgz", - "integrity": "sha512-BSzugrt4kQ/Z0krro8zhTwV1Kd79ue25IhNN/VtHFy1mG/6Tluyi+msc0UpwaoQzxSHa28mntAjIZY6kEgfR9Q==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz", + "integrity": "sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==", "dev": true, "requires": { "glob": "^8.0.1", - "json-parse-even-better-errors": "^2.3.1", - "normalize-package-data": "^4.0.0", - "npm-normalize-package-bin": "^2.0.0" + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "dependencies": { "brace-expansion": { @@ -15208,9 +16523,9 @@ } }, "glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -15221,30 +16536,24 @@ } }, "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" } - }, - "npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true } } }, "read-package-json-fast": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", - "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", "dev": true, "requires": { - "json-parse-even-better-errors": "^2.3.0", - "npm-normalize-package-bin": "^1.0.1" + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" } }, "readable-stream": { @@ -15276,6 +16585,12 @@ "resolve": "^1.1.6" } }, + "regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "dev": true + }, "regexp.prototype.flags": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", @@ -15383,9 +16698,9 @@ } }, "rollup": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.0.tgz", - "integrity": "sha512-x4KsrCgwQ7ZJPcFA/SUu6QVcYlO7uRLfLAy0DSA4NS2eG8japdbpM50ToH7z4iObodRYOJ0soneF0iaQRJ6zhA==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.14.0.tgz", + "integrity": "sha512-o23sdgCLcLSe3zIplT9nQ1+r97okuaiR+vmAPZPTDYB7/f3tgWIYNyiQveMsZwshBT0is4eGax/HH83Q7CG+/Q==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -15406,6 +16721,17 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -15423,9 +16749,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -15569,14 +16895,15 @@ } }, "shiki": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.11.1.tgz", - "integrity": "sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.0.tgz", + "integrity": "sha512-fb9Fg1Yx/ElVJcTqPQIEOSfn7mSZlrT1W3CkymY08lL2Jsi+t7jPcZzKO1lCsQwlSDuyNhHvolnyA2OI4EgJNg==", "dev": true, "requires": { - "jsonc-parser": "^3.0.0", - "vscode-oniguruma": "^1.6.1", - "vscode-textmate": "^6.0.0" + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" } }, "short-hash": { @@ -15610,9 +16937,9 @@ } }, "sift": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz", - "integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", + "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==", "dev": true }, "signal-exit": { @@ -15640,29 +16967,32 @@ "dev": true }, "socket.io": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", - "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.0.tgz", + "integrity": "sha512-b65bp6INPk/BMMrIgVvX12x3Q+NqlGqSlTuvKQWt0BUJ3Hyy3JangBl7fEoWZTXbOKlCqNPbQ6MbWgok/km28w==", "dev": true, "requires": { "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" + "engine.io": "~6.4.0", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.1" } }, "socket.io-adapter": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", - "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==", - "dev": true + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", + "dev": true, + "requires": { + "ws": "~8.11.0" + } }, "socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.2.tgz", + "integrity": "sha512-DJtziuKypFkMMHCm2uIshOYC7QaylbtzQwiMYDuCKy3OPkjLzu4B2vAhTlqipRHHzrI0NJeBAizTK7X+6m1jVw==", "dev": true, "requires": { "@socket.io/component-emitter": "~3.1.0", @@ -15670,9 +17000,9 @@ } }, "socks": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", - "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", "dev": true, "requires": { "ip": "^2.0.0", @@ -15738,10 +17068,13 @@ } }, "spawn-please": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-1.0.0.tgz", - "integrity": "sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A==", - "dev": true + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-2.0.1.tgz", + "integrity": "sha512-W+cFbZR2q2mMTfjz5ZGvhBAiX+e/zczFCNlbS9mxiSdYswBXwUuBUT+a0urH+xZZa8f/bs0mXHyZsZHR9hKogA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3" + } }, "spdx-correct": { "version": "3.1.1", @@ -15776,12 +17109,12 @@ "dev": true }, "ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz", + "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==", "dev": true, "requires": { - "minipass": "^3.1.1" + "minipass": "^4.0.0" } }, "statuses": { @@ -15811,25 +17144,25 @@ } }, "string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" } }, "string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" } }, "strip-ansi": { @@ -15911,19 +17244,39 @@ "dev": true }, "tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", "dev": true, "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^4.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "dependencies": { + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -15992,9 +17345,9 @@ } }, "traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw==" + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", + "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==" }, "tree-kill": { "version": "1.2.2", @@ -16082,22 +17435,22 @@ "dev": true }, "tsup": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.2.3.tgz", - "integrity": "sha512-J5Pu2Dx0E1wlpIEsVFv9ryzP1pZ1OYsJ2cBHZ7GrKteytNdzaSz5hmLX7/nAxtypq+jVkVvA79d7S83ETgHQ5w==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.6.0.tgz", + "integrity": "sha512-HxZE7Hj5yNxLFftCXdcJ+Jsax8dI4oKb0bt8fIvd1g/W0FZ46sU1pFBVo15WpOERFcEMH7Hykey/Q+hKO4s9RQ==", "dev": true, "requires": { - "bundle-require": "^3.1.0", + "bundle-require": "^4.0.0", "cac": "^6.7.12", "chokidar": "^3.5.1", "debug": "^4.3.1", - "esbuild": "^0.15.1", + "esbuild": "^0.17.6", "execa": "^5.0.0", "globby": "^11.0.3", "joycon": "^3.0.1", "postcss-load-config": "^3.0.1", "resolve-from": "^5.0.0", - "rollup": "^2.74.1", + "rollup": "^3.2.5", "source-map": "0.8.0-beta.0", "sucrase": "^3.20.3", "tree-kill": "^1.2.2" @@ -16186,6 +17539,17 @@ "mime-types": "~2.1.24" } }, + "typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + } + }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -16196,9 +17560,9 @@ } }, "typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "uberproto": { @@ -16220,18 +17584,18 @@ } }, "unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", "dev": true, "requires": { - "unique-slug": "^3.0.0" + "unique-slug": "^4.0.0" } }, "unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", "dev": true, "requires": { "imurmurhash": "^0.1.4" @@ -16354,9 +17718,9 @@ } }, "validate-npm-package-name": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", - "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", "dev": true, "requires": { "builtins": "^5.0.0" @@ -16369,70 +17733,244 @@ "dev": true }, "vite": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.3.tgz", - "integrity": "sha512-/3XWiktaopByM5bd8dqvHxRt5EEgRikevnnrpND0gRfNkrMrPaGGexhtLCzv15RcCMtV2CLw+BPas8YFeSG0KA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.1.tgz", + "integrity": "sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==", "dev": true, "requires": { - "esbuild": "^0.15.6", + "esbuild": "^0.16.14", "fsevents": "~2.3.2", - "postcss": "^8.4.16", + "postcss": "^8.4.21", "resolve": "^1.22.1", - "rollup": "~2.78.0" + "rollup": "^3.10.0" }, "dependencies": { - "rollup": { - "version": "2.78.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz", - "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", + "@esbuild/android-arm": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", + "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", + "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", + "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", + "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", + "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", + "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", + "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", + "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", + "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", + "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", + "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", + "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", + "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", + "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", + "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", + "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", + "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", + "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", + "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", + "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", + "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", + "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", + "dev": true, + "optional": true + }, + "esbuild": { + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", + "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", "dev": true, "requires": { - "fsevents": "~2.3.2" + "@esbuild/android-arm": "0.16.17", + "@esbuild/android-arm64": "0.16.17", + "@esbuild/android-x64": "0.16.17", + "@esbuild/darwin-arm64": "0.16.17", + "@esbuild/darwin-x64": "0.16.17", + "@esbuild/freebsd-arm64": "0.16.17", + "@esbuild/freebsd-x64": "0.16.17", + "@esbuild/linux-arm": "0.16.17", + "@esbuild/linux-arm64": "0.16.17", + "@esbuild/linux-ia32": "0.16.17", + "@esbuild/linux-loong64": "0.16.17", + "@esbuild/linux-mips64el": "0.16.17", + "@esbuild/linux-ppc64": "0.16.17", + "@esbuild/linux-riscv64": "0.16.17", + "@esbuild/linux-s390x": "0.16.17", + "@esbuild/linux-x64": "0.16.17", + "@esbuild/netbsd-x64": "0.16.17", + "@esbuild/openbsd-x64": "0.16.17", + "@esbuild/sunos-x64": "0.16.17", + "@esbuild/win32-arm64": "0.16.17", + "@esbuild/win32-ia32": "0.16.17", + "@esbuild/win32-x64": "0.16.17" } } } }, "vitepress": { - "version": "1.0.0-alpha.15", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.15.tgz", - "integrity": "sha512-+pHJQCpnv0wVgLRyonisrj7Y77PVhbns2nTLxV9GkH3T+RTY/W2JmRatzBg5WciMaPyO8Ms6F3YElO5PULVv3w==", + "version": "1.0.0-alpha.45", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.45.tgz", + "integrity": "sha512-8AVWdymQqBUPmXmAbpapDDg18iDmkNJ47l5eOklBlAjj3n8P3zDAsBhOWSQ6+Nvm6+/GaZATyAvsrg47JD5Idw==", "dev": true, "requires": { - "@docsearch/css": "^3.2.1", - "@docsearch/js": "^3.2.1", - "@vitejs/plugin-vue": "^3.1.0", - "@vue/devtools-api": "^6.2.1", - "@vueuse/core": "^9.1.1", - "body-scroll-lock": "^4.0.0-beta.0", - "nprogress": "^0.2.0", - "shiki": "^0.11.1", - "vite": "^3.1.0", - "vue": "^3.2.38" + "@docsearch/css": "^3.3.2", + "@docsearch/js": "^3.3.2", + "@vitejs/plugin-vue": "^4.0.0", + "@vue/devtools-api": "^6.5.0", + "@vueuse/core": "^9.12.0", + "body-scroll-lock": "4.0.0-beta.0", + "shiki": "^0.14.0", + "vite": "^4.0.4", + "vue": "^3.2.45" } }, "vscode-oniguruma": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", - "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", "dev": true }, "vscode-textmate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-6.0.0.tgz", - "integrity": "sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", "dev": true }, "vue": { - "version": "3.2.39", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.39.tgz", - "integrity": "sha512-tRkguhRTw9NmIPXhzk21YFBqXHT2t+6C6wPOgQ50fcFVWnPdetmRqbmySRHznrYjX2E47u0cGlKGcxKZJ38R/g==", + "version": "3.2.47", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.47.tgz", + "integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==", "dev": true, "requires": { - "@vue/compiler-dom": "3.2.39", - "@vue/compiler-sfc": "3.2.39", - "@vue/runtime-dom": "3.2.39", - "@vue/server-renderer": "3.2.39", - "@vue/shared": "3.2.39" + "@vue/compiler-dom": "3.2.47", + "@vue/compiler-sfc": "3.2.47", + "@vue/runtime-dom": "3.2.47", + "@vue/server-renderer": "3.2.47", + "@vue/shared": "3.2.47" } }, "webidl-conversions": { @@ -16473,6 +18011,20 @@ "is-symbol": "^1.0.3" } }, + "which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + } + }, "wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -16607,9 +18159,9 @@ } }, "ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "dev": true, "requires": {} }, @@ -16632,9 +18184,9 @@ "dev": true }, "yaml": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", - "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.1.tgz", + "integrity": "sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index 491c89b3..dcbe1c88 100644 --- a/package.json +++ b/package.json @@ -63,52 +63,52 @@ ], "dependencies": { "@feathers-plus/batch-loader": "^0.3.6", - "@feathersjs/commons": "^5.0.0-pre.29", - "@feathersjs/errors": "^5.0.0-pre.29", - "@feathersjs/feathers": "^5.0.0-pre.29", + "@feathersjs/commons": "^5.0.0-pre.36", + "@feathersjs/errors": "^5.0.0-pre.36", + "@feathersjs/feathers": "^5.0.0-pre.36", "ajv": "^6.12.6", "debug": "^4.3.4", "graphql": "^16.6.0", "lodash": "^4.17.21", - "traverse": "^0.6.6" + "traverse": "^0.6.7" }, "devDependencies": { "@feathers-plus/cache": "^1.4.0", "@feathers-plus/graphql": "^1.10.0", - "@feathersjs/authentication": "^5.0.0-pre.29", - "@feathersjs/authentication-local": "^5.0.0-pre.29", - "@feathersjs/client": "^5.0.0-pre.29", - "@feathersjs/express": "^5.0.0-pre.29", - "@feathersjs/socketio": "^5.0.0-pre.29", - "@feathersjs/socketio-client": "^5.0.0-pre.29", - "@types/chai": "^4.3.3", + "@feathersjs/authentication": "^5.0.0-pre.36", + "@feathersjs/authentication-local": "^5.0.0-pre.36", + "@feathersjs/client": "^5.0.0-pre.36", + "@feathersjs/express": "^5.0.0-pre.36", + "@feathersjs/socketio": "^5.0.0-pre.36", + "@feathersjs/socketio-client": "^5.0.0-pre.36", + "@types/chai": "^4.3.4", "@types/clone": "^2.1.1", "@types/debug": "^4.1.7", - "@types/lodash": "^4.14.185", - "@types/mocha": "^9.1.1", - "@types/node": "^18.7.18", + "@types/lodash": "^4.14.191", + "@types/mocha": "^10.0.1", + "@types/node": "^18.13.0", "@types/traverse": "^0.6.32", - "@typescript-eslint/eslint-plugin": "^5.37.0", - "@typescript-eslint/parser": "^5.37.0", + "@typescript-eslint/eslint-plugin": "^5.51.0", + "@typescript-eslint/parser": "^5.51.0", "c8": "^7.12.0", - "chai": "^4.3.6", + "chai": "^4.3.7", "clone": "^2.1.2", - "eslint": "^8.23.1", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-import": "^2.26.0", + "eslint": "^8.33.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-prefer-arrow": "^1.2.3", "eslint-plugin-prettier": "^4.2.1", "feathers-memory": "^4.1.0", - "mocha": "^10.0.0", - "mongodb": "^4.9.1", - "npm-check-updates": "^16.1.3", - "prettier": "^2.7.1", + "mocha": "^10.2.0", + "mongodb": "^5.0.1", + "npm-check-updates": "^16.6.5", + "prettier": "^2.8.4", "shx": "^0.3.4", - "sift": "^16.0.0", + "sift": "^16.0.1", "ts-node": "^10.9.1", - "tsup": "^6.2.3", - "typescript": "^4.8.3", - "vitepress": "^1.0.0-alpha.14" + "tsup": "^6.6.0", + "typescript": "^4.9.5", + "vitepress": "^1.0.0-alpha.45" }, "engines": { "node": ">= 14" From cb6958a0ebcdba933918ea30114e476163d53b17 Mon Sep 17 00:00:00 2001 From: fratzinger <22286818+fratzinger@users.noreply.github.com> Date: Wed, 8 Feb 2023 21:18:00 +0100 Subject: [PATCH 9/9] feat: new utils `beforeAround` & `afterAround` --- src/index.ts | 2 ++ src/utility-types.ts | 1 + src/utils/after-around.ts | 9 +++++++++ src/utils/before-around.ts | 9 +++++++++ src/utils/combine.ts | 2 +- test/index.test.ts | 2 ++ 6 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/utility-types.ts create mode 100644 src/utils/after-around.ts create mode 100644 src/utils/before-around.ts diff --git a/src/index.ts b/src/index.ts index 4319455c..a801f803 100755 --- a/src/index.ts +++ b/src/index.ts @@ -37,6 +37,8 @@ export * from './hooks/unless'; export * from './hooks/validate'; export * from './hooks/validate-schema'; +export * from './utils/after-around'; +export * from './utils/before-around'; export * from './utils/calling-params'; export * from './utils/check-context'; export * from './utils/combine'; diff --git a/src/utility-types.ts b/src/utility-types.ts new file mode 100644 index 00000000..7dfe5cee --- /dev/null +++ b/src/utility-types.ts @@ -0,0 +1 @@ +export type Promisable = T | Promise; diff --git a/src/utils/after-around.ts b/src/utils/after-around.ts new file mode 100644 index 00000000..01441edb --- /dev/null +++ b/src/utils/after-around.ts @@ -0,0 +1,9 @@ +import type { HookContext, NextFunction } from '@feathersjs/feathers'; +import type { HookFunction } from '../types'; + +export const afterAround = (regularHook: HookFunction) => { + return async (context: H, next: NextFunction) => { + await next(); + return await regularHook(context); + }; +}; diff --git a/src/utils/before-around.ts b/src/utils/before-around.ts new file mode 100644 index 00000000..f8ccd49f --- /dev/null +++ b/src/utils/before-around.ts @@ -0,0 +1,9 @@ +import type { HookContext, NextFunction } from '@feathersjs/feathers'; +import type { HookFunction } from '../types'; + +export const beforeAround = (regularHook: HookFunction) => { + return async (context: H, next: NextFunction) => { + await regularHook(context); + return next(); + }; +}; diff --git a/src/utils/combine.ts b/src/utils/combine.ts index 18290136..83b7ce67 100755 --- a/src/utils/combine.ts +++ b/src/utils/combine.ts @@ -43,7 +43,7 @@ export function combine(...serviceHooks: Ho const currentCtx = await hook(currentHook); // @ts-ignore return updateCurrentHook(currentCtx); - }, Promise.resolve(ctx)); + }, Promise.resolve(ctx) as Promise); try { await promise; diff --git a/test/index.test.ts b/test/index.test.ts index b48b2e1f..dfb17d76 100755 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -4,7 +4,9 @@ import * as allExported from '../src'; const members = [ 'actOnDefault', 'actOnDispatch', + 'afterAround', 'alterItems', + 'beforeAround', 'cache', 'callingParams', 'callingParamsDefaults',