From f8d315ff6ea3a336a0aa6c9a2a73c93c61db986a Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Tue, 16 Jan 2024 22:18:47 +0100 Subject: [PATCH] Upgrade to mongoose 7 (#14971) * remove some unused dependencies * update mongoose version * make common tests pass * Make unit tests pass * make api v3 integration tests pass * fix lint issues * fix issue with package-lock * fix(lint): we don't need no .js * fix(lint): update to latest config-habitrpg * chore(npm): update package locks * fix(test): replace deprecated fn * chore(package): update eslint-habitrpg again * fix(lint): server linting * fix(lint): client linting * fix(client): correct mangled common imports * chore(npm): update package-locks * fix(lint): punctuation, module --------- Co-authored-by: SabreCat Co-authored-by: SabreCat --- .eslintrc.js | 7 +- gulp/gulp-console.js | 5 - gulp/gulp-tests.js | 38 +- migrations/.eslintrc.js | 6 +- migrations/groups/habitrpg-jackalopes.js | 14 +- migrations/users/achievement-restore.js | 3 +- migrations/users/bulk-email.js | 1 + package-lock.json | 1478 +++++++++++------ package.json | 13 +- scripts/gdpr-delete-users.js | 2 + test/.eslintrc.js | 8 +- test/api/unit/libs/bug-report.test.js | 4 +- test/api/unit/libs/password.test.js | 6 +- test/api/unit/libs/payments/apple.test.js | 20 +- test/api/unit/libs/payments/payments.test.js | 16 +- test/api/unit/middlewares/cronMiddleware.js | 35 +- test/api/unit/models/group.test.js | 6 +- test/api/unit/models/newsPost.js | 4 +- test/api/unit/models/task.test.js | 9 +- test/api/unit/models/user.test.js | 10 +- .../DELETE-challenges_challengeId.test.js | 2 +- ...-challenges_challengeId_export_csv.test.js | 2 +- .../GET-challenges_group_groupid.test.js | 4 +- .../challenges/GET-challenges_user.test.js | 6 +- .../challenges/POST-challenge_flag.test.js | 2 +- .../POST-challenge_flag_clear.test.js | 2 +- .../challenges/POST-challenges.test.js | 6 +- ...lenges_challengeId_winner_winnerId.test.js | 4 +- .../integration/chat/DELETE-chat_id.test.js | 2 +- .../integration/chat/POST-chat.flag.test.js | 10 +- .../integration/chat/POST-chat.like.test.js | 2 +- .../api/v3/integration/chat/POST-chat.test.js | 38 +- ...POST-groups_id_chat_id_clear_flags.test.js | 8 +- .../integration/coupons/GET-coupons.test.js | 2 +- .../POST-coupons_generate_event.test.js | 4 +- .../debug/POST-debug_quest-progress.test.js | 4 +- .../v3/integration/groups/GET-groups.test.js | 2 +- .../integration/groups/GET-groups_id.test.js | 6 +- .../v3/integration/groups/POST-groups.test.js | 4 +- .../groups/POST-groups_groupId_join.test.js | 8 +- .../groups/POST-groups_groupId_leave.test.js | 6 +- .../POST-groups_id_removeMember.test.js | 6 +- .../groups/POST-groups_invite.test.js | 10 +- .../v3/integration/groups/PUT-groups.test.js | 2 +- .../members/POST-members_memberId_flag.js | 2 - .../members/POST-transfer_gems.test.js | 13 +- ...-notifications_notificationId_read.test.js | 2 +- ...T-notifications_notificationId_see.test.js | 2 +- .../POST-notifications_read.test.js | 2 +- .../POST_notifications_see.test.js | 2 +- .../prevent-multiple-notification.js | 2 +- .../POST-groups_groupId_quests_accept.test.js | 2 +- ...-groups_groupId_quests_force-start.test.js | 12 +- .../POST-groups_groupId_quests_invite.test.js | 10 +- .../POST-groups_groupid_quests_abort.test.js | 2 +- .../POST-groups_groupid_quests_cancel.test.js | 2 +- .../POST-groups_groupid_quests_leave.test.js | 2 +- .../POST-groups_groupid_quests_reject.test.js | 2 +- .../shops/GET-shops_market.test.js | 2 +- .../shops/GET-shops_time_travelers.test.js | 6 +- .../integration/tasks/DELETE-tasks_id.test.js | 2 +- .../integration/tasks/GET-tasks_user.test.js | 6 +- .../POST-tasks_id_score_direction.test.js | 2 +- .../POST-tasks_unlink-all_challengeId.test.js | 1 - .../v3/integration/tasks/PUT-tasks_id.test.js | 2 +- .../v3/integration/user/DELETE-user.test.js | 6 +- .../user/GET-user_anonymized.test.js | 2 +- .../integration/user/POST-move-pinned-item.js | 12 +- .../user/POST-user_class_cast_spellId.test.js | 46 +- .../user/POST-user_custom-day-start.test.js | 2 +- .../user/POST-user_equip_type_key.test.js | 2 +- .../user/POST-user_feed_pet_food.test.js | 8 +- ...POST-user_hatch_egg_hatchingPotion.test.js | 4 +- .../user/POST-user_mark_pms_read.test.js | 2 +- .../user/POST-user_purchase.test.js | 12 +- .../user/POST-user_read_card.test.js | 2 +- .../user/POST-user_rebirth.test.js | 2 +- .../user/POST-user_release_both.test.js | 2 +- .../user/POST-user_release_mounts.test.js | 2 +- .../user/POST-user_release_pets.test.js | 2 +- .../integration/user/POST-user_reroll.test.js | 2 +- .../integration/user/POST-user_revive.test.js | 2 +- .../integration/user/POST-user_sell.test.js | 2 +- .../v3/integration/user/POST-user_unlock.js | 4 +- test/api/v3/integration/user/PUT-user.test.js | 10 +- .../DELETE-user_auth_social_network.test.js | 8 +- .../GET-auth_reset-password-set-new-one.js | 8 +- .../POST-auth_reset-password-set-new-one.js | 18 +- .../user/auth/POST-login-local.test.js | 4 +- .../user/auth/POST-register_local.test.js | 6 +- .../auth/POST-user_reset_password.test.js | 2 +- .../user/auth/PUT-user_update_email.test.js | 4 +- .../auth/PUT-user_update_password.test.js | 2 +- .../auth/PUT-user_update_username.test.js | 2 +- .../user/buy/POST-user_buy.test.js | 8 +- .../user/buy/POST-user_buy_armoire.test.js | 2 +- .../buy/POST-user_buy_health_potion.test.js | 2 +- .../user/buy/POST-user_buy_quest.test.js | 6 +- .../buy/POST-user_buy_special_spell.test.js | 4 +- .../user/stats/POST-user_allocate.test.js | 4 +- .../stats/POST-user_allocate_bulk.test.js | 4 +- test/api/v4/news/POST-news.test.js | 2 +- test/api/v4/news/PUT-news_newsId.test.js | 2 +- .../v4/tasks/POST-tasks-bulk-score.test.js | 4 +- .../user/POST-user_class_cast_spellId.test.js | 46 +- test/api/v4/user/POST-user_rebirth.test.js | 2 +- test/api/v4/user/POST-user_reroll.test.js | 2 +- test/api/v4/user/PUT-user.test.js | 8 +- .../v4/user/auth/POST-register_local.test.js | 6 +- test/helpers/api-integration/api-classes.js | 6 +- .../api-integration/v3/object-generators.js | 8 +- .../api-integration/v4/object-generators.js | 8 +- test/helpers/api-unit.helper.js | 4 +- test/helpers/common.helper.js | 18 +- test/helpers/mongo.js | 118 +- website/client/package-lock.json | 1276 +++++++++++--- website/client/package.json | 10 +- website/client/src/app.vue | 6 +- .../components/groups/group.stories.utils.js | 2 +- .../components/groups/questDetailModal.vue | 2 +- .../inventory/equipment/equipGearModal.vue | 2 +- .../inventory/equipment/unequipDropdown.vue | 2 +- .../src/components/memberDetailsNew.vue | 6 +- .../shops/market/equipmentSection.vue | 2 +- .../src/components/shops/seasonal/index.vue | 2 +- .../components/snackbars/notifications.vue | 2 +- .../client/src/components/tasks/spells.vue | 6 +- website/client/src/libs/encodeParams.js | 2 +- .../settingRows/dayStartAdjustmentSetting.vue | 2 +- .../settings/settingRows/fixValuesSetting.vue | 2 +- .../settings/settingRows/loginMethods.vue | 2 +- .../settings/siteDataRows/webhooksRow.vue | 2 +- website/client/src/router/handleRedirect.js | 2 +- website/client/src/store/actions/user.js | 12 +- website/client/src/store/index.js | 2 +- .../unit/components/notifications.spec.js | 35 +- website/common/script/.eslintrc.js | 8 +- .../script/content/gear/sets/special/index.js | 6 +- .../common/script/content/quests/seasonal.js | 5 +- website/common/script/content/spells.js | 10 +- website/common/script/cron.js | 2 +- website/common/script/fns/randomDrop.js | 3 +- website/common/script/libs/errorMessage.js | 2 +- .../script/libs/shops-seasonal.config.js | 6 +- website/common/script/libs/shops.js | 7 +- website/common/script/ops/buy/buy.js | 5 +- website/common/script/ops/scoreTask.js | 2 +- .../common/script/ops/updateUserBalance.js | 6 +- .../script/ops/updateUserHourglasses.js | 12 +- website/server/.eslintrc.js | 6 +- website/server/controllers/api-v3/auth.js | 22 +- .../server/controllers/api-v3/challenges.js | 3 +- website/server/controllers/api-v3/chat.js | 4 +- website/server/controllers/api-v3/groups.js | 6 +- website/server/controllers/api-v3/hall.js | 4 +- website/server/controllers/api-v3/members.js | 6 +- .../controllers/api-v3/notifications.js | 6 +- .../controllers/api-v3/pushNotifications.js | 4 +- website/server/controllers/api-v3/tasks.js | 12 +- .../server/controllers/api-v3/tasks/groups.js | 2 +- website/server/controllers/api-v3/user.js | 4 +- .../server/controllers/api-v4/bug-report.js | 4 +- website/server/controllers/api-v4/news.js | 2 +- website/server/controllers/top-level/email.js | 4 +- website/server/libs/apiError.js | 2 +- website/server/libs/auth/index.js | 2 +- website/server/libs/auth/social.js | 2 +- website/server/libs/baseModel.js | 4 - website/server/libs/bug-report.js | 4 +- website/server/libs/inbox/index.js | 4 +- website/server/libs/password.js | 1 - .../calculateSubscriptionTerminationDate.js | 4 +- website/server/libs/payments/google.js | 8 +- website/server/libs/payments/groupPayments.js | 2 +- .../libs/payments/stripe/oneTimePayments.js | 4 +- website/server/libs/payments/subscriptions.js | 10 +- website/server/libs/preening.js | 5 +- website/server/libs/setupMongoose.js | 8 +- website/server/libs/sleep.js | 2 +- website/server/libs/spells.js | 13 +- website/server/libs/user/index.js | 2 +- website/server/libs/user/validation.js | 2 +- website/server/middlewares/cron.js | 5 +- website/server/middlewares/domain.js | 3 + website/server/models/challenge.js | 14 +- website/server/models/group.js | 49 +- website/server/models/subscriptionPlan.js | 6 +- website/server/models/user/hooks.js | 4 - website/server/models/user/methods.js | 17 +- 189 files changed, 2645 insertions(+), 1423 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0b5aa69a00..0ce53b9a28 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,9 +1,10 @@ +/* eslint-disable import/no-commonjs */ module.exports = { root: true, extends: [ - 'habitrpg/lib/node' + 'habitrpg/lib/node', ], rules: { 'import/no-extraneous-dependencies': 'off', - } -} + }, +}; diff --git a/gulp/gulp-console.js b/gulp/gulp-console.js index b4373c64ba..fae870de1a 100644 --- a/gulp/gulp-console.js +++ b/gulp/gulp-console.js @@ -2,7 +2,6 @@ import mongoose from 'mongoose'; import nconf from 'nconf'; import repl from 'repl'; import gulp from 'gulp'; -import logger from '../website/server/libs/logger'; import { getDevelopmentConnectionUrl, getDefaultConnectionOptions, @@ -39,10 +38,6 @@ const improveRepl = context => { mongoose.connect( connectionUrl, mongooseOptions, - err => { - if (err) throw err; - logger.info('Connected with Mongoose'); - }, ); }; diff --git a/gulp/gulp-tests.js b/gulp/gulp-tests.js index d61ead1c98..f46fd53fa7 100644 --- a/gulp/gulp-tests.js +++ b/gulp/gulp-tests.js @@ -59,13 +59,15 @@ gulp.task('test:prepare:mongo', cb => { const mongooseOptions = getDefaultConnectionOptions(); const connectionUrl = getDevelopmentConnectionUrl(TEST_DB_URI); - mongoose.connect(connectionUrl, mongooseOptions, err => { - if (err) return cb(`Unable to connect to mongo database. Are you sure it's running? \n\n${err}`); - return mongoose.connection.dropDatabase(err2 => { - if (err2) return cb(err2); - return mongoose.connection.close(cb); + mongoose.connect(connectionUrl, mongooseOptions) + .then(() => mongoose.connection.dropDatabase()) + .then(() => mongoose.connection.close()).then(() => { + cb(); + }) + .catch(err => { + if (err) return cb(`Unable to connect to mongo database. Are you sure it's running? \n\n${err}`); + throw err; }); - }); }); gulp.task('test:prepare:server', gulp.series('test:prepare:mongo', done => { @@ -116,8 +118,10 @@ gulp.task('test:common:safe', gulp.series('test:prepare:build', cb => { pipe(runner); })); -gulp.task('test:content', gulp.series('test:prepare:build', - runInChildProcess(CONTENT_TEST_COMMAND, LIMIT_MAX_BUFFER_OPTIONS))); +gulp.task('test:content', gulp.series( + 'test:prepare:build', + runInChildProcess(CONTENT_TEST_COMMAND, LIMIT_MAX_BUFFER_OPTIONS), +)); gulp.task('test:content:clean', cb => { pipe(exec(testBin(CONTENT_TEST_COMMAND), LIMIT_MAX_BUFFER_OPTIONS, () => cb())); @@ -142,16 +146,20 @@ gulp.task('test:content:safe', gulp.series('test:prepare:build', cb => { pipe(runner); })); -gulp.task('test:api:unit:run', - runInChildProcess(integrationTestCommand('test/api/unit', 'coverage/api-unit'))); +gulp.task( + 'test:api:unit:run', + runInChildProcess(integrationTestCommand('test/api/unit', 'coverage/api-unit')), +); gulp.task('test:api:unit:watch', () => gulp.watch(['website/server/libs/*', 'test/api/unit/**/*', 'website/server/controllers/**/*'], gulp.series('test:api:unit:run', done => done()))); -gulp.task('test:api-v3:integration', gulp.series('test:prepare:mongo', +gulp.task('test:api-v3:integration', gulp.series( + 'test:prepare:mongo', runInChildProcess( integrationTestCommand('test/api/v3/integration', 'coverage/api-v3-integration'), LIMIT_MAX_BUFFER_OPTIONS, - ))); + ), +)); gulp.task('test:api-v3:integration:watch', () => gulp.watch([ 'website/server/controllers/api-v3/**/*', 'common/script/ops/*', 'website/server/libs/*.js', @@ -164,11 +172,13 @@ gulp.task('test:api-v3:integration:separate-server', runInChildProcess( 'LOAD_SERVER=0', )); -gulp.task('test:api-v4:integration', gulp.series('test:prepare:mongo', +gulp.task('test:api-v4:integration', gulp.series( + 'test:prepare:mongo', runInChildProcess( integrationTestCommand('test/api/v4', 'api-v4-integration'), LIMIT_MAX_BUFFER_OPTIONS, - ))); + ), +)); gulp.task('test:api-v4:integration:separate-server', runInChildProcess( 'mocha test/api/v4 --recursive --require ./test/helpers/start-server', diff --git a/migrations/.eslintrc.js b/migrations/.eslintrc.js index d8d1723174..44dc646b6a 100644 --- a/migrations/.eslintrc.js +++ b/migrations/.eslintrc.js @@ -3,6 +3,6 @@ module.exports = { root: false, rules: { 'no-console': 0, - 'no-use-before-define': ['error', { functions: false }] - } -} + 'no-use-before-define': ['error', { functions: false }], + }, +}; diff --git a/migrations/groups/habitrpg-jackalopes.js b/migrations/groups/habitrpg-jackalopes.js index 06b18d5d52..480f0d5df3 100644 --- a/migrations/groups/habitrpg-jackalopes.js +++ b/migrations/groups/habitrpg-jackalopes.js @@ -21,12 +21,14 @@ async function handOutJackalopes () { if (user.party._id) groupList.push(user.party._id); groupList = groupList.concat(user.guilds); - const subscribedGroup = await Group.findOne({ - _id: { $in: groupList }, - 'purchased.plan.planId': 'group_monthly', - 'purchased.plan.dateTerminated': null, - }, - { _id: 1 }); + const subscribedGroup = await Group.findOne( + { + _id: { $in: groupList }, + 'purchased.plan.planId': 'group_monthly', + 'purchased.plan.dateTerminated': null, + }, + { _id: 1 }, + ); if (subscribedGroup) { User.update({ _id: user._id }, { $set: { 'items.mounts.Jackalope-RoyalPurple': true } }).exec(); diff --git a/migrations/users/achievement-restore.js b/migrations/users/achievement-restore.js index e603a0f330..b65958f69c 100644 --- a/migrations/users/achievement-restore.js +++ b/migrations/users/achievement-restore.js @@ -51,7 +51,8 @@ function getAchievementUpdate (newUser, oldUser) { // Rebirth level if (achievementsUpdate.rebirthLevel) { achievementsUpdate.rebirthLevel = Math.max( - achievementsUpdate.rebirthLevel, oldAchievements.rebirthLevel, + achievementsUpdate.rebirthLevel, + oldAchievements.rebirthLevel, ); } else if (oldAchievements.rebirthLevel) { achievementsUpdate.rebirthLevel = oldAchievements.rebirthLevel; diff --git a/migrations/users/bulk-email.js b/migrations/users/bulk-email.js index 7aa90291d9..4508178f13 100644 --- a/migrations/users/bulk-email.js +++ b/migrations/users/bulk-email.js @@ -16,6 +16,7 @@ async function updateUser (user) { if (count % progressCount === 0) { console.warn(`${count} ${user._id}`); + // eslint-disable-next-line no-promise-executor-return await new Promise(resolve => setTimeout(resolve, 5000)); } diff --git a/package-lock.json b/package-lock.json index c0d3404dff..55264d153b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,11 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==" + }, "@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -14,11 +19,24 @@ } }, "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "requires": { - "@babel/highlight": "^7.10.4" + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } } }, "@babel/compat-data": { @@ -632,9 +650,9 @@ "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==" }, "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==" + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==" }, "@babel/helper-validator-option": { "version": "7.22.5", @@ -750,12 +768,12 @@ } }, "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "dependencies": { @@ -1971,6 +1989,95 @@ "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", "optional": true }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==" + }, + "@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "requires": { + "type-fest": "^0.20.2" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + } + } + }, + "@eslint/js": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==" + }, "@google-cloud/common": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-4.0.3.tgz", @@ -2035,6 +2142,44 @@ } } }, + "@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "requires": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==" + }, + "@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==" + }, "@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -2213,6 +2358,15 @@ } } }, + "@mongodb-js/saslprep": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz", + "integrity": "sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, "@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", @@ -2448,6 +2602,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.2.tgz", "integrity": "sha512-+uWmsejEHfmSjyyM/LkrP0orfE2m5Mx9Xel4tXNeqi1ldK5XMQcDsFkBmLDtuyKUbxj2jGDo0H240fbCRJZo7Q==", + "dev": true, "requires": { "@types/node": "*" } @@ -2542,7 +2697,7 @@ "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=" + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, "@types/jsonwebtoken": { "version": "8.5.9", @@ -2574,6 +2729,7 @@ "version": "3.5.27", "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.5.27.tgz", "integrity": "sha512-1jxKDgdfJEOO9zp+lv43p8jOqRs02xPrdUTzAZIVK9tVEySfCEmktL2jEu9A3wOBEOs18yKzpVIKUh8b8ALk3w==", + "dev": true, "requires": { "@types/bson": "*", "@types/node": "*" @@ -2622,6 +2778,25 @@ "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.2.tgz", "integrity": "sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g==" }, + "@types/webidl-conversions": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" + }, + "@types/whatwg-url": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", + "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "requires": { + "@types/node": "*", + "@types/webidl-conversions": "*" + } + }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" + }, "@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -2811,9 +2986,9 @@ } }, "acorn": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", - "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==" + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==" }, "acorn-import-assertions": { "version": "1.8.0", @@ -2821,9 +2996,9 @@ "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==" }, "acorn-jsx": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", - "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" }, "agent-base": { "version": "6.0.2", @@ -2896,17 +3071,17 @@ } }, "ansi-escapes": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", - "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "requires": { - "type-fest": "^0.11.0" + "type-fest": "^0.21.3" }, "dependencies": { "type-fest": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", - "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==" + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" } } }, @@ -2919,9 +3094,9 @@ } }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "3.2.1", @@ -4825,7 +5000,7 @@ "bin-pack": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bin-pack/-/bin-pack-1.0.2.tgz", - "integrity": "sha1-wqAU7b8L7XCjKSBi7UZXe5YSBnk=" + "integrity": "sha512-aOk0SxEon5LF9cMxQFViSKb4qccG6rs7XKyMXIb1J8f8LA2acTIWnHdT0IOTe4gYBbqgjdbuTZ5f+UP+vlh4Mw==" }, "bin-version": { "version": "3.1.0", @@ -5065,6 +5240,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "optional": true, "requires": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" @@ -5074,6 +5250,7 @@ "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "optional": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -5088,6 +5265,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "optional": true, "requires": { "safe-buffer": "~5.1.0" } @@ -5097,7 +5275,8 @@ "bluebird": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true }, "body-parser": { "version": "1.20.2", @@ -5233,7 +5412,8 @@ "bson": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.4.tgz", - "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==" + "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==", + "dev": true }, "buffer": { "version": "5.6.0", @@ -6407,9 +6587,9 @@ "dev": true }, "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "default-compare": { "version": "1.0.0", @@ -6542,7 +6722,8 @@ "denque": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", - "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" + "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==", + "dev": true }, "depd": { "version": "2.0.0", @@ -7058,106 +7239,236 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "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", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" }, "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" } }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "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==" + }, + "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==", + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "requires": { + "is-glob": "^4.0.3" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } } } }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "requires": { + "p-locate": "^5.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } } } }, "eslint-config-airbnb-base": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", - "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "requires": { "confusing-browser-globals": "^1.0.10", "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "object.entries": "^1.1.5", + "semver": "^6.3.0" }, "dependencies": { "call-bind": { @@ -7211,21 +7522,109 @@ "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, "eslint-config-habitrpg": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-habitrpg/-/eslint-config-habitrpg-6.2.1.tgz", - "integrity": "sha512-RRzasGeFbDfYlYSAANJ/94RnmeE6QkY3RK8RHHp6vf5tUo3ZG5swy81y1miLVtxLmv8EgWAJNmoOYZonbmK5+A==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/eslint-config-habitrpg/-/eslint-config-habitrpg-6.2.3.tgz", + "integrity": "sha512-qxxC0yGBcjl8NM50hKKBDltxztml3yheipOOI5+UapXPOffRbaRjD1Mx/rxgRgq+fMjziGo90PtcB7TX5v0Kwg==", "requires": { "eslint": "^6.5.1", - "eslint-config-airbnb-base": "^14.0.0", + "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-mocha": "^6.1.1", "eslint-plugin-vue": "^5.2.3" }, "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + }, + "ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + } + } + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, "eslint-plugin-mocha": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-6.3.0.tgz", @@ -7233,15 +7632,166 @@ "requires": { "eslint-utils": "^2.0.0", "ramda": "^0.27.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + } } }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "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==", "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "requires": { + "type-fest": "^0.8.1" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==" + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -7557,12 +8107,19 @@ } }, "eslint-scope": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + } } }, "eslint-utils": { @@ -7571,21 +8128,28 @@ "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", "requires": { "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } } }, "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" }, "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "requires": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" } }, "esprima": { @@ -7594,26 +8158,33 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "requires": { "estraverse": "^5.1.0" }, "dependencies": { "estraverse": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", - "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==" + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" } } }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + } } }, "estraverse": { @@ -8196,7 +8767,7 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "fast-safe-stringify": { "version": "2.1.1", @@ -8253,11 +8824,11 @@ } }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "file-type": { @@ -8419,44 +8990,19 @@ "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==" }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - } + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" } }, "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" }, "flush-write-stream": { "version": "1.1.1", @@ -8875,7 +9421,7 @@ "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": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" }, "functions-have-names": { "version": "1.2.3", @@ -9077,42 +9623,38 @@ } }, "gifsicle": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-5.1.0.tgz", - "integrity": "sha512-hQsOH7yjC7fMokntysN6f2QuxrnX+zmKKKVy0sC3Vhtnk8WrOxLdfH/Z2PNn7lVVx+1+drzIeAe8ufcmdSC/8g==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-5.3.0.tgz", + "integrity": "sha512-FJTpgdj1Ow/FITB7SVza5HlzXa+/lqEY0tHQazAJbuAdvyJtkH4wIdsR2K414oaTwRXHFLLF+tYbipj+OpYg+Q==", "optional": true, "requires": { "bin-build": "^3.0.0", "bin-wrapper": "^4.0.0", - "execa": "^4.0.0", - "logalot": "^2.0.0" + "execa": "^5.0.0" }, "dependencies": { "execa": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", - "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "optional": true, "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.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.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", - "optional": true, - "requires": { - "pump": "^3.0.0" - } + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "optional": true }, "npm-run-path": { "version": "4.0.1", @@ -9697,6 +10239,11 @@ "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", "optional": true }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -10235,9 +10782,9 @@ } }, "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "optional": true }, "iconv-lite": { @@ -10254,22 +10801,14 @@ "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==" }, "ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" - }, - "image-size": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.2.tgz", - "integrity": "sha512-xfOoWjceHntRb3qFCrh5ZFORYH8XCdYpASltMhZ/Q0KZiOwjdE/Yl2QCiWdwD+lygV5bMCvauzgu5PxBX/Yerg==", - "requires": { - "queue": "6.0.2" - } + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" }, "imagemin": { "version": "7.0.1", @@ -10344,9 +10883,9 @@ } }, "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -10404,7 +10943,7 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" }, "in-app-purchase": { "version": "1.11.4", @@ -10504,9 +11043,9 @@ "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==" }, "inquirer": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.2.tgz", - "integrity": "sha512-DF4osh1FM6l0RJc5YWYhSDB6TawiBRlbV9Cox8MWlidU218Tb7fm3lQTULyUJDfJ0tjbzl0W4q651mrCCEM55w==", + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", "requires": { "ansi-escapes": "^4.2.1", "chalk": "^4.1.0", @@ -10514,7 +11053,7 @@ "cli-width": "^3.0.0", "external-editor": "^3.0.3", "figures": "^3.0.0", - "lodash": "^4.17.16", + "lodash": "^4.17.19", "mute-stream": "0.0.8", "run-async": "^2.4.0", "rxjs": "^6.6.0", @@ -10523,11 +11062,6 @@ "through": "^2.3.6" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -10563,14 +11097,6 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10648,6 +11174,11 @@ "resolved": "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz", "integrity": "sha1-ge9X/l0FgUzVjCSDYyqZwwoOgIc=" }, + "ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -10907,6 +11438,11 @@ "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", "optional": true }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" + }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -11506,9 +12042,9 @@ "integrity": "sha512-40aUybvhH9t2h71ncA1/1SbtTNCVZHgsTsTgqPUxGWDmUDrXyDf2wMNQKEbdBjbf4AI+fQhbECNTV6lWxQKUzg==" }, "kareem": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", - "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", + "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==" }, "kerberos": { "version": "1.1.7", @@ -11529,6 +12065,21 @@ "tsscmp": "1.0.6" } }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "requires": { + "json-buffer": "3.0.1" + }, + "dependencies": { + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + } + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -11613,12 +12164,12 @@ } }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, "liftoff": { @@ -11691,7 +12242,7 @@ "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "dev": true }, "lodash.includes": { @@ -11724,6 +12275,11 @@ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" }, + "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==" + }, "lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", @@ -12491,6 +13047,39 @@ } } }, + "mongodb-connection-string-url": { + "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==", + "requires": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^11.0.0" + }, + "dependencies": { + "tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "requires": { + "punycode": "^2.1.1" + } + }, + "webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" + }, + "whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "requires": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + } + } + } + }, "mongodb-core": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.2.7.tgz", @@ -12552,106 +13141,42 @@ } }, "mongoose": { - "version": "5.13.20", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.13.20.tgz", - "integrity": "sha512-TjGFa/XnJYt+wLmn8y9ssjyO2OhBMeEBtOHb9iJM16EWu2Du6L1Q6zSiEK2ziyYQM8agb4tumNIQFzqbxId7MA==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.6.8.tgz", + "integrity": "sha512-q9zAySH+UtOK5yonWyNcLfq3PxrY6s4gdta4qNGKNOE2yTVoY9FP4hQtvWYnv4rkdk7T8QmQMC7bbhJjDxIunw==", "requires": { - "@types/bson": "1.x || 4.0.x", - "@types/mongodb": "^3.5.27", - "bson": "^1.1.4", - "kareem": "2.3.2", - "mongodb": "3.7.4", - "mongoose-legacy-pluralize": "1.0.2", - "mpath": "0.8.4", - "mquery": "3.2.5", - "ms": "2.1.2", - "optional-require": "1.0.x", - "regexp-clone": "1.0.0", - "safe-buffer": "5.2.1", - "sift": "13.5.2", - "sliced": "1.0.1" + "bson": "^5.5.0", + "kareem": "2.5.1", + "mongodb": "5.9.1", + "mpath": "0.9.0", + "mquery": "5.0.0", + "ms": "2.1.3", + "sift": "16.0.1" }, "dependencies": { - "bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } + "bson": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz", + "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==" }, "mongodb": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.4.tgz", - "integrity": "sha512-K5q8aBqEXMwWdVNh94UQTwZ6BejVbFhh1uB6c5FKtPE9eUMZPUO3sRZdgIEcHSrAWmxzpG/FeODDKL388sqRmw==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.1.tgz", + "integrity": "sha512-NBGA8AfJxGPeB12F73xXwozt8ZpeIPmCUeWRwl9xejozTXFes/3zaep9zhzs1B/nKKsw4P3I4iPfXl3K7s6g+Q==", "requires": { - "bl": "^2.2.1", - "bson": "^1.1.4", - "denque": "^1.4.1", - "optional-require": "^1.1.8", - "safe-buffer": "^5.1.2", - "saslprep": "^1.0.0" - }, - "dependencies": { - "optional-require": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.1.8.tgz", - "integrity": "sha512-jq83qaUb0wNg9Krv1c5OQ+58EK+vHde6aBPzLvPPqJm89UQWsvSuFy9X/OSNJnFeSOKo7btE0n8Nl2+nE+z5nA==", - "requires": { - "require-at": "^1.0.6" - } - } + "@mongodb-js/saslprep": "^1.1.0", + "bson": "^5.5.0", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" } }, - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "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==" - } - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "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==" - } - } + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" } } }, - "mongoose-legacy-pluralize": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", - "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" - }, "monk": { "version": "7.3.4", "resolved": "https://registry.npmjs.org/monk/-/monk-7.3.4.tgz", @@ -12750,35 +13275,16 @@ } }, "mpath": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz", - "integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g==" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==" }, "mquery": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.5.tgz", - "integrity": "sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", + "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", "requires": { - "bluebird": "3.5.1", - "debug": "3.1.0", - "regexp-clone": "^1.0.0", - "safe-buffer": "5.1.2", - "sliced": "1.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "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==" - } + "debug": "4.x" } }, "ms": { @@ -12828,7 +13334,7 @@ "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, "nconf": { "version": "0.12.1", @@ -13144,7 +13650,7 @@ "nopt": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", "requires": { "abbrev": "1" } @@ -13892,9 +14398,9 @@ } }, "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "requires": { "mimic-fn": "^2.1.0" } @@ -13902,19 +14408,20 @@ "optional-require": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.3.tgz", - "integrity": "sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA==" + "integrity": "sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA==", + "dev": true }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" } }, "optipng-bin": { @@ -14209,7 +14716,7 @@ "pause": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", - "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" + "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=" }, "pause-stream": { "version": "0.0.11", @@ -14395,9 +14902,9 @@ } }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" }, "prepend-http": { "version": "2.0.0", @@ -14573,14 +15080,6 @@ "strict-uri-encode": "^1.0.0" } }, - "queue": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", - "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", - "requires": { - "inherits": "~2.0.3" - } - }, "quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -14749,11 +15248,6 @@ "regenerate": "^1.4.2" } }, - "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==" - }, "regenerator-transform": { "version": "0.15.2", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", @@ -14771,11 +15265,6 @@ "safe-regex": "^1.1.0" } }, - "regexp-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", - "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" - }, "regexp.prototype.flags": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", @@ -14983,11 +15472,6 @@ "integrity": "sha1-7W2Lm9Y4wTMosV3YOL1mYRHdeBw=", "dev": true }, - "require-at": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/require-at/-/require-at-1.0.6.tgz", - "integrity": "sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g==" - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -15198,24 +15682,34 @@ } }, "rxjs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.0.tgz", - "integrity": "sha512-3HMA8z/Oz61DUHe+SdOiQyzIf4tOx5oQHmMir7IZEu6TMqCLHT4LRcmNaUS0NwOz8VLvmmBduMsoaUvMaIiqzg==", + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", "requires": { "tslib": "^1.9.0" } }, "safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, "dependencies": { + "call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "requires": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + } + }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -15258,15 +15752,25 @@ } }, "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==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz", + "integrity": "sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==", "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "is-regex": "^1.1.4" }, "dependencies": { + "call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "requires": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + } + }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -15313,6 +15817,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "dev": true, "optional": true, "requires": { "sparse-bitfield": "^3.0.3" @@ -15363,7 +15868,7 @@ "secure-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", - "integrity": "sha512-nZi59hW3Sl5P3+wOO89eHBAAGwmCPd2aE1+dLZV5MO+ItQctIvAqihzaAXIQhvtH4KJPxM080HsnqltR2y8cWg==" + "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=" }, "seek-bzip": { "version": "1.0.5", @@ -15493,14 +15998,15 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", + "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", "requires": { "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.2", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.1" }, "dependencies": { "function-bind": { @@ -15622,9 +16128,9 @@ } }, "sift": { - "version": "13.5.2", - "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz", - "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA==" + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", + "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==" }, "signal-exit": { "version": "3.0.3", @@ -15752,10 +16258,10 @@ "is-fullwidth-code-point": "^2.0.0" } }, - "sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha512-VZBmZP8WU3sMOZm1bdgTadsQbcscK0UM8oKxKVBs4XAhUo2Xxzm/OFMGBkPusxw9xL3Uy8LrzEqGqJhclsr0yA==" + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" }, "snapdragon": { "version": "0.8.2", @@ -15872,6 +16378,15 @@ } } }, + "socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "requires": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + } + }, "sort-keys": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", @@ -16435,17 +16950,17 @@ } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" } }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==" }, "strip-bom-stream": { "version": "1.0.0", @@ -16662,6 +17177,11 @@ "string-width": "^3.0.0" }, "dependencies": { + "ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==" + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -16671,6 +17191,14 @@ "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^5.1.0" } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } } } }, @@ -16904,7 +17432,7 @@ "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "through": { "version": "2.3.8", @@ -17229,9 +17757,9 @@ } }, "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "tsscmp": { "version": "1.0.6", @@ -17257,11 +17785,11 @@ "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-detect": { @@ -17271,9 +17799,9 @@ "dev": true }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" }, "type-is": { "version": "1.6.18", @@ -17699,9 +18227,9 @@ "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" }, "v8-compile-cache": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", - "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", + "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==" }, "v8flags": { "version": "3.2.0", @@ -17758,48 +18286,6 @@ "replace-ext": "^1.0.0" } }, - "vinyl-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/vinyl-buffer/-/vinyl-buffer-1.0.1.tgz", - "integrity": "sha1-lsGjR5uMU5JULGEgKQE7Wyf4i78=", - "requires": { - "bl": "^1.2.1", - "through2": "^2.0.3" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, "vinyl-file": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-1.3.0.tgz", @@ -17962,6 +18448,11 @@ "estraverse": "^4.1.1" } }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + }, "espree": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", @@ -18292,9 +18783,9 @@ } }, "word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==" }, "wordwrap": { "version": "1.0.0", @@ -18570,6 +19061,11 @@ "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" } } } diff --git a/package.json b/package.json index 382de76f9f..e9d42cb5cd 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,9 @@ "csv-stringify": "^5.6.5", "cwait": "^1.1.1", "domain-middleware": "~0.1.0", - "eslint": "6.8.0", - "eslint-config-habitrpg": "6.2.1", - "eslint-plugin-mocha": "5.3.0", + "eslint": "^8.55.0", + "eslint-config-habitrpg": "^6.2.3", + "eslint-plugin-mocha": "^5.0.0", "express": "^4.18.2", "express-basic-auth": "^1.2.1", "express-validator": "^5.2.0", @@ -36,11 +36,9 @@ "gulp-babel": "^8.0.0", "gulp-imagemin": "^7.1.0", "gulp-nodemon": "^2.5.0", - "nodemon": "^2.0.20", "gulp.spritesmith": "^6.13.0", "habitica-markdown": "^3.0.0", "helmet": "^4.6.0", - "image-size": "^1.0.2", "in-app-purchase": "^1.11.3", "js2xmlparser": "^5.0.0", "jsonwebtoken": "^9.0.2", @@ -50,10 +48,11 @@ "method-override": "^3.0.0", "moment": "^2.29.4", "moment-recur": "^1.0.7", - "mongoose": "^5.13.20", + "mongoose": "^7.6.3", "morgan": "^1.10.0", "nconf": "^0.12.1", "node-gcm": "^1.0.5", + "nodemon": "^2.0.20", "on-headers": "^1.0.2", "passport": "^0.5.3", "passport-facebook": "^3.0.0", @@ -64,7 +63,6 @@ "ps-tree": "^1.0.0", "rate-limiter-flexible": "^2.4.2", "redis": "^3.1.2", - "regenerator-runtime": "^0.13.11", "remove-markdown": "^0.5.0", "rimraf": "^3.0.2", "short-uuid": "^4.2.2", @@ -74,7 +72,6 @@ "useragent": "^2.1.9", "uuid": "^9.0.0", "validator": "^13.11.0", - "vinyl-buffer": "^1.0.1", "winston": "^3.10.0", "winston-loggly-bulk": "^3.3.0", "xml2js": "^0.6.2" diff --git a/scripts/gdpr-delete-users.js b/scripts/gdpr-delete-users.js index 9fcf52ee58..fa3541c815 100644 --- a/scripts/gdpr-delete-users.js +++ b/scripts/gdpr-delete-users.js @@ -44,6 +44,7 @@ async function deleteHabiticaData (user, email) { { _id: user._id }, { $set: set }, ); + // eslint-disable-next-line no-promise-executor-return await new Promise(resolve => setTimeout(resolve, 1000)); const response = await axios.delete( `${BASE_URL}/api/v3/user`, @@ -96,6 +97,7 @@ async function processEmailAddress (email) { return console.log(`No users found with email address ${email}`); } + // eslint-disable-next-line no-promise-executor-return await new Promise(resolve => setTimeout(resolve, 1000)); return Promise.all(users.map(user => (async () => { await deleteAmplitudeData(user._id, email); // eslint-disable-line no-await-in-loop diff --git a/test/.eslintrc.js b/test/.eslintrc.js index 68ba406a46..004cabcb0c 100644 --- a/test/.eslintrc.js +++ b/test/.eslintrc.js @@ -1,3 +1,5 @@ +/* eslint-disable import/no-commonjs */ + module.exports = { extends: [ 'habitrpg/lib/mocha', @@ -7,9 +9,9 @@ module.exports = { chai: true, expect: true, sinon: true, - sandbox: true + sandbox: true, }, rules: { 'import/no-extraneous-dependencies': 'off', - } -} + }, +}; diff --git a/test/api/unit/libs/bug-report.test.js b/test/api/unit/libs/bug-report.test.js index feac88ef32..58eefca3e6 100644 --- a/test/api/unit/libs/bug-report.test.js +++ b/test/api/unit/libs/bug-report.test.js @@ -26,9 +26,7 @@ describe('bug-report', () => { _id: userId, }); - const result = await bugReportLogic( - user, userMail, userMessage, userAgent, - ); + const result = await bugReportLogic(user, userMail, userMessage, userAgent); expect(emailLib.sendTxn).to.be.called; expect(result).to.deep.equal({ diff --git a/test/api/unit/libs/password.test.js b/test/api/unit/libs/password.test.js index d9f1572ab5..4abb85e015 100644 --- a/test/api/unit/libs/password.test.js +++ b/test/api/unit/libs/password.test.js @@ -227,7 +227,7 @@ describe('Password Utilities', () => { expiresAt: moment().subtract({ minutes: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); @@ -264,7 +264,7 @@ describe('Password Utilities', () => { expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': 'invalid', }); @@ -280,7 +280,7 @@ describe('Password Utilities', () => { expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); diff --git a/test/api/unit/libs/payments/apple.test.js b/test/api/unit/libs/payments/apple.test.js index 2f01fef793..f7435609d1 100644 --- a/test/api/unit/libs/payments/apple.test.js +++ b/test/api/unit/libs/payments/apple.test.js @@ -342,10 +342,12 @@ describe('Apple Payments', () => { }]); sub = common.content.subscriptionBlocks[newOption.subKey]; - await applePayments.subscribe(user, + await applePayments.subscribe( + user, receipt, headers, - nextPaymentProcessing); + nextPaymentProcessing, + ); expect(iapSetupStub).to.be.calledOnce; expect(iapValidateStub).to.be.calledOnce; @@ -387,10 +389,12 @@ describe('Apple Payments', () => { }]); sub = common.content.subscriptionBlocks[newOption.subKey]; - await applePayments.subscribe(user, + await applePayments.subscribe( + user, receipt, headers, - nextPaymentProcessing); + nextPaymentProcessing, + ); expect(iapSetupStub).to.be.calledOnce; expect(iapValidateStub).to.be.calledOnce; @@ -517,9 +521,7 @@ describe('Apple Payments', () => { const secondUser = new User(); await secondUser.save(); - await expect(applePayments.subscribe( - secondUser, receipt, headers, nextPaymentProcessing, - )) + await expect(applePayments.subscribe(secondUser, receipt, headers, nextPaymentProcessing)) .to.eventually.be.rejected.and.to.eql({ httpCode: 401, name: 'NotAuthorized', @@ -559,9 +561,7 @@ describe('Apple Payments', () => { const thirdUser = new User(); await thirdUser.save(); - await expect(applePayments.subscribe( - thirdUser, receipt, headers, nextPaymentProcessing, - )) + await expect(applePayments.subscribe(thirdUser, receipt, headers, nextPaymentProcessing)) .to.eventually.be.rejected.and.to.eql({ httpCode: 401, name: 'NotAuthorized', diff --git a/test/api/unit/libs/payments/payments.test.js b/test/api/unit/libs/payments/payments.test.js index 438b8def23..5b2d2f9899 100644 --- a/test/api/unit/libs/payments/payments.test.js +++ b/test/api/unit/libs/payments/payments.test.js @@ -1382,18 +1382,6 @@ describe('payments/index', () => { expect(user.purchased.plan.mysteryItems).to.have.a.lengthOf(1); expect(user.purchased.plan.mysteryItems).to.include('head_mystery_201605'); }); - - it('does not award mystery item when user already has the item in the mystery box', async () => { - user.purchased.plan.mysteryItems = [mayMysteryItem]; - - sandbox.spy(user.purchased.plan.mysteryItems, 'push'); - - data = { paymentMethod: 'PaymentMethod', user, sub: { key: 'basic_3mo' } }; - await api.createSubscription(data); - - expect(user.purchased.plan.mysteryItems.push).to.be.calledOnce; - expect(user.purchased.plan.mysteryItems.push).to.be.calledWith('head_mystery_201605'); - }); }); }); @@ -1599,10 +1587,10 @@ describe('payments/index', () => { it('sends gem donation message in each participant\'s language', async () => { // TODO using english for both users because other languages are not loaded // for api.buyGems - await recipient.update({ + await recipient.updateOne({ 'preferences.language': 'en', }); - await user.update({ + await user.updateOne({ 'preferences.language': 'en', }); await api.buyGems(data); diff --git a/test/api/unit/middlewares/cronMiddleware.js b/test/api/unit/middlewares/cronMiddleware.js index 9df810c9fd..ccc6ef2e50 100644 --- a/test/api/unit/middlewares/cronMiddleware.js +++ b/test/api/unit/middlewares/cronMiddleware.js @@ -53,11 +53,9 @@ describe('cron middleware', () => { cronMiddleware(req, res, err => { if (err) return reject(err); - Tasks.Task.findOne({ _id: task }, (secondErr, taskFound) => { - if (secondErr) return reject(err); - expect(secondErr).to.not.exist; - expect(taskFound).to.not.exist; - return resolve(); + Tasks.Task.findOne({ _id: task }).then(foundTask => { + expect(foundTask).to.not.exist; + resolve(); }); return null; @@ -78,10 +76,8 @@ describe('cron middleware', () => { await new Promise((resolve, reject) => { cronMiddleware(req, res, err => { if (err) return reject(err); - Tasks.Task.findOne({ _id: task }, (secondErr, taskFound) => { - if (secondErr) return reject(secondErr); - expect(secondErr).to.not.exist; - expect(taskFound).to.exist; + Tasks.Task.findOne({ _id: task }).then(foundTask => { + expect(foundTask).to.exist; return resolve(); }); return null; @@ -103,10 +99,8 @@ describe('cron middleware', () => { await new Promise((resolve, reject) => { cronMiddleware(req, res, err => { if (err) return reject(err); - Tasks.Task.findOne({ _id: task }, (secondErr, taskFound) => { - if (secondErr) return reject(secondErr); - expect(secondErr).to.not.exist; - expect(taskFound).to.not.exist; + Tasks.Task.findOne({ _id: task }).then(foundTask => { + expect(foundTask).to.not.exist; return resolve(); }); return null; @@ -170,8 +164,7 @@ describe('cron middleware', () => { await new Promise((resolve, reject) => { cronMiddleware(req, res, err => { if (err) return reject(err); - return User.findOne({ _id: user._id }, (secondErr, updatedUser) => { - if (secondErr) return reject(secondErr); + return User.findOne({ _id: user._id }).then(updatedUser => { expect(updatedUser.stats.hp).to.be.lessThan(hpBefore); return resolve(); }); @@ -188,8 +181,7 @@ describe('cron middleware', () => { await new Promise((resolve, reject) => { cronMiddleware(req, res, err => { if (err) return reject(err); - return Tasks.Task.findOne({ _id: todo._id }, (secondErr, todoFound) => { - if (secondErr) return reject(secondErr); + return Tasks.Task.findOne({ _id: todo._id }).then(todoFound => { expect(todoFound.value).to.be.lessThan(todoValueBefore); return resolve(); }); @@ -224,8 +216,7 @@ describe('cron middleware', () => { await new Promise((resolve, reject) => { cronMiddleware(req, res, err => { if (err) return reject(err); - return User.findOne({ _id: user._id }, (secondErr, updatedUser) => { - if (secondErr) return reject(secondErr); + return User.findOne({ _id: user._id }).then(updatedUser => { expect(updatedUser.stats.hp).to.be.lessThan(hpBefore); return resolve(); }); @@ -238,7 +229,7 @@ describe('cron middleware', () => { await user.save(); const updatedUser = user.toObject(); - updatedUser.nMatched = 0; + updatedUser.matchedCount = 0; sandbox.spy(cronLib, 'recoverCron'); @@ -269,7 +260,7 @@ describe('cron middleware', () => { it('cronSignature less than an hour ago should error', async () => { user.lastCron = moment(new Date()).subtract({ days: 2 }); const now = new Date(); - await User.update({ + await User.updateOne({ _id: user._id, }, { $set: { @@ -291,7 +282,7 @@ describe('cron middleware', () => { it('cronSignature longer than an hour ago should allow cron', async () => { user.lastCron = moment(new Date()).subtract({ days: 2 }); const now = new Date(); - await User.update({ + await User.updateOne({ _id: user._id, }, { $set: { diff --git a/test/api/unit/models/group.test.js b/test/api/unit/models/group.test.js index 77a535fd0b..9a2f7d6c9b 100644 --- a/test/api/unit/models/group.test.js +++ b/test/api/unit/models/group.test.js @@ -1358,7 +1358,7 @@ describe('Group Model', () => { describe('#sendChat', () => { beforeEach(() => { - sandbox.spy(User, 'update'); + sandbox.spy(User, 'updateOne'); sandbox.spy(User, 'updateMany'); }); @@ -1450,7 +1450,7 @@ describe('Group Model', () => { party.sendChat({ message: 'message' }); - expect(User.update).to.not.be.called; + expect(User.updateMany).to.not.be.called; }); it('skips sending messages to the tavern', () => { @@ -1458,7 +1458,7 @@ describe('Group Model', () => { party.sendChat({ message: 'message' }); - expect(User.update).to.not.be.called; + expect(User.updateMany).to.not.be.called; }); }); diff --git a/test/api/unit/models/newsPost.js b/test/api/unit/models/newsPost.js index 883ffe193f..55f4c413fc 100644 --- a/test/api/unit/models/newsPost.js +++ b/test/api/unit/models/newsPost.js @@ -103,7 +103,7 @@ describe('NewsPost Model', () => { beforeEach(async () => { // Delete all existing posts from the database - await NewsPost.remove(); + await NewsPost.deleteMany(); }); afterEach(() => { @@ -116,7 +116,7 @@ describe('NewsPost Model', () => { _id: v4(), publishDate: new Date(), published: true, }; NewsPost.updateLastNewsPost(previousPost); - intervalId = refreshNewsPost(50); // refreshes every 50ms + intervalId = refreshNewsPost(100); // refreshes every 100ms await sleep(0.1); // wait 100ms to make sure the new post has a more recent publishDate const newPost = await NewsPost.create({ diff --git a/test/api/unit/models/task.test.js b/test/api/unit/models/task.test.js index 5da3341cbe..0fcc790ee9 100644 --- a/test/api/unit/models/task.test.js +++ b/test/api/unit/models/task.test.js @@ -221,7 +221,8 @@ describe('Task Model', () => { it('returns task by alias', async () => { const foundTasks = await Tasks.Task.findMultipleByIdOrAlias( - [taskWithAlias.alias], user._id, + [taskWithAlias.alias], + user._id, ); expect(foundTasks[0].text).to.eql(taskWithAlias.text); @@ -229,7 +230,8 @@ describe('Task Model', () => { it('returns multiple tasks', async () => { const foundTasks = await Tasks.Task.findMultipleByIdOrAlias( - [taskWithAlias.alias, secondTask._id], user._id, + [taskWithAlias.alias, secondTask._id], + user._id, ); expect(foundTasks.length).to.eql(2); @@ -239,7 +241,8 @@ describe('Task Model', () => { it('returns a task only once if searched by both id and alias', async () => { const foundTasks = await Tasks.Task.findMultipleByIdOrAlias( - [taskWithAlias.alias, taskWithAlias._id], user._id, + [taskWithAlias.alias, taskWithAlias._id], + user._id, ); expect(foundTasks.length).to.eql(1); diff --git a/test/api/unit/models/user.test.js b/test/api/unit/models/user.test.js index 7061baf7ca..c5b6054c73 100644 --- a/test/api/unit/models/user.test.js +++ b/test/api/unit/models/user.test.js @@ -188,7 +188,7 @@ describe('User Model', () => { it('removes invalid tags when loading the user', async () => { let user = new User(); await user.save(); - await user.update({ + await user.updateOne({ $set: { tags: [ null, // invalid, not an object @@ -212,7 +212,7 @@ describe('User Model', () => { it('removes invalid push devices when loading the user', async () => { let user = new User(); await user.save(); - await user.update({ + await user.updateOne({ $set: { pushDevices: [ null, // invalid, not an object @@ -236,7 +236,7 @@ describe('User Model', () => { it('removes duplicate push devices when loading the user', async () => { let user = new User(); await user.save(); - await user.update({ + await user.updateOne({ $set: { pushDevices: [ { type: 'android', regId: '1234' }, @@ -258,7 +258,7 @@ describe('User Model', () => { it('removes invalid notifications when loading the user', async () => { let user = new User(); await user.save(); - await user.update({ + await user.updateOne({ $set: { notifications: [ null, // invalid, not an object @@ -284,7 +284,7 @@ describe('User Model', () => { it('removes multiple NEW_CHAT_MESSAGE for the same group', async () => { let user = new User(); await user.save(); - await user.update({ + await user.updateOne({ $set: { notifications: [ { diff --git a/test/api/v3/integration/challenges/DELETE-challenges_challengeId.test.js b/test/api/v3/integration/challenges/DELETE-challenges_challengeId.test.js index 5e1f9ce9e0..5c4ebb06c8 100644 --- a/test/api/v3/integration/challenges/DELETE-challenges_challengeId.test.js +++ b/test/api/v3/integration/challenges/DELETE-challenges_challengeId.test.js @@ -87,7 +87,7 @@ describe('DELETE /challenges/:challengeId', () => { const testTask = _.find(tasks, task => task.text === taskText); expect(testTask.challenge.broken).to.eql('CHALLENGE_DELETED'); - expect(testTask.challenge.winner).to.be.null; + expect(testTask.challenge.winner).to.be.undefined; }); }); }); diff --git a/test/api/v3/integration/challenges/GET-challenges_challengeId_export_csv.test.js b/test/api/v3/integration/challenges/GET-challenges_challengeId_export_csv.test.js index 9fca02088e..257bd6606f 100644 --- a/test/api/v3/integration/challenges/GET-challenges_challengeId_export_csv.test.js +++ b/test/api/v3/integration/challenges/GET-challenges_challengeId_export_csv.test.js @@ -74,7 +74,7 @@ describe('GET /challenges/:challengeId/export/csv', () => { }); it('should successfully return when it contains erroneous residue user data', async () => { - await members[0].update({ challenges: [] }); + await members[0].updateOne({ challenges: [] }); const res = await members[1].get(`/challenges/${challenge._id}/export/csv`); const sortedMembers = _.sortBy([members[1], members[2], groupLeader], '_id'); const splitRes = res.split('\n'); diff --git a/test/api/v3/integration/challenges/GET-challenges_group_groupid.test.js b/test/api/v3/integration/challenges/GET-challenges_group_groupid.test.js index 8fc956a544..5a1a567ecd 100644 --- a/test/api/v3/integration/challenges/GET-challenges_group_groupid.test.js +++ b/test/api/v3/integration/challenges/GET-challenges_group_groupid.test.js @@ -186,7 +186,7 @@ describe('GET challenges/groups/:groupId', () => { before(async () => { user = await generateUser(); - await user.update({ balance: 0.5 }); + await user.updateOne({ balance: 0.5 }); tavern = await user.get(`/groups/${TAVERN_ID}`); challenge = await generateChallenge(user, tavern, { prize: 1 }); @@ -269,7 +269,7 @@ describe('GET challenges/groups/:groupId', () => { let officialChallenge; let unofficialChallenges; before(async () => { - await user.update({ + await user.updateOne({ 'permissions.challengeAdmin': true, balance: 3, }); diff --git a/test/api/v3/integration/challenges/GET-challenges_user.test.js b/test/api/v3/integration/challenges/GET-challenges_user.test.js index 190024e9de..4267a86567 100644 --- a/test/api/v3/integration/challenges/GET-challenges_user.test.js +++ b/test/api/v3/integration/challenges/GET-challenges_user.test.js @@ -68,7 +68,7 @@ describe('GET challenges/user', () => { challenge = await generateChallenge(user, group); challenge2 = await generateChallenge(user, group); - await user.update({ balance: 0.25 }); + await user.updateOne({ balance: 0.25 }); publicChallenge = await generateChallenge(user, tavern, { prize: 1 }); await member.post(`/challenges/${challenge._id}/join`); @@ -234,7 +234,7 @@ describe('GET challenges/user', () => { upgradeToGroupPlan: true, })); - await user.update({ + await user.updateOne({ 'permissions.challengeAdmin': true, }); @@ -308,7 +308,7 @@ describe('GET challenges/user', () => { guild = group; member = members[0]; // eslint-disable-line prefer-destructuring - await user.update({ balance: 20 }); + await user.updateOne({ balance: 20 }); for (let i = 0; i < 11; i += 1) { let challenge = await generateChallenge(user, group); // eslint-disable-line diff --git a/test/api/v3/integration/challenges/POST-challenge_flag.test.js b/test/api/v3/integration/challenges/POST-challenge_flag.test.js index 0f5f353b6c..adb2f37235 100644 --- a/test/api/v3/integration/challenges/POST-challenge_flag.test.js +++ b/test/api/v3/integration/challenges/POST-challenge_flag.test.js @@ -41,7 +41,7 @@ describe('POST /challenges/:challengeId/flag', () => { }); it('flags a challenge with a higher count when from an admin', async () => { - await user.update({ 'contributor.admin': true }); + await user.updateOne({ 'contributor.admin': true }); const flagResult = await user.post(`/challenges/${challenge._id}/flag`); diff --git a/test/api/v3/integration/challenges/POST-challenge_flag_clear.test.js b/test/api/v3/integration/challenges/POST-challenge_flag_clear.test.js index b1cfaaf667..814323353b 100644 --- a/test/api/v3/integration/challenges/POST-challenge_flag_clear.test.js +++ b/test/api/v3/integration/challenges/POST-challenge_flag_clear.test.js @@ -23,7 +23,7 @@ describe('POST /challenges/:challengeId/clearflags', () => { admin = groupLeader; [nonAdmin] = members; - await admin.update({ 'permissions.moderator': true }); + await admin.updateOne({ 'permissions.moderator': true }); challenge = await generateChallenge(admin, group); await admin.post(`/challenges/${challenge._id}/flag`); diff --git a/test/api/v3/integration/challenges/POST-challenges.test.js b/test/api/v3/integration/challenges/POST-challenges.test.js index fa490725cf..e471e0c5f2 100644 --- a/test/api/v3/integration/challenges/POST-challenges.test.js +++ b/test/api/v3/integration/challenges/POST-challenges.test.js @@ -79,7 +79,7 @@ describe('POST /challenges', () => { }); groupLeader = await populatedGroup.groupLeader.sync(); - await groupLeader.update({ permissions: {} }); + await groupLeader.updateOne({ permissions: {} }); group = populatedGroup.group; groupMember = populatedGroup.members[0]; // eslint-disable-line prefer-destructuring }); @@ -177,7 +177,7 @@ describe('POST /challenges', () => { const oldUserBalance = groupLeader.balance; const prize = 8; - await group.update({ balance: 0 }); + await group.updateOne({ balance: 0 }); await groupLeader.post('/challenges', { group: group._id, name: 'Test Challenge', @@ -202,7 +202,7 @@ describe('POST /challenges', () => { }); it('sets challenge as official if created by admin and official flag is set', async () => { - await groupLeader.update({ + await groupLeader.updateOne({ permissions: { challengeAdmin: true, }, diff --git a/test/api/v3/integration/challenges/POST-challenges_challengeId_winner_winnerId.test.js b/test/api/v3/integration/challenges/POST-challenges_challengeId_winner_winnerId.test.js index 53da2a5942..b24e581a86 100644 --- a/test/api/v3/integration/challenges/POST-challenges_challengeId_winner_winnerId.test.js +++ b/test/api/v3/integration/challenges/POST-challenges_challengeId_winner_winnerId.test.js @@ -128,10 +128,10 @@ describe('POST /challenges/:challengeId/winner/:winnerId', () => { const oldBalance = winningUser.balance; const oldLeaderBalance = (await groupLeader.sync()).balance; - await winningUser.update({ + await winningUser.updateOne({ 'purchased.plan.customerId': 'group-plan', }); - await group.update({ + await group.updateOne({ 'leaderOnly.getGems': true, 'purchased.plan.customerId': 123, }); diff --git a/test/api/v3/integration/chat/DELETE-chat_id.test.js b/test/api/v3/integration/chat/DELETE-chat_id.test.js index d0a323edfb..69f6995540 100644 --- a/test/api/v3/integration/chat/DELETE-chat_id.test.js +++ b/test/api/v3/integration/chat/DELETE-chat_id.test.js @@ -28,7 +28,7 @@ describe('DELETE /groups/:groupId/chat/:chatId', () => { message = message.message; userThatDidNotCreateChat = members[0]; // eslint-disable-line prefer-destructuring admin = members[1]; // eslint-disable-line prefer-destructuring - await admin.update({ permissions: { moderator: true } }); + await admin.updateOne({ permissions: { moderator: true } }); }); context('Chat errors', () => { diff --git a/test/api/v3/integration/chat/POST-chat.flag.test.js b/test/api/v3/integration/chat/POST-chat.flag.test.js index 21dfabec92..9e89131f6c 100644 --- a/test/api/v3/integration/chat/POST-chat.flag.test.js +++ b/test/api/v3/integration/chat/POST-chat.flag.test.js @@ -27,11 +27,11 @@ describe('POST /chat/:chatId/flag', () => { })); [admin, anotherUser, newUser, userToDelete] = members; - await user.update({ permissions: {} }); - await admin.update({ permissions: { moderator: true } }); - await anotherUser.update({ 'auth.timestamps.created': moment().subtract(USER_AGE_FOR_FLAGGING + 1, 'days').toDate() }); - await newUser.update({ 'auth.timestamps.created': moment().subtract(1, 'days').toDate() }); - await userToDelete.update({ + await user.updateOne({ permissions: {} }); + await admin.updateOne({ permissions: { moderator: true } }); + await anotherUser.updateOne({ 'auth.timestamps.created': moment().subtract(USER_AGE_FOR_FLAGGING + 1, 'days').toDate() }); + await newUser.updateOne({ 'auth.timestamps.created': moment().subtract(1, 'days').toDate() }); + await userToDelete.updateOne({ 'auth.timestamps.created': moment().subtract(1, 'days').toDate(), 'purchased.plan.dateTerminated': moment().subtract(1, 'minutes').toDate(), }); diff --git a/test/api/v3/integration/chat/POST-chat.like.test.js b/test/api/v3/integration/chat/POST-chat.like.test.js index 242d2d95f6..82a2af883c 100644 --- a/test/api/v3/integration/chat/POST-chat.like.test.js +++ b/test/api/v3/integration/chat/POST-chat.like.test.js @@ -27,7 +27,7 @@ describe('POST /chat/:chatId/like', () => { })); [anotherUser] = members; - await anotherUser.update({ 'auth.timestamps.created': new Date('2022-01-01') }); + await anotherUser.updateOne({ 'auth.timestamps.created': new Date('2022-01-01') }); }); it('Returns an error when chat message is not found', async () => { diff --git a/test/api/v3/integration/chat/POST-chat.test.js b/test/api/v3/integration/chat/POST-chat.test.js index 10e8e80bc3..ba4ac00ed0 100644 --- a/test/api/v3/integration/chat/POST-chat.test.js +++ b/test/api/v3/integration/chat/POST-chat.test.js @@ -30,14 +30,14 @@ describe('POST /chat', () => { upgradeToGroupPlan: true, }); user = groupLeader; - await user.update({ + await user.updateOne({ 'contributor.level': SPAM_MIN_EXEMPT_CONTRIB_LEVEL, 'auth.timestamps.created': new Date('2022-01-01'), }); // prevent tests accidentally throwing messageGroupChatSpam groupWithChat = group; [member, additionalMember] = members; - await member.update({ 'auth.timestamps.created': new Date('2022-01-01') }); - await additionalMember.update({ 'auth.timestamps.created': new Date('2022-01-01') }); + await member.updateOne({ 'auth.timestamps.created': new Date('2022-01-01') }); + await additionalMember.updateOne({ 'auth.timestamps.created': new Date('2022-01-01') }); }); it('Returns an error when no message is provided', async () => { @@ -77,11 +77,11 @@ describe('POST /chat', () => { describe('mute user', () => { afterEach(() => { - member.update({ 'flags.chatRevoked': false }); + member.updateOne({ 'flags.chatRevoked': false }); }); it('does not error when chat privileges are revoked when sending a message to a private guild', async () => { - await member.update({ + await member.updateOne({ 'flags.chatRevoked': true, }); @@ -101,7 +101,7 @@ describe('POST /chat', () => { }); const privatePartyMemberWithChatsRevoked = members[0]; - await privatePartyMemberWithChatsRevoked.update({ + await privatePartyMemberWithChatsRevoked.updateOne({ 'flags.chatRevoked': true, 'auth.timestamps.created': new Date('2022-01-01'), }); @@ -120,11 +120,11 @@ describe('POST /chat', () => { afterEach(() => { sandbox.restore(); - member.update({ 'flags.chatShadowMuted': false }); + member.updateOne({ 'flags.chatShadowMuted': false }); }); it('creates a chat with zero flagCount when sending a message to a private guild', async () => { - await member.update({ + await member.updateOne({ 'flags.chatShadowMuted': true, }); @@ -145,7 +145,7 @@ describe('POST /chat', () => { }); const userWithChatShadowMuted = members[0]; - await userWithChatShadowMuted.update({ + await userWithChatShadowMuted.updateOne({ 'flags.chatShadowMuted': true, 'auth.timestamps.created': new Date('2022-01-01'), }); @@ -167,7 +167,7 @@ describe('POST /chat', () => { }, members: 1, }); - await members[0].update({ 'auth.timestamps.created': new Date('2022-01-01') }); + await members[0].updateOne({ 'auth.timestamps.created': new Date('2022-01-01') }); const message = await members[0].post(`/groups/${group._id}/chat`, { message: testBannedWordMessage }); @@ -189,7 +189,7 @@ describe('POST /chat', () => { afterEach(() => { sandbox.restore(); - user.update({ 'flags.chatRevoked': false }); + user.updateOne({ 'flags.chatRevoked': false }); }); it('allows slurs in private groups', async () => { @@ -201,7 +201,7 @@ describe('POST /chat', () => { }, members: 1, }); - await members[0].update({ 'auth.timestamps.created': new Date('2022-01-01') }); + await members[0].updateOne({ 'auth.timestamps.created': new Date('2022-01-01') }); const message = await members[0].post(`/groups/${group._id}/chat`, { message: testSlurMessage }); @@ -210,14 +210,14 @@ describe('POST /chat', () => { }); it('errors when user account is too young', async () => { - await user.update({ 'auth.timestamps.created': new Date() }); + await user.updateOne({ 'auth.timestamps.created': new Date() }); await expect(user.post(`/groups/${groupWithChat._id}/chat`, { message: 'hi im new' })) .to.eventually.be.rejected.and.eql({ code: 400, error: 'BadRequest', message: t('chatTemporarilyUnavailable'), }); - await user.update({ 'auth.timestamps.created': new Date('2022-01-01') }); + await user.updateOne({ 'auth.timestamps.created': new Date('2022-01-01') }); }); it('creates a chat', async () => { @@ -258,7 +258,7 @@ describe('POST /chat', () => { it('chat message with mentions - mention link should not count towards 3000 chars limit', async () => { const memberUsername = 'memberUsername'; - await member.update({ 'auth.local.username': memberUsername }); + await member.updateOne({ 'auth.local.username': memberUsername }); const messageWithMentions = `hi @${memberUsername} 123456789 123456789 123456789 123456789 123456789 123456789 123456789 89 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678 END.`; @@ -278,7 +278,7 @@ describe('POST /chat', () => { const mount = 'test-mount'; const pet = 'test-pet'; const style = 'test-style'; - await user.update({ + await user.updateOne({ 'items.currentMount': mount, 'items.currentPet': pet, 'preferences.style': style, @@ -308,7 +308,7 @@ describe('POST /chat', () => { }); it('creates costume to user styles', async () => { - await user.update({ 'preferences.costume': true }); + await user.updateOne({ 'preferences.costume': true }); const message = await user.post(`/groups/${groupWithChat._id}/chat`, { message: testMessage }); @@ -323,7 +323,7 @@ describe('POST /chat', () => { tier: 800, tokensApplied: true, }; - await user.update({ + await user.updateOne({ backer: backerInfo, }); @@ -375,7 +375,7 @@ describe('POST /chat', () => { context('chat notifications', () => { beforeEach(() => { - member.update({ newMessages: {}, notifications: [] }); + member.updateOne({ newMessages: {}, notifications: [] }); }); it('notifies other users of new messages for a guild', async () => { diff --git a/test/api/v3/integration/chat/POST-groups_id_chat_id_clear_flags.test.js b/test/api/v3/integration/chat/POST-groups_id_chat_id_clear_flags.test.js index 13513cda1e..22ac5c4221 100644 --- a/test/api/v3/integration/chat/POST-groups_id_chat_id_clear_flags.test.js +++ b/test/api/v3/integration/chat/POST-groups_id_chat_id_clear_flags.test.js @@ -28,8 +28,8 @@ describe('POST /groups/:id/chat/:id/clearflags', () => { groupWithChat = group; author = groupLeader; [nonAdmin, admin] = members; - await nonAdmin.update({ 'auth.timestamps.created': moment().subtract(USER_AGE_FOR_FLAGGING + 1, 'days').toDate() }); - await admin.update({ 'permissions.moderator': true }); + await nonAdmin.updateOne({ 'auth.timestamps.created': moment().subtract(USER_AGE_FOR_FLAGGING + 1, 'days').toDate() }); + await admin.updateOne({ 'permissions.moderator': true }); message = await author.post(`/groups/${groupWithChat._id}/chat`, { message: 'Some message' }); message = message.message; @@ -71,7 +71,7 @@ describe('POST /groups/:id/chat/:id/clearflags', () => { members: 2, }); - await members[0].update({ 'auth.timestamps.created': new Date('2022-01-01') }); + await members[0].updateOne({ 'auth.timestamps.created': new Date('2022-01-01') }); let privateMessage = await members[0].post(`/groups/${group._id}/chat`, { message: 'Some message' }); privateMessage = privateMessage.message; @@ -104,7 +104,7 @@ describe('POST /groups/:id/chat/:id/clearflags', () => { const member = members[0]; // make member that can use skills - await member.update({ + await member.updateOne({ 'stats.lvl': 100, 'stats.mp': 400, 'stats.class': 'wizard', diff --git a/test/api/v3/integration/coupons/GET-coupons.test.js b/test/api/v3/integration/coupons/GET-coupons.test.js index 0839f22dba..ed7a10308a 100644 --- a/test/api/v3/integration/coupons/GET-coupons.test.js +++ b/test/api/v3/integration/coupons/GET-coupons.test.js @@ -24,7 +24,7 @@ describe('GET /coupons/', () => { }); it('should return the coupons in CSV format ordered by creation date', async () => { - await user.update({ + await user.updateOne({ 'permissions.coupons': true, }); diff --git a/test/api/v3/integration/coupons/POST-coupons_generate_event.test.js b/test/api/v3/integration/coupons/POST-coupons_generate_event.test.js index f0c5bfe436..fe35f9a8f6 100644 --- a/test/api/v3/integration/coupons/POST-coupons_generate_event.test.js +++ b/test/api/v3/integration/coupons/POST-coupons_generate_event.test.js @@ -19,7 +19,7 @@ describe('POST /coupons/generate/:event', () => { }); it('returns an error if user has no coupons permission', async () => { - await user.update({ + await user.updateOne({ 'permissions.coupons': false, }); @@ -47,7 +47,7 @@ describe('POST /coupons/generate/:event', () => { }); it('should generate coupons', async () => { - await user.update({ + await user.updateOne({ 'permissions.coupons': true, }); diff --git a/test/api/v3/integration/debug/POST-debug_quest-progress.test.js b/test/api/v3/integration/debug/POST-debug_quest-progress.test.js index 7234395c6f..c74f3bf6af 100644 --- a/test/api/v3/integration/debug/POST-debug_quest-progress.test.js +++ b/test/api/v3/integration/debug/POST-debug_quest-progress.test.js @@ -24,7 +24,7 @@ describe('POST /debug/quest-progress', () => { }); it('increases boss quest progress by 1000', async () => { - await user.update({ + await user.updateOne({ 'party.quest.key': 'whale', }); @@ -36,7 +36,7 @@ describe('POST /debug/quest-progress', () => { }); it('increases collection quest progress by 300 items', async () => { - await user.update({ + await user.updateOne({ 'party.quest.key': 'evilsanta2', }); diff --git a/test/api/v3/integration/groups/GET-groups.test.js b/test/api/v3/integration/groups/GET-groups.test.js index 407cc21d29..63418dbb9e 100644 --- a/test/api/v3/integration/groups/GET-groups.test.js +++ b/test/api/v3/integration/groups/GET-groups.test.js @@ -37,7 +37,7 @@ describe('GET /groups', () => { upgradeToGroupPlan: true, })); [user] = members; - await user.update({ balance: 4 }); + await user.updateOne({ balance: 4 }); ({ group: secondGroup, groupLeader: secondLeader } = await createAndPopulateGroup({ groupDetails: { diff --git a/test/api/v3/integration/groups/GET-groups_id.test.js b/test/api/v3/integration/groups/GET-groups_id.test.js index ea22cfe9a6..15837e381e 100644 --- a/test/api/v3/integration/groups/GET-groups_id.test.js +++ b/test/api/v3/integration/groups/GET-groups_id.test.js @@ -153,7 +153,7 @@ describe('GET /groups/:id', () => { it('removes non-existent guild from user\'s guild list', async () => { const guildId = generateUUID(); - await user.update({ + await user.updateOne({ guilds: [guildId, generateUUID()], }); @@ -173,7 +173,7 @@ describe('GET /groups/:id', () => { it('removes non-existent party from user\'s party object', async () => { const partyId = generateUUID(); - await user.update({ + await user.updateOne({ party: { _id: partyId }, }); @@ -290,7 +290,7 @@ describe('GET /groups/:id', () => { beforeEach(async () => { [admin] = members; - await admin.update({ permissions: { moderator: true } }); + await admin.updateOne({ permissions: { moderator: true } }); }); it('includes all messages', async () => { diff --git a/test/api/v3/integration/groups/POST-groups.test.js b/test/api/v3/integration/groups/POST-groups.test.js index cb056c3e24..1d64883a32 100644 --- a/test/api/v3/integration/groups/POST-groups.test.js +++ b/test/api/v3/integration/groups/POST-groups.test.js @@ -110,7 +110,7 @@ describe('POST /group', () => { }); it('creates a party when the user has no chat privileges', async () => { - await user.update({ 'flags.chatRevoked': true }); + await user.updateOne({ 'flags.chatRevoked': true }); const party = await user.post('/groups', { name: partyName, type: partyType, @@ -120,7 +120,7 @@ describe('POST /group', () => { }); it('does not require gems to create a party', async () => { - await user.update({ balance: 0 }); + await user.updateOne({ balance: 0 }); const party = await user.post('/groups', { name: partyName, diff --git a/test/api/v3/integration/groups/POST-groups_groupId_join.test.js b/test/api/v3/integration/groups/POST-groups_groupId_join.test.js index a9bc3ed49f..e70b6a20ce 100644 --- a/test/api/v3/integration/groups/POST-groups_groupId_join.test.js +++ b/test/api/v3/integration/groups/POST-groups_groupId_join.test.js @@ -78,7 +78,7 @@ describe('POST /group/:groupId/join', () => { }); it('does not increment basilist quest count to inviter with basilist when joining a guild', async () => { - await user.update({ 'items.quests.basilist': 1 }); + await user.updateOne({ 'items.quests.basilist': 1 }); await invitedUser.post(`/groups/${guild._id}/join`); @@ -146,7 +146,7 @@ describe('POST /group/:groupId/join', () => { }); it('Issue #12291: accepting a redundant party invite will let the user stay in the party', async () => { - await invitedUser.update({ + await invitedUser.updateOne({ 'party._id': party._id, }); await expect(invitedUser.get('/user')).to.eventually.have.nested.property('party._id', party._id); @@ -193,7 +193,7 @@ describe('POST /group/:groupId/join', () => { }); it('increments basilist quest item count to inviter when joining a party', async () => { - await user.update({ 'items.quests.basilist': 1 }); + await user.updateOne({ 'items.quests.basilist': 1 }); await invitedUser.post(`/groups/${party._id}/join`); @@ -201,7 +201,7 @@ describe('POST /group/:groupId/join', () => { }); it('invites joining member to active quest', async () => { - await user.update({ + await user.updateOne({ [`items.quests.${PET_QUEST}`]: 1, }); await user.post(`/groups/${party._id}/quests/invite/${PET_QUEST}`); diff --git a/test/api/v3/integration/groups/POST-groups_groupId_leave.test.js b/test/api/v3/integration/groups/POST-groups_groupId_leave.test.js index 523c7b9d65..826019743a 100644 --- a/test/api/v3/integration/groups/POST-groups_groupId_leave.test.js +++ b/test/api/v3/integration/groups/POST-groups_groupId_leave.test.js @@ -30,7 +30,7 @@ describe('POST /groups/:groupId/leave', () => { [member] = members; memberCount = groupToLeave.memberCount; - await leader.update({ 'auth.timestamps.created': new Date('2022-01-01') }); + await leader.updateOne({ 'auth.timestamps.created': new Date('2022-01-01') }); }); it('prevents non members from leaving', async () => { @@ -135,7 +135,7 @@ describe('POST /groups/:groupId/leave', () => { [member] = members; [invitedUser] = invitees; memberCount = groupToLeave.memberCount; - await leader.update({ 'auth.timestamps.created': new Date('2022-01-01') }); + await leader.updateOne({ 'auth.timestamps.created': new Date('2022-01-01') }); }); it('prevents non members from leaving', async () => { @@ -317,7 +317,7 @@ describe('POST /groups/:groupId/leave', () => { upgradeToGroupPlan: true, })); [member] = members; - await member.update({ + await member.updateOne({ 'purchased.plan.extraMonths': extraMonths, }); }); diff --git a/test/api/v3/integration/groups/POST-groups_id_removeMember.test.js b/test/api/v3/integration/groups/POST-groups_id_removeMember.test.js index 6e8e7822e1..7d23490031 100644 --- a/test/api/v3/integration/groups/POST-groups_id_removeMember.test.js +++ b/test/api/v3/integration/groups/POST-groups_id_removeMember.test.js @@ -212,7 +212,7 @@ describe('POST /groups/:groupId/removeMember/:memberId', () => { it('removes user from quest when removing user from party after quest starts', async () => { const petQuest = 'whale'; - await partyLeader.update({ + await partyLeader.updateOne({ [`items.quests.${petQuest}`]: 1, }); @@ -234,7 +234,7 @@ describe('POST /groups/:groupId/removeMember/:memberId', () => { it('removes user from quest when removing user from party before quest starts', async () => { const petQuest = 'whale'; - await partyLeader.update({ + await partyLeader.updateOne({ [`items.quests.${petQuest}`]: 1, }); await partyInvitedUser.post(`/groups/${party._id}/join`); @@ -257,7 +257,7 @@ describe('POST /groups/:groupId/removeMember/:memberId', () => { it('prevents user from being removed if they are the quest owner', async () => { const petQuest = 'whale'; - await partyMember.update({ + await partyMember.updateOne({ [`items.quests.${petQuest}`]: 1, }); diff --git a/test/api/v3/integration/groups/POST-groups_invite.test.js b/test/api/v3/integration/groups/POST-groups_invite.test.js index aab4c50a27..df343c8324 100644 --- a/test/api/v3/integration/groups/POST-groups_invite.test.js +++ b/test/api/v3/integration/groups/POST-groups_invite.test.js @@ -49,7 +49,7 @@ describe('Post /groups/:groupId/invite', () => { }); it('returns error when recipient has blocked the senders', async () => { - const inviterNoBlocks = await inviter.update({ 'inbox.blocks': [] }); + const inviterNoBlocks = await inviter.updateOne({ 'inbox.blocks': [] }); const userWithBlockedInviter = await generateUser({ 'inbox.blocks': [inviter._id] }); await expect(inviterNoBlocks.post(`/groups/${group._id}/invite`, { usernames: [userWithBlockedInviter.auth.local.lowerCaseUsername], @@ -107,7 +107,7 @@ describe('Post /groups/:groupId/invite', () => { describe('user id invites', () => { it('returns an error when inviter has no chat privileges', async () => { - const inviterMuted = await inviter.update({ 'flags.chatRevoked': true }); + const inviterMuted = await inviter.updateOne({ 'flags.chatRevoked': true }); const userToInvite = await generateUser(); await expect(inviterMuted.post(`/groups/${group._id}/invite`, { uuids: [userToInvite._id], @@ -197,7 +197,7 @@ describe('Post /groups/:groupId/invite', () => { }); it('returns error when recipient has blocked the senders', async () => { - const inviterNoBlocks = await inviter.update({ 'inbox.blocks': [] }); + const inviterNoBlocks = await inviter.updateOne({ 'inbox.blocks': [] }); const userWithBlockedInviter = await generateUser({ 'inbox.blocks': [inviter._id] }); await expect(inviterNoBlocks.post(`/groups/${group._id}/invite`, { uuids: [userWithBlockedInviter._id], @@ -269,7 +269,7 @@ describe('Post /groups/:groupId/invite', () => { const testInvite = { name: 'test', email: 'test@habitica.com' }; it('returns an error when inviter has no chat privileges', async () => { - const inviterMuted = await inviter.update({ 'flags.chatRevoked': true }); + const inviterMuted = await inviter.updateOne({ 'flags.chatRevoked': true }); await expect(inviterMuted.post(`/groups/${group._id}/invite`, { emails: [testInvite], inviter: 'inviter name', @@ -439,7 +439,7 @@ describe('Post /groups/:groupId/invite', () => { describe('party invites', () => { it('returns an error when inviter has no chat privileges', async () => { - const inviterMuted = await inviter.update({ 'flags.chatRevoked': true }); + const inviterMuted = await inviter.updateOne({ 'flags.chatRevoked': true }); const userToInvite = await generateUser(); await expect(inviterMuted.post(`/groups/${group._id}/invite`, { uuids: [userToInvite._id], diff --git a/test/api/v3/integration/groups/PUT-groups.test.js b/test/api/v3/integration/groups/PUT-groups.test.js index e584703fea..dd1cd32bfc 100644 --- a/test/api/v3/integration/groups/PUT-groups.test.js +++ b/test/api/v3/integration/groups/PUT-groups.test.js @@ -170,7 +170,7 @@ describe('PUT /group', () => { }, upgradeToGroupPlan: true, }); - await groupLeader.update({ permissions: {} }); + await groupLeader.updateOne({ permissions: {} }); const updateGroupDetails = { id: group._id, diff --git a/test/api/v3/integration/members/POST-members_memberId_flag.js b/test/api/v3/integration/members/POST-members_memberId_flag.js index 964660d959..f6810d8695 100644 --- a/test/api/v3/integration/members/POST-members_memberId_flag.js +++ b/test/api/v3/integration/members/POST-members_memberId_flag.js @@ -69,8 +69,6 @@ describe('POST /members/:memberId/flag', () => { await reporter.post(`/members/${target._id}/flag`); const updatedTarget = await admin.get(`/hall/heroes/${target._id}`); expect(updatedTarget.profile.flags[reporter._id]).to.have.all.keys([ - 'comment', - 'source', 'timestamp', ]); expect(moment(updatedTarget.profile.flags[reporter._id].timestamp).toDate()).to.be.a('date'); diff --git a/test/api/v3/integration/members/POST-transfer_gems.test.js b/test/api/v3/integration/members/POST-transfer_gems.test.js index 10b14f7dfe..aa5f98f2a7 100644 --- a/test/api/v3/integration/members/POST-transfer_gems.test.js +++ b/test/api/v3/integration/members/POST-transfer_gems.test.js @@ -181,7 +181,8 @@ describe('POST /members/transfer-gems', () => { const updatedSender = await userToSendMessage.get('/user'); const sendersMessageInReceiversInbox = findMessage( - updatedReceiver.inbox.messages, userToSendMessage._id, + updatedReceiver.inbox.messages, + userToSendMessage._id, ); const sendersMessageInSendersInbox = findMessage(updatedSender.inbox.messages, receiver._id); @@ -212,7 +213,8 @@ describe('POST /members/transfer-gems', () => { const updatedSender = await userToSendMessage.get('/user'); const sendersMessageInReceiversInbox = findMessage( - updatedReceiver.inbox.messages, userToSendMessage._id, + updatedReceiver.inbox.messages, + userToSendMessage._id, ); const sendersMessageInSendersInbox = findMessage(updatedSender.inbox.messages, receiver._id); @@ -233,10 +235,10 @@ describe('POST /members/transfer-gems', () => { }); it('sends transfer gems message in each participant\'s language', async () => { - await receiver.update({ + await receiver.updateOne({ 'preferences.language': 'es', }); - await userToSendMessage.update({ + await userToSendMessage.updateOne({ 'preferences.language': 'cs', }); await userToSendMessage.post('/members/transfer-gems', { @@ -248,7 +250,8 @@ describe('POST /members/transfer-gems', () => { const updatedSender = await userToSendMessage.get('/user'); const sendersMessageInReceiversInbox = findMessage( - updatedReceiver.inbox.messages, userToSendMessage._id, + updatedReceiver.inbox.messages, + userToSendMessage._id, ); const sendersMessageInSendersInbox = findMessage(updatedSender.inbox.messages, receiver._id); diff --git a/test/api/v3/integration/notifications/POST-notifications_notificationId_read.test.js b/test/api/v3/integration/notifications/POST-notifications_notificationId_read.test.js index 29011cb3fa..1070d52ce2 100644 --- a/test/api/v3/integration/notifications/POST-notifications_notificationId_read.test.js +++ b/test/api/v3/integration/notifications/POST-notifications_notificationId_read.test.js @@ -27,7 +27,7 @@ describe('POST /notifications/:notificationId/read', () => { const id = generateUUID(); const id2 = generateUUID(); - await user.update({ + await user.updateOne({ notifications: [{ id, type: 'DROPS_ENABLED', diff --git a/test/api/v3/integration/notifications/POST-notifications_notificationId_see.test.js b/test/api/v3/integration/notifications/POST-notifications_notificationId_see.test.js index f1104563ee..8f6d9f8da6 100644 --- a/test/api/v3/integration/notifications/POST-notifications_notificationId_see.test.js +++ b/test/api/v3/integration/notifications/POST-notifications_notificationId_see.test.js @@ -27,7 +27,7 @@ describe('POST /notifications/:notificationId/see', () => { const id = generateUUID(); const id2 = generateUUID(); - await user.update({ + await user.updateOne({ notifications: [{ id, type: 'DROPS_ENABLED', diff --git a/test/api/v3/integration/notifications/POST-notifications_read.test.js b/test/api/v3/integration/notifications/POST-notifications_read.test.js index 1839e38630..d5025bd040 100644 --- a/test/api/v3/integration/notifications/POST-notifications_read.test.js +++ b/test/api/v3/integration/notifications/POST-notifications_read.test.js @@ -30,7 +30,7 @@ describe('POST /notifications/read', () => { const id2 = generateUUID(); const id3 = generateUUID(); - await user.update({ + await user.updateOne({ notifications: [{ id, type: 'DROPS_ENABLED', diff --git a/test/api/v3/integration/notifications/POST_notifications_see.test.js b/test/api/v3/integration/notifications/POST_notifications_see.test.js index eb1cb599db..2c5c9e1978 100644 --- a/test/api/v3/integration/notifications/POST_notifications_see.test.js +++ b/test/api/v3/integration/notifications/POST_notifications_see.test.js @@ -30,7 +30,7 @@ describe('POST /notifications/see', () => { const id2 = generateUUID(); const id3 = generateUUID(); - await user.update({ + await user.updateOne({ notifications: [{ id, type: 'DROPS_ENABLED', diff --git a/test/api/v3/integration/notifications/prevent-multiple-notification.js b/test/api/v3/integration/notifications/prevent-multiple-notification.js index 31da8c1e16..b4d0a5006f 100644 --- a/test/api/v3/integration/notifications/prevent-multiple-notification.js +++ b/test/api/v3/integration/notifications/prevent-multiple-notification.js @@ -25,7 +25,7 @@ describe('Prevent multiple notifications', () => { for (let i = 0; i < 4; i += 1) { for (let memberIndex = 0; memberIndex < partyMembers.length; memberIndex += 1) { - await partyMembers[memberIndex].update({ 'auth.timestamps.created': new Date('2022-01-01') }); // eslint-disable-line no-await-in-loop + await partyMembers[memberIndex].updateOne({ 'auth.timestamps.created': new Date('2022-01-01') }); // eslint-disable-line no-await-in-loop multipleChatMessages.push( partyMembers[memberIndex].post(`/groups/${party._id}/chat`, { message: `Message ${i}_${memberIndex}` }), ); diff --git a/test/api/v3/integration/quests/POST-groups_groupId_quests_accept.test.js b/test/api/v3/integration/quests/POST-groups_groupId_quests_accept.test.js index 671ff002d4..d827659108 100644 --- a/test/api/v3/integration/quests/POST-groups_groupId_quests_accept.test.js +++ b/test/api/v3/integration/quests/POST-groups_groupId_quests_accept.test.js @@ -26,7 +26,7 @@ describe('POST /groups/:groupId/quests/accept', () => { leader = groupLeader; partyMembers = members; - await leader.update({ + await leader.updateOne({ [`items.quests.${PET_QUEST}`]: 1, }); }); diff --git a/test/api/v3/integration/quests/POST-groups_groupId_quests_force-start.test.js b/test/api/v3/integration/quests/POST-groups_groupId_quests_force-start.test.js index 48c9378105..bc084c2f44 100644 --- a/test/api/v3/integration/quests/POST-groups_groupId_quests_force-start.test.js +++ b/test/api/v3/integration/quests/POST-groups_groupId_quests_force-start.test.js @@ -23,7 +23,7 @@ describe('POST /groups/:groupId/quests/force-start', () => { leader = groupLeader; partyMembers = members; - await leader.update({ + await leader.updateOne({ [`items.quests.${PET_QUEST}`]: 1, }); }); @@ -93,7 +93,7 @@ describe('POST /groups/:groupId/quests/force-start', () => { context('successfully force starting a quest', () => { it('allows quest leader to force start quest', async () => { const questLeader = partyMembers[0]; - await questLeader.update({ [`items.quests.${PET_QUEST}`]: 1 }); + await questLeader.updateOne({ [`items.quests.${PET_QUEST}`]: 1 }); await questLeader.post(`/groups/${questingGroup._id}/quests/invite/${PET_QUEST}`); await questLeader.post(`/groups/${questingGroup._id}/quests/force-start`); @@ -105,7 +105,7 @@ describe('POST /groups/:groupId/quests/force-start', () => { it('allows group leader to force start quest', async () => { const questLeader = partyMembers[0]; - await questLeader.update({ [`items.quests.${PET_QUEST}`]: 1 }); + await questLeader.updateOne({ [`items.quests.${PET_QUEST}`]: 1 }); await questLeader.post(`/groups/${questingGroup._id}/quests/invite/${PET_QUEST}`); await leader.post(`/groups/${questingGroup._id}/quests/force-start`); @@ -177,7 +177,7 @@ describe('POST /groups/:groupId/quests/force-start', () => { await leader.post(`/groups/${questingGroup._id}/quests/invite/${PET_QUEST}`); const notInPartyUser = await generateUser(); - await questingGroup.update({ + await questingGroup.updateOne({ [`quest.members.${notInPartyUser._id}`]: true, }); await questingGroup.sync(); @@ -217,7 +217,7 @@ describe('POST /groups/:groupId/quests/force-start', () => { await leader.post(`/groups/${questingGroup._id}/quests/invite/${PET_QUEST}`); await partyMembers[0].post(`/groups/${questingGroup._id}/quests/accept`); - await questingGroup.update({ + await questingGroup.updateOne({ [`quest.members.${partyMemberThatRejects._id}`]: false, [`quest.members.${partyMemberThatIgnores._id}`]: null, }); @@ -236,7 +236,7 @@ describe('POST /groups/:groupId/quests/force-start', () => { it('allows group leader to force start quest and verifies chat', async () => { const questLeader = partyMembers[0]; - await questLeader.update({ [`items.quests.${PET_QUEST}`]: 1 }); + await questLeader.updateOne({ [`items.quests.${PET_QUEST}`]: 1 }); await questLeader.post(`/groups/${questingGroup._id}/quests/invite/${PET_QUEST}`); await leader.post(`/groups/${questingGroup._id}/quests/force-start`); diff --git a/test/api/v3/integration/quests/POST-groups_groupId_quests_invite.test.js b/test/api/v3/integration/quests/POST-groups_groupId_quests_invite.test.js index e7dd9426b0..957e1ac8d2 100644 --- a/test/api/v3/integration/quests/POST-groups_groupId_quests_invite.test.js +++ b/test/api/v3/integration/quests/POST-groups_groupId_quests_invite.test.js @@ -87,8 +87,8 @@ describe('POST /groups/:groupId/quests/invite/:questKey', () => { const leaderUpdate = {}; leaderUpdate[`items.quests.${PET_QUEST}`] = 1; - await leader.update(leaderUpdate); - await questingGroup.update({ 'quest.key': QUEST_IN_PROGRESS }); + await leader.updateOne(leaderUpdate); + await questingGroup.updateOne({ 'quest.key': QUEST_IN_PROGRESS }); await expect(leader.post(`/groups/${questingGroup._id}/quests/invite/${PET_QUEST}`)).to.eventually.be.rejected.and.eql({ code: 401, @@ -104,8 +104,8 @@ describe('POST /groups/:groupId/quests/invite/:questKey', () => { memberUpdate[`items.quests.${PET_QUEST}`] = 1; await Promise.all([ - leader.update(memberUpdate), - member.update(memberUpdate), + leader.updateOne(memberUpdate), + member.updateOne(memberUpdate), ]); }); @@ -202,7 +202,7 @@ describe('POST /groups/:groupId/quests/invite/:questKey', () => { leaderUpdate[`items.quests.${LEVELED_QUEST}`] = 1; leaderUpdate['stats.lvl'] = LEVELED_QUEST_REQ - 1; - await leader.update(leaderUpdate); + await leader.updateOne(leaderUpdate); await leader.post(`/groups/${questingGroup._id}/quests/invite/${LEVELED_QUEST}`); }); diff --git a/test/api/v3/integration/quests/POST-groups_groupid_quests_abort.test.js b/test/api/v3/integration/quests/POST-groups_groupid_quests_abort.test.js index 3e1bf567bd..d7c9ba4a40 100644 --- a/test/api/v3/integration/quests/POST-groups_groupid_quests_abort.test.js +++ b/test/api/v3/integration/quests/POST-groups_groupid_quests_abort.test.js @@ -24,7 +24,7 @@ describe('POST /groups/:groupId/quests/abort', () => { leader = groupLeader; partyMembers = members; - await leader.update({ + await leader.updateOne({ [`items.quests.${PET_QUEST}`]: 1, }); user = await generateUser(); diff --git a/test/api/v3/integration/quests/POST-groups_groupid_quests_cancel.test.js b/test/api/v3/integration/quests/POST-groups_groupid_quests_cancel.test.js index 77c5a5ec17..b34ecec418 100644 --- a/test/api/v3/integration/quests/POST-groups_groupid_quests_cancel.test.js +++ b/test/api/v3/integration/quests/POST-groups_groupid_quests_cancel.test.js @@ -24,7 +24,7 @@ describe('POST /groups/:groupId/quests/cancel', () => { leader = groupLeader; partyMembers = members; - await leader.update({ + await leader.updateOne({ [`items.quests.${PET_QUEST}`]: 1, }); user = await generateUser(); diff --git a/test/api/v3/integration/quests/POST-groups_groupid_quests_leave.test.js b/test/api/v3/integration/quests/POST-groups_groupid_quests_leave.test.js index 87d37464c1..0b4151f4fc 100644 --- a/test/api/v3/integration/quests/POST-groups_groupid_quests_leave.test.js +++ b/test/api/v3/integration/quests/POST-groups_groupid_quests_leave.test.js @@ -23,7 +23,7 @@ describe('POST /groups/:groupId/quests/leave', () => { leader = groupLeader; partyMembers = members; - await leader.update({ + await leader.updateOne({ [`items.quests.${PET_QUEST}`]: 1, }); user = await generateUser(); diff --git a/test/api/v3/integration/quests/POST-groups_groupid_quests_reject.test.js b/test/api/v3/integration/quests/POST-groups_groupid_quests_reject.test.js index e956c71664..80b7f27ee0 100644 --- a/test/api/v3/integration/quests/POST-groups_groupid_quests_reject.test.js +++ b/test/api/v3/integration/quests/POST-groups_groupid_quests_reject.test.js @@ -25,7 +25,7 @@ describe('POST /groups/:groupId/quests/reject', () => { leader = groupLeader; partyMembers = members; - await leader.update({ + await leader.updateOne({ [`items.quests.${PET_QUEST}`]: 1, }); user = await generateUser(); diff --git a/test/api/v3/integration/shops/GET-shops_market.test.js b/test/api/v3/integration/shops/GET-shops_market.test.js index 8feadaa89e..2978bed9e2 100644 --- a/test/api/v3/integration/shops/GET-shops_market.test.js +++ b/test/api/v3/integration/shops/GET-shops_market.test.js @@ -27,7 +27,7 @@ describe('GET /shops/market', () => { }); it('can purchase anything returned from the shops object using the /user/purchase route', async () => { - await user.update({ + await user.updateOne({ balance: 99999999, 'stats.gp': 99999999, }); diff --git a/test/api/v3/integration/shops/GET-shops_time_travelers.test.js b/test/api/v3/integration/shops/GET-shops_time_travelers.test.js index 81e3c3c23e..3e81459eac 100644 --- a/test/api/v3/integration/shops/GET-shops_time_travelers.test.js +++ b/test/api/v3/integration/shops/GET-shops_time_travelers.test.js @@ -39,7 +39,7 @@ describe('GET /shops/time-travelers', () => { }); it('returns active shop notes and imageName if user has trinkets', async () => { - await user.update({ + await user.updateOne({ 'purchased.plan.consecutive.trinkets': 1, }); @@ -57,7 +57,7 @@ describe('GET /shops/time-travelers', () => { }); it('does not return mystery sets that are already owned', async () => { - await user.update({ + await user.updateOne({ 'items.gear.owned': { head_mystery_201606: true, // eslint-disable-line camelcase armor_mystery_201606: true, // eslint-disable-line camelcase @@ -72,7 +72,7 @@ describe('GET /shops/time-travelers', () => { }); it('does not return pets and mounts that user already owns', async () => { - await user.update({ + await user.updateOne({ 'items.mounts': { 'MantisShrimp-Base': true, }, diff --git a/test/api/v3/integration/tasks/DELETE-tasks_id.test.js b/test/api/v3/integration/tasks/DELETE-tasks_id.test.js index 7218592e69..8f5a6bca9a 100644 --- a/test/api/v3/integration/tasks/DELETE-tasks_id.test.js +++ b/test/api/v3/integration/tasks/DELETE-tasks_id.test.js @@ -86,7 +86,7 @@ describe('DELETE /tasks/:id', () => { it('does not send task activity webhooks if task is not user owned', async () => { const uuid = generateUUID(); - await user.update({ + await user.updateOne({ balance: 10, }); const guild = await generateGroup(user); diff --git a/test/api/v3/integration/tasks/GET-tasks_user.test.js b/test/api/v3/integration/tasks/GET-tasks_user.test.js index 85602ded26..31361d46bd 100644 --- a/test/api/v3/integration/tasks/GET-tasks_user.test.js +++ b/test/api/v3/integration/tasks/GET-tasks_user.test.js @@ -154,7 +154,7 @@ describe('GET /tasks/user', () => { xit('returns dailies with isDue for the date specified and will add CDS offset if time is not supplied and assumes timezones', async () => { const timezoneOffset = 420; - await user.update({ + await user.updateOne({ 'preferences.dayStart': 0, 'preferences.timezoneOffset': timezoneOffset, }); @@ -181,7 +181,7 @@ describe('GET /tasks/user', () => { xit('returns dailies with isDue for the date specified and will add CDS offset if time is not supplied and assumes timezones', async () => { const timezoneOffset = 240; - await user.update({ + await user.updateOne({ 'preferences.dayStart': 0, 'preferences.timezoneOffset': timezoneOffset, }); @@ -208,7 +208,7 @@ describe('GET /tasks/user', () => { xit('returns dailies with isDue for the date specified and will add CDS offset if time is not supplied and assumes timezones', async () => { const timezoneOffset = 540; - await user.update({ + await user.updateOne({ 'preferences.dayStart': 0, 'preferences.timezoneOffset': timezoneOffset, }); diff --git a/test/api/v3/integration/tasks/POST-tasks_id_score_direction.test.js b/test/api/v3/integration/tasks/POST-tasks_id_score_direction.test.js index 864a12cba6..e0042480eb 100644 --- a/test/api/v3/integration/tasks/POST-tasks_id_score_direction.test.js +++ b/test/api/v3/integration/tasks/POST-tasks_id_score_direction.test.js @@ -106,7 +106,7 @@ describe('POST /tasks/:id/score/:direction', () => { const initialLvl = user.stats.lvl; - await user.update({ + await user.updateOne({ 'stats.exp': 3000, }); const task = await user.post('/tasks/user', { diff --git a/test/api/v3/integration/tasks/POST-tasks_unlink-all_challengeId.test.js b/test/api/v3/integration/tasks/POST-tasks_unlink-all_challengeId.test.js index be356c38e0..2acd1ecb00 100644 --- a/test/api/v3/integration/tasks/POST-tasks_unlink-all_challengeId.test.js +++ b/test/api/v3/integration/tasks/POST-tasks_unlink-all_challengeId.test.js @@ -104,7 +104,6 @@ describe('POST /tasks/unlink-all/:challengeId', () => { id: challenge._id, shortName: challenge.shortName, broken: 'CHALLENGE_DELETED', - winner: null, }); }); }); diff --git a/test/api/v3/integration/tasks/PUT-tasks_id.test.js b/test/api/v3/integration/tasks/PUT-tasks_id.test.js index 780d4fe3cd..43941395a9 100644 --- a/test/api/v3/integration/tasks/PUT-tasks_id.test.js +++ b/test/api/v3/integration/tasks/PUT-tasks_id.test.js @@ -200,7 +200,7 @@ describe('PUT /tasks/:id', () => { it('does not send task activity webhooks if task is not user owned', async () => { const uuid = generateUUID(); - await user.update({ + await user.updateOne({ balance: 10, }); const guild = await generateGroup(user); diff --git a/test/api/v3/integration/user/DELETE-user.test.js b/test/api/v3/integration/user/DELETE-user.test.js index f0dd2018c6..cd90f87e23 100644 --- a/test/api/v3/integration/user/DELETE-user.test.js +++ b/test/api/v3/integration/user/DELETE-user.test.js @@ -48,6 +48,7 @@ describe('DELETE /user', () => { }); it('deletes the user', async () => { + await expect(checkExistence('users', user._id)).to.eventually.eql(true); await user.del('/user', { password, }); @@ -157,11 +158,12 @@ describe('DELETE /user', () => { }); it('deletes the user with a legacy sha1 password', async () => { + await expect(checkExistence('users', user._id)).to.eventually.eql(true); const textPassword = 'mySecretPassword'; const salt = sha1MakeSalt(); const sha1HashedPassword = sha1EncryptPassword(textPassword, salt); - await user.update({ + await user.updateOne({ 'auth.local.hashed_password': sha1HashedPassword, 'auth.local.passwordHashMethod': 'sha1', 'auth.local.salt': salt, @@ -211,6 +213,7 @@ describe('DELETE /user', () => { }); it('deletes a Google user', async () => { + await expect(checkExistence('users', user._id)).to.eventually.eql(true); await user.del('/user', { password: DELETE_CONFIRMATION, }); @@ -230,6 +233,7 @@ describe('DELETE /user', () => { }); it('deletes a Apple user', async () => { + await expect(checkExistence('users', user._id)).to.eventually.eql(true); await user.del('/user', { password: DELETE_CONFIRMATION, }); diff --git a/test/api/v3/integration/user/GET-user_anonymized.test.js b/test/api/v3/integration/user/GET-user_anonymized.test.js index c7d1d91b21..1e1c3ef943 100644 --- a/test/api/v3/integration/user/GET-user_anonymized.test.js +++ b/test/api/v3/integration/user/GET-user_anonymized.test.js @@ -17,7 +17,7 @@ describe('GET /user/anonymized', () => { text: 'Clark Kent', }, }); - await user.update({ + await user.updateOne({ newMessages: ['some', 'new', 'messages'], 'profile.name': 'profile', 'purchased.plan': 'purchased plan', diff --git a/test/api/v3/integration/user/POST-move-pinned-item.js b/test/api/v3/integration/user/POST-move-pinned-item.js index e3792f2fa7..fb76005933 100644 --- a/test/api/v3/integration/user/POST-move-pinned-item.js +++ b/test/api/v3/integration/user/POST-move-pinned-item.js @@ -52,7 +52,7 @@ describe('POST /user/move-pinned-item/:path/move/to/:position', () => { // For this test put seasonal items at the end so they stay out of the way testPinnedItemsOrder = testPinnedItemsOrder.concat(officialPinnedItemPaths); - await user.update({ + await user.updateOne({ pinnedItems: testPinnedItems, pinnedItemsOrder: testPinnedItemsOrder, }); @@ -96,7 +96,7 @@ describe('POST /user/move-pinned-item/:path/move/to/:position', () => { 'potion', ]; - await user.update({ + await user.updateOne({ pinnedItems: testPinnedItems, pinnedItemsOrder: testPinnedItemsOrder, }); @@ -138,7 +138,7 @@ describe('POST /user/move-pinned-item/:path/move/to/:position', () => { 'potion', ]; - await user.update({ + await user.updateOne({ pinnedItems: testPinnedItems, pinnedItemsOrder: testPinnedItemsOrder, }); @@ -171,7 +171,7 @@ describe('POST /user/move-pinned-item/:path/move/to/:position', () => { // add item to pinned officialPinnedItems.push({ type: 'armoire', path: 'armoire' }); - await user.update({ + await user.updateOne({ pinnedItems: testPinnedItems, pinnedItemsOrder: testPinnedItemsOrder, }); @@ -201,7 +201,7 @@ describe('POST /user/move-pinned-item/:path/move/to/:position', () => { 'potion', ]; - await user.update({ + await user.updateOne({ pinnedItems: testPinnedItems, pinnedItemsOrder: testPinnedItemsOrder, }); @@ -225,7 +225,7 @@ describe('POST /user/move-pinned-item/:path/move/to/:position', () => { 'potion', ]; - await user.update({ + await user.updateOne({ pinnedItems: testPinnedItems, pinnedItemsOrder: testPinnedItemsOrder, }); diff --git a/test/api/v3/integration/user/POST-user_class_cast_spellId.test.js b/test/api/v3/integration/user/POST-user_class_cast_spellId.test.js index eeda226b45..c51b377ed1 100644 --- a/test/api/v3/integration/user/POST-user_class_cast_spellId.test.js +++ b/test/api/v3/integration/user/POST-user_class_cast_spellId.test.js @@ -18,7 +18,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if spell does not exist', async () => { - await user.update({ 'stats.class': 'rogue' }); + await user.updateOne({ 'stats.class': 'rogue' }); const spellId = 'invalidSpell'; await expect(user.post(`/user/class/cast/${spellId}`)) .to.eventually.be.rejected.and.eql({ @@ -39,7 +39,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if spell.mana > user.mana', async () => { - await user.update({ 'stats.class': 'rogue' }); + await user.updateOne({ 'stats.class': 'rogue' }); await expect(user.post('/user/class/cast/backStab')) .to.eventually.be.rejected.and.eql({ code: 401, @@ -58,7 +58,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if use Healing Light spell with full health', async () => { - await user.update({ + await user.updateOne({ 'stats.class': 'healer', 'stats.lvl': 11, 'stats.hp': 50, @@ -73,7 +73,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if spell.lvl > user.level', async () => { - await user.update({ 'stats.mp': 200, 'stats.class': 'wizard' }); + await user.updateOne({ 'stats.mp': 200, 'stats.class': 'wizard' }); await expect(user.post('/user/class/cast/earth')) .to.eventually.be.rejected.and.eql({ code: 401, @@ -101,7 +101,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if targetId is required but missing', async () => { - await user.update({ 'stats.class': 'rogue', 'stats.lvl': 11 }); + await user.updateOne({ 'stats.class': 'rogue', 'stats.lvl': 11 }); await expect(user.post('/user/class/cast/pickPocket')) .to.eventually.be.rejected.and.eql({ code: 400, @@ -111,7 +111,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if targeted task doesn\'t exist', async () => { - await user.update({ 'stats.class': 'rogue', 'stats.lvl': 11 }); + await user.updateOne({ 'stats.class': 'rogue', 'stats.lvl': 11 }); await expect(user.post(`/user/class/cast/pickPocket?targetId=${generateUUID()}`)) .to.eventually.be.rejected.and.eql({ code: 404, @@ -127,7 +127,7 @@ describe('POST /user/class/cast/:spellId', () => { await groupLeader.post(`/tasks/challenge/${challenge._id}`, [ { type: 'habit', text: 'task text' }, ]); - await groupLeader.update({ 'stats.class': 'rogue', 'stats.lvl': 11 }); + await groupLeader.updateOne({ 'stats.class': 'rogue', 'stats.lvl': 11 }); await sleep(0.5); await groupLeader.sync(); await expect(groupLeader.post(`/user/class/cast/pickPocket?targetId=${groupLeader.tasksOrder.habits[0]}`)) @@ -146,7 +146,7 @@ describe('POST /user/class/cast/:spellId', () => { type: 'todo', }); await groupLeader.post(`/tasks/${groupTask._id}/assign`, [groupLeader._id]); - await groupLeader.update({ 'stats.class': 'rogue', 'stats.lvl': 11 }); + await groupLeader.updateOne({ 'stats.class': 'rogue', 'stats.lvl': 11 }); await sleep(0.5); await groupLeader.sync(); @@ -159,7 +159,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('Issue #12361: returns an error if stealth has already been cast', async () => { - await user.update({ + await user.updateOne({ 'stats.class': 'rogue', 'stats.lvl': 15, 'stats.mp': 400, @@ -180,7 +180,7 @@ describe('POST /user/class/cast/:spellId', () => { groupDetails: { type: 'party', privacy: 'private' }, members: 1, }); - await groupLeader.update({ 'items.special.snowball': 3 }); + await groupLeader.updateOne({ 'items.special.snowball': 3 }); const target = generateUUID(); await expect(groupLeader.post(`/user/class/cast/snowball?targetId=${target}`)) @@ -192,7 +192,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if party does not exists', async () => { - await user.update({ 'items.special.snowball': 3 }); + await user.updateOne({ 'items.special.snowball': 3 }); await expect(user.post(`/user/class/cast/snowball?targetId=${generateUUID()}`)) .to.eventually.be.rejected.and.eql({ @@ -207,7 +207,7 @@ describe('POST /user/class/cast/:spellId', () => { groupDetails: { type: 'party', privacy: 'private' }, members: 1, }); - await groupLeader.update({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 13 }); + await groupLeader.updateOne({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 13 }); await groupLeader.post('/user/class/cast/earth'); await sleep(1); @@ -224,11 +224,11 @@ describe('POST /user/class/cast/:spellId', () => { }); let promises = []; - promises.push(group.groupLeader.update({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 20 })); - promises.push(group.members[0].update({ 'stats.mp': 0, 'stats.class': 'warrior', 'stats.lvl': 20 })); - promises.push(group.members[1].update({ 'stats.mp': 0, 'stats.class': 'wizard', 'stats.lvl': 20 })); - promises.push(group.members[2].update({ 'stats.mp': 0, 'stats.class': 'rogue', 'stats.lvl': 20 })); - promises.push(group.members[3].update({ 'stats.mp': 0, 'stats.class': 'healer', 'stats.lvl': 20 })); + promises.push(group.groupLeader.updateOne({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 20 })); + promises.push(group.members[0].updateOne({ 'stats.mp': 0, 'stats.class': 'warrior', 'stats.lvl': 20 })); + promises.push(group.members[1].updateOne({ 'stats.mp': 0, 'stats.class': 'wizard', 'stats.lvl': 20 })); + promises.push(group.members[2].updateOne({ 'stats.mp': 0, 'stats.class': 'rogue', 'stats.lvl': 20 })); + promises.push(group.members[3].updateOne({ 'stats.mp': 0, 'stats.class': 'healer', 'stats.lvl': 20 })); await Promise.all(promises); await group.groupLeader.post('/user/class/cast/mpheal'); @@ -252,7 +252,7 @@ describe('POST /user/class/cast/:spellId', () => { members: 1, }); - await groupLeader.update({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 13 }); + await groupLeader.updateOne({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 13 }); await groupLeader.post('/user/class/cast/earth', { quantity: 2 }); await sleep(1); @@ -275,7 +275,7 @@ describe('POST /user/class/cast/:spellId', () => { text: 'todo group', type: 'todo', }); - await user.update({ 'stats.class': 'healer', 'stats.mp': 200, 'stats.lvl': 15 }); + await user.updateOne({ 'stats.class': 'healer', 'stats.mp': 200, 'stats.lvl': 15 }); await user.post(`/tasks/${groupTask._id}/assign`, [user._id]); await user.put('/user', { 'preferences.tasks.mirrorGroupTasks': [guild._id], @@ -305,7 +305,7 @@ describe('POST /user/class/cast/:spellId', () => { }); const leader = party.groupLeader; const recipient = party.members[0]; - await leader.update({ 'stats.gp': 10 }); + await leader.updateOne({ 'stats.gp': 10 }); await leader.post(`/user/class/cast/birthday?targetId=${recipient._id}`); await leader.sync(); await recipient.sync(); @@ -314,14 +314,14 @@ describe('POST /user/class/cast/:spellId', () => { }); it('only increases user\'s achievement one if target == caster', async () => { - await user.update({ 'stats.gp': 10 }); + await user.updateOne({ 'stats.gp': 10 }); await user.post(`/user/class/cast/birthday?targetId=${user._id}`); await user.sync(); expect(user.achievements.birthday).to.equal(1); }); it('passes correct target to spell when targetType === \'task\'', async () => { - await user.update({ 'stats.class': 'wizard', 'stats.lvl': 11 }); + await user.updateOne({ 'stats.class': 'wizard', 'stats.lvl': 11 }); const task = await user.post('/tasks/user', { text: 'test habit', @@ -334,7 +334,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('passes correct target to spell when targetType === \'self\'', async () => { - await user.update({ 'stats.class': 'wizard', 'stats.lvl': 14, 'stats.mp': 50 }); + await user.updateOne({ 'stats.class': 'wizard', 'stats.lvl': 14, 'stats.mp': 50 }); const result = await user.post('/user/class/cast/frost'); diff --git a/test/api/v3/integration/user/POST-user_custom-day-start.test.js b/test/api/v3/integration/user/POST-user_custom-day-start.test.js index 158c3667ae..e7746c7c0e 100644 --- a/test/api/v3/integration/user/POST-user_custom-day-start.test.js +++ b/test/api/v3/integration/user/POST-user_custom-day-start.test.js @@ -24,7 +24,7 @@ describe('POST /user/custom-day-start', () => { it('sets lastCron to the current time to prevent an unexpected cron', async () => { const oldCron = moment().subtract(7, 'hours'); - await user.update({ lastCron: oldCron }); + await user.updateOne({ lastCron: oldCron }); await user.post(endpoint, { dayStart: 1 }); await user.sync(); diff --git a/test/api/v3/integration/user/POST-user_equip_type_key.test.js b/test/api/v3/integration/user/POST-user_equip_type_key.test.js index aed598d583..344319b2bb 100644 --- a/test/api/v3/integration/user/POST-user_equip_type_key.test.js +++ b/test/api/v3/integration/user/POST-user_equip_type_key.test.js @@ -14,7 +14,7 @@ describe('POST /user/equip/:type/:key', () => { // More tests in common code unit tests it('equip an item', async () => { - await user.update({ + await user.updateOne({ 'items.gear.owned': { weapon_warrior_0: true, weapon_warrior_1: true, diff --git a/test/api/v3/integration/user/POST-user_feed_pet_food.test.js b/test/api/v3/integration/user/POST-user_feed_pet_food.test.js index 8b384abdf9..3196fa3976 100644 --- a/test/api/v3/integration/user/POST-user_feed_pet_food.test.js +++ b/test/api/v3/integration/user/POST-user_feed_pet_food.test.js @@ -19,7 +19,7 @@ describe('POST /user/feed/:pet/:food', () => { // More tests in common code unit tests it('does not enjoy the food', async () => { - await user.update({ + await user.updateOne({ 'items.pets.Wolf-Base': 5, 'items.food.Milk': 2, }); @@ -42,7 +42,7 @@ describe('POST /user/feed/:pet/:food', () => { }); it('bulk feeding pet with non-preferred food', async () => { - await user.update({ + await user.updateOne({ 'items.pets.Wolf-Base': 5, 'items.food.Milk': 3, }); @@ -85,7 +85,7 @@ describe('POST /user/feed/:pet/:food', () => { }, }); - await user.update({ + await user.updateOne({ 'items.pets.Wolf-Base': 49, 'items.food.Milk': 2, }); @@ -113,7 +113,7 @@ describe('POST /user/feed/:pet/:food', () => { }, }); - await user.update({ + await user.updateOne({ 'items.pets.Wolf-Base': 47, 'items.food.Milk': 3, }); diff --git a/test/api/v3/integration/user/POST-user_hatch_egg_hatchingPotion.test.js b/test/api/v3/integration/user/POST-user_hatch_egg_hatchingPotion.test.js index 35fb766f38..02edbf578d 100644 --- a/test/api/v3/integration/user/POST-user_hatch_egg_hatchingPotion.test.js +++ b/test/api/v3/integration/user/POST-user_hatch_egg_hatchingPotion.test.js @@ -16,7 +16,7 @@ describe('POST /user/hatch/:egg/:hatchingPotion', () => { // More tests in common code unit tests it('hatch a new pet', async () => { - await user.update({ + await user.updateOne({ 'items.eggs.Wolf': 1, 'items.hatchingPotions.Base': 1, }); @@ -54,7 +54,7 @@ describe('POST /user/hatch/:egg/:hatchingPotion', () => { }, }); - await user.update({ + await user.updateOne({ 'items.eggs.Wolf': 1, 'items.hatchingPotions.Base': 1, }); diff --git a/test/api/v3/integration/user/POST-user_mark_pms_read.test.js b/test/api/v3/integration/user/POST-user_mark_pms_read.test.js index 50552359ef..0e0e6b73d2 100644 --- a/test/api/v3/integration/user/POST-user_mark_pms_read.test.js +++ b/test/api/v3/integration/user/POST-user_mark_pms_read.test.js @@ -12,7 +12,7 @@ describe('POST /user/mark-pms-read', () => { // More tests in common code unit tests it('marks user\'s private messages as read', async () => { - await user.update({ + await user.updateOne({ 'inbox.newMessages': 1, }); await user.post('/user/mark-pms-read'); diff --git a/test/api/v3/integration/user/POST-user_purchase.test.js b/test/api/v3/integration/user/POST-user_purchase.test.js index 0fd8871d2b..c21692bc4c 100644 --- a/test/api/v3/integration/user/POST-user_purchase.test.js +++ b/test/api/v3/integration/user/POST-user_purchase.test.js @@ -35,7 +35,7 @@ describe('POST /user/purchase/:type/:key', () => { it('can convert gold to gems if subscribed', async () => { const oldBalance = user.balance; - await user.update({ + await user.updateOne({ 'purchased.plan.customerId': 'group-plan', 'stats.gp': 1000, }); @@ -53,14 +53,14 @@ describe('POST /user/purchase/:type/:key', () => { }, upgradeToGroupPlan: true, }); - await group.update({ + await group.updateOne({ 'leaderOnly.getGems': true, 'purchased.plan.customerId': 123, }); await groupLeader.sync(); const oldBalance = groupLeader.balance; - await groupLeader.update({ + await groupLeader.updateOne({ 'purchased.plan.customerId': 'group-plan', 'stats.gp': 1000, }); @@ -80,13 +80,13 @@ describe('POST /user/purchase/:type/:key', () => { members: 1, upgradeToGroupPlan: true, }); - await group.update({ + await group.updateOne({ 'leaderOnly.getGems': true, 'purchased.plan.customerId': 123, }); const oldBalance = members[0].balance; - await members[0].update({ + await members[0].updateOne({ 'purchased.plan.customerId': 'group-plan', 'stats.gp': 1000, }); @@ -111,7 +111,7 @@ describe('POST /user/purchase/:type/:key', () => { it('can convert gold to gems if subscribed', async () => { const oldBalance = user.balance; - await user.update({ + await user.updateOne({ 'purchased.plan.customerId': 'group-plan', 'stats.gp': 1000, }); diff --git a/test/api/v3/integration/user/POST-user_read_card.test.js b/test/api/v3/integration/user/POST-user_read_card.test.js index c04d24c734..2681c10631 100644 --- a/test/api/v3/integration/user/POST-user_read_card.test.js +++ b/test/api/v3/integration/user/POST-user_read_card.test.js @@ -23,7 +23,7 @@ describe('POST /user/read-card/:cardType', () => { // More tests in common code unit tests it('reads a card', async () => { - await user.update({ + await user.updateOne({ 'items.special.greetingReceived': [true], 'flags.cardReceived': true, notifications: [{ diff --git a/test/api/v3/integration/user/POST-user_rebirth.test.js b/test/api/v3/integration/user/POST-user_rebirth.test.js index 87826148f4..fa83d74be8 100644 --- a/test/api/v3/integration/user/POST-user_rebirth.test.js +++ b/test/api/v3/integration/user/POST-user_rebirth.test.js @@ -24,7 +24,7 @@ describe('POST /user/rebirth', () => { // More tests in common code unit tests it('resets user\'s tasks', async () => { - await user.update({ + await user.updateOne({ balance: 1.5, }); diff --git a/test/api/v3/integration/user/POST-user_release_both.test.js b/test/api/v3/integration/user/POST-user_release_both.test.js index 8519f1b359..d7cc4818fc 100644 --- a/test/api/v3/integration/user/POST-user_release_both.test.js +++ b/test/api/v3/integration/user/POST-user_release_both.test.js @@ -47,7 +47,7 @@ describe('POST /user/release-both', () => { // More tests in common code unit tests it('grants triad bingo with gems', async () => { - await user.update(); + await user.updateOne(); const response = await user.post('/user/release-both'); await user.sync(); diff --git a/test/api/v3/integration/user/POST-user_release_mounts.test.js b/test/api/v3/integration/user/POST-user_release_mounts.test.js index 10403028c3..0fcce00f86 100644 --- a/test/api/v3/integration/user/POST-user_release_mounts.test.js +++ b/test/api/v3/integration/user/POST-user_release_mounts.test.js @@ -36,7 +36,7 @@ describe('POST /user/release-mounts', () => { // More tests in common code unit tests it('releases mounts', async () => { - await user.update({ + await user.updateOne({ balance: 1, }); diff --git a/test/api/v3/integration/user/POST-user_release_pets.test.js b/test/api/v3/integration/user/POST-user_release_pets.test.js index 96834cc044..c703ff62bd 100644 --- a/test/api/v3/integration/user/POST-user_release_pets.test.js +++ b/test/api/v3/integration/user/POST-user_release_pets.test.js @@ -36,7 +36,7 @@ describe('POST /user/release-pets', () => { // More tests in common code unit tests it('releases pets', async () => { - await user.update({ + await user.updateOne({ balance: 1, }); diff --git a/test/api/v3/integration/user/POST-user_reroll.test.js b/test/api/v3/integration/user/POST-user_reroll.test.js index 37d4b6eb6d..030fa682a1 100644 --- a/test/api/v3/integration/user/POST-user_reroll.test.js +++ b/test/api/v3/integration/user/POST-user_reroll.test.js @@ -24,7 +24,7 @@ describe('POST /user/reroll', () => { // More tests in common code unit tests it('resets user\'s tasks', async () => { - await user.update({ + await user.updateOne({ balance: 2, }); diff --git a/test/api/v3/integration/user/POST-user_revive.test.js b/test/api/v3/integration/user/POST-user_revive.test.js index e042dfd9f7..feef42be15 100644 --- a/test/api/v3/integration/user/POST-user_revive.test.js +++ b/test/api/v3/integration/user/POST-user_revive.test.js @@ -24,7 +24,7 @@ describe('POST /user/revive', () => { // More tests in common code unit tests it('decreases a stat', async () => { - await user.update({ + await user.updateOne({ 'stats.str': 2, 'stats.hp': 0, }); diff --git a/test/api/v3/integration/user/POST-user_sell.test.js b/test/api/v3/integration/user/POST-user_sell.test.js index 896e9bf280..07a10eb854 100644 --- a/test/api/v3/integration/user/POST-user_sell.test.js +++ b/test/api/v3/integration/user/POST-user_sell.test.js @@ -25,7 +25,7 @@ describe('POST /user/sell/:type/:key', () => { }); it('sells an item', async () => { - await user.update({ + await user.updateOne({ items: { eggs: { Wolf: 1, diff --git a/test/api/v3/integration/user/POST-user_unlock.js b/test/api/v3/integration/user/POST-user_unlock.js index cb6eceeb8d..26016ef275 100644 --- a/test/api/v3/integration/user/POST-user_unlock.js +++ b/test/api/v3/integration/user/POST-user_unlock.js @@ -26,7 +26,7 @@ describe('POST /user/unlock', () => { // More tests in common code unit tests it('reduces a user\'s balance', async () => { - await user.update({ + await user.updateOne({ balance: usersStartingGems, }); const response = await user.post(`/user/unlock?path=${unlockPath}`); @@ -37,7 +37,7 @@ describe('POST /user/unlock', () => { }); it('does not reduce a user\'s balance twice', async () => { - await user.update({ + await user.updateOne({ balance: usersStartingGems, }); const response = await user.post(`/user/unlock?path=${unlockGearSetPath}`); diff --git a/test/api/v3/integration/user/PUT-user.test.js b/test/api/v3/integration/user/PUT-user.test.js index 315c8026e2..49f365465a 100644 --- a/test/api/v3/integration/user/PUT-user.test.js +++ b/test/api/v3/integration/user/PUT-user.test.js @@ -108,7 +108,7 @@ describe('PUT /user', () => { _id: '1234', publishDate: new Date(), title: 'Title', published: true, }); - await user.update({ + await user.updateOne({ 'flags.lastNewStuffRead': '123', }); @@ -190,7 +190,7 @@ describe('PUT /user', () => { it(`updates user with ${type} that is a default`, async () => { const dbUpdate = {}; dbUpdate[`purchased.${type}.${item}`] = true; - await user.update(dbUpdate); + await user.updateOne(dbUpdate); // Sanity checks to make sure user is not already equipped with item expect(get(user.preferences, type)).to.not.eql(item); @@ -212,7 +212,7 @@ describe('PUT /user', () => { }); it('can set beard to default', async () => { - await user.update({ + await user.updateOne({ 'purchased.hair.beard': 3, 'preferences.hair.beard': 3, }); @@ -225,7 +225,7 @@ describe('PUT /user', () => { }); it('can set mustache to default', async () => { - await user.update({ + await user.updateOne({ 'purchased.hair.mustache': 2, 'preferences.hair.mustache': 2, }); @@ -264,7 +264,7 @@ describe('PUT /user', () => { it(`updates user with ${type} user does own`, async () => { const dbUpdate = {}; dbUpdate[`purchased.${type}.${item}`] = true; - await user.update(dbUpdate); + await user.updateOne(dbUpdate); // Sanity check to make sure user is not already equipped with item expect(get(user.preferences, type)).to.not.eql(item); diff --git a/test/api/v3/integration/user/auth/DELETE-user_auth_social_network.test.js b/test/api/v3/integration/user/auth/DELETE-user_auth_social_network.test.js index 522a49d369..830512d313 100644 --- a/test/api/v3/integration/user/auth/DELETE-user_auth_social_network.test.js +++ b/test/api/v3/integration/user/auth/DELETE-user_auth_social_network.test.js @@ -22,7 +22,7 @@ describe('DELETE social registration', () => { context('Google', () => { it('fails if user does not have an alternative registration method', async () => { - await user.update({ + await user.updateOne({ 'auth.google.id': 'some-google-id', 'auth.local': { ok: true }, }); @@ -34,7 +34,7 @@ describe('DELETE social registration', () => { }); it('succeeds if user has a local registration', async () => { - await user.update({ + await user.updateOne({ 'auth.google.id': 'some-google-id', }); @@ -47,7 +47,7 @@ describe('DELETE social registration', () => { context('Apple', () => { it('fails if user does not have an alternative registration method', async () => { - await user.update({ + await user.updateOne({ 'auth.apple.id': 'some-apple-id', 'auth.local': { ok: true }, }); @@ -59,7 +59,7 @@ describe('DELETE social registration', () => { }); it('succeeds if user has a local registration', async () => { - await user.update({ + await user.updateOne({ 'auth.apple.id': 'some-apple-id', }); diff --git a/test/api/v3/integration/user/auth/GET-auth_reset-password-set-new-one.js b/test/api/v3/integration/user/auth/GET-auth_reset-password-set-new-one.js index b805c4be02..7cb4529067 100644 --- a/test/api/v3/integration/user/auth/GET-auth_reset-password-set-new-one.js +++ b/test/api/v3/integration/user/auth/GET-auth_reset-password-set-new-one.js @@ -44,7 +44,7 @@ xdescribe('GET /user/auth/local/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().subtract({ minutes: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); @@ -69,7 +69,7 @@ xdescribe('GET /user/auth/local/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ auth: 'not an object with valid fields', }); @@ -84,7 +84,7 @@ xdescribe('GET /user/auth/local/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': 'invalid', }); @@ -101,7 +101,7 @@ xdescribe('GET /user/auth/local/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); diff --git a/test/api/v3/integration/user/auth/POST-auth_reset-password-set-new-one.js b/test/api/v3/integration/user/auth/POST-auth_reset-password-set-new-one.js index 51cea8bb89..472872988d 100644 --- a/test/api/v3/integration/user/auth/POST-auth_reset-password-set-new-one.js +++ b/test/api/v3/integration/user/auth/POST-auth_reset-password-set-new-one.js @@ -59,7 +59,7 @@ describe('POST /user/auth/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().subtract({ minutes: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); @@ -111,7 +111,7 @@ describe('POST /user/auth/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': 'invalid', }); @@ -133,7 +133,7 @@ describe('POST /user/auth/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); @@ -153,7 +153,7 @@ describe('POST /user/auth/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); @@ -174,7 +174,7 @@ describe('POST /user/auth/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); @@ -196,7 +196,7 @@ describe('POST /user/auth/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); @@ -218,7 +218,7 @@ describe('POST /user/auth/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); @@ -245,7 +245,7 @@ describe('POST /user/auth/reset-password-set-new-one', () => { const salt = sha1MakeSalt(); const sha1HashedPassword = sha1EncryptPassword(textPassword, salt); - await user.update({ + await user.updateOne({ 'auth.local.hashed_password': sha1HashedPassword, 'auth.local.passwordHashMethod': 'sha1', 'auth.local.salt': salt, @@ -260,7 +260,7 @@ describe('POST /user/auth/reset-password-set-new-one', () => { userId: user._id, expiresAt: moment().add({ days: 1 }), })); - await user.update({ + await user.updateOne({ 'auth.local.passwordResetCode': code, }); diff --git a/test/api/v3/integration/user/auth/POST-login-local.test.js b/test/api/v3/integration/user/auth/POST-login-local.test.js index 62662be164..a9ba3e74c1 100644 --- a/test/api/v3/integration/user/auth/POST-login-local.test.js +++ b/test/api/v3/integration/user/auth/POST-login-local.test.js @@ -37,7 +37,7 @@ describe('POST /user/auth/local/login', () => { }); it('user is blocked', async () => { - await user.update({ 'auth.blocked': 1 }); + await user.updateOne({ 'auth.blocked': 1 }); await expect(api.post(endpoint, { username: user.auth.local.username, password, @@ -84,7 +84,7 @@ describe('POST /user/auth/local/login', () => { const salt = sha1MakeSalt(); const sha1HashedPassword = sha1EncryptPassword(textPassword, salt); - await user.update({ + await user.updateOne({ 'auth.local.hashed_password': sha1HashedPassword, 'auth.local.passwordHashMethod': 'sha1', 'auth.local.salt': salt, diff --git a/test/api/v3/integration/user/auth/POST-register_local.test.js b/test/api/v3/integration/user/auth/POST-register_local.test.js index d97751fd91..eb22a02987 100644 --- a/test/api/v3/integration/user/auth/POST-register_local.test.js +++ b/test/api/v3/integration/user/auth/POST-register_local.test.js @@ -497,7 +497,7 @@ describe('POST /user/auth/local/register', () => { }); }); it('succeeds', async () => { - await user.update({ 'auth.facebook.id': 'some-fb-id', 'auth.local': { ok: true } }); + await user.updateOne({ 'auth.facebook.id': 'some-fb-id', 'auth.local': { ok: true } }); await user.post('/user/auth/local/register', { username, email, @@ -531,7 +531,7 @@ describe('POST /user/auth/local/register', () => { }); }); it('succeeds', async () => { - await user.update({ 'auth.google.id': 'some-google-id', 'auth.local': { ok: true } }); + await user.updateOne({ 'auth.google.id': 'some-google-id', 'auth.local': { ok: true } }); await user.post('/user/auth/local/register', { username, email, @@ -565,7 +565,7 @@ describe('POST /user/auth/local/register', () => { }); }); it('succeeds', async () => { - await user.update({ 'auth.apple.id': 'some-apple-id', 'auth.local': { ok: true } }); + await user.updateOne({ 'auth.apple.id': 'some-apple-id', 'auth.local': { ok: true } }); await user.post('/user/auth/local/register', { username, email, diff --git a/test/api/v3/integration/user/auth/POST-user_reset_password.test.js b/test/api/v3/integration/user/auth/POST-user_reset_password.test.js index da66e5fd3e..d75b6c04cc 100644 --- a/test/api/v3/integration/user/auth/POST-user_reset_password.test.js +++ b/test/api/v3/integration/user/auth/POST-user_reset_password.test.js @@ -27,7 +27,7 @@ describe('POST /user/reset-password', async () => { it('resets password for social users', async () => { const email = `${user.auth.local.username}+google@example.com`; - await user.update({ 'auth.google.emails': [{ value: email }] }); + await user.updateOne({ 'auth.google.emails': [{ value: email }] }); await user.sync(); const previousPassword = user.auth.local.passwordResetCode; const response = await user.post(endpoint, { diff --git a/test/api/v3/integration/user/auth/PUT-user_update_email.test.js b/test/api/v3/integration/user/auth/PUT-user_update_email.test.js index 1bfa7b6bbc..3044471e38 100644 --- a/test/api/v3/integration/user/auth/PUT-user_update_email.test.js +++ b/test/api/v3/integration/user/auth/PUT-user_update_email.test.js @@ -80,7 +80,7 @@ describe('PUT /user/auth/update-email', () => { const sha1HashedPassword = sha1EncryptPassword(textPassword, salt); const myNewEmail = 'my-new-random-email@example.net'; - await user.update({ + await user.updateOne({ 'auth.local.hashed_password': sha1HashedPassword, 'auth.local.passwordHashMethod': 'sha1', 'auth.local.salt': salt, @@ -115,7 +115,7 @@ describe('PUT /user/auth/update-email', () => { beforeEach(async () => { socialUser = await generateUser(); - await socialUser.update({ 'auth.local': { ok: true } }); + await socialUser.updateOne({ 'auth.local': { ok: true } }); }); it('does not change email if user.auth.local.email does not exist for this user', async () => { diff --git a/test/api/v3/integration/user/auth/PUT-user_update_password.test.js b/test/api/v3/integration/user/auth/PUT-user_update_password.test.js index 4ccfef0c5a..916e377a7f 100644 --- a/test/api/v3/integration/user/auth/PUT-user_update_password.test.js +++ b/test/api/v3/integration/user/auth/PUT-user_update_password.test.js @@ -128,7 +128,7 @@ describe('PUT /user/auth/update-password', async () => { const salt = sha1MakeSalt(); const sha1HashedPassword = sha1EncryptPassword(textPassword, salt); - await user.update({ + await user.updateOne({ 'auth.local.hashed_password': sha1HashedPassword, 'auth.local.passwordHashMethod': 'sha1', 'auth.local.salt': salt, diff --git a/test/api/v3/integration/user/auth/PUT-user_update_username.test.js b/test/api/v3/integration/user/auth/PUT-user_update_username.test.js index bb8f0827c8..fef2dfe497 100644 --- a/test/api/v3/integration/user/auth/PUT-user_update_username.test.js +++ b/test/api/v3/integration/user/auth/PUT-user_update_username.test.js @@ -67,7 +67,7 @@ describe('PUT /user/auth/update-username', async () => { const salt = sha1MakeSalt(); const sha1HashedPassword = sha1EncryptPassword(textPassword, salt); - await user.update({ + await user.updateOne({ 'auth.local.hashed_password': sha1HashedPassword, 'auth.local.passwordHashMethod': 'sha1', 'auth.local.salt': salt, diff --git a/test/api/v3/integration/user/buy/POST-user_buy.test.js b/test/api/v3/integration/user/buy/POST-user_buy.test.js index aee180d753..5c3a6c9b1d 100644 --- a/test/api/v3/integration/user/buy/POST-user_buy.test.js +++ b/test/api/v3/integration/user/buy/POST-user_buy.test.js @@ -30,7 +30,7 @@ describe('POST /user/buy/:key', () => { }); it('buys a potion', async () => { - await user.update({ + await user.updateOne({ 'stats.gp': 400, 'stats.hp': 40, }); @@ -45,7 +45,7 @@ describe('POST /user/buy/:key', () => { }); it('returns an error if user tries to buy a potion with full health', async () => { - await user.update({ + await user.updateOne({ 'stats.gp': 40, 'stats.hp': 50, }); @@ -72,7 +72,7 @@ describe('POST /user/buy/:key', () => { const item = content.special[key]; const stub = sinon.stub(item, 'canOwn').returns(true); - await user.update({ 'stats.gp': 250 }); + await user.updateOne({ 'stats.gp': 250 }); const res = await user.post(`/user/buy/${key}`); await user.sync(); @@ -88,7 +88,7 @@ describe('POST /user/buy/:key', () => { }); it('allows for bulk purchases', async () => { - await user.update({ + await user.updateOne({ 'stats.gp': 400, 'stats.hp': 20, }); diff --git a/test/api/v3/integration/user/buy/POST-user_buy_armoire.test.js b/test/api/v3/integration/user/buy/POST-user_buy_armoire.test.js index f3f40e72b6..ff58562759 100644 --- a/test/api/v3/integration/user/buy/POST-user_buy_armoire.test.js +++ b/test/api/v3/integration/user/buy/POST-user_buy_armoire.test.js @@ -15,7 +15,7 @@ describe('POST /user/buy-armoire', () => { // More tests in common code unit tests it('returns an error if user does not have enough gold', async () => { - await user.update({ + await user.updateOne({ 'stats.gp': 5, }); diff --git a/test/api/v3/integration/user/buy/POST-user_buy_health_potion.test.js b/test/api/v3/integration/user/buy/POST-user_buy_health_potion.test.js index e79132fa5e..64ded47ec6 100644 --- a/test/api/v3/integration/user/buy/POST-user_buy_health_potion.test.js +++ b/test/api/v3/integration/user/buy/POST-user_buy_health_potion.test.js @@ -27,7 +27,7 @@ describe('POST /user/buy-health-potion', () => { }); it('buys a potion', async () => { - await user.update({ + await user.updateOne({ 'stats.gp': 400, }); diff --git a/test/api/v3/integration/user/buy/POST-user_buy_quest.test.js b/test/api/v3/integration/user/buy/POST-user_buy_quest.test.js index 9d24286c36..e805baa575 100644 --- a/test/api/v3/integration/user/buy/POST-user_buy_quest.test.js +++ b/test/api/v3/integration/user/buy/POST-user_buy_quest.test.js @@ -29,7 +29,7 @@ describe('POST /user/buy-quest/:key', () => { const key = 'dilatoryDistress1'; const item = content.quests[key]; - await user.update({ 'stats.gp': 250 }); + await user.updateOne({ 'stats.gp': 250 }); const res = await user.post(`/user/buy-quest/${key}`); await user.sync(); @@ -45,7 +45,7 @@ describe('POST /user/buy-quest/:key', () => { const achievementName1 = `achievements.quests.${prerequisites[0]}`; - await user.update({ + await user.updateOne({ [achievementName1]: true, 'stats.gp': 9999, }); @@ -66,7 +66,7 @@ describe('POST /user/buy-quest/:key', () => { const achievementName1 = `achievements.quests.${prerequisites[0]}`; const achievementName2 = `achievements.quests.${prerequisites[1]}`; - await user.update({ + await user.updateOne({ [achievementName1]: true, [achievementName2]: true, 'stats.gp': 9999, diff --git a/test/api/v3/integration/user/buy/POST-user_buy_special_spell.test.js b/test/api/v3/integration/user/buy/POST-user_buy_special_spell.test.js index 266661c421..504072a492 100644 --- a/test/api/v3/integration/user/buy/POST-user_buy_special_spell.test.js +++ b/test/api/v3/integration/user/buy/POST-user_buy_special_spell.test.js @@ -29,7 +29,7 @@ describe('POST /user/buy-special-spell/:key', () => { const key = 'thankyou'; const item = content.special[key]; - await user.update({ 'stats.gp': 250 }); + await user.updateOne({ 'stats.gp': 250 }); const res = await user.post(`/user/buy-special-spell/${key}`); await user.sync(); @@ -45,7 +45,7 @@ describe('POST /user/buy-special-spell/:key', () => { it('returns an error if user does not have enough gold', async () => { const key = 'thankyou'; - await user.update({ + await user.updateOne({ 'stats.gp': 5, }); diff --git a/test/api/v3/integration/user/stats/POST-user_allocate.test.js b/test/api/v3/integration/user/stats/POST-user_allocate.test.js index c7c7f18204..5453745184 100644 --- a/test/api/v3/integration/user/stats/POST-user_allocate.test.js +++ b/test/api/v3/integration/user/stats/POST-user_allocate.test.js @@ -36,7 +36,7 @@ describe('POST /user/allocate', () => { }); it('returns an error if the user hasn\'t selected class', async () => { - await user.update({ 'flags.classSelected': false }); + await user.updateOne({ 'flags.classSelected': false }); await expect(user.post('/user/allocate')) .to.eventually.be.rejected.and.eql({ code: 401, @@ -46,7 +46,7 @@ describe('POST /user/allocate', () => { }); it('allocates attribute points', async () => { - await user.update({ 'stats.points': 1 }); + await user.updateOne({ 'stats.points': 1 }); const res = await user.post('/user/allocate?stat=con'); await user.sync(); expect(user.stats.con).to.equal(1); diff --git a/test/api/v3/integration/user/stats/POST-user_allocate_bulk.test.js b/test/api/v3/integration/user/stats/POST-user_allocate_bulk.test.js index fb60c80c49..ca067b0a0e 100644 --- a/test/api/v3/integration/user/stats/POST-user_allocate_bulk.test.js +++ b/test/api/v3/integration/user/stats/POST-user_allocate_bulk.test.js @@ -32,7 +32,7 @@ describe('POST /user/allocate-bulk', () => { }); it('returns an error if user has not selected class', async () => { - await user.update({ 'flags.classSelected': false }); + await user.updateOne({ 'flags.classSelected': false }); await expect(user.post('/user/allocate-bulk', statsUpdate)) .to.eventually.be.rejected.and.eql({ code: 401, @@ -42,7 +42,7 @@ describe('POST /user/allocate-bulk', () => { }); it('allocates attribute points', async () => { - await user.update({ 'stats.points': 3 }); + await user.updateOne({ 'stats.points': 3 }); await user.post('/user/allocate-bulk', statsUpdate); await user.sync(); diff --git a/test/api/v4/news/POST-news.test.js b/test/api/v4/news/POST-news.test.js index 733204a632..445b9d16d4 100644 --- a/test/api/v4/news/POST-news.test.js +++ b/test/api/v4/news/POST-news.test.js @@ -45,7 +45,7 @@ describe('POST /news', () => { context('calls updateLastNewsPost', () => { beforeEach(async () => { - await NewsPost.remove({ }); + await NewsPost.deleteMany({ }); }); afterEach(async () => { diff --git a/test/api/v4/news/PUT-news_newsId.test.js b/test/api/v4/news/PUT-news_newsId.test.js index 172603a45a..c8a9d05ade 100644 --- a/test/api/v4/news/PUT-news_newsId.test.js +++ b/test/api/v4/news/PUT-news_newsId.test.js @@ -53,7 +53,7 @@ describe('PUT /news/:newsID', () => { context('calls updateLastNewsPost', () => { beforeEach(async () => { - await NewsPost.remove({ }); + await NewsPost.deleteMany({ }); }); it('updates post data', async () => { diff --git a/test/api/v4/tasks/POST-tasks-bulk-score.test.js b/test/api/v4/tasks/POST-tasks-bulk-score.test.js index 52b4bd61f5..d1f2ddba40 100644 --- a/test/api/v4/tasks/POST-tasks-bulk-score.test.js +++ b/test/api/v4/tasks/POST-tasks-bulk-score.test.js @@ -103,7 +103,7 @@ describe('POST /tasks/bulk-score', () => { const initialLvl = user.stats.lvl; - await user.update({ + await user.updateOne({ 'stats.exp': 3000, }); const task = await user.post('/tasks/user', { @@ -160,7 +160,7 @@ describe('POST /tasks/bulk-score', () => { type: 'habit', }); - await user.update({ + await user.updateOne({ 'party.quest.key': 'gryphon', }); diff --git a/test/api/v4/user/POST-user_class_cast_spellId.test.js b/test/api/v4/user/POST-user_class_cast_spellId.test.js index dd2ccd21da..26f986e3eb 100644 --- a/test/api/v4/user/POST-user_class_cast_spellId.test.js +++ b/test/api/v4/user/POST-user_class_cast_spellId.test.js @@ -18,7 +18,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if spell does not exist', async () => { - await user.update({ 'stats.class': 'rogue' }); + await user.updateOne({ 'stats.class': 'rogue' }); const spellId = 'invalidSpell'; await expect(user.post(`/user/class/cast/${spellId}`)) .to.eventually.be.rejected.and.eql({ @@ -39,7 +39,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if spell.mana > user.mana', async () => { - await user.update({ 'stats.class': 'rogue' }); + await user.updateOne({ 'stats.class': 'rogue' }); await expect(user.post('/user/class/cast/backStab')) .to.eventually.be.rejected.and.eql({ code: 401, @@ -58,7 +58,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if spell.lvl > user.level', async () => { - await user.update({ 'stats.mp': 200, 'stats.class': 'wizard' }); + await user.updateOne({ 'stats.mp': 200, 'stats.class': 'wizard' }); await expect(user.post('/user/class/cast/earth')) .to.eventually.be.rejected.and.eql({ code: 401, @@ -86,7 +86,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if targetId is required but missing', async () => { - await user.update({ 'stats.class': 'rogue', 'stats.lvl': 11 }); + await user.updateOne({ 'stats.class': 'rogue', 'stats.lvl': 11 }); await expect(user.post('/user/class/cast/pickPocket')) .to.eventually.be.rejected.and.eql({ code: 400, @@ -96,7 +96,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if targeted task doesn\'t exist', async () => { - await user.update({ 'stats.class': 'rogue', 'stats.lvl': 11 }); + await user.updateOne({ 'stats.class': 'rogue', 'stats.lvl': 11 }); await expect(user.post(`/user/class/cast/pickPocket?targetId=${generateUUID()}`)) .to.eventually.be.rejected.and.eql({ code: 404, @@ -112,7 +112,7 @@ describe('POST /user/class/cast/:spellId', () => { await groupLeader.post(`/tasks/challenge/${challenge._id}`, [ { type: 'habit', text: 'task text' }, ]); - await groupLeader.update({ 'stats.class': 'rogue', 'stats.lvl': 11 }); + await groupLeader.updateOne({ 'stats.class': 'rogue', 'stats.lvl': 11 }); await sleep(0.5); await groupLeader.sync(); await expect(groupLeader.post(`/user/class/cast/pickPocket?targetId=${groupLeader.tasksOrder.habits[0]}`)) @@ -131,7 +131,7 @@ describe('POST /user/class/cast/:spellId', () => { type: 'todo', }); await groupLeader.post(`/tasks/${groupTask._id}/assign`, [groupLeader._id]); - await groupLeader.update({ 'stats.class': 'rogue', 'stats.lvl': 11 }); + await groupLeader.updateOne({ 'stats.class': 'rogue', 'stats.lvl': 11 }); await sleep(0.5); await groupLeader.sync(); @@ -148,7 +148,7 @@ describe('POST /user/class/cast/:spellId', () => { groupDetails: { type: 'party', privacy: 'private' }, members: 1, }); - await groupLeader.update({ 'items.special.snowball': 3 }); + await groupLeader.updateOne({ 'items.special.snowball': 3 }); const target = generateUUID(); await expect(groupLeader.post(`/user/class/cast/snowball?targetId=${target}`)) @@ -160,7 +160,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('returns an error if party does not exists', async () => { - await user.update({ 'items.special.snowball': 3 }); + await user.updateOne({ 'items.special.snowball': 3 }); await expect(user.post(`/user/class/cast/snowball?targetId=${generateUUID()}`)) .to.eventually.be.rejected.and.eql({ @@ -175,7 +175,7 @@ describe('POST /user/class/cast/:spellId', () => { groupDetails: { type: 'party', privacy: 'private' }, members: 1, }); - await groupLeader.update({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 13 }); + await groupLeader.updateOne({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 13 }); await groupLeader.post('/user/class/cast/earth'); await sleep(1); @@ -192,11 +192,11 @@ describe('POST /user/class/cast/:spellId', () => { }); let promises = []; - promises.push(group.groupLeader.update({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 20 })); - promises.push(group.members[0].update({ 'stats.mp': 0, 'stats.class': 'warrior', 'stats.lvl': 20 })); - promises.push(group.members[1].update({ 'stats.mp': 0, 'stats.class': 'wizard', 'stats.lvl': 20 })); - promises.push(group.members[2].update({ 'stats.mp': 0, 'stats.class': 'rogue', 'stats.lvl': 20 })); - promises.push(group.members[3].update({ 'stats.mp': 0, 'stats.class': 'healer', 'stats.lvl': 20 })); + promises.push(group.groupLeader.updateOne({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 20 })); + promises.push(group.members[0].updateOne({ 'stats.mp': 0, 'stats.class': 'warrior', 'stats.lvl': 20 })); + promises.push(group.members[1].updateOne({ 'stats.mp': 0, 'stats.class': 'wizard', 'stats.lvl': 20 })); + promises.push(group.members[2].updateOne({ 'stats.mp': 0, 'stats.class': 'rogue', 'stats.lvl': 20 })); + promises.push(group.members[3].updateOne({ 'stats.mp': 0, 'stats.class': 'healer', 'stats.lvl': 20 })); await Promise.all(promises); await group.groupLeader.post('/user/class/cast/mpheal'); @@ -244,7 +244,7 @@ describe('POST /user/class/cast/:spellId', () => { groupDetails: { type: 'party', privacy: 'private' }, members: 3, }); - await groupLeader.update({ + await groupLeader.updateOne({ 'stats.mp': 200, 'stats.class': habitClass.className, 'stats.lvl': 20, 'stats.hp': 40, }); // need this for task spells and for stealth @@ -261,7 +261,7 @@ describe('POST /user/class/cast/:spellId', () => { expect(groupLeader.stats.mp).to.be.lessThan(200); }); it('works without a party', async () => { - await user.update({ + await user.updateOne({ 'stats.mp': 200, 'stats.class': habitClass.className, 'stats.lvl': 20, 'stats.hp': 40, }); // need this for task spells and for stealth @@ -288,7 +288,7 @@ describe('POST /user/class/cast/:spellId', () => { members: 1, }); - await groupLeader.update({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 13 }); + await groupLeader.updateOne({ 'stats.mp': 200, 'stats.class': 'wizard', 'stats.lvl': 13 }); await groupLeader.post('/user/class/cast/earth', { quantity: 2 }); await sleep(1); @@ -311,7 +311,7 @@ describe('POST /user/class/cast/:spellId', () => { text: 'todo group', type: 'todo', }); - await user.update({ 'stats.class': 'healer', 'stats.mp': 200, 'stats.lvl': 15 }); + await user.updateOne({ 'stats.class': 'healer', 'stats.mp': 200, 'stats.lvl': 15 }); await user.post(`/tasks/${groupTask._id}/assign`, [user._id]); await user.put('/user', { 'preferences.tasks.mirrorGroupTasks': [guild._id], @@ -341,7 +341,7 @@ describe('POST /user/class/cast/:spellId', () => { }); const leader = party.groupLeader; const recipient = party.members[0]; - await leader.update({ 'stats.gp': 10 }); + await leader.updateOne({ 'stats.gp': 10 }); await leader.post(`/user/class/cast/birthday?targetId=${recipient._id}`); await leader.sync(); await recipient.sync(); @@ -350,14 +350,14 @@ describe('POST /user/class/cast/:spellId', () => { }); it('only increases user\'s achievement one if target == caster', async () => { - await user.update({ 'stats.gp': 10 }); + await user.updateOne({ 'stats.gp': 10 }); await user.post(`/user/class/cast/birthday?targetId=${user._id}`); await user.sync(); expect(user.achievements.birthday).to.equal(1); }); it('passes correct target to spell when targetType === \'task\'', async () => { - await user.update({ 'stats.class': 'wizard', 'stats.lvl': 11 }); + await user.updateOne({ 'stats.class': 'wizard', 'stats.lvl': 11 }); const task = await user.post('/tasks/user', { text: 'test habit', @@ -370,7 +370,7 @@ describe('POST /user/class/cast/:spellId', () => { }); it('passes correct target to spell when targetType === \'self\'', async () => { - await user.update({ 'stats.class': 'wizard', 'stats.lvl': 14, 'stats.mp': 50 }); + await user.updateOne({ 'stats.class': 'wizard', 'stats.lvl': 14, 'stats.mp': 50 }); const result = await user.post('/user/class/cast/frost'); diff --git a/test/api/v4/user/POST-user_rebirth.test.js b/test/api/v4/user/POST-user_rebirth.test.js index b4781c6bc6..041ae9a061 100644 --- a/test/api/v4/user/POST-user_rebirth.test.js +++ b/test/api/v4/user/POST-user_rebirth.test.js @@ -24,7 +24,7 @@ describe('POST /user/rebirth', () => { // More tests in common code unit tests it('resets user\'s tasks', async () => { - await user.update({ + await user.updateOne({ balance: 1.5, }); diff --git a/test/api/v4/user/POST-user_reroll.test.js b/test/api/v4/user/POST-user_reroll.test.js index 18d1aaad79..38e5f78ca6 100644 --- a/test/api/v4/user/POST-user_reroll.test.js +++ b/test/api/v4/user/POST-user_reroll.test.js @@ -24,7 +24,7 @@ describe('POST /user/reroll', () => { // More tests in common code unit tests it('resets user\'s tasks', async () => { - await user.update({ + await user.updateOne({ balance: 2, }); diff --git a/test/api/v4/user/PUT-user.test.js b/test/api/v4/user/PUT-user.test.js index 1abf4f8d24..ce7697dea0 100644 --- a/test/api/v4/user/PUT-user.test.js +++ b/test/api/v4/user/PUT-user.test.js @@ -147,7 +147,7 @@ describe('PUT /user', () => { it(`updates user with ${type} that is a default`, async () => { const dbUpdate = {}; dbUpdate[`purchased.${type}.${item}`] = true; - await user.update(dbUpdate); + await user.updateOne(dbUpdate); // Sanity checks to make sure user is not already equipped with item expect(get(user.preferences, type)).to.not.eql(item); @@ -169,7 +169,7 @@ describe('PUT /user', () => { }); it('can set beard to default', async () => { - await user.update({ + await user.updateOne({ 'purchased.hair.beard': 3, 'preferences.hair.beard': 3, }); @@ -182,7 +182,7 @@ describe('PUT /user', () => { }); it('can set mustache to default', async () => { - await user.update({ + await user.updateOne({ 'purchased.hair.mustache': 2, 'preferences.hair.mustache': 2, }); @@ -221,7 +221,7 @@ describe('PUT /user', () => { it(`updates user with ${type} user does own`, async () => { const dbUpdate = {}; dbUpdate[`purchased.${type}.${item}`] = true; - await user.update(dbUpdate); + await user.updateOne(dbUpdate); // Sanity check to make sure user is not already equipped with item expect(get(user.preferences, type)).to.not.eql(item); diff --git a/test/api/v4/user/auth/POST-register_local.test.js b/test/api/v4/user/auth/POST-register_local.test.js index 11836cd213..6582ecb7b4 100644 --- a/test/api/v4/user/auth/POST-register_local.test.js +++ b/test/api/v4/user/auth/POST-register_local.test.js @@ -444,7 +444,7 @@ describe('POST /user/auth/local/register', () => { }); }); it('succeeds', async () => { - await user.update({ 'auth.facebook.id': 'some-fb-id', 'auth.local': { ok: true } }); + await user.updateOne({ 'auth.facebook.id': 'some-fb-id', 'auth.local': { ok: true } }); await user.post('/user/auth/local/register', { username, email, @@ -478,7 +478,7 @@ describe('POST /user/auth/local/register', () => { }); }); it('succeeds', async () => { - await user.update({ 'auth.google.id': 'some-google-id', 'auth.local': { ok: true } }); + await user.updateOne({ 'auth.google.id': 'some-google-id', 'auth.local': { ok: true } }); await user.post('/user/auth/local/register', { username, email, @@ -512,7 +512,7 @@ describe('POST /user/auth/local/register', () => { }); }); it('succeeds', async () => { - await user.update({ 'auth.apple.id': 'some-apple-id', 'auth.local': { ok: true } }); + await user.updateOne({ 'auth.apple.id': 'some-apple-id', 'auth.local': { ok: true } }); await user.post('/user/auth/local/register', { username, email, diff --git a/test/helpers/api-integration/api-classes.js b/test/helpers/api-integration/api-classes.js index 83f458f23d..892a313770 100644 --- a/test/helpers/api-integration/api-classes.js +++ b/test/helpers/api-integration/api-classes.js @@ -19,7 +19,7 @@ class ApiObject { assign(this, options); } - async update (options) { + async updateOne (options) { if (isEmpty(options)) { return null; } @@ -94,7 +94,7 @@ export class ApiGroup extends ApiObject { const update = { chat }; - return this.update(update); + return this.updateOne(update); } async createCancelledSubscription () { @@ -107,7 +107,7 @@ export class ApiGroup extends ApiObject { }, }; - return this.update(update); + return this.updateOne(update); } } diff --git a/test/helpers/api-integration/v3/object-generators.js b/test/helpers/api-integration/v3/object-generators.js index e3a7c723c9..d51bc58553 100644 --- a/test/helpers/api-integration/v3/object-generators.js +++ b/test/helpers/api-integration/v3/object-generators.js @@ -35,7 +35,7 @@ export async function generateUser (update = {}, overrides = {}) { const apiUser = new ApiUser(user); - await apiUser.update(update); + await apiUser.updateOne(update); return apiUser; } @@ -80,7 +80,7 @@ export async function generateGroup (leader, details = {}, update = {}) { const group = await leader.post('/groups', details); const apiGroup = new ApiGroup(group); - await apiGroup.update(update); + await apiGroup.updateOne(update); return apiGroup; } @@ -143,7 +143,7 @@ export async function createAndPopulateGroup (settings = {}) { times(numberOfMembers, () => generateUser(groupMembershipTypes[group.type])), ); - await group.update({ memberCount: numberOfMembers + 1 }); + await group.updateOne({ memberCount: numberOfMembers + 1 }); const invitees = await Promise.all( times(numberOfInvites, () => generateUser()), @@ -184,7 +184,7 @@ export async function generateChallenge (challengeCreator, group, details = {}, const challenge = await challengeCreator.post('/challenges', details); const apiChallenge = new ApiChallenge(challenge); - await apiChallenge.update(update); + await apiChallenge.updateOne(update); return apiChallenge; } diff --git a/test/helpers/api-integration/v4/object-generators.js b/test/helpers/api-integration/v4/object-generators.js index 92a4c50748..8c4e25a8cc 100644 --- a/test/helpers/api-integration/v4/object-generators.js +++ b/test/helpers/api-integration/v4/object-generators.js @@ -29,7 +29,7 @@ export async function generateUser (update = {}) { const apiUser = new ApiUser(user); - await apiUser.update(update); + await apiUser.updateOne(update); return apiUser; } @@ -74,7 +74,7 @@ export async function generateGroup (leader, details = {}, update = {}) { const group = await leader.post('/groups', details); const apiGroup = new ApiGroup(group); - await apiGroup.update(update); + await apiGroup.updateOne(update); return apiGroup; } @@ -136,7 +136,7 @@ export async function createAndPopulateGroup (settings = {}) { times(numberOfMembers, () => generateUser(groupMembershipTypes[group.type])), ); - await group.update({ memberCount: numberOfMembers + 1 }); + await group.updateOne({ memberCount: numberOfMembers + 1 }); const invitees = await Promise.all( times(numberOfInvites, () => generateUser()), @@ -177,7 +177,7 @@ export async function generateChallenge (challengeCreator, group, details = {}, const challenge = await challengeCreator.post('/challenges', details); const apiChallenge = new ApiChallenge(challenge); - await apiChallenge.update(update); + await apiChallenge.updateOne(update); return apiChallenge; } diff --git a/test/helpers/api-unit.helper.js b/test/helpers/api-unit.helper.js index 6ca56abb5c..db867eb391 100644 --- a/test/helpers/api-unit.helper.js +++ b/test/helpers/api-unit.helper.js @@ -11,9 +11,9 @@ import * as Tasks from '../../website/server/models/task'; export { translationCheck } from './translate'; -afterEach(done => { +afterEach(() => { sandbox.restore(); - mongoose.connection.dropDatabase(done); + return mongoose.connection.dropDatabase(); }); export { sleep } from './sleep'; diff --git a/test/helpers/common.helper.js b/test/helpers/common.helper.js index 6015e2b618..8f3bf3433c 100644 --- a/test/helpers/common.helper.js +++ b/test/helpers/common.helper.js @@ -1,11 +1,9 @@ -import mongoose from 'mongoose'; - import { model as User } from '../../website/server/models/user'; import { - DailySchema, - HabitSchema, - RewardSchema, - TodoSchema, + daily as Daily, + habit as Habit, + reward as Reward, + todo as Todo, } from '../../website/server/models/task'; export { translate } from './translate'; @@ -17,25 +15,17 @@ export function generateUser (options = {}) { } export function generateDaily (options = {}) { - const Daily = mongoose.model('Daily', DailySchema); - return new Daily(options).toObject(); } export function generateHabit (options = {}) { - const Habit = mongoose.model('Habit', HabitSchema); - return new Habit(options).toObject(); } export function generateReward (options = {}) { - const Reward = mongoose.model('Reward', RewardSchema); - return new Reward(options).toObject(); } export function generateTodo (options = {}) { - const Todo = mongoose.model('Todo', TodoSchema); - return new Todo(options).toObject(); } diff --git a/test/helpers/mongo.js b/test/helpers/mongo.js index 701f553ece..c67a00cb57 100644 --- a/test/helpers/mongo.js +++ b/test/helpers/mongo.js @@ -6,48 +6,27 @@ import { TAVERN_ID } from '../../website/server/models/group'; // but you no longer have access to, // like private parties or users export async function checkExistence (collectionName, id) { - return new Promise((resolve, reject) => { - const collection = mongoose.connection.db.collection(collectionName); - - collection.find({ _id: id }, { _id: 1 }).limit(1).toArray((findError, docs) => { - if (findError) return reject(findError); - - const exists = docs.length > 0; - - return resolve(exists); - }); - }); + const count = await mongoose.connection.db.collection(collectionName).countDocuments({ _id: id }); + return count > 0; } // Obtain a property from the database. Useful if the property is private // and thus unavailable to the client export async function getProperty (collectionName, id, path) { - return new Promise((resolve, reject) => { - const collection = mongoose.connection.db.collection(collectionName); - - collection.find({ _id: id }, { [path]: 1 }).limit(1).toArray((findError, docs) => { - if (findError) return reject(findError); - - return resolve(get(docs[0], path)); - }); - }); + const doc = await mongoose.connection.db.collection(collectionName) + .find({ _id: id }, { [path]: 1 }, { limit: 1 }).next(); + return get(doc, path); } // Specifically helpful for the GET /groups tests, // resets the db to an empty state and creates a tavern document export async function resetHabiticaDB () { - return new Promise((resolve, reject) => { - mongoose.connection.dropDatabase(dbErr => { - if (dbErr) return reject(dbErr); - const groups = mongoose.connection.db.collection('groups'); - const users = mongoose.connection.db.collection('users'); - - return users.count({ _id: '7bde7864-ebc5-4ee2-a4b7-1070d464cdb0' }, (err, count) => { - if (err) return reject(err); - if (count > 0) return resolve(); - - // create the leader for the tavern - return users.insertOne({ + const groups = mongoose.connection.db.collection('groups'); + const users = mongoose.connection.db.collection('users'); + return mongoose.connection.dropDatabase() + .then(() => users.countDocuments({ _id: '7bde7864-ebc5-4ee2-a4b7-1070d464cdb0' })).then(count => { + if (count === 0) { + users.insertOne({ _id: '7bde7864-ebc5-4ee2-a4b7-1070d464cdb0', apiToken: TAVERN_ID, auth: { @@ -59,79 +38,52 @@ export async function resetHabiticaDB () { passwordHashMethod: 'bcrypt', }, }, - }, insertErr => { - if (insertErr) return reject(insertErr); - - // For some mysterious reason after a dropDatabase there can still be a group... - return groups.count({ _id: TAVERN_ID }, (err2, count2) => { - if (err2) return reject(err2); - if (count2 > 0) return resolve(); - - return groups.insertOne({ - _id: TAVERN_ID, - chat: [], - leader: '7bde7864-ebc5-4ee2-a4b7-1070d464cdb0', // Siena Leslie - name: 'HabitRPG', - type: 'guild', - privacy: 'public', - memberCount: 0, - }, insertErr2 => { - if (insertErr2) return reject(insertErr2); - - return resolve(); - }); - }); }); - }); + } + }).then(() => groups.countDocuments({ _id: TAVERN_ID })) + .then(count => { + if (count === 0) { + groups.insertOne({ + _id: TAVERN_ID, + chat: [], + leader: '7bde7864-ebc5-4ee2-a4b7-1070d464cdb0', // Siena Leslie + name: 'HabitRPG', + type: 'guild', + privacy: 'public', + memberCount: 0, + }); + } }); - }); } export async function updateDocument (collectionName, doc, update) { const collection = mongoose.connection.db.collection(collectionName); - - return new Promise(resolve => { - collection.updateOne({ _id: doc._id }, { $set: update }, updateErr => { - if (updateErr) throw new Error(`Error updating ${collectionName}: ${updateErr}`); - resolve(); - }); - }); + return collection.updateOne({ _id: doc._id }, { $set: update }); } // Unset a property in the database. // Useful for testing. export async function unsetDocument (collectionName, doc, update) { const collection = mongoose.connection.db.collection(collectionName); - - return new Promise(resolve => { - collection.updateOne({ _id: doc._id }, { $unset: update }, updateErr => { - if (updateErr) throw new Error(`Error updating ${collectionName}: ${updateErr}`); - resolve(); - }); - }); + return collection.updateOne({ _id: doc._id }, { $unset: update }); } export async function getDocument (collectionName, doc) { const collection = mongoose.connection.db.collection(collectionName); - - return new Promise(resolve => { - collection.findOne({ _id: doc._id }, (lookupErr, found) => { - if (lookupErr) throw new Error(`Error looking up ${collectionName}: ${lookupErr}`); - resolve(found); - }); - }); + return collection.findOne({ _id: doc._id }); } before(done => { mongoose.connection.on('open', err => { if (err) return done(err); return resetHabiticaDB() - .then(() => done()) - .catch(done); + .then(() => { + done(); + }) + .catch(error => { + throw error; + }); }); }); -after(done => mongoose.connection.dropDatabase(err => { - if (err) return done(err); - return mongoose.connection.close(done); -})); +after(() => mongoose.connection.dropDatabase()); diff --git a/website/client/package-lock.json b/website/client/package-lock.json index 7c76d89290..cab468beaa 100644 --- a/website/client/package-lock.json +++ b/website/client/package-lock.json @@ -4,6 +4,11 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==" + }, "@achrinza/node-ipc": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/@achrinza/node-ipc/-/node-ipc-9.2.2.tgz", @@ -3152,6 +3157,67 @@ "to-fast-properties": "^2.0.0" } }, + "@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "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==" + }, + "globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "requires": { + "type-fest": "^0.20.2" + } + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + } + } + }, "@hapi/address": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.2.tgz", @@ -3186,6 +3252,21 @@ "@hapi/hoek": "^8.3.0" } }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" + }, "@intervolga/optimize-cssnano-plugin": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@intervolga/optimize-cssnano-plugin/-/optimize-cssnano-plugin-1.0.6.tgz", @@ -5684,34 +5765,11 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "optional": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, - "loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -5743,38 +5801,6 @@ "ansi-regex": "^5.0.1" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.8.3", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", - "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } - } - }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -6078,9 +6104,9 @@ "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==" }, "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" }, "acorn-walk": { "version": "7.2.0", @@ -7194,9 +7220,9 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" }, "async": { "version": "2.6.4", @@ -7613,15 +7639,6 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, "bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -8194,11 +8211,7 @@ "version": "1.2.13", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } + "optional": true } } }, @@ -8419,9 +8432,9 @@ "integrity": "sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==" }, "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==" }, "clipboardy": { "version": "2.3.0", @@ -9724,6 +9737,35 @@ } } }, + "enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "requires": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==" + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, "entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", @@ -9867,113 +9909,327 @@ } }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "requires": { - "@babel/code-frame": "^7.0.0", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "requires": { - "esrecurse": "^4.1.0", + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==" + }, + "@babel/highlight": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "requires": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" + } + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "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==" + }, + "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==", + "requires": { + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, + "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==" + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + } + } + }, + "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==" + }, "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { "is-glob": "^4.0.1" } }, "globals": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", - "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "requires": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } }, - "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==" + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "requires": { + "prelude-ls": "^1.2.1" + } }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, "eslint-config-airbnb-base": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", - "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "requires": { "confusing-browser-globals": "^1.0.10", "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "object.entries": "^1.1.5", + "semver": "^6.3.0" }, "dependencies": { "call-bind": { @@ -10027,21 +10283,80 @@ "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, "eslint-config-habitrpg": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-habitrpg/-/eslint-config-habitrpg-6.2.1.tgz", - "integrity": "sha512-RRzasGeFbDfYlYSAANJ/94RnmeE6QkY3RK8RHHp6vf5tUo3ZG5swy81y1miLVtxLmv8EgWAJNmoOYZonbmK5+A==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/eslint-config-habitrpg/-/eslint-config-habitrpg-6.2.3.tgz", + "integrity": "sha512-qxxC0yGBcjl8NM50hKKBDltxztml3yheipOOI5+UapXPOffRbaRjD1Mx/rxgRgq+fMjziGo90PtcB7TX5v0Kwg==", "requires": { "eslint": "^6.5.1", - "eslint-config-airbnb-base": "^14.0.0", + "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-mocha": "^6.1.1", "eslint-plugin-vue": "^5.2.3" }, "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, "eslint-plugin-mocha": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-6.3.0.tgz", @@ -10049,6 +10364,16 @@ "requires": { "eslint-utils": "^2.0.0", "ramda": "^0.27.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + } } }, "eslint-plugin-vue": { @@ -10059,22 +10384,94 @@ "vue-eslint-parser": "^5.0.0" } }, + "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==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", "requires": { "eslint-visitor-keys": "^1.1.0" } }, "espree": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", - "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", "requires": { - "acorn": "^6.0.2", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + } + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "requires": { + "type-fest": "^0.8.1" + } + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" } }, "ramda": { @@ -10082,6 +10479,65 @@ "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.2.tgz", "integrity": "sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA==" }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + }, "vue-eslint-parser": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz", @@ -10093,6 +10549,32 @@ "espree": "^4.1.0", "esquery": "^1.0.1", "lodash": "^4.17.11" + }, + "dependencies": { + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "espree": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", + "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "requires": { + "acorn": "^6.0.2", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + } } } } @@ -10441,9 +10923,9 @@ } }, "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "requires": { "eslint-visitor-keys": "^1.1.0" } @@ -10454,19 +10936,24 @@ "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==" }, "espree": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", - "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "requires": { - "acorn": "^7.1.0", - "acorn-jsx": "^5.1.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" }, "dependencies": { "acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==" + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" } } }, @@ -10476,11 +10963,18 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "requires": { - "estraverse": "^4.0.0" + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + } } }, "esrecurse": { @@ -11015,11 +11509,11 @@ } }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "file-loader": { @@ -11064,12 +11558,6 @@ } } }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "optional": true - }, "filesize": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", @@ -11112,19 +11600,19 @@ "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==" }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "dependencies": { "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "requires": { "glob": "^7.1.3" } @@ -11132,9 +11620,9 @@ } }, "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==" + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" }, "flush-write-stream": { "version": "1.1.1", @@ -11409,7 +11897,7 @@ "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": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" }, "functions-have-names": { "version": "1.2.3", @@ -12200,29 +12688,46 @@ "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==" }, "inquirer": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.1.tgz", - "integrity": "sha512-V1FFQ3TIO15det8PijPLFR9M9baSlnRs9nL7zWu1MNVA2T9YVl9ZbrHJhYs7e9X8jeMZ3lr2JH/rdHFgNCBdYw==", + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", "requires": { "ansi-escapes": "^4.2.1", - "chalk": "^2.4.2", + "chalk": "^4.1.0", "cli-cursor": "^3.1.0", - "cli-width": "^2.0.0", + "cli-width": "^3.0.0", "external-editor": "^3.0.3", "figures": "^3.0.0", - "lodash": "^4.17.15", + "lodash": "^4.17.19", "mute-stream": "0.0.8", - "run-async": "^2.2.0", - "rxjs": "^6.5.3", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", "string-width": "^4.1.0", - "strip-ansi": "^5.1.0", + "strip-ansi": "^6.0.0", "through": "^2.3.6" }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, "cli-cursor": { "version": "3.1.0", @@ -12232,11 +12737,29 @@ "restore-cursor": "^3.1.0" } }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -12248,9 +12771,9 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "requires": { "mimic-fn": "^2.1.0" } @@ -12265,23 +12788,29 @@ } }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - } + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" } } } @@ -12801,11 +13330,6 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -13041,6 +13565,11 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -13064,7 +13593,7 @@ "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" }, "json-stringify-safe": { "version": "5.0.1", @@ -13103,6 +13632,14 @@ "verror": "1.10.0" } }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "requires": { + "json-buffer": "3.0.1" + } + }, "killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", @@ -13253,11 +13790,21 @@ "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=" }, + "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==" + }, "lodash.transform": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.transform/-/lodash.transform-4.6.0.tgz", "integrity": "sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A=" }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" + }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -14273,12 +14820,6 @@ "thenify-all": "^1.0.0" } }, - "nan": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", - "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", - "optional": true - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -16380,9 +16921,9 @@ } }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==" }, "regjsgen": { "version": "0.5.1", @@ -16509,6 +17050,11 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -16597,12 +17143,9 @@ } }, "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "^2.1.0" - } + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" }, "run-parallel": { "version": "1.1.10", @@ -16618,24 +17161,34 @@ } }, "rxjs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", - "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", "requires": { "tslib": "^1.9.0" } }, "safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, "dependencies": { + "call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "requires": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + } + }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -16678,15 +17231,25 @@ } }, "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==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz", + "integrity": "sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==", "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "is-regex": "^1.1.4" }, "dependencies": { + "call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "requires": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + } + }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -16961,14 +17524,15 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", + "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", "requires": { "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.2", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.1" }, "dependencies": { "function-bind": { @@ -16987,6 +17551,14 @@ "hasown": "^2.0.0" } }, + "has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "requires": { + "get-intrinsic": "^1.2.2" + } + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -17113,13 +17685,41 @@ "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + } } }, "smartbanner.js": { @@ -18076,7 +18676,7 @@ "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==" }, "strip-eof": { "version": "1.0.0", @@ -18249,24 +18849,69 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" }, "dependencies": { - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "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==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "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==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" } } } @@ -18319,7 +18964,7 @@ "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "thenify": { "version": "3.3.1", @@ -18924,9 +19569,9 @@ "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" }, "v8-compile-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", + "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==" }, "validate-npm-package-license": { "version": "3.0.4", @@ -19137,6 +19782,85 @@ } } }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.8.3", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", + "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "optional": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "optional": true + }, + "loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "vue-mugen-scroll": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/vue-mugen-scroll/-/vue-mugen-scroll-0.2.6.tgz", diff --git a/website/client/package.json b/website/client/package.json index c0fd91869e..afa68cd8fb 100644 --- a/website/client/package.json +++ b/website/client/package.json @@ -26,10 +26,10 @@ "chai": "^4.3.7", "core-js": "^3.33.1", "dompurify": "^3.0.3", - "eslint": "6.8.0", - "eslint-config-habitrpg": "6.2.1", - "eslint-plugin-mocha": "5.3.0", - "eslint-plugin-vue": "7.20.0", + "eslint": "^7.32.0", + "eslint-config-habitrpg": "^6.2.3", + "eslint-plugin-mocha": "^5.3.0", + "eslint-plugin-vue": "^7.20.0", "habitica-markdown": "^3.0.0", "hellojs": "^1.20.0", "inspectpack": "^4.7.1", @@ -52,8 +52,8 @@ "vue-fragment": "^1.6.0", "vue-mugen-scroll": "^0.2.6", "vue-router": "^3.6.5", - "vue-template-compiler": "^2.7.10", "vue-template-babel-compiler": "^2.0.0", + "vue-template-compiler": "^2.7.10", "vuedraggable": "^2.24.3", "vuejs-datepicker": "git://github.com/habitrpg/vuejs-datepicker.git#153d339e4dbebb73733658aeda1d5b7fcc55b0a0", "webpack": "^4.47.0" diff --git a/website/client/src/app.vue b/website/client/src/app.vue index eacf20579e..44d9b543e0 100644 --- a/website/client/src/app.vue +++ b/website/client/src/app.vue @@ -425,7 +425,8 @@ export default { this.$store.state.isUserLoaded = true; Analytics.setUser(); Analytics.updateUser(); - return axios.get('/api/v4/i18n/browser-script', + return axios.get( + '/api/v4/i18n/browser-script', { language: this.user.preferences.language, headers: { @@ -433,7 +434,8 @@ export default { Pragma: 'no-cache', Expires: '0', }, - }); + }, + ); }).then(() => { const i18nData = window && window['habitica-i18n']; this.$loadLocale(i18nData); diff --git a/website/client/src/components/groups/group.stories.utils.js b/website/client/src/components/groups/group.stories.utils.js index 215623b2d4..24512948f2 100644 --- a/website/client/src/components/groups/group.stories.utils.js +++ b/website/client/src/components/groups/group.stories.utils.js @@ -1,6 +1,6 @@ +import content from 'habitica/website/common/script/content/content'; import rightSidebar from '@/components/groups/rightSidebar'; import getters from '@/store/getters'; -import content from '../../../../common/script/content'; export function createStory ({ template, diff --git a/website/client/src/components/groups/questDetailModal.vue b/website/client/src/components/groups/questDetailModal.vue index 7878038412..f11984ad5a 100644 --- a/website/client/src/components/groups/questDetailModal.vue +++ b/website/client/src/components/groups/questDetailModal.vue @@ -304,6 +304,7 @@