From e9e93eff42656369cda9cd661aca229fc3faf831 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sat, 8 Apr 2023 07:42:35 +0000 Subject: [PATCH] refactor: convert to esm (wip) --- server/app/{regex.js => regex.mjs} | 4 +- server/controllers/auth.js | 158 - server/controllers/auth.mjs | 161 + server/controllers/common.js | 533 --- server/controllers/common.mjs | 534 +++ server/controllers/ssl.js | 36 - server/controllers/ssl.mjs | 39 + server/controllers/upload.js | 105 - server/controllers/{ws.js => ws.mjs} | 10 +- server/core/{asar.js => asar.mjs} | 17 +- server/core/{auth.js => auth.mjs} | 31 +- server/core/cache.js | 7 - server/core/{config.js => config.mjs} | 44 +- server/core/{db.js => db.mjs} | 51 +- server/core/{extensions.js => extensions.mjs} | 10 +- server/core/{kernel.js => kernel.mjs} | 34 +- server/core/logger.js | 60 - server/core/logger.mjs | 61 + server/core/{mail.js => mail.mjs} | 24 +- server/core/{scheduler.js => scheduler.mjs} | 30 +- server/core/{servers.js => servers.mjs} | 36 +- server/core/system.js | 21 - server/core/system.mjs | 21 + server/db/migrations/{3.0.0.js => 3.0.0.mjs} | 14 +- server/db/migrator-source.js | 27 - server/db/migrator-source.mjs | 26 + server/graph/index.js | 54 - server/graph/index.mjs | 61 + .../resolvers/{analytics.js => analytics.mjs} | 20 +- .../graph/resolvers/{asset.js => asset.mjs} | 34 +- .../{authentication.js => authentication.mjs} | 50 +- .../resolvers/{comment.js => comment.mjs} | 22 +- .../graph/resolvers/{group.js => group.mjs} | 20 +- .../graph/resolvers/{hooks.js => hooks.mjs} | 18 +- .../{localization.js => localization.mjs} | 14 +- server/graph/resolvers/{mail.js => mail.mjs} | 14 +- .../{navigation.js => navigation.mjs} | 12 +- server/graph/resolvers/{page.js => page.mjs} | 62 +- .../resolvers/{rendering.js => rendering.mjs} | 10 +- server/graph/resolvers/search.js | 16 - server/graph/resolvers/search.mjs | 16 + server/graph/resolvers/{site.js => site.mjs} | 38 +- .../resolvers/{storage.js => storage.mjs} | 24 +- .../graph/resolvers/{system.js => system.mjs} | 40 +- server/graph/resolvers/{tree.js => tree.mjs} | 18 +- server/graph/resolvers/{user.js => user.mjs} | 60 +- server/graph/scalars/{date.js => date.mjs} | 6 +- server/graph/scalars/{json.js => json.mjs} | 4 +- server/graph/scalars/{uuid.js => uuid.mjs} | 4 +- .../helpers/{brute-knex.js => brute-knex.mjs} | 6 +- server/helpers/common.js | 99 - server/helpers/common.mjs | 102 + server/helpers/{config.js => config.mjs} | 8 +- server/helpers/{error.js => error.mjs} | 4 +- server/helpers/graph.js | 21 - server/helpers/graph.mjs | 20 + server/helpers/page.js | 151 - server/helpers/page.mjs | 155 + server/helpers/security.js | 38 - server/helpers/security.mjs | 38 + server/{index.js => index.mjs} | 28 +- server/locales/README.md | 20 - server/middlewares/security.js | 46 - server/middlewares/seo.js | 19 - server/models/{analytics.js => analytics.mjs} | 34 +- server/models/{apiKeys.js => apiKeys.mjs} | 10 +- server/models/{assets.js => assets.mjs} | 41 +- .../{authentication.js => authentication.mjs} | 20 +- ...mmentProviders.js => commentProviders.mjs} | 38 +- server/models/{comments.js => comments.mjs} | 18 +- server/models/{groups.js => groups.mjs} | 8 +- server/models/{hooks.js => hooks.mjs} | 4 +- server/models/index.mjs | 45 + server/models/{locales.js => locales.mjs} | 4 +- .../models/{navigation.js => navigation.mjs} | 10 +- .../{pageHistory.js => pageHistory.mjs} | 27 +- server/models/{pageLinks.js => pageLinks.mjs} | 8 +- server/models/{pages.js => pages.mjs} | 79 +- server/models/{renderers.js => renderers.mjs} | 48 +- server/models/{settings.js => settings.mjs} | 10 +- server/models/{sites.js => sites.mjs} | 12 +- server/models/{storage.js => storage.mjs} | 23 +- server/models/{tags.js => tags.mjs} | 24 +- server/models/{tree.js => tree.mjs} | 56 +- server/models/{userKeys.js => userKeys.mjs} | 12 +- server/models/{users.js => users.mjs} | 131 +- server/package-lock.json | 4055 +++++++---------- server/package.json | 145 +- .../{check-version.js => check-version.mjs} | 2 +- ...n-job-history.js => clean-job-history.mjs} | 4 +- .../{update-locales.js => update-locales.mjs} | 2 +- .../{purge-uploads.js => purge-uploads.mjs} | 16 +- .../{render-page.js => render-page.mjs} | 18 +- server/{web.js => web.mjs} | 109 +- server/worker.js | 12 +- ux/package-lock.json | 350 +- ux/package.json | 58 +- 97 files changed, 3974 insertions(+), 4925 deletions(-) rename server/app/{regex.js => regex.mjs} (93%) delete mode 100644 server/controllers/auth.js create mode 100644 server/controllers/auth.mjs delete mode 100644 server/controllers/common.js create mode 100644 server/controllers/common.mjs delete mode 100644 server/controllers/ssl.js create mode 100644 server/controllers/ssl.mjs delete mode 100644 server/controllers/upload.js rename server/controllers/{ws.js => ws.mjs} (71%) rename server/core/{asar.js => asar.mjs} (92%) rename server/core/{auth.js => auth.mjs} (96%) delete mode 100644 server/core/cache.js rename server/core/{config.js => config.mjs} (75%) rename server/core/{db.js => db.mjs} (80%) rename server/core/{extensions.js => extensions.mjs} (67%) rename server/core/{kernel.js => kernel.mjs} (73%) delete mode 100644 server/core/logger.js create mode 100644 server/core/logger.mjs rename server/core/{mail.js => mail.mjs} (79%) rename server/core/{scheduler.js => scheduler.mjs} (93%) rename server/core/{servers.js => servers.mjs} (86%) delete mode 100644 server/core/system.js create mode 100644 server/core/system.mjs rename server/db/migrations/{3.0.0.js => 3.0.0.mjs} (99%) delete mode 100644 server/db/migrator-source.js create mode 100644 server/db/migrator-source.mjs delete mode 100644 server/graph/index.js create mode 100644 server/graph/index.mjs rename server/graph/resolvers/{analytics.js => analytics.mjs} (58%) rename server/graph/resolvers/{asset.js => asset.mjs} (93%) rename server/graph/resolvers/{authentication.js => authentication.mjs} (80%) rename server/graph/resolvers/{comment.js => comment.mjs} (86%) rename server/graph/resolvers/{group.js => group.mjs} (91%) rename server/graph/resolvers/{hooks.js => hooks.mjs} (83%) rename server/graph/resolvers/{localization.js => localization.mjs} (82%) rename server/graph/resolvers/{mail.js => mail.mjs} (80%) rename server/graph/resolvers/{navigation.js => navigation.mjs} (71%) rename server/graph/resolvers/{page.js => page.mjs} (89%) rename server/graph/resolvers/{rendering.js => rendering.mjs} (86%) delete mode 100644 server/graph/resolvers/search.js create mode 100644 server/graph/resolvers/search.mjs rename server/graph/resolvers/{site.js => site.mjs} (91%) rename server/graph/resolvers/{storage.js => storage.mjs} (92%) rename server/graph/resolvers/{system.js => system.mjs} (89%) rename server/graph/resolvers/{tree.js => tree.mjs} (92%) rename server/graph/resolvers/{user.js => user.mjs} (86%) rename server/graph/scalars/{date.js => date.mjs} (83%) rename server/graph/scalars/{json.js => json.mjs} (94%) rename server/graph/scalars/{uuid.js => uuid.mjs} (90%) rename server/helpers/{brute-knex.js => brute-knex.mjs} (96%) delete mode 100644 server/helpers/common.js create mode 100644 server/helpers/common.mjs rename server/helpers/{config.js => config.mjs} (89%) rename server/helpers/{error.js => error.mjs} (99%) delete mode 100644 server/helpers/graph.js create mode 100644 server/helpers/graph.mjs delete mode 100644 server/helpers/page.js create mode 100644 server/helpers/page.mjs delete mode 100644 server/helpers/security.js create mode 100644 server/helpers/security.mjs rename server/{index.js => index.mjs} (70%) delete mode 100644 server/locales/README.md delete mode 100644 server/middlewares/security.js delete mode 100644 server/middlewares/seo.js rename server/models/{analytics.js => analytics.mjs} (71%) rename server/models/{apiKeys.js => apiKeys.mjs} (89%) rename server/models/{assets.js => assets.mjs} (85%) rename server/models/{authentication.js => authentication.mjs} (78%) rename server/models/{commentProviders.js => commentProviders.mjs} (69%) rename server/models/{comments.js => comments.mjs} (92%) rename server/models/{groups.js => groups.mjs} (88%) rename server/models/{hooks.js => hooks.mjs} (90%) create mode 100644 server/models/index.mjs rename server/models/{locales.js => locales.mjs} (94%) rename server/models/{navigation.js => navigation.mjs} (89%) rename server/models/{pageHistory.js => pageHistory.mjs} (90%) rename server/models/{pageLinks.js => pageLinks.mjs} (79%) rename server/models/{pages.js => pages.mjs} (94%) rename server/models/{renderers.js => renderers.mjs} (74%) rename server/models/{settings.js => settings.mjs} (67%) rename server/models/{sites.js => sites.mjs} (94%) rename server/models/{storage.js => storage.mjs} (91%) rename server/models/{tags.js => tags.mjs} (74%) rename server/models/{tree.js => tree.mjs} (87%) rename server/models/{userKeys.js => userKeys.mjs} (89%) rename server/models/{users.js => users.mjs} (86%) rename server/tasks/simple/{check-version.js => check-version.mjs} (88%) rename server/tasks/simple/{clean-job-history.js => clean-job-history.mjs} (86%) rename server/tasks/simple/{update-locales.js => update-locales.mjs} (88%) rename server/tasks/workers/{purge-uploads.js => purge-uploads.mjs} (60%) rename server/tasks/workers/{render-page.js => render-page.mjs} (83%) rename server/{web.js => web.mjs} (67%) diff --git a/server/app/regex.js b/server/app/regex.mjs similarity index 93% rename from server/app/regex.js rename to server/app/regex.mjs index 490e4b3e..2b4e7d6c 100644 --- a/server/app/regex.js +++ b/server/app/regex.mjs @@ -1,6 +1,4 @@ -'use strict' - -module.exports = { +export default { arabic: '\u0600-\u06ff\u0750-\u077f\ufb50-\ufc3f\ufe70-\ufefc', cjk: '\u4E00-\u9FBF\u3040-\u309F\u30A0-\u30FFㄱ-ㅎ가-힣ㅏ-ㅣ', youtube: /(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|&v(?:i)?=))([^#&?]*).*/, diff --git a/server/controllers/auth.js b/server/controllers/auth.js deleted file mode 100644 index 90f8e3c3..00000000 --- a/server/controllers/auth.js +++ /dev/null @@ -1,158 +0,0 @@ -/* global WIKI */ - -const express = require('express') -const ExpressBrute = require('express-brute') -const BruteKnex = require('../helpers/brute-knex') -const router = express.Router() -const moment = require('moment') -const _ = require('lodash') -const path = require('path') - -const bruteforce = new ExpressBrute(new BruteKnex({ - createTable: true, - knex: WIKI.db.knex -}), { - freeRetries: 5, - minWait: 5 * 60 * 1000, // 5 minutes - maxWait: 60 * 60 * 1000, // 1 hour - failCallback: (req, res, next) => { - res.status(401).send('Too many failed attempts. Try again later.') - } -}) - -/** - * Login form - */ -router.get('/login', async (req, res, next) => { - // -> Bypass Login - if (WIKI.config.auth.autoLogin && !req.query.all) { - const stg = await WIKI.db.authentication.query().orderBy('order').first() - const stgInfo = _.find(WIKI.data.authentication, ['key', stg.strategyKey]) - if (!stgInfo.useForm) { - return res.redirect(`/login/${stg.key}`) - } - } - // -> Show Login - res.sendFile(path.join(WIKI.ROOTPATH, 'assets/index.html')) -}) - -/** - * Social Strategies Login - */ -router.get('/login/:strategy', async (req, res, next) => { - try { - await WIKI.db.users.login({ - strategy: req.params.strategy - }, { req, res }) - } catch (err) { - next(err) - } -}) - -/** - * Social Strategies Callback - */ -router.all('/login/:strategy/callback', async (req, res, next) => { - if (req.method !== 'GET' && req.method !== 'POST') { return next() } - - try { - const authResult = await WIKI.db.users.login({ - strategy: req.params.strategy - }, { req, res }) - res.cookie('jwt', authResult.jwt, { expires: moment().add(1, 'y').toDate() }) - - const loginRedirect = req.cookies['loginRedirect'] - if (loginRedirect === '/' && authResult.redirect) { - res.clearCookie('loginRedirect') - res.redirect(authResult.redirect) - } else if (loginRedirect) { - res.clearCookie('loginRedirect') - res.redirect(loginRedirect) - } else if (authResult.redirect) { - res.redirect(authResult.redirect) - } else { - res.redirect('/') - } - } catch (err) { - next(err) - } -}) - -/** - * Logout - */ -router.get('/logout', async (req, res, next) => { - const redirURL = await WIKI.db.users.logout({ req, res }) - req.logout((err) => { - if (err) { return next(err) } - res.clearCookie('jwt') - res.redirect(redirURL) - }) -}) - -/** - * Register form - */ -router.get('/register', async (req, res, next) => { - _.set(res.locals, 'pageMeta.title', 'Register') - const localStrg = await WIKI.db.authentication.getStrategy('local') - if (localStrg.selfRegistration) { - res.sendFile(path.join(WIKI.ROOTPATH, 'assets/index.html')) - } else { - next(new WIKI.Error.AuthRegistrationDisabled()) - } -}) - -/** - * Verify - */ -router.get('/verify/:token', bruteforce.prevent, async (req, res, next) => { - try { - const usr = await WIKI.db.userKeys.validateToken({ kind: 'verify', token: req.params.token }) - await WIKI.db.users.query().patch({ isVerified: true }).where('id', usr.id) - req.brute.reset() - if (WIKI.config.auth.enforce2FA) { - res.redirect('/login') - } else { - const result = await WIKI.db.users.refreshToken(usr) - res.cookie('jwt', result.token, { expires: moment().add(1, 'years').toDate() }) - res.redirect('/') - } - } catch (err) { - next(err) - } -}) - -/** - * Reset Password - */ -router.get('/login-reset/:token', bruteforce.prevent, async (req, res, next) => { - try { - const usr = await WIKI.db.userKeys.validateToken({ kind: 'resetPwd', token: req.params.token }) - if (!usr) { - throw new Error('Invalid Token') - } - req.brute.reset() - - const changePwdContinuationToken = await WIKI.db.userKeys.generateToken({ - userId: usr.id, - kind: 'changePwd' - }) - const bgUrl = !_.isEmpty(WIKI.config.auth.loginBgUrl) ? WIKI.config.auth.loginBgUrl : '/_assets/img/splash/1.jpg' - res.render('login', { bgUrl, hideLocal: WIKI.config.auth.hideLocal, changePwdContinuationToken }) - } catch (err) { - next(err) - } -}) - -/** - * JWT Public Endpoints - */ -router.get('/.well-known/jwk.json', function (req, res, next) { - res.json(WIKI.config.certs.jwk) -}) -router.get('/.well-known/jwk.pem', function (req, res, next) { - res.send(WIKI.config.certs.public) -}) - -module.exports = router diff --git a/server/controllers/auth.mjs b/server/controllers/auth.mjs new file mode 100644 index 00000000..84374888 --- /dev/null +++ b/server/controllers/auth.mjs @@ -0,0 +1,161 @@ +/* global WIKI */ + +import express from 'express' +import ExpressBrute from 'express-brute' +import BruteKnex from '../helpers/brute-knex.mjs' +import { find, isEmpty, set } from 'lodash-es' +import path from 'node:path' +import { DateTime } from 'luxon' + +export default function () { + const router = express.Router() + + const bruteforce = new ExpressBrute(new BruteKnex({ + createTable: true, + knex: WIKI.db.knex + }), { + freeRetries: 5, + minWait: 5 * 60 * 1000, // 5 minutes + maxWait: 60 * 60 * 1000, // 1 hour + failCallback: (req, res, next) => { + res.status(401).send('Too many failed attempts. Try again later.') + } + }) + + /** + * Login form + */ + router.get('/login', async (req, res, next) => { + // -> Bypass Login + if (WIKI.config.auth.autoLogin && !req.query.all) { + const stg = await WIKI.db.authentication.query().orderBy('order').first() + const stgInfo = find(WIKI.data.authentication, ['key', stg.strategyKey]) + if (!stgInfo.useForm) { + return res.redirect(`/login/${stg.key}`) + } + } + // -> Show Login + res.sendFile(path.join(WIKI.ROOTPATH, 'assets/index.html')) + }) + + /** + * Social Strategies Login + */ + router.get('/login/:strategy', async (req, res, next) => { + try { + await WIKI.db.users.login({ + strategy: req.params.strategy + }, { req, res }) + } catch (err) { + next(err) + } + }) + + /** + * Social Strategies Callback + */ + router.all('/login/:strategy/callback', async (req, res, next) => { + if (req.method !== 'GET' && req.method !== 'POST') { return next() } + + try { + const authResult = await WIKI.db.users.login({ + strategy: req.params.strategy + }, { req, res }) + res.cookie('jwt', authResult.jwt, { expires: DateTime.now().plus({ years: 1 }).toJSDate() }) + + const loginRedirect = req.cookies['loginRedirect'] + if (loginRedirect === '/' && authResult.redirect) { + res.clearCookie('loginRedirect') + res.redirect(authResult.redirect) + } else if (loginRedirect) { + res.clearCookie('loginRedirect') + res.redirect(loginRedirect) + } else if (authResult.redirect) { + res.redirect(authResult.redirect) + } else { + res.redirect('/') + } + } catch (err) { + next(err) + } + }) + + /** + * Logout + */ + router.get('/logout', async (req, res, next) => { + const redirURL = await WIKI.db.users.logout({ req, res }) + req.logout((err) => { + if (err) { return next(err) } + res.clearCookie('jwt') + res.redirect(redirURL) + }) + }) + + /** + * Register form + */ + router.get('/register', async (req, res, next) => { + set(res.locals, 'pageMeta.title', 'Register') + const localStrg = await WIKI.db.authentication.getStrategy('local') + if (localStrg.selfRegistration) { + res.sendFile(path.join(WIKI.ROOTPATH, 'assets/index.html')) + } else { + next(new WIKI.Error.AuthRegistrationDisabled()) + } + }) + + /** + * Verify + */ + router.get('/verify/:token', bruteforce.prevent, async (req, res, next) => { + try { + const usr = await WIKI.db.userKeys.validateToken({ kind: 'verify', token: req.params.token }) + await WIKI.db.users.query().patch({ isVerified: true }).where('id', usr.id) + req.brute.reset() + if (WIKI.config.auth.enforce2FA) { + res.redirect('/login') + } else { + const result = await WIKI.db.users.refreshToken(usr) + res.cookie('jwt', result.token, { expires: DateTime.now().plus({ years: 1 }).toJSDate() }) + res.redirect('/') + } + } catch (err) { + next(err) + } + }) + + /** + * Reset Password + */ + router.get('/login-reset/:token', bruteforce.prevent, async (req, res, next) => { + try { + const usr = await WIKI.db.userKeys.validateToken({ kind: 'resetPwd', token: req.params.token }) + if (!usr) { + throw new Error('Invalid Token') + } + req.brute.reset() + + const changePwdContinuationToken = await WIKI.db.userKeys.generateToken({ + userId: usr.id, + kind: 'changePwd' + }) + const bgUrl = !isEmpty(WIKI.config.auth.loginBgUrl) ? WIKI.config.auth.loginBgUrl : '/_assets/img/splash/1.jpg' + res.render('login', { bgUrl, hideLocal: WIKI.config.auth.hideLocal, changePwdContinuationToken }) + } catch (err) { + next(err) + } + }) + + /** + * JWT Public Endpoints + */ + router.get('/.well-known/jwk.json', function (req, res, next) { + res.json(WIKI.config.certs.jwk) + }) + router.get('/.well-known/jwk.pem', function (req, res, next) { + res.send(WIKI.config.certs.public) + }) + + return router +} diff --git a/server/controllers/common.js b/server/controllers/common.js deleted file mode 100644 index c5cd057c..00000000 --- a/server/controllers/common.js +++ /dev/null @@ -1,533 +0,0 @@ -const express = require('express') -const router = express.Router() -const pageHelper = require('../helpers/page') -const _ = require('lodash') -const CleanCSS = require('clean-css') -const moment = require('moment') -const path = require('path') -const siteAssetsPath = path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'assets') - -/** - * Robots.txt - */ -router.get('/robots.txt', (req, res, next) => { - res.type('text/plain') - if (_.includes(WIKI.config.seo.robots, 'noindex')) { - res.send('User-agent: *\nDisallow: /') - } else { - res.status(200).end() - } -}) - -/** - * Health Endpoint - */ -router.get('/healthz', (req, res, next) => { - if (WIKI.db.knex.client.pool.numFree() < 1 && WIKI.db.knex.client.pool.numUsed() < 1) { - res.status(503).json({ ok: false }).end() - } else { - res.status(200).json({ ok: true }).end() - } -}) - -/** - * Site Asset - */ -router.get('/_site/:siteId?/:resource', async (req, res, next) => { - const site = req.params.siteId ? WIKI.sites[req.params.siteId] : await WIKI.db.sites.getSiteByHostname({ hostname: req.hostname }) - if (!site) { - return res.status(404).send('Site Not Found') - } - switch (req.params.resource) { - case 'logo': { - if (site.config.assets.logo) { - // TODO: Fetch from db if not in disk cache - res.sendFile(path.join(siteAssetsPath, `logo-${site.id}.${site.config.assets.logoExt}`)) - } else { - res.sendFile(path.join(WIKI.ROOTPATH, 'assets/_assets/logo-wikijs.svg')) - } - break - } - case 'favicon': { - if (site.config.assets.favicon) { - // TODO: Fetch from db if not in disk cache - res.sendFile(path.join(siteAssetsPath, `favicon-${site.id}.${site.config.assets.faviconExt}`)) - } else { - res.sendFile(path.join(WIKI.ROOTPATH, 'assets/_assets/logo-wikijs.svg')) - } - break - } - case 'loginbg': { - if (site.config.assets.loginBg) { - // TODO: Fetch from db if not in disk cache - res.sendFile(path.join(siteAssetsPath, `loginbg-${site.id}.jpg`)) - } else { - res.sendFile(path.join(WIKI.ROOTPATH, 'assets/_assets/bg/login.jpg')) - } - break - } - default: { - return res.status(404).send('Invalid Site Resource') - } - } -}) - -/** - * Asset Thumbnails / Download - */ -router.get('/_thumb/:id.webp', async (req, res, next) => { - const thumb = await WIKI.db.assets.getThumbnail({ - id: req.params.id - }) - - if (thumb) { - // TODO: Check permissions - - switch (thumb.previewState) { - case 'pending': { - res.redirect('/_assets/illustrations/fileman-pending.svg') - break - } - case 'ready': { - res.set('Content-Type', 'image/webp') - res.send(thumb.preview) - break - } - case 'failed': { - res.redirect('/_assets/illustrations/fileman-failed.svg') - break - } - default: { - return res.status(500).send('Invalid Thumbnail Preview State') - } - } - } else { - return res.sendStatus(404) - } -}) - -// router.get(['/_admin', '/_admin/*'], (req, res, next) => { -// if (!WIKI.auth.checkAccess(req.user, [ -// 'manage:system', -// 'write:users', -// 'manage:users', -// 'write:groups', -// 'manage:groups', -// 'manage:navigation', -// 'manage:theme', -// 'manage:api' -// ])) { -// _.set(res.locals, 'pageMeta.title', 'Unauthorized') -// return res.status(403).render('unauthorized', { action: 'view' }) -// } - -// _.set(res.locals, 'pageMeta.title', 'Admin') -// res.render('admin') - -// }) - -// /** -// * Download Page / Version -// */ -// router.get(['/d', '/d/*'], async (req, res, next) => { -// const pageArgs = pageHelper.parsePath(req.path, { stripExt: true }) - -// const versionId = (req.query.v) ? _.toSafeInteger(req.query.v) : 0 - -// const page = await WIKI.db.pages.getPageFromDb({ -// path: pageArgs.path, -// locale: pageArgs.locale, -// userId: req.user.id, -// isPrivate: false -// }) - -// pageArgs.tags = _.get(page, 'tags', []) - -// if (versionId > 0) { -// if (!WIKI.auth.checkAccess(req.user, ['read:history'], pageArgs)) { -// _.set(res.locals, 'pageMeta.title', 'Unauthorized') -// return res.render('unauthorized', { action: 'downloadVersion' }) -// } -// } else { -// if (!WIKI.auth.checkAccess(req.user, ['read:source'], pageArgs)) { -// _.set(res.locals, 'pageMeta.title', 'Unauthorized') -// return res.render('unauthorized', { action: 'download' }) -// } -// } - -// if (page) { -// const fileName = _.last(page.path.split('/')) + '.' + pageHelper.getFileExtension(page.contentType) -// res.attachment(fileName) -// if (versionId > 0) { -// const pageVersion = await WIKI.db.pageHistory.getVersion({ pageId: page.id, versionId }) -// res.send(pageHelper.injectPageMetadata(pageVersion)) -// } else { -// res.send(pageHelper.injectPageMetadata(page)) -// } -// } else { -// res.status(404).end() -// } -// }) - -// /** -// * Create/Edit document -// */ -// router.get(['/_edit', '/_edit/*'], async (req, res, next) => { -// const pageArgs = pageHelper.parsePath(req.path, { stripExt: true }) -// const site = await WIKI.db.sites.getSiteByHostname({ hostname: req.hostname }) - -// if (!site) { -// throw new Error('INVALID_SITE') -// } - -// if (pageArgs.path === '') { -// return res.redirect(`/_edit/home`) -// } - -// // if (WIKI.config.lang.namespacing && !pageArgs.explicitLocale) { -// // return res.redirect(`/_edit/${pageArgs.locale}/${pageArgs.path}`) -// // } - -// // req.i18n.changeLanguage(pageArgs.locale) - -// // -> Set Editor Lang -// _.set(res, 'locals.siteConfig.lang', pageArgs.locale) -// // _.set(res, 'locals.siteConfig.rtl', req.i18n.dir() === 'rtl') - -// // -> Check for reserved path -// if (pageHelper.isReservedPath(pageArgs.path)) { -// return next(new Error('Cannot create this page because it starts with a system reserved path.')) -// } - -// // -> Get page data from DB -// let page = await WIKI.db.pages.getPageFromDb({ -// siteId: site.id, -// path: pageArgs.path, -// locale: pageArgs.locale, -// userId: req.user.id -// }) - -// pageArgs.tags = _.get(page, 'tags', []) - -// // -> Effective Permissions -// const effectivePermissions = WIKI.auth.getEffectivePermissions(req, pageArgs) - -// const injectCode = { -// css: '', // WIKI.config.theming.injectCSS, -// head: '', // WIKI.config.theming.injectHead, -// body: '' // WIKI.config.theming.injectBody -// } - -// if (page) { -// // -> EDIT MODE -// if (!(effectivePermissions.pages.write || effectivePermissions.pages.manage)) { -// _.set(res.locals, 'pageMeta.title', 'Unauthorized') -// return res.render('unauthorized', { action: 'edit' }) -// } - -// // -> Get page tags -// await page.$relatedQuery('tags') -// page.tags = _.map(page.tags, 'tag') - -// // Handle missing extra field -// page.extra = page.extra || { css: '', js: '' } - -// // -> Beautify Script CSS -// if (!_.isEmpty(page.extra.css)) { -// page.extra.css = new CleanCSS({ format: 'beautify' }).minify(page.extra.css).styles -// } - -// _.set(res.locals, 'pageMeta.title', `Edit ${page.title}`) -// _.set(res.locals, 'pageMeta.description', page.description) -// page.mode = 'update' -// page.isPublished = (page.isPublished === true || page.isPublished === 1) ? 'true' : 'false' -// page.content = Buffer.from(page.content).toString('base64') -// } else { -// // -> CREATE MODE -// if (!effectivePermissions.pages.write) { -// _.set(res.locals, 'pageMeta.title', 'Unauthorized') -// return res.render('unauthorized', { action: 'create' }) -// } - -// _.set(res.locals, 'pageMeta.title', `New Page`) -// page = { -// path: pageArgs.path, -// localeCode: pageArgs.locale, -// editorKey: null, -// mode: 'create', -// content: null, -// title: null, -// description: null, -// updatedAt: new Date().toISOString(), -// extra: { -// css: '', -// js: '' -// } -// } -// } - -// res.render('editor', { page, injectCode, effectivePermissions }) -// }) - -// /** -// * History -// */ -// router.get(['/h', '/h/*'], async (req, res, next) => { -// const pageArgs = pageHelper.parsePath(req.path, { stripExt: true }) - -// if (WIKI.config.lang.namespacing && !pageArgs.explicitLocale) { -// return res.redirect(`/h/${pageArgs.locale}/${pageArgs.path}`) -// } - -// req.i18n.changeLanguage(pageArgs.locale) - -// _.set(res, 'locals.siteConfig.lang', pageArgs.locale) -// _.set(res, 'locals.siteConfig.rtl', req.i18n.dir() === 'rtl') - -// const page = await WIKI.db.pages.getPageFromDb({ -// path: pageArgs.path, -// locale: pageArgs.locale, -// userId: req.user.id, -// isPrivate: false -// }) - -// if (!page) { -// _.set(res.locals, 'pageMeta.title', 'Page Not Found') -// return res.status(404).render('notfound', { action: 'history' }) -// } - -// pageArgs.tags = _.get(page, 'tags', []) - -// const effectivePermissions = WIKI.auth.getEffectivePermissions(req, pageArgs) - -// if (!effectivePermissions.history.read) { -// _.set(res.locals, 'pageMeta.title', 'Unauthorized') -// return res.render('unauthorized', { action: 'history' }) -// } - -// if (page) { -// _.set(res.locals, 'pageMeta.title', page.title) -// _.set(res.locals, 'pageMeta.description', page.description) - -// res.render('history', { page, effectivePermissions }) -// } else { -// res.redirect(`/${pageArgs.path}`) -// } -// }) - -// /** -// * Page ID redirection -// */ -// router.get(['/i', '/i/:id'], async (req, res, next) => { -// const pageId = _.toSafeInteger(req.params.id) -// if (pageId <= 0) { -// return res.redirect('/') -// } - -// const page = await WIKI.db.pages.query().column(['path', 'localeCode', 'isPrivate', 'privateNS']).findById(pageId) -// if (!page) { -// _.set(res.locals, 'pageMeta.title', 'Page Not Found') -// return res.status(404).render('notfound', { action: 'view' }) -// } - -// if (!WIKI.auth.checkAccess(req.user, ['read:pages'], { -// locale: page.localeCode, -// path: page.path, -// private: page.isPrivate, -// privateNS: page.privateNS, -// explicitLocale: false, -// tags: page.tags -// })) { -// _.set(res.locals, 'pageMeta.title', 'Unauthorized') -// return res.render('unauthorized', { action: 'view' }) -// } - -// if (WIKI.config.lang.namespacing) { -// return res.redirect(`/${page.localeCode}/${page.path}`) -// } else { -// return res.redirect(`/${page.path}`) -// } -// }) - -// /** -// * Source -// */ -// router.get(['/s', '/s/*'], async (req, res, next) => { -// const pageArgs = pageHelper.parsePath(req.path, { stripExt: true }) -// const versionId = (req.query.v) ? _.toSafeInteger(req.query.v) : 0 - -// const page = await WIKI.db.pages.getPageFromDb({ -// path: pageArgs.path, -// locale: pageArgs.locale, -// userId: req.user.id, -// isPrivate: false -// }) - -// pageArgs.tags = _.get(page, 'tags', []) - -// if (WIKI.config.lang.namespacing && !pageArgs.explicitLocale) { -// return res.redirect(`/s/${pageArgs.locale}/${pageArgs.path}`) -// } - -// // -> Effective Permissions -// const effectivePermissions = WIKI.auth.getEffectivePermissions(req, pageArgs) - -// _.set(res, 'locals.siteConfig.lang', pageArgs.locale) -// _.set(res, 'locals.siteConfig.rtl', req.i18n.dir() === 'rtl') - -// if (versionId > 0) { -// if (!effectivePermissions.history.read) { -// _.set(res.locals, 'pageMeta.title', 'Unauthorized') -// return res.render('unauthorized', { action: 'sourceVersion' }) -// } -// } else { -// if (!effectivePermissions.source.read) { -// _.set(res.locals, 'pageMeta.title', 'Unauthorized') -// return res.render('unauthorized', { action: 'source' }) -// } -// } - -// if (page) { -// if (versionId > 0) { -// const pageVersion = await WIKI.db.pageHistory.getVersion({ pageId: page.id, versionId }) -// _.set(res.locals, 'pageMeta.title', pageVersion.title) -// _.set(res.locals, 'pageMeta.description', pageVersion.description) -// res.render('source', { -// page: { -// ...page, -// ...pageVersion -// }, -// effectivePermissions -// }) -// } else { -// _.set(res.locals, 'pageMeta.title', page.title) -// _.set(res.locals, 'pageMeta.description', page.description) - -// res.render('source', { page, effectivePermissions }) -// } -// } else { -// res.redirect(`/${pageArgs.path}`) -// } -// }) - -// /** -// * Tags -// */ -// router.get(['/t', '/t/*'], (req, res, next) => { -// _.set(res.locals, 'pageMeta.title', 'Tags') -// res.render('tags') -// }) - -/** - * User Avatar - */ -router.get('/_user/:uid/avatar', async (req, res, next) => { - if (!WIKI.auth.checkAccess(req.user, ['read:pages'])) { - return res.sendStatus(403) - } - const av = await WIKI.db.users.getUserAvatarData(req.params.uid) - if (av) { - res.set('Content-Type', 'image/jpeg') - return res.send(av) - } - - return res.sendStatus(404) -}) - -// /** -// * View document / asset -// */ -// router.get('/*', async (req, res, next) => { -// const stripExt = _.some(WIKI.data.pageExtensions, ext => _.endsWith(req.path, `.${ext}`)) -// const pageArgs = pageHelper.parsePath(req.path, { stripExt }) -// const isPage = (stripExt || pageArgs.path.indexOf('.') === -1) -// const site = await WIKI.db.sites.getSiteByHostname({ hostname: req.hostname }) - -// if (!site) { -// throw new Error('INVALID_SITE') -// } - -// if (isPage) { -// // if (WIKI.config.lang.namespacing && !pageArgs.explicitLocale) { -// // return res.redirect(`/${pageArgs.locale}/${pageArgs.path}`) -// // } - -// // req.i18n.changeLanguage(pageArgs.locale) - -// try { -// // -> Get Page from cache -// const page = await WIKI.db.pages.getPage({ -// siteId: site.id, -// path: pageArgs.path, -// locale: pageArgs.locale, -// userId: req.user.id -// }) -// pageArgs.tags = _.get(page, 'tags', []) - -// // -> Effective Permissions -// const effectivePermissions = WIKI.auth.getEffectivePermissions(req, pageArgs) - -// // -> Check User Access -// if (!effectivePermissions.pages.read) { -// if (req.user.id === WIKI.auth.guest.id) { -// res.cookie('loginRedirect', req.path, { -// maxAge: 15 * 60 * 1000 -// }) -// } -// if (pageArgs.path === 'home' && req.user.id === WIKI.auth.guest.id) { -// return res.redirect('/login') -// } -// return res.redirect(`/_error/unauthorized?from=${req.path}`) -// } - -// _.set(res, 'locals.siteConfig.lang', pageArgs.locale) -// // _.set(res, 'locals.siteConfig.rtl', req.i18n.dir() === 'rtl') - -// if (page) { -// _.set(res.locals, 'pageMeta.title', page.title) -// _.set(res.locals, 'pageMeta.description', page.description) - -// // -> Check Publishing State -// let pageIsPublished = page.isPublished -// if (pageIsPublished && !_.isEmpty(page.publishStartDate)) { -// pageIsPublished = moment(page.publishStartDate).isSameOrBefore() -// } -// if (pageIsPublished && !_.isEmpty(page.publishEndDate)) { -// pageIsPublished = moment(page.publishEndDate).isSameOrAfter() -// } -// if (!pageIsPublished && !effectivePermissions.pages.write) { -// _.set(res.locals, 'pageMeta.title', 'Unauthorized') -// return res.status(403).render('unauthorized', { -// action: 'view' -// }) -// } - -// // -> Render view -// res.sendFile(path.join(WIKI.ROOTPATH, 'assets/index.html')) -// } else if (pageArgs.path === 'home') { -// res.redirect('/_welcome') -// } else { -// _.set(res.locals, 'pageMeta.title', 'Page Not Found') -// if (effectivePermissions.pages.write) { -// res.status(404).render('new', { path: pageArgs.path, locale: pageArgs.locale }) -// } else { -// res.status(404).render('notfound', { action: 'view' }) -// } -// } -// } catch (err) { -// next(err) -// } -// } else { -// if (!WIKI.auth.checkAccess(req.user, ['read:assets'], pageArgs)) { -// return res.sendStatus(403) -// } - -// await WIKI.db.assets.getAsset(pageArgs.path, res) -// } -// }) - -router.get('/*', (req, res, next) => { - res.sendFile(path.join(WIKI.ROOTPATH, 'assets/index.html')) -}) - -module.exports = router diff --git a/server/controllers/common.mjs b/server/controllers/common.mjs new file mode 100644 index 00000000..fb278d87 --- /dev/null +++ b/server/controllers/common.mjs @@ -0,0 +1,534 @@ +import express from 'express' +// import pageHelper from '../helpers/page.mjs' +// import CleanCSS from 'clean-css' +import path from 'node:path' + +export default function () { + const router = express.Router() + const siteAssetsPath = path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'assets') + + /** + * Robots.txt + */ + router.get('/robots.txt', (req, res, next) => { + res.type('text/plain') + if (WIKI.config.seo.robots.includes('noindex')) { + res.send('User-agent: *\nDisallow: /') + } else { + res.status(200).end() + } + }) + + /** + * Health Endpoint + */ + router.get('/healthz', (req, res, next) => { + if (WIKI.db.knex.client.pool.numFree() < 1 && WIKI.db.knex.client.pool.numUsed() < 1) { + res.status(503).json({ ok: false }).end() + } else { + res.status(200).json({ ok: true }).end() + } + }) + + /** + * Site Asset + */ + router.get('/_site/:siteId?/:resource', async (req, res, next) => { + const site = req.params.siteId ? WIKI.sites[req.params.siteId] : await WIKI.db.sites.getSiteByHostname({ hostname: req.hostname }) + if (!site) { + return res.status(404).send('Site Not Found') + } + switch (req.params.resource) { + case 'logo': { + if (site.config.assets.logo) { + // TODO: Fetch from db if not in disk cache + res.sendFile(path.join(siteAssetsPath, `logo-${site.id}.${site.config.assets.logoExt}`)) + } else { + res.sendFile(path.join(WIKI.ROOTPATH, 'assets/_assets/logo-wikijs.svg')) + } + break + } + case 'favicon': { + if (site.config.assets.favicon) { + // TODO: Fetch from db if not in disk cache + res.sendFile(path.join(siteAssetsPath, `favicon-${site.id}.${site.config.assets.faviconExt}`)) + } else { + res.sendFile(path.join(WIKI.ROOTPATH, 'assets/_assets/logo-wikijs.svg')) + } + break + } + case 'loginbg': { + if (site.config.assets.loginBg) { + // TODO: Fetch from db if not in disk cache + res.sendFile(path.join(siteAssetsPath, `loginbg-${site.id}.jpg`)) + } else { + res.sendFile(path.join(WIKI.ROOTPATH, 'assets/_assets/bg/login.jpg')) + } + break + } + default: { + return res.status(404).send('Invalid Site Resource') + } + } + }) + + /** + * Asset Thumbnails / Download + */ + router.get('/_thumb/:id.webp', async (req, res, next) => { + const thumb = await WIKI.db.assets.getThumbnail({ + id: req.params.id + }) + + if (thumb) { + // TODO: Check permissions + + switch (thumb.previewState) { + case 'pending': { + res.redirect('/_assets/illustrations/fileman-pending.svg') + break + } + case 'ready': { + res.set('Content-Type', 'image/webp') + res.send(thumb.preview) + break + } + case 'failed': { + res.redirect('/_assets/illustrations/fileman-failed.svg') + break + } + default: { + return res.status(500).send('Invalid Thumbnail Preview State') + } + } + } else { + return res.sendStatus(404) + } + }) + + // router.get(['/_admin', '/_admin/*'], (req, res, next) => { + // if (!WIKI.auth.checkAccess(req.user, [ + // 'manage:system', + // 'write:users', + // 'manage:users', + // 'write:groups', + // 'manage:groups', + // 'manage:navigation', + // 'manage:theme', + // 'manage:api' + // ])) { + // _.set(res.locals, 'pageMeta.title', 'Unauthorized') + // return res.status(403).render('unauthorized', { action: 'view' }) + // } + + // _.set(res.locals, 'pageMeta.title', 'Admin') + // res.render('admin') + + // }) + + // /** + // * Download Page / Version + // */ + // router.get(['/d', '/d/*'], async (req, res, next) => { + // const pageArgs = pageHelper.parsePath(req.path, { stripExt: true }) + + // const versionId = (req.query.v) ? _.toSafeInteger(req.query.v) : 0 + + // const page = await WIKI.db.pages.getPageFromDb({ + // path: pageArgs.path, + // locale: pageArgs.locale, + // userId: req.user.id, + // isPrivate: false + // }) + + // pageArgs.tags = _.get(page, 'tags', []) + + // if (versionId > 0) { + // if (!WIKI.auth.checkAccess(req.user, ['read:history'], pageArgs)) { + // _.set(res.locals, 'pageMeta.title', 'Unauthorized') + // return res.render('unauthorized', { action: 'downloadVersion' }) + // } + // } else { + // if (!WIKI.auth.checkAccess(req.user, ['read:source'], pageArgs)) { + // _.set(res.locals, 'pageMeta.title', 'Unauthorized') + // return res.render('unauthorized', { action: 'download' }) + // } + // } + + // if (page) { + // const fileName = _.last(page.path.split('/')) + '.' + pageHelper.getFileExtension(page.contentType) + // res.attachment(fileName) + // if (versionId > 0) { + // const pageVersion = await WIKI.db.pageHistory.getVersion({ pageId: page.id, versionId }) + // res.send(pageHelper.injectPageMetadata(pageVersion)) + // } else { + // res.send(pageHelper.injectPageMetadata(page)) + // } + // } else { + // res.status(404).end() + // } + // }) + + // /** + // * Create/Edit document + // */ + // router.get(['/_edit', '/_edit/*'], async (req, res, next) => { + // const pageArgs = pageHelper.parsePath(req.path, { stripExt: true }) + // const site = await WIKI.db.sites.getSiteByHostname({ hostname: req.hostname }) + + // if (!site) { + // throw new Error('INVALID_SITE') + // } + + // if (pageArgs.path === '') { + // return res.redirect(`/_edit/home`) + // } + + // // if (WIKI.config.lang.namespacing && !pageArgs.explicitLocale) { + // // return res.redirect(`/_edit/${pageArgs.locale}/${pageArgs.path}`) + // // } + + // // req.i18n.changeLanguage(pageArgs.locale) + + // // -> Set Editor Lang + // _.set(res, 'locals.siteConfig.lang', pageArgs.locale) + // // _.set(res, 'locals.siteConfig.rtl', req.i18n.dir() === 'rtl') + + // // -> Check for reserved path + // if (pageHelper.isReservedPath(pageArgs.path)) { + // return next(new Error('Cannot create this page because it starts with a system reserved path.')) + // } + + // // -> Get page data from DB + // let page = await WIKI.db.pages.getPageFromDb({ + // siteId: site.id, + // path: pageArgs.path, + // locale: pageArgs.locale, + // userId: req.user.id + // }) + + // pageArgs.tags = _.get(page, 'tags', []) + + // // -> Effective Permissions + // const effectivePermissions = WIKI.auth.getEffectivePermissions(req, pageArgs) + + // const injectCode = { + // css: '', // WIKI.config.theming.injectCSS, + // head: '', // WIKI.config.theming.injectHead, + // body: '' // WIKI.config.theming.injectBody + // } + + // if (page) { + // // -> EDIT MODE + // if (!(effectivePermissions.pages.write || effectivePermissions.pages.manage)) { + // _.set(res.locals, 'pageMeta.title', 'Unauthorized') + // return res.render('unauthorized', { action: 'edit' }) + // } + + // // -> Get page tags + // await page.$relatedQuery('tags') + // page.tags = _.map(page.tags, 'tag') + + // // Handle missing extra field + // page.extra = page.extra || { css: '', js: '' } + + // // -> Beautify Script CSS + // if (!_.isEmpty(page.extra.css)) { + // page.extra.css = new CleanCSS({ format: 'beautify' }).minify(page.extra.css).styles + // } + + // _.set(res.locals, 'pageMeta.title', `Edit ${page.title}`) + // _.set(res.locals, 'pageMeta.description', page.description) + // page.mode = 'update' + // page.isPublished = (page.isPublished === true || page.isPublished === 1) ? 'true' : 'false' + // page.content = Buffer.from(page.content).toString('base64') + // } else { + // // -> CREATE MODE + // if (!effectivePermissions.pages.write) { + // _.set(res.locals, 'pageMeta.title', 'Unauthorized') + // return res.render('unauthorized', { action: 'create' }) + // } + + // _.set(res.locals, 'pageMeta.title', `New Page`) + // page = { + // path: pageArgs.path, + // localeCode: pageArgs.locale, + // editorKey: null, + // mode: 'create', + // content: null, + // title: null, + // description: null, + // updatedAt: new Date().toISOString(), + // extra: { + // css: '', + // js: '' + // } + // } + // } + + // res.render('editor', { page, injectCode, effectivePermissions }) + // }) + + // /** + // * History + // */ + // router.get(['/h', '/h/*'], async (req, res, next) => { + // const pageArgs = pageHelper.parsePath(req.path, { stripExt: true }) + + // if (WIKI.config.lang.namespacing && !pageArgs.explicitLocale) { + // return res.redirect(`/h/${pageArgs.locale}/${pageArgs.path}`) + // } + + // req.i18n.changeLanguage(pageArgs.locale) + + // _.set(res, 'locals.siteConfig.lang', pageArgs.locale) + // _.set(res, 'locals.siteConfig.rtl', req.i18n.dir() === 'rtl') + + // const page = await WIKI.db.pages.getPageFromDb({ + // path: pageArgs.path, + // locale: pageArgs.locale, + // userId: req.user.id, + // isPrivate: false + // }) + + // if (!page) { + // _.set(res.locals, 'pageMeta.title', 'Page Not Found') + // return res.status(404).render('notfound', { action: 'history' }) + // } + + // pageArgs.tags = _.get(page, 'tags', []) + + // const effectivePermissions = WIKI.auth.getEffectivePermissions(req, pageArgs) + + // if (!effectivePermissions.history.read) { + // _.set(res.locals, 'pageMeta.title', 'Unauthorized') + // return res.render('unauthorized', { action: 'history' }) + // } + + // if (page) { + // _.set(res.locals, 'pageMeta.title', page.title) + // _.set(res.locals, 'pageMeta.description', page.description) + + // res.render('history', { page, effectivePermissions }) + // } else { + // res.redirect(`/${pageArgs.path}`) + // } + // }) + + // /** + // * Page ID redirection + // */ + // router.get(['/i', '/i/:id'], async (req, res, next) => { + // const pageId = _.toSafeInteger(req.params.id) + // if (pageId <= 0) { + // return res.redirect('/') + // } + + // const page = await WIKI.db.pages.query().column(['path', 'localeCode', 'isPrivate', 'privateNS']).findById(pageId) + // if (!page) { + // _.set(res.locals, 'pageMeta.title', 'Page Not Found') + // return res.status(404).render('notfound', { action: 'view' }) + // } + + // if (!WIKI.auth.checkAccess(req.user, ['read:pages'], { + // locale: page.localeCode, + // path: page.path, + // private: page.isPrivate, + // privateNS: page.privateNS, + // explicitLocale: false, + // tags: page.tags + // })) { + // _.set(res.locals, 'pageMeta.title', 'Unauthorized') + // return res.render('unauthorized', { action: 'view' }) + // } + + // if (WIKI.config.lang.namespacing) { + // return res.redirect(`/${page.localeCode}/${page.path}`) + // } else { + // return res.redirect(`/${page.path}`) + // } + // }) + + // /** + // * Source + // */ + // router.get(['/s', '/s/*'], async (req, res, next) => { + // const pageArgs = pageHelper.parsePath(req.path, { stripExt: true }) + // const versionId = (req.query.v) ? _.toSafeInteger(req.query.v) : 0 + + // const page = await WIKI.db.pages.getPageFromDb({ + // path: pageArgs.path, + // locale: pageArgs.locale, + // userId: req.user.id, + // isPrivate: false + // }) + + // pageArgs.tags = _.get(page, 'tags', []) + + // if (WIKI.config.lang.namespacing && !pageArgs.explicitLocale) { + // return res.redirect(`/s/${pageArgs.locale}/${pageArgs.path}`) + // } + + // // -> Effective Permissions + // const effectivePermissions = WIKI.auth.getEffectivePermissions(req, pageArgs) + + // _.set(res, 'locals.siteConfig.lang', pageArgs.locale) + // _.set(res, 'locals.siteConfig.rtl', req.i18n.dir() === 'rtl') + + // if (versionId > 0) { + // if (!effectivePermissions.history.read) { + // _.set(res.locals, 'pageMeta.title', 'Unauthorized') + // return res.render('unauthorized', { action: 'sourceVersion' }) + // } + // } else { + // if (!effectivePermissions.source.read) { + // _.set(res.locals, 'pageMeta.title', 'Unauthorized') + // return res.render('unauthorized', { action: 'source' }) + // } + // } + + // if (page) { + // if (versionId > 0) { + // const pageVersion = await WIKI.db.pageHistory.getVersion({ pageId: page.id, versionId }) + // _.set(res.locals, 'pageMeta.title', pageVersion.title) + // _.set(res.locals, 'pageMeta.description', pageVersion.description) + // res.render('source', { + // page: { + // ...page, + // ...pageVersion + // }, + // effectivePermissions + // }) + // } else { + // _.set(res.locals, 'pageMeta.title', page.title) + // _.set(res.locals, 'pageMeta.description', page.description) + + // res.render('source', { page, effectivePermissions }) + // } + // } else { + // res.redirect(`/${pageArgs.path}`) + // } + // }) + + // /** + // * Tags + // */ + // router.get(['/t', '/t/*'], (req, res, next) => { + // _.set(res.locals, 'pageMeta.title', 'Tags') + // res.render('tags') + // }) + + /** + * User Avatar + */ + router.get('/_user/:uid/avatar', async (req, res, next) => { + if (!WIKI.auth.checkAccess(req.user, ['read:pages'])) { + return res.sendStatus(403) + } + const av = await WIKI.db.users.getUserAvatarData(req.params.uid) + if (av) { + res.set('Content-Type', 'image/jpeg') + return res.send(av) + } + + return res.sendStatus(404) + }) + + // /** + // * View document / asset + // */ + // router.get('/*', async (req, res, next) => { + // const stripExt = _.some(WIKI.data.pageExtensions, ext => _.endsWith(req.path, `.${ext}`)) + // const pageArgs = pageHelper.parsePath(req.path, { stripExt }) + // const isPage = (stripExt || pageArgs.path.indexOf('.') === -1) + // const site = await WIKI.db.sites.getSiteByHostname({ hostname: req.hostname }) + + // if (!site) { + // throw new Error('INVALID_SITE') + // } + + // if (isPage) { + // // if (WIKI.config.lang.namespacing && !pageArgs.explicitLocale) { + // // return res.redirect(`/${pageArgs.locale}/${pageArgs.path}`) + // // } + + // // req.i18n.changeLanguage(pageArgs.locale) + + // try { + // // -> Get Page from cache + // const page = await WIKI.db.pages.getPage({ + // siteId: site.id, + // path: pageArgs.path, + // locale: pageArgs.locale, + // userId: req.user.id + // }) + // pageArgs.tags = _.get(page, 'tags', []) + + // // -> Effective Permissions + // const effectivePermissions = WIKI.auth.getEffectivePermissions(req, pageArgs) + + // // -> Check User Access + // if (!effectivePermissions.pages.read) { + // if (req.user.id === WIKI.auth.guest.id) { + // res.cookie('loginRedirect', req.path, { + // maxAge: 15 * 60 * 1000 + // }) + // } + // if (pageArgs.path === 'home' && req.user.id === WIKI.auth.guest.id) { + // return res.redirect('/login') + // } + // return res.redirect(`/_error/unauthorized?from=${req.path}`) + // } + + // _.set(res, 'locals.siteConfig.lang', pageArgs.locale) + // // _.set(res, 'locals.siteConfig.rtl', req.i18n.dir() === 'rtl') + + // if (page) { + // _.set(res.locals, 'pageMeta.title', page.title) + // _.set(res.locals, 'pageMeta.description', page.description) + + // // -> Check Publishing State + // let pageIsPublished = page.isPublished + // if (pageIsPublished && !_.isEmpty(page.publishStartDate)) { + // pageIsPublished = moment(page.publishStartDate).isSameOrBefore() + // } + // if (pageIsPublished && !_.isEmpty(page.publishEndDate)) { + // pageIsPublished = moment(page.publishEndDate).isSameOrAfter() + // } + // if (!pageIsPublished && !effectivePermissions.pages.write) { + // _.set(res.locals, 'pageMeta.title', 'Unauthorized') + // return res.status(403).render('unauthorized', { + // action: 'view' + // }) + // } + + // // -> Render view + // res.sendFile(path.join(WIKI.ROOTPATH, 'assets/index.html')) + // } else if (pageArgs.path === 'home') { + // res.redirect('/_welcome') + // } else { + // _.set(res.locals, 'pageMeta.title', 'Page Not Found') + // if (effectivePermissions.pages.write) { + // res.status(404).render('new', { path: pageArgs.path, locale: pageArgs.locale }) + // } else { + // res.status(404).render('notfound', { action: 'view' }) + // } + // } + // } catch (err) { + // next(err) + // } + // } else { + // if (!WIKI.auth.checkAccess(req.user, ['read:assets'], pageArgs)) { + // return res.sendStatus(403) + // } + + // await WIKI.db.assets.getAsset(pageArgs.path, res) + // } + // }) + + router.get('/*', (req, res, next) => { + res.sendFile(path.join(WIKI.ROOTPATH, 'assets/index.html')) + }) + + return router +} diff --git a/server/controllers/ssl.js b/server/controllers/ssl.js deleted file mode 100644 index 607bb579..00000000 --- a/server/controllers/ssl.js +++ /dev/null @@ -1,36 +0,0 @@ -const express = require('express') -const router = express.Router() -const _ = require('lodash') -const qs = require('querystring') - -/** - * Let's Encrypt Challenge - */ -router.get('/.well-known/acme-challenge/:token', (req, res, next) => { - res.type('text/plain') - if (_.get(WIKI.config, 'letsencrypt.challenge', false)) { - if (WIKI.config.letsencrypt.challenge.token === req.params.token) { - res.send(WIKI.config.letsencrypt.challenge.keyAuthorization) - WIKI.logger.info(`(LETSENCRYPT) Received valid challenge request. [ ACCEPTED ]`) - } else { - res.status(406).send('Invalid Challenge Token!') - WIKI.logger.warn(`(LETSENCRYPT) Received invalid challenge request. [ REJECTED ]`) - } - } else { - res.status(418).end() - } -}) - -/** - * Redirect to HTTPS if HTTP Redirection is enabled - */ -// router.all('/*', (req, res, next) => { -// if (WIKI.config.server.sslRedir && !req.secure && WIKI.servers.servers.https) { -// let query = (!_.isEmpty(req.query)) ? `?${qs.stringify(req.query)}` : `` -// return res.redirect(`https://${req.hostname}${req.originalUrl}${query}`) -// } else { -// next() -// } -// }) - -module.exports = router diff --git a/server/controllers/ssl.mjs b/server/controllers/ssl.mjs new file mode 100644 index 00000000..b3633f85 --- /dev/null +++ b/server/controllers/ssl.mjs @@ -0,0 +1,39 @@ +import express from 'express' +import { get } from 'lodash-es' +import qs from 'querystring' + +export default function () { + const router = express.Router() + + /** + * Let's Encrypt Challenge + */ + router.get('/.well-known/acme-challenge/:token', (req, res, next) => { + res.type('text/plain') + if (get(WIKI.config, 'letsencrypt.challenge', false)) { + if (WIKI.config.letsencrypt.challenge.token === req.params.token) { + res.send(WIKI.config.letsencrypt.challenge.keyAuthorization) + WIKI.logger.info(`(LETSENCRYPT) Received valid challenge request. [ ACCEPTED ]`) + } else { + res.status(406).send('Invalid Challenge Token!') + WIKI.logger.warn(`(LETSENCRYPT) Received invalid challenge request. [ REJECTED ]`) + } + } else { + res.status(418).end() + } + }) + + /** + * Redirect to HTTPS if HTTP Redirection is enabled + */ + // router.all('/*', (req, res, next) => { + // if (WIKI.config.server.sslRedir && !req.secure && WIKI.servers.servers.https) { + // let query = (!_.isEmpty(req.query)) ? `?${qs.stringify(req.query)}` : `` + // return res.redirect(`https://${req.hostname}${req.originalUrl}${query}`) + // } else { + // next() + // } + // }) + + return router +} diff --git a/server/controllers/upload.js b/server/controllers/upload.js deleted file mode 100644 index f9594563..00000000 --- a/server/controllers/upload.js +++ /dev/null @@ -1,105 +0,0 @@ -const express = require('express') -const router = express.Router() -const _ = require('lodash') -const multer = require('multer') -const path = require('path') -const sanitize = require('sanitize-filename') - -/** - * Upload files - */ -router.post('/u', (req, res, next) => { - multer({ - dest: path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'uploads'), - limits: { - fileSize: WIKI.config.uploads.maxFileSize, - files: WIKI.config.uploads.maxFiles - } - }).array('mediaUpload')(req, res, next) -}, async (req, res, next) => { - if (!_.some(req.user.permissions, pm => _.includes(['write:assets', 'manage:system'], pm))) { - return res.status(403).json({ - succeeded: false, - message: 'You are not authorized to upload files.' - }) - } else if (req.files.length < 1) { - return res.status(400).json({ - succeeded: false, - message: 'Missing upload payload.' - }) - } else if (req.files.length > 1) { - return res.status(400).json({ - succeeded: false, - message: 'You cannot upload multiple files within the same request.' - }) - } - const fileMeta = _.get(req, 'files[0]', false) - if (!fileMeta) { - return res.status(500).json({ - succeeded: false, - message: 'Missing upload file metadata.' - }) - } - - // Get folder Id - let folderId = null - try { - const folderRaw = _.get(req, 'body.mediaUpload', false) - if (folderRaw) { - folderId = _.get(JSON.parse(folderRaw), 'folderId', null) - if (folderId === 0) { - folderId = null - } - } else { - throw new Error('Missing File Metadata') - } - } catch (err) { - return res.status(400).json({ - succeeded: false, - message: 'Missing upload folder metadata.' - }) - } - - // Build folder hierarchy - let hierarchy = [] - if (folderId) { - try { - hierarchy = await WIKI.db.assetFolders.getHierarchy(folderId) - } catch (err) { - return res.status(400).json({ - succeeded: false, - message: 'Failed to fetch folder hierarchy.' - }) - } - } - - // Sanitize filename - fileMeta.originalname = sanitize(fileMeta.originalname.toLowerCase().replace(/[\s,;#]+/g, '_')) - - // Check if user can upload at path - const assetPath = (folderId) ? hierarchy.map(h => h.slug).join('/') + `/${fileMeta.originalname}` : fileMeta.originalname - if (!WIKI.auth.checkAccess(req.user, ['write:assets'], { path: assetPath })) { - return res.status(403).json({ - succeeded: false, - message: 'You are not authorized to upload files to this folder.' - }) - } - - // Process upload file - await WIKI.db.assets.upload({ - ...fileMeta, - mode: 'upload', - folderId: folderId, - assetPath, - user: req.user - }) - res.send('ok') -}) - -router.get('/u', async (req, res, next) => { - res.json({ - ok: true - }) -}) - -module.exports = router diff --git a/server/controllers/ws.js b/server/controllers/ws.mjs similarity index 71% rename from server/controllers/ws.js rename to server/controllers/ws.mjs index aa12beab..6fe0bbe5 100644 --- a/server/controllers/ws.js +++ b/server/controllers/ws.mjs @@ -1,16 +1,16 @@ -const chalk = require('chalk') -const os = require('node:os') +import chalk from 'chalk' +import os from 'node:os' -module.exports = () => { +export default function () { WIKI.servers.ws.on('connection', (socket) => { // TODO: Validate token + permissions const token = socket.handshake.auth.token - console.info(token) + // console.info(token) const listeners = {} socket.on('server:logs', () => { - socket.emit('server:log', chalk`{greenBright Streaming logs from {bold Wiki.js} instance {yellowBright.bold ${WIKI.INSTANCE_ID}} on host {yellowBright.bold ${os.hostname()}}...}`) + socket.emit('server:log', chalk.greenBright(`Streaming logs from ${chalk.bold('Wiki.js')} instance ${chalk.yellowBright.bold(WIKI.INSTANCE_ID)} on host ${chalk.yellowBright.bold(os.hostname())}...`)) listeners.serverLogs = (msg) => { socket.emit('server:log', msg) } diff --git a/server/core/asar.js b/server/core/asar.mjs similarity index 92% rename from server/core/asar.js rename to server/core/asar.mjs index c1521934..fe22a2f7 100644 --- a/server/core/asar.js +++ b/server/core/asar.mjs @@ -1,20 +1,19 @@ -const pickle = require('chromium-pickle-js') -const path = require('path') -const UINT64 = require('cuint').UINT64 -const fs = require('fs') +import pickle from 'chromium-pickle-js' +import path from 'node:path' +import { UINT64 } from 'cuint' +import fs from 'node:fs' /** * Based of express-serve-asar (https://github.com/toyobayashi/express-serve-asar) * by Fenglin Li (https://github.com/toyobayashi) */ -const packages = { - 'twemoji': path.join(WIKI.ROOTPATH, `assets-legacy/svg/twemoji.asar`) -} - -module.exports = { +export default { fdCache: {}, async serve (pkgName, req, res, next) { + const packages = { + 'twemoji': path.join(WIKI.ROOTPATH, `assets/svg/twemoji.asar`) + } const file = this.readFilesystemSync(packages[pkgName]) const { filesystem, fd } = file const info = filesystem.getFile(req.path.substring(1)) diff --git a/server/core/auth.js b/server/core/auth.mjs similarity index 96% rename from server/core/auth.js rename to server/core/auth.mjs index 12893ee8..3d76bc84 100644 --- a/server/core/auth.js +++ b/server/core/auth.mjs @@ -1,24 +1,25 @@ -const passport = require('passport') -const passportJWT = require('passport-jwt') -const _ = require('lodash') -const jwt = require('jsonwebtoken') -const ms = require('ms') -const { DateTime } = require('luxon') -const util = require('node:util') -const crypto = require('node:crypto') -const randomBytes = util.promisify(crypto.randomBytes) -const pem2jwk = require('pem-jwk').pem2jwk +import passport from 'passport' +import passportJWT from 'passport-jwt' +import _ from 'lodash' +import jwt from 'jsonwebtoken' +import ms from 'ms' +import { DateTime } from 'luxon' +import util from 'node:util' +import crypto from 'node:crypto' +import { pem2jwk } from 'pem-jwk' +import NodeCache from 'node-cache' +import { extractJWT } from '../helpers/security.mjs' -const securityHelper = require('../helpers/security') +const randomBytes = util.promisify(crypto.randomBytes) -module.exports = { +export default { strategies: {}, guest: { cacheExpiration: DateTime.utc().minus({ days: 1 }) }, groups: {}, validApiKeys: [], - revocationList: require('./cache').init(), + revocationList: new NodeCache(), /** * Initialize the authentication module @@ -64,7 +65,7 @@ module.exports = { // Load JWT passport.use('jwt', new passportJWT.Strategy({ - jwtFromRequest: securityHelper.extractJWT, + jwtFromRequest: extractJWT, secretOrKey: WIKI.config.auth.certs.public, audience: WIKI.config.auth.audience, issuer: 'urn:wiki.js', @@ -141,7 +142,7 @@ module.exports = { // Revalidate and renew token if (mustRevalidate) { - const jwtPayload = jwt.decode(securityHelper.extractJWT(req)) + const jwtPayload = jwt.decode(extractJWT(req)) try { const newToken = await WIKI.db.users.refreshToken(jwtPayload.id, jwtPayload.pvd) user = newToken.user diff --git a/server/core/cache.js b/server/core/cache.js deleted file mode 100644 index ea01b27e..00000000 --- a/server/core/cache.js +++ /dev/null @@ -1,7 +0,0 @@ -const NodeCache = require('node-cache') - -module.exports = { - init() { - return new NodeCache() - } -} diff --git a/server/core/config.js b/server/core/config.mjs similarity index 75% rename from server/core/config.js rename to server/core/config.mjs index 4a752c6b..36a100e4 100644 --- a/server/core/config.js +++ b/server/core/config.mjs @@ -1,19 +1,19 @@ -const _ = require('lodash') -const chalk = require('chalk') -const cfgHelper = require('../helpers/config') -const fs = require('fs') -const path = require('path') -const yaml = require('js-yaml') - -module.exports = { +import { defaultsDeep, get, isPlainObject } from 'lodash-es' +import chalk from 'chalk' +import cfgHelper from '../helpers/config.mjs' +import regexData from '../app/regex.mjs' +import fs from 'node:fs/promises' +import path from 'node:path' +import yaml from 'js-yaml' + +export default { /** * Load root config from disk */ - init(silent = false) { - let confPaths = { + async init(silent = false) { + const confPaths = { config: path.join(WIKI.ROOTPATH, 'config.yml'), - data: path.join(WIKI.SERVERPATH, 'app/data.yml'), - dataRegex: path.join(WIKI.SERVERPATH, 'app/regex.js') + data: path.join(WIKI.SERVERPATH, 'app/data.yml') } if (process.env.dockerdev) { @@ -34,11 +34,11 @@ module.exports = { try { appconfig = yaml.load( cfgHelper.parseConfigValue( - fs.readFileSync(confPaths.config, 'utf8') + await fs.readFile(confPaths.config, 'utf8') ) ) - appdata = yaml.load(fs.readFileSync(confPaths.data, 'utf8')) - appdata.regex = require(confPaths.dataRegex) + appdata = yaml.load(await fs.readFile(confPaths.data, 'utf8')) + appdata.regex = regexData if (!silent) { console.info(chalk.green.bold(`OK`)) } @@ -52,7 +52,7 @@ module.exports = { // Merge with defaults - appconfig = _.defaultsDeep(appconfig, appdata.defaults.config) + appconfig = defaultsDeep(appconfig, appdata.defaults.config) // Override port @@ -66,7 +66,7 @@ module.exports = { // Load package info - const packageInfo = require(path.join(WIKI.SERVERPATH, 'package.json')) + const packageInfo = JSON.parse(await fs.readFile(path.join(WIKI.SERVERPATH, 'package.json'), 'utf-8')) // Load DB Password from Docker Secret File if (process.env.DB_PASS_FILE) { @@ -74,7 +74,7 @@ module.exports = { console.info(chalk.blue(`DB_PASS_FILE is defined. Will use secret from file.`)) } try { - appconfig.db.pass = fs.readFileSync(process.env.DB_PASS_FILE, 'utf8').trim() + appconfig.db.pass = await fs.readFile(process.env.DB_PASS_FILE, 'utf8').trim() } catch (err) { console.error(chalk.red.bold(`>>> Failed to read Docker Secret File using path defined in DB_PASS_FILE env variable!`)) console.error(err.message) @@ -93,9 +93,9 @@ module.exports = { * Load config from DB */ async loadFromDb() { - let conf = await WIKI.db.settings.getConfig() + const conf = await WIKI.db.settings.getConfig() if (conf) { - WIKI.config = _.defaultsDeep(conf, WIKI.config) + WIKI.config = defaultsDeep(conf, WIKI.config) } else { WIKI.logger.warn('Missing DB Configuration!') process.exit(1) @@ -110,8 +110,8 @@ module.exports = { async saveToDb(keys, propagate = true) { try { for (let key of keys) { - let value = _.get(WIKI.config, key, null) - if (!_.isPlainObject(value)) { + let value = get(WIKI.config, key, null) + if (!isPlainObject(value)) { value = { v: value } } let affectedRows = await WIKI.db.settings.query().patch({ value }).where('key', key) diff --git a/server/core/db.js b/server/core/db.mjs similarity index 80% rename from server/core/db.js rename to server/core/db.mjs index 0b2143a4..1e92c833 100644 --- a/server/core/db.js +++ b/server/core/db.mjs @@ -1,19 +1,18 @@ -const _ = require('lodash') -const autoload = require('auto-load') -const path = require('path') -const Knex = require('knex') -const fs = require('fs') -const Objection = require('objection') -const PGPubSub = require('pg-pubsub') - -const migrationSource = require('../db/migrator-source') -const migrateFromLegacy = require('../db/legacy') -const { setTimeout } = require('timers/promises') +import { get, has, isEmpty, isPlainObject } from 'lodash-es' +import path from 'node:path' +import knex from 'knex' +import fs from 'node:fs/promises' +import Objection from 'objection' +import PGPubSub from 'pg-pubsub' + +import migrationSource from '../db/migrator-source.mjs' +// const migrateFromLegacy = require('../db/legacy') +import { setTimeout } from 'node:timers/promises' /** * ORM DB module */ -module.exports = { +export default { Objection, knex: null, listener: null, @@ -21,14 +20,14 @@ module.exports = { /** * Initialize DB */ - init(workerMode = false) { + async init (workerMode = false) { let self = this WIKI.logger.info('Checking DB configuration...') // Fetch DB Config - this.config = (!_.isEmpty(process.env.DATABASE_URL)) ? process.env.DATABASE_URL : { + this.config = (!isEmpty(process.env.DATABASE_URL)) ? process.env.DATABASE_URL : { host: WIKI.config.db.host.toString(), user: WIKI.config.db.user.toString(), password: WIKI.config.db.pass.toString(), @@ -40,27 +39,27 @@ module.exports = { let dbUseSSL = (WIKI.config.db.ssl === true || WIKI.config.db.ssl === 'true' || WIKI.config.db.ssl === 1 || WIKI.config.db.ssl === '1') let sslOptions = null - if (dbUseSSL && _.isPlainObject(this.config) && _.get(WIKI.config.db, 'sslOptions.auto', null) === false) { + if (dbUseSSL && isPlainObject(this.config) && get(WIKI.config.db, 'sslOptions.auto', null) === false) { sslOptions = WIKI.config.db.sslOptions sslOptions.rejectUnauthorized = sslOptions.rejectUnauthorized !== false if (sslOptions.ca && sslOptions.ca.indexOf('-----') !== 0) { - sslOptions.ca = fs.readFileSync(path.resolve(WIKI.ROOTPATH, sslOptions.ca)) + sslOptions.ca = await fs.readFile(path.resolve(WIKI.ROOTPATH, sslOptions.ca), 'utf-8') } if (sslOptions.cert) { - sslOptions.cert = fs.readFileSync(path.resolve(WIKI.ROOTPATH, sslOptions.cert)) + sslOptions.cert = await fs.readFile(path.resolve(WIKI.ROOTPATH, sslOptions.cert), 'utf-8') } if (sslOptions.key) { - sslOptions.key = fs.readFileSync(path.resolve(WIKI.ROOTPATH, sslOptions.key)) + sslOptions.key = await fs.readFile(path.resolve(WIKI.ROOTPATH, sslOptions.key), 'utf-8') } if (sslOptions.pfx) { - sslOptions.pfx = fs.readFileSync(path.resolve(WIKI.ROOTPATH, sslOptions.pfx)) + sslOptions.pfx = await fs.readFile(path.resolve(WIKI.ROOTPATH, sslOptions.pfx), 'utf-8') } } else { sslOptions = true } // Handle inline SSL CA Certificate mode - if (!_.isEmpty(process.env.DB_SSL_CA)) { + if (!isEmpty(process.env.DB_SSL_CA)) { const chunks = [] for (let i = 0, charsLength = process.env.DB_SSL_CA.length; i < charsLength; i += 64) { chunks.push(process.env.DB_SSL_CA.substring(i, i + 64)) @@ -73,12 +72,12 @@ module.exports = { } } - if (dbUseSSL && _.isPlainObject(this.config)) { + if (dbUseSSL && isPlainObject(this.config)) { this.config.ssl = (sslOptions === true) ? { rejectUnauthorized: true } : sslOptions } // Initialize Knex - this.knex = Knex({ + this.knex = knex({ client: 'pg', useNullAsDefault: true, asyncStackTraces: WIKI.IS_DEBUG, @@ -104,11 +103,11 @@ module.exports = { // Load DB Models WIKI.logger.info('Loading DB models...') - const models = autoload(path.join(WIKI.SERVERPATH, 'models')) + const models = (await import(path.join(WIKI.SERVERPATH, 'models/index.mjs'))).default // Set init tasks let conAttempts = 0 - let initTasks = { + const initTasks = { // -> Attempt initial connection async connect () { try { @@ -143,7 +142,7 @@ module.exports = { }, // -> Migrate DB Schemas from 2.x async migrateFromLegacy () { - return migrateFromLegacy.migrate(self.knex) + // return migrateFromLegacy.migrate(self.knex) } } @@ -184,7 +183,7 @@ module.exports = { // -> Outbound events handling this.listener.addChannel('wiki', payload => { - if (_.has(payload, 'event') && payload.source !== WIKI.INSTANCE_ID) { + if (has(payload, 'event') && payload.source !== WIKI.INSTANCE_ID) { WIKI.logger.info(`Received event ${payload.event} from instance ${payload.source}: [ OK ]`) WIKI.events.inbound.emit(payload.event, payload.value) } diff --git a/server/core/extensions.js b/server/core/extensions.mjs similarity index 67% rename from server/core/extensions.js rename to server/core/extensions.mjs index 2c22441e..32ff856c 100644 --- a/server/core/extensions.js +++ b/server/core/extensions.mjs @@ -1,13 +1,13 @@ -const fs = require('fs-extra') -const path = require('path') +import fs from 'node:fs/promises' +import path from 'path' -module.exports = { +export default { ext: {}, async init () { const extDirs = await fs.readdir(path.join(WIKI.SERVERPATH, 'modules/extensions')) WIKI.logger.info(`Checking for installed optional extensions...`) - for (let dir of extDirs) { - WIKI.extensions.ext[dir] = require(path.join(WIKI.SERVERPATH, 'modules/extensions', dir, 'ext.js')) + for (const dir of extDirs) { + WIKI.extensions.ext[dir] = (await import(path.join(WIKI.SERVERPATH, 'modules/extensions', dir, 'ext.mjs'))).default const isInstalled = await WIKI.extensions.ext[dir].check() if (isInstalled) { WIKI.logger.info(`Optional extension ${dir} is installed. [ OK ]`) diff --git a/server/core/kernel.js b/server/core/kernel.mjs similarity index 73% rename from server/core/kernel.js rename to server/core/kernel.mjs index 976075ec..f759f04d 100644 --- a/server/core/kernel.js +++ b/server/core/kernel.mjs @@ -1,16 +1,24 @@ -const _ = require('lodash') -const EventEmitter = require('eventemitter2').EventEmitter2 +import { padEnd } from 'lodash-es' +import eventemitter2 from 'eventemitter2' +import NodeCache from 'node-cache' + +import asar from './asar.mjs' +import db from './db.mjs' +import extensions from './extensions.mjs' +import scheduler from './scheduler.mjs' +import servers from './servers.mjs' let isShuttingDown = false -module.exports = { +export default { async init() { WIKI.logger.info('=======================================') - WIKI.logger.info(`= Wiki.js ${_.padEnd(WIKI.version + ' ', 29, '=')}`) + WIKI.logger.info(`= Wiki.js ${padEnd(WIKI.version + ' ', 29, '=')}`) WIKI.logger.info('=======================================') WIKI.logger.info('Initializing...') + WIKI.logger.info(`Running node.js ${process.version}`) - WIKI.db = require('./db').init() + WIKI.db = await db.init() try { await WIKI.db.onReady @@ -31,15 +39,15 @@ module.exports = { */ async preBootWeb() { try { - WIKI.cache = require('./cache').init() - WIKI.scheduler = await require('./scheduler').init() - WIKI.servers = require('./servers') + WIKI.cache = new NodeCache() + WIKI.scheduler = await scheduler.init() + WIKI.servers = servers WIKI.events = { - inbound: new EventEmitter(), - outbound: new EventEmitter() + inbound: new eventemitter2.EventEmitter2(), + outbound: new eventemitter2.EventEmitter2() } - WIKI.extensions = require('./extensions') - WIKI.asar = require('./asar') + WIKI.extensions = extensions + WIKI.asar = asar } catch (err) { WIKI.logger.error(err) process.exit(1) @@ -51,7 +59,7 @@ module.exports = { async bootWeb() { try { await this.preBootWeb() - await require('../web')() + await (await import('../web.mjs')).init() this.postBootWeb() } catch (err) { WIKI.logger.error(err) diff --git a/server/core/logger.js b/server/core/logger.js deleted file mode 100644 index 40dc7e49..00000000 --- a/server/core/logger.js +++ /dev/null @@ -1,60 +0,0 @@ -const chalk = require('chalk') -const EventEmitter = require('events') - -const LEVELS = ['error', 'warn', 'info', 'debug'] -const LEVELSIGNORED = ['verbose', 'silly'] -const LEVELCOLORS = { - error: 'red', - warn: 'yellow', - info: 'green', - debug: 'cyan' -} - -class Logger extends EventEmitter {} -const primaryLogger = new Logger() - -let ignoreNextLevels = false - -primaryLogger.ws = new EventEmitter() - -LEVELS.forEach(lvl => { - primaryLogger[lvl] = (...args) => { - primaryLogger.emit(lvl, ...args) - } - - if (!ignoreNextLevels) { - primaryLogger.on(lvl, (msg) => { - let formatted = '' - if (WIKI.config.logFormat === 'json') { - formatted = JSON.stringify({ - timestamp: new Date().toISOString(), - instance: WIKI.INSTANCE_ID, - level: lvl, - message: msg - }) - } else { - if (msg instanceof Error) { - msg = msg.stack - } - formatted = chalk`${new Date().toISOString()} {dim [${WIKI.INSTANCE_ID}]} {${LEVELCOLORS[lvl]}.bold ${lvl}}: ${msg}` - } - - console.log(formatted) - primaryLogger.ws.emit('log', formatted) - }) - } - if (lvl === WIKI.config.logLevel) { - ignoreNextLevels = true - } -}) - -LEVELSIGNORED.forEach(lvl => { - primaryLogger[lvl] = () => {} -}) - -module.exports = { - loggers: {}, - init () { - return primaryLogger - } -} diff --git a/server/core/logger.mjs b/server/core/logger.mjs new file mode 100644 index 00000000..0b4766b4 --- /dev/null +++ b/server/core/logger.mjs @@ -0,0 +1,61 @@ +import chalk from 'chalk' +import EventEmitter from 'node:events' + +const LEVELS = ['error', 'warn', 'info', 'debug'] +const LEVELSIGNORED = ['verbose', 'silly'] +const LEVELCOLORS = { + error: 'red', + warn: 'yellow', + info: 'green', + debug: 'cyan' +} + +class Logger extends EventEmitter {} + +export default { + loggers: {}, + init () { + const primaryLogger = new Logger() + + let ignoreNextLevels = false + + primaryLogger.ws = new EventEmitter() + + LEVELS.forEach(lvl => { + primaryLogger[lvl] = (...args) => { + primaryLogger.emit(lvl, ...args) + } + + if (!ignoreNextLevels) { + primaryLogger.on(lvl, (msg) => { + let formatted = '' + if (WIKI.config.logFormat === 'json') { + formatted = JSON.stringify({ + timestamp: new Date().toISOString(), + instance: WIKI.INSTANCE_ID, + level: lvl, + message: msg + }) + } else { + if (msg instanceof Error) { + msg = msg.stack + } + formatted = `${new Date().toISOString()} ${chalk.dim('[' + WIKI.INSTANCE_ID + ']')} ${chalk[LEVELCOLORS[lvl]].bold(lvl)}: ${msg}` + } + + console.log(formatted) + primaryLogger.ws.emit('log', formatted) + }) + } + if (lvl === WIKI.config.logLevel) { + ignoreNextLevels = true + } + }) + + LEVELSIGNORED.forEach(lvl => { + primaryLogger[lvl] = () => {} + }) + + return primaryLogger + } +} diff --git a/server/core/mail.js b/server/core/mail.mjs similarity index 79% rename from server/core/mail.js rename to server/core/mail.mjs index e6960741..64a91eaf 100644 --- a/server/core/mail.js +++ b/server/core/mail.mjs @@ -1,13 +1,13 @@ -const nodemailer = require('nodemailer') -const _ = require('lodash') -const fs = require('fs-extra') -const path = require('path') +import nodemailer from 'nodemailer' +import { get, has, kebabCase, set, template } from 'lodash-es' +import fs from 'node:fs/promises' +import path from 'node:path' -module.exports = { +export default { transport: null, templates: {}, init() { - if (_.get(WIKI.config, 'mail.host', '').length > 2) { + if (get(WIKI.config, 'mail.host', '').length > 2) { let conf = { host: WIKI.config.mail.host, port: WIKI.config.mail.port, @@ -17,7 +17,7 @@ module.exports = { rejectUnauthorized: !(WIKI.config.mail.verifySSL === false) } } - if (_.get(WIKI.config, 'mail.user', '').length > 1) { + if (get(WIKI.config, 'mail.user', '').length > 1) { conf = { ...conf, auth: { @@ -26,7 +26,7 @@ module.exports = { } } } - if (_.get(WIKI.config, 'mail.useDKIM', false)) { + if (get(WIKI.config, 'mail.useDKIM', false)) { conf = { ...conf, dkim: { @@ -57,7 +57,7 @@ module.exports = { to: opts.to, subject: `${opts.subject} - ${WIKI.config.title}`, text: opts.text, - html: _.get(this.templates, opts.template)({ + html: get(this.templates, opts.template)({ logo: (WIKI.config.logoUrl.startsWith('http') ? '' : WIKI.config.host) + WIKI.config.logoUrl, siteTitle: WIKI.config.title, copyright: WIKI.config.company.length > 0 ? WIKI.config.company : 'Powered by Wiki.js', @@ -66,11 +66,11 @@ module.exports = { }) }, async loadTemplate(key) { - if (_.has(this.templates, key)) { return } - const keyKebab = _.kebabCase(key) + if (has(this.templates, key)) { return } + const keyKebab = kebabCase(key) try { const rawTmpl = await fs.readFile(path.join(WIKI.SERVERPATH, `templates/${keyKebab}.html`), 'utf8') - _.set(this.templates, key, _.template(rawTmpl)) + set(this.templates, key, template(rawTmpl)) } catch (err) { WIKI.logger.warn(err) throw new WIKI.Error.MailTemplateFailed() diff --git a/server/core/scheduler.js b/server/core/scheduler.mjs similarity index 93% rename from server/core/scheduler.js rename to server/core/scheduler.mjs index 9d5f01ca..e1e09a30 100644 --- a/server/core/scheduler.js +++ b/server/core/scheduler.mjs @@ -1,14 +1,14 @@ -const { DynamicThreadPool } = require('poolifier') -const os = require('node:os') -const autoload = require('auto-load') -const path = require('node:path') -const cronparser = require('cron-parser') -const { DateTime } = require('luxon') -const { v4: uuid } = require('uuid') -const { createDeferred } = require('../helpers/common') -const _ = require('lodash') +import { DynamicThreadPool } from 'poolifier' +import os from 'node:os' +import fs from 'node:fs/promises' +import path from 'node:path' +import cronparser from 'cron-parser' +import { DateTime } from 'luxon' +import { v4 as uuid } from 'uuid' +import { createDeferred } from '../helpers/common.mjs' +import { find, remove } from 'lodash-es' -module.exports = { +export default { workerPool: null, maxWorkers: 1, activeWorkers: 0, @@ -25,7 +25,11 @@ module.exports = { exitHandler: () => WIKI.logger.debug('A worker has gone offline.'), onlineHandler: () => WIKI.logger.debug('New worker is online.') }) - this.tasks = autoload(path.join(WIKI.SERVERPATH, 'tasks/simple')) + this.tasks = {} + for (const f of (await fs.readdir(path.join(WIKI.SERVERPATH, 'tasks/simple')))) { + const taskName = f.replace('.mjs', '') + this.tasks[taskName] = (await import(path.join(WIKI.SERVERPATH, 'tasks/simple', f))).task + } return this }, async start () { @@ -43,7 +47,7 @@ module.exports = { break } case 'jobCompleted': { - const jobPromise = _.find(this.completionPromises, ['id', payload.id]) + const jobPromise = find(this.completionPromises, ['id', payload.id]) if (jobPromise) { if (payload.state === 'success') { jobPromise.resolve() @@ -51,7 +55,7 @@ module.exports = { jobPromise.reject(new Error(payload.errorMessage)) } setTimeout(() => { - _.remove(this.completionPromises, ['id', payload.id]) + remove(this.completionPromises, ['id', payload.id]) }) } break diff --git a/server/core/servers.js b/server/core/servers.mjs similarity index 86% rename from server/core/servers.js rename to server/core/servers.mjs index 8e21c64d..30e6a3de 100644 --- a/server/core/servers.js +++ b/server/core/servers.mjs @@ -1,13 +1,15 @@ -const fs = require('fs-extra') -const http = require('http') -const https = require('https') -const { ApolloServer } = require('apollo-server-express') -const _ = require('lodash') -const io = require('socket.io') -const { ApolloServerPluginLandingPageGraphQLPlayground, ApolloServerPluginLandingPageProductionDefault } = require('apollo-server-core') -const { graphqlUploadExpress } = require('graphql-upload') +import fs from 'node:fs/promises' +import http from 'node:http' +import https from 'node:https' +import { ApolloServer } from 'apollo-server-express' +import { isEmpty } from 'lodash-es' +import { Server as IoServer } from 'socket.io' +import { ApolloServerPluginLandingPageGraphQLPlayground, ApolloServerPluginLandingPageProductionDefault } from 'apollo-server-core' +import graphqlUploadExpress from 'graphql-upload/graphqlUploadExpress.mjs' -module.exports = { +import { initSchema } from '../graph/index.mjs' + +export default { graph: null, http: null, https: null, @@ -69,15 +71,15 @@ module.exports = { const tlsOpts = {} try { if (WIKI.config.ssl.format === 'pem') { - tlsOpts.key = WIKI.config.ssl.inline ? WIKI.config.ssl.key : fs.readFileSync(WIKI.config.ssl.key) - tlsOpts.cert = WIKI.config.ssl.inline ? WIKI.config.ssl.cert : fs.readFileSync(WIKI.config.ssl.cert) + tlsOpts.key = WIKI.config.ssl.inline ? WIKI.config.ssl.key : await fs.readFile(WIKI.config.ssl.key, 'utf-8') + tlsOpts.cert = WIKI.config.ssl.inline ? WIKI.config.ssl.cert : await fs.readFile(WIKI.config.ssl.cert, 'utf-8') } else { - tlsOpts.pfx = WIKI.config.ssl.inline ? WIKI.config.ssl.pfx : fs.readFileSync(WIKI.config.ssl.pfx) + tlsOpts.pfx = WIKI.config.ssl.inline ? WIKI.config.ssl.pfx : await fs.readFile(WIKI.config.ssl.pfx, 'utf-8') } - if (!_.isEmpty(WIKI.config.ssl.passphrase)) { + if (!isEmpty(WIKI.config.ssl.passphrase)) { tlsOpts.passphrase = WIKI.config.ssl.passphrase } - if (!_.isEmpty(WIKI.config.ssl.dhparam)) { + if (!isEmpty(WIKI.config.ssl.dhparam)) { tlsOpts.dhparam = WIKI.config.ssl.dhparam } } catch (err) { @@ -127,7 +129,7 @@ module.exports = { * Start GraphQL Server */ async startGraphQL () { - const graphqlSchema = require('../graph') + const graphqlSchema = await initSchema() this.graph = new ApolloServer({ schema: graphqlSchema, csrfPrevention: true, @@ -155,13 +157,13 @@ module.exports = { */ async initWebSocket() { if (this.https) { - this.ws = new io.Server(this.https, { + this.ws = new IoServer(this.https, { path: '/_ws/', serveClient: false }) WIKI.logger.info(`WebSocket Server attached to HTTPS Server [ OK ]`) } else { - this.ws = new io.Server(this.http, { + this.ws = new IoServer(this.http, { path: '/_ws/', serveClient: false, cors: true // TODO: dev only, replace with app settings once stable diff --git a/server/core/system.js b/server/core/system.js deleted file mode 100644 index 7f94415f..00000000 --- a/server/core/system.js +++ /dev/null @@ -1,21 +0,0 @@ -const fs = require('fs-extra') -const path = require('path') - -module.exports = { - updates: { - channel: 'BETA', - version: WIKI.version, - releaseDate: WIKI.releaseDate, - minimumVersionRequired: '3.0.0-beta.0', - minimumNodeRequired: '18.0.0' - }, - init () { - fs.ensureDir(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'assets')) - fs.ensureDir(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'uploads')) - - // Clear content cache - fs.emptyDir(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'cache')) - - return this - } -} diff --git a/server/core/system.mjs b/server/core/system.mjs new file mode 100644 index 00000000..b639b579 --- /dev/null +++ b/server/core/system.mjs @@ -0,0 +1,21 @@ +import fse from 'fs-extra' +import path from 'node:path' + +export default { + updates: { + channel: 'BETA', + version: WIKI.version, + releaseDate: WIKI.releaseDate, + minimumVersionRequired: '3.0.0-beta.0', + minimumNodeRequired: '18.0.0' + }, + init () { + fse.ensureDir(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'assets')) + fse.ensureDir(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'uploads')) + + // Clear content cache + fse.emptyDir(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'cache')) + + return this + } +} diff --git a/server/db/migrations/3.0.0.js b/server/db/migrations/3.0.0.mjs similarity index 99% rename from server/db/migrations/3.0.0.js rename to server/db/migrations/3.0.0.mjs index e02dff04..80bb1843 100644 --- a/server/db/migrations/3.0.0.js +++ b/server/db/migrations/3.0.0.mjs @@ -1,10 +1,10 @@ -const { v4: uuid } = require('uuid') -const bcrypt = require('bcryptjs-then') -const crypto = require('crypto') -const { DateTime } = require('luxon') -const pem2jwk = require('pem-jwk').pem2jwk +import { v4 as uuid } from 'uuid' +import bcrypt from 'bcryptjs-then' +import crypto from 'node:crypto' +import { DateTime } from 'luxon' +import { pem2jwk } from 'pem-jwk' -exports.up = async knex => { +export async function up (knex) { WIKI.logger.info('Running 3.0.0 database migration...') // ===================================== @@ -778,4 +778,4 @@ exports.up = async knex => { WIKI.logger.info('Completed 3.0.0 database migration.') } -exports.down = knex => { } +export function down (knex) { } diff --git a/server/db/migrator-source.js b/server/db/migrator-source.js deleted file mode 100644 index b1e8a626..00000000 --- a/server/db/migrator-source.js +++ /dev/null @@ -1,27 +0,0 @@ -const path = require('path') -const fs = require('fs-extra') -const semver = require('semver') - -const baseMigrationPath = path.join(WIKI.SERVERPATH, 'db/migrations') - -module.exports = { - /** - * Gets the migration names - * @returns Promise - */ - async getMigrations() { - const migrationFiles = await fs.readdir(baseMigrationPath) - return migrationFiles.map(m => m.replace('.js', '')).sort(semver.compare).map(m => ({ - file: m, - directory: baseMigrationPath - })) - }, - - getMigrationName(migration) { - return migration.file.indexOf('.js') >= 0 ? migration.file : `${migration.file}.js` - }, - - getMigration(migration) { - return require(path.join(baseMigrationPath, migration.file)) - } -} diff --git a/server/db/migrator-source.mjs b/server/db/migrator-source.mjs new file mode 100644 index 00000000..ee866331 --- /dev/null +++ b/server/db/migrator-source.mjs @@ -0,0 +1,26 @@ +import path from 'node:path' +import fse from 'fs-extra' +import semver from 'semver' + +export default { + /** + * Gets the migration names + * @returns Promise + */ + async getMigrations() { + const baseMigrationPath = path.join(WIKI.SERVERPATH, 'db/migrations') + const migrationFiles = await fse.readdir(baseMigrationPath) + return migrationFiles.map(m => m.replace('.mjs', '')).sort(semver.compare).map(m => ({ + file: m, + directory: baseMigrationPath + })) + }, + + getMigrationName(migration) { + return migration.file.indexOf('.mjs') >= 0 ? migration.file : `${migration.file}.mjs` + }, + + async getMigration(migration) { + return import(path.join(WIKI.SERVERPATH, 'db/migrations', `${migration.file}.mjs`)) + } +} diff --git a/server/graph/index.js b/server/graph/index.js deleted file mode 100644 index be410ab0..00000000 --- a/server/graph/index.js +++ /dev/null @@ -1,54 +0,0 @@ -const _ = require('lodash') -const fs = require('fs') -const path = require('path') -const autoload = require('auto-load') -const { makeExecutableSchema } = require('@graphql-tools/schema') -const { defaultKeyGenerator, rateLimitDirective } = require('graphql-rate-limit-directive') -const { GraphQLUpload } = require('graphql-upload') - -// Rate Limiter - -const { rateLimitDirectiveTypeDefs, rateLimitDirectiveTransformer } = rateLimitDirective({ - keyGenerator: (directiveArgs, source, args, context, info) => `${context.req.ip}:${defaultKeyGenerator(directiveArgs, source, args, context, info)}` -}) - -// Schemas - -WIKI.logger.info(`Loading GraphQL Schema...`) -const typeDefs = [ - rateLimitDirectiveTypeDefs -] -const schemas = fs.readdirSync(path.join(WIKI.SERVERPATH, 'graph/schemas')) -schemas.forEach(schema => { - typeDefs.push(fs.readFileSync(path.join(WIKI.SERVERPATH, `graph/schemas/${schema}`), 'utf8')) -}) - -// Resolvers - -WIKI.logger.info(`Loading GraphQL Resolvers...`) -let resolvers = { - Date: require('./scalars/date'), - JSON: require('./scalars/json'), - UUID: require('./scalars/uuid'), - Upload: GraphQLUpload -} -const resolversObj = _.values(autoload(path.join(WIKI.SERVERPATH, 'graph/resolvers'))) -resolversObj.forEach(resolver => { - _.merge(resolvers, resolver) -}) - -// Make executable schema - -WIKI.logger.info(`Compiling GraphQL Schema...`) -let schema = makeExecutableSchema({ - typeDefs, - resolvers -}) - -// Apply schema transforms - -schema = rateLimitDirectiveTransformer(schema) - -WIKI.logger.info(`GraphQL Schema: [ OK ]`) - -module.exports = schema diff --git a/server/graph/index.mjs b/server/graph/index.mjs new file mode 100644 index 00000000..116c16f5 --- /dev/null +++ b/server/graph/index.mjs @@ -0,0 +1,61 @@ +import { merge } from 'lodash-es' +import fs from 'node:fs/promises' +import path from 'node:path' +import { makeExecutableSchema } from '@graphql-tools/schema' +import { defaultKeyGenerator, rateLimitDirective } from 'graphql-rate-limit-directive' +import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs' + +import DateScalar from './scalars/date.mjs' +import JSONScalar from './scalars/json.mjs' +import UUIDScalar from './scalars/uuid.mjs' + +export async function initSchema () { + // Rate Limiter + + const { rateLimitDirectiveTypeDefs, rateLimitDirectiveTransformer } = rateLimitDirective({ + keyGenerator: (directiveArgs, source, args, context, info) => `${context.req.ip}:${defaultKeyGenerator(directiveArgs, source, args, context, info)}` + }) + + // Schemas + + WIKI.logger.info(`Loading GraphQL Schema...`) + const typeDefs = [ + rateLimitDirectiveTypeDefs + ] + const schemaList = await fs.readdir(path.join(WIKI.SERVERPATH, 'graph/schemas')) + for (const schemaFile of schemaList) { + typeDefs.push(await fs.readFile(path.join(WIKI.SERVERPATH, `graph/schemas/${schemaFile}`), 'utf8')) + } + + // Resolvers + + WIKI.logger.info(`Loading GraphQL Resolvers...`) + let resolvers = { + Date: DateScalar, + JSON: JSONScalar, + UUID: UUIDScalar, + Upload: GraphQLUpload + } + + const resolverList = await fs.readdir(path.join(WIKI.SERVERPATH, 'graph/resolvers')) + for (const resolverFile of resolverList) { + const resolver = (await import(path.join(WIKI.SERVERPATH, 'graph/resolvers', resolverFile))).default + merge(resolvers, resolver) + } + + // Make executable schema + + WIKI.logger.info(`Compiling GraphQL Schema...`) + let schema = makeExecutableSchema({ + typeDefs, + resolvers + }) + + // Apply schema transforms + + schema = rateLimitDirectiveTransformer(schema) + + WIKI.logger.info(`GraphQL Schema: [ OK ]`) + + return schema +} diff --git a/server/graph/resolvers/analytics.js b/server/graph/resolvers/analytics.mjs similarity index 58% rename from server/graph/resolvers/analytics.js rename to server/graph/resolvers/analytics.mjs index e8d43a17..911745cb 100644 --- a/server/graph/resolvers/analytics.js +++ b/server/graph/resolvers/analytics.mjs @@ -1,17 +1,17 @@ -const _ = require('lodash') -const graphHelper = require('../../helpers/graph') +import { find, get, reduce, set, sortBy, transform } from 'lodash-es' +import { generateError, generateSuccess } from '../../helpers/graph.mjs' -module.exports = { +export default { Query: { async analyticsProviders(obj, args, context, info) { let providers = await WIKI.db.analytics.getProviders(args.isEnabled) providers = providers.map(stg => { - const providerInfo = _.find(WIKI.data.analytics, ['key', stg.key]) || {} + const providerInfo = find(WIKI.data.analytics, ['key', stg.key]) || {} return { ...providerInfo, ...stg, - config: _.sortBy(_.transform(stg.config, (res, value, key) => { - const configData = _.get(providerInfo.props, key, {}) + config: sortBy(transform(stg.config, (res, value, key) => { + const configData = get(providerInfo.props, key, {}) res.push({ key, value: JSON.stringify({ @@ -31,18 +31,18 @@ module.exports = { for (let str of args.providers) { await WIKI.db.analytics.query().patch({ isEnabled: str.isEnabled, - config: _.reduce(str.config, (result, value, key) => { - _.set(result, `${value.key}`, _.get(JSON.parse(value.value), 'v', null)) + config: reduce(str.config, (result, value, key) => { + set(result, `${value.key}`, get(JSON.parse(value.value), 'v', null)) return result }, {}) }).where('key', str.key) await WIKI.cache.del('analytics') } return { - responseResult: graphHelper.generateSuccess('Providers updated successfully') + responseResult: generateSuccess('Providers updated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } } diff --git a/server/graph/resolvers/asset.js b/server/graph/resolvers/asset.mjs similarity index 93% rename from server/graph/resolvers/asset.js rename to server/graph/resolvers/asset.mjs index 22aa08b7..408d498a 100644 --- a/server/graph/resolvers/asset.js +++ b/server/graph/resolvers/asset.mjs @@ -1,12 +1,12 @@ -const _ = require('lodash') -const sanitize = require('sanitize-filename') -const graphHelper = require('../../helpers/graph') -const path = require('node:path') -const fs = require('fs-extra') -const { v4: uuid } = require('uuid') -const { pipeline } = require('node:stream/promises') - -module.exports = { +import _ from 'lodash-es' +import sanitize from 'sanitize-filename' +import { generateError, generateSuccess } from '../../helpers/graph.mjs' +import path from 'node:path' +import fs from 'fs-extra' +import { v4 as uuid } from 'uuid' +import { pipeline } from 'node:stream/promises' + +export default { Query: { async assetById(obj, args, context) { return null @@ -83,13 +83,13 @@ module.exports = { }) return { - responseResult: graphHelper.generateSuccess('Asset has been renamed successfully.') + responseResult: generateSuccess('Asset has been renamed successfully.') } } else { throw new WIKI.Error.AssetInvalid() } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -122,13 +122,13 @@ module.exports = { }) return { - responseResult: graphHelper.generateSuccess('Asset has been deleted successfully.') + responseResult: generateSuccess('Asset has been deleted successfully.') } } else { throw new WIKI.Error.AssetInvalid() } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -357,13 +357,13 @@ module.exports = { } else { WIKI.logger.debug('Asset(s) uploaded successfully.') return { - operation: graphHelper.generateSuccess('Asset(s) uploaded successfully') + operation: generateSuccess('Asset(s) uploaded successfully') } } } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -373,10 +373,10 @@ module.exports = { try { await WIKI.db.assets.flushTempUploads() return { - responseResult: graphHelper.generateSuccess('Temporary Uploads have been flushed successfully.') + responseResult: generateSuccess('Temporary Uploads have been flushed successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } } diff --git a/server/graph/resolvers/authentication.js b/server/graph/resolvers/authentication.mjs similarity index 80% rename from server/graph/resolvers/authentication.js rename to server/graph/resolvers/authentication.mjs index de1caa8c..358d0b56 100644 --- a/server/graph/resolvers/authentication.js +++ b/server/graph/resolvers/authentication.mjs @@ -1,7 +1,7 @@ -const _ = require('lodash') -const graphHelper = require('../../helpers/graph') +import _ from 'lodash-es' +import { generateError, generateSuccess } from '../../helpers/graph.mjs' -module.exports = { +export default { Query: { /** * List of API Keys @@ -67,11 +67,11 @@ module.exports = { WIKI.events.outbound.emit('reloadApiKeys') return { key, - operation: graphHelper.generateSuccess('API Key created successfully') + operation: generateSuccess('API Key created successfully') } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -82,7 +82,7 @@ module.exports = { const authResult = await WIKI.db.users.login(args, context) return { ...authResult, - operation: graphHelper.generateSuccess('Login success') + operation: generateSuccess('Login success') } } catch (err) { // LDAP Debug Flag @@ -91,7 +91,7 @@ module.exports = { } console.error(err) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -102,10 +102,10 @@ module.exports = { const authResult = await WIKI.db.users.loginTFA(args, context) return { ...authResult, - responseResult: graphHelper.generateSuccess('TFA success') + responseResult: generateSuccess('TFA success') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -116,10 +116,10 @@ module.exports = { const authResult = await WIKI.db.users.loginChangePassword(args, context) return { ...authResult, - responseResult: graphHelper.generateSuccess('Password changed successfully') + responseResult: generateSuccess('Password changed successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -129,10 +129,10 @@ module.exports = { try { await WIKI.db.users.loginForgotPassword(args, context) return { - responseResult: graphHelper.generateSuccess('Password reset request processed.') + responseResult: generateSuccess('Password reset request processed.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -142,10 +142,10 @@ module.exports = { try { await WIKI.db.users.register({ ...args, verify: true }, context) return { - responseResult: graphHelper.generateSuccess('Registration success') + responseResult: generateSuccess('Registration success') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -156,10 +156,10 @@ module.exports = { WIKI.config.api.isEnabled = args.enabled await WIKI.configSvc.saveToDb(['api']) return { - operation: graphHelper.generateSuccess('API State changed successfully') + operation: generateSuccess('API State changed successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -173,10 +173,10 @@ module.exports = { await WIKI.auth.reloadApiKeys() WIKI.events.outbound.emit('reloadApiKeys') return { - operation: graphHelper.generateSuccess('API Key revoked successfully') + operation: generateSuccess('API Key revoked successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -226,10 +226,10 @@ module.exports = { await WIKI.auth.activateStrategies() WIKI.events.outbound.emit('reloadAuthStrategies') return { - responseResult: graphHelper.generateSuccess('Strategies updated successfully') + responseResult: generateSuccess('Strategies updated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -239,10 +239,10 @@ module.exports = { try { await WIKI.auth.regenerateCertificates() return { - responseResult: graphHelper.generateSuccess('Certificates have been regenerated successfully.') + responseResult: generateSuccess('Certificates have been regenerated successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -252,10 +252,10 @@ module.exports = { try { await WIKI.auth.resetGuestUser() return { - responseResult: graphHelper.generateSuccess('Guest user has been reset successfully.') + responseResult: generateSuccess('Guest user has been reset successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } }, diff --git a/server/graph/resolvers/comment.js b/server/graph/resolvers/comment.mjs similarity index 86% rename from server/graph/resolvers/comment.js rename to server/graph/resolvers/comment.mjs index b564872c..5dd0d008 100644 --- a/server/graph/resolvers/comment.js +++ b/server/graph/resolvers/comment.mjs @@ -1,7 +1,7 @@ -const _ = require('lodash') -const graphHelper = require('../../helpers/graph') +import _ from 'lodash-es' +import { generateError, generateSuccess } from '../../helpers/graph.mjs' -module.exports = { +export default { Query: { /** * Fetch list of Comments Providers @@ -90,11 +90,11 @@ module.exports = { ip: context.req.ip }) return { - responseResult: graphHelper.generateSuccess('New comment posted successfully'), + responseResult: generateSuccess('New comment posted successfully'), id: cmId } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -108,11 +108,11 @@ module.exports = { ip: context.req.ip }) return { - responseResult: graphHelper.generateSuccess('Comment updated successfully'), + responseResult: generateSuccess('Comment updated successfully'), render: cmRender } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -126,10 +126,10 @@ module.exports = { ip: context.req.ip }) return { - responseResult: graphHelper.generateSuccess('Comment deleted successfully') + responseResult: generateSuccess('Comment deleted successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -148,10 +148,10 @@ module.exports = { } await WIKI.db.commentProviders.initProvider() return { - responseResult: graphHelper.generateSuccess('Comment Providers updated successfully') + responseResult: generateSuccess('Comment Providers updated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } } diff --git a/server/graph/resolvers/group.js b/server/graph/resolvers/group.mjs similarity index 91% rename from server/graph/resolvers/group.js rename to server/graph/resolvers/group.mjs index 50ab15fe..1754149f 100644 --- a/server/graph/resolvers/group.js +++ b/server/graph/resolvers/group.mjs @@ -1,9 +1,9 @@ -const graphHelper = require('../../helpers/graph') -const safeRegex = require('safe-regex') -const _ = require('lodash') -const { v4: uuid } = require('uuid') +import { generateError, generateSuccess } from '../../helpers/graph.mjs' +import safeRegex from 'safe-regex' +import _ from 'lodash-es' +import { v4 as uuid } from 'uuid' -module.exports = { +export default { Query: { /** * FETCH ALL GROUPS @@ -71,7 +71,7 @@ module.exports = { WIKI.events.outbound.emit('addAuthRevoke', { id: usr.id, kind: 'u' }) return { - operation: graphHelper.generateSuccess('User has been assigned to group.') + operation: generateSuccess('User has been assigned to group.') } }, /** @@ -90,7 +90,7 @@ module.exports = { await WIKI.auth.reloadGroups() WIKI.events.outbound.emit('reloadGroups') return { - operation: graphHelper.generateSuccess('Group created successfully.'), + operation: generateSuccess('Group created successfully.'), group } }, @@ -111,7 +111,7 @@ module.exports = { WIKI.events.outbound.emit('reloadGroups') return { - operation: graphHelper.generateSuccess('Group has been deleted.') + operation: generateSuccess('Group has been deleted.') } }, /** @@ -138,7 +138,7 @@ module.exports = { WIKI.events.outbound.emit('addAuthRevoke', { id: usr.id, kind: 'u' }) return { - operation: graphHelper.generateSuccess('User has been unassigned from group.') + operation: generateSuccess('User has been unassigned from group.') } }, /** @@ -193,7 +193,7 @@ module.exports = { WIKI.events.outbound.emit('reloadGroups') return { - operation: graphHelper.generateSuccess('Group has been updated.') + operation: generateSuccess('Group has been updated.') } } }, diff --git a/server/graph/resolvers/hooks.js b/server/graph/resolvers/hooks.mjs similarity index 83% rename from server/graph/resolvers/hooks.js rename to server/graph/resolvers/hooks.mjs index 1fbb7eae..85333f6e 100644 --- a/server/graph/resolvers/hooks.js +++ b/server/graph/resolvers/hooks.mjs @@ -1,7 +1,7 @@ -const graphHelper = require('../../helpers/graph') -const _ = require('lodash') +import { generateError, generateSuccess } from '../../helpers/graph.mjs' +import _ from 'lodash-es' -module.exports = { +export default { Query: { async hooks () { return WIKI.db.hooks.query().orderBy('name') @@ -31,11 +31,11 @@ module.exports = { WIKI.logger.debug(`New Hook ${newHook.id} created successfully.`) return { - operation: graphHelper.generateSuccess('Hook created successfully'), + operation: generateSuccess('Hook created successfully'), hook: newHook } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -63,10 +63,10 @@ module.exports = { WIKI.logger.debug(`Hook ${args.id} updated successfully.`) return { - operation: graphHelper.generateSuccess('Hook updated successfully') + operation: generateSuccess('Hook updated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -77,10 +77,10 @@ module.exports = { await WIKI.db.hooks.deleteHook(args.id) WIKI.logger.debug(`Hook ${args.id} deleted successfully.`) return { - operation: graphHelper.generateSuccess('Hook deleted successfully') + operation: generateSuccess('Hook deleted successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } } diff --git a/server/graph/resolvers/localization.js b/server/graph/resolvers/localization.mjs similarity index 82% rename from server/graph/resolvers/localization.js rename to server/graph/resolvers/localization.mjs index 0564afeb..9a7d61c0 100644 --- a/server/graph/resolvers/localization.js +++ b/server/graph/resolvers/localization.mjs @@ -1,7 +1,7 @@ -const graphHelper = require('../../helpers/graph') -const _ = require('lodash') +import { generateError, generateSuccess } from '../../helpers/graph.mjs' +import _ from 'lodash-es' -module.exports = { +export default { Query: { async locales(obj, args, context, info) { let remoteLocales = await WIKI.cache.get('locales') @@ -29,10 +29,10 @@ module.exports = { }, args.locale) await job.finished return { - responseResult: graphHelper.generateSuccess('Locale downloaded successfully') + responseResult: generateSuccess('Locale downloaded successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async updateLocale(obj, args, context) { @@ -53,10 +53,10 @@ module.exports = { await WIKI.cache.del('nav:locales') return { - responseResult: graphHelper.generateSuccess('Locale config updated') + responseResult: generateSuccess('Locale config updated') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } } diff --git a/server/graph/resolvers/mail.js b/server/graph/resolvers/mail.mjs similarity index 80% rename from server/graph/resolvers/mail.js rename to server/graph/resolvers/mail.mjs index 1e071c66..fe92c9c7 100644 --- a/server/graph/resolvers/mail.js +++ b/server/graph/resolvers/mail.mjs @@ -1,7 +1,7 @@ -const _ = require('lodash') -const graphHelper = require('../../helpers/graph') +import _ from 'lodash-es' +import { generateError, generateSuccess } from '../../helpers/graph.mjs' -module.exports = { +export default { Query: { async mailConfig(obj, args, context, info) { return { @@ -28,10 +28,10 @@ module.exports = { }) return { - operation: graphHelper.generateSuccess('Test email sent successfully.') + operation: generateSuccess('Test email sent successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async updateMailConfig(obj, args, context) { @@ -56,10 +56,10 @@ module.exports = { WIKI.mail.init() return { - operation: graphHelper.generateSuccess('Mail configuration updated successfully.') + operation: generateSuccess('Mail configuration updated successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } } diff --git a/server/graph/resolvers/navigation.js b/server/graph/resolvers/navigation.mjs similarity index 71% rename from server/graph/resolvers/navigation.js rename to server/graph/resolvers/navigation.mjs index 879308f0..169c51f8 100644 --- a/server/graph/resolvers/navigation.js +++ b/server/graph/resolvers/navigation.mjs @@ -1,6 +1,6 @@ -const graphHelper = require('../../helpers/graph') +import { generateError, generateSuccess } from '../../helpers/graph.mjs' -module.exports = { +export default { Query: { async navigationTree (obj, args, context, info) { return WIKI.db.navigation.getTree({ cache: false, locale: 'all', bypassAuth: true }) @@ -20,10 +20,10 @@ module.exports = { } return { - responseResult: graphHelper.generateSuccess('Navigation updated successfully') + responseResult: generateSuccess('Navigation updated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async updateNavigationConfig (obj, args, context) { @@ -34,10 +34,10 @@ module.exports = { await WIKI.configSvc.saveToDb(['nav']) return { - responseResult: graphHelper.generateSuccess('Navigation config updated successfully') + responseResult: generateSuccess('Navigation config updated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } } diff --git a/server/graph/resolvers/page.js b/server/graph/resolvers/page.mjs similarity index 89% rename from server/graph/resolvers/page.js rename to server/graph/resolvers/page.mjs index 1011f905..b01f4ca9 100644 --- a/server/graph/resolvers/page.js +++ b/server/graph/resolvers/page.mjs @@ -1,8 +1,8 @@ -const _ = require('lodash') -const graphHelper = require('../../helpers/graph') -const pageHelper = require('../../helpers/page') +import _ from 'lodash-es' +import { generateError, generateSuccess } from '../../helpers/graph.mjs' +import { parsePath }from '../../helpers/page.mjs' -module.exports = { +export default { Query: { /** * PAGE HISTORY @@ -169,7 +169,7 @@ module.exports = { */ async pageByPath (obj, args, context, info) { // console.info(info) - const pageArgs = pageHelper.parsePath(args.path) + const pageArgs = parsePath(args.path) const page = await WIKI.db.pages.getPageFromDb({ ...pageArgs, siteId: args.siteId @@ -393,11 +393,11 @@ module.exports = { user: context.req.user }) return { - operation: graphHelper.generateSuccess('Page created successfully.'), + operation: generateSuccess('Page created successfully.'), page } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -410,11 +410,11 @@ module.exports = { user: context.req.user }) return { - operation: graphHelper.generateSuccess('Page has been updated.'), + operation: generateSuccess('Page has been updated.'), page } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -427,10 +427,10 @@ module.exports = { user: context.req.user }) return { - responseResult: graphHelper.generateSuccess('Page has been converted.') + responseResult: generateSuccess('Page has been converted.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -443,10 +443,10 @@ module.exports = { user: context.req.user }) return { - responseResult: graphHelper.generateSuccess('Page has been moved.') + responseResult: generateSuccess('Page has been moved.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -459,10 +459,10 @@ module.exports = { user: context.req.user }) return { - responseResult: graphHelper.generateSuccess('Page has been deleted.') + responseResult: generateSuccess('Page has been deleted.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -478,10 +478,10 @@ module.exports = { throw new Error('This tag does not exist.') } return { - responseResult: graphHelper.generateSuccess('Tag has been deleted.') + responseResult: generateSuccess('Tag has been deleted.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -499,10 +499,10 @@ module.exports = { throw new Error('This tag does not exist.') } return { - responseResult: graphHelper.generateSuccess('Tag has been updated successfully.') + responseResult: generateSuccess('Tag has been updated successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -513,10 +513,10 @@ module.exports = { await WIKI.db.pages.flushCache() WIKI.events.outbound.emit('flushCache') return { - responseResult: graphHelper.generateSuccess('Pages Cache has been flushed successfully.') + responseResult: generateSuccess('Pages Cache has been flushed successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -526,11 +526,11 @@ module.exports = { try { const count = await WIKI.db.pages.migrateToLocale(args) return { - responseResult: graphHelper.generateSuccess('Migrated content to target locale successfully.'), + responseResult: generateSuccess('Migrated content to target locale successfully.'), count } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -540,10 +540,10 @@ module.exports = { try { await WIKI.db.pages.rebuildTree() return { - responseResult: graphHelper.generateSuccess('Page tree rebuilt successfully.') + responseResult: generateSuccess('Page tree rebuilt successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -557,10 +557,10 @@ module.exports = { } await WIKI.db.pages.renderPage(page) return { - responseResult: graphHelper.generateSuccess('Page rendered successfully.') + responseResult: generateSuccess('Page rendered successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -593,10 +593,10 @@ module.exports = { }) return { - responseResult: graphHelper.generateSuccess('Page version restored successfully.') + responseResult: generateSuccess('Page version restored successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -606,10 +606,10 @@ module.exports = { try { await WIKI.db.pageHistory.purge(args.olderThan) return { - responseResult: graphHelper.generateSuccess('Page history purged successfully.') + responseResult: generateSuccess('Page history purged successfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } }, diff --git a/server/graph/resolvers/rendering.js b/server/graph/resolvers/rendering.mjs similarity index 86% rename from server/graph/resolvers/rendering.js rename to server/graph/resolvers/rendering.mjs index 75ea0eb8..55383045 100644 --- a/server/graph/resolvers/rendering.js +++ b/server/graph/resolvers/rendering.mjs @@ -1,7 +1,7 @@ -const _ = require('lodash') -const graphHelper = require('../../helpers/graph') +import _ from 'lodash-es' +import { generateError, generateSuccess } from '../../helpers/graph.mjs' -module.exports = { +export default { Query: { async renderers(obj, args, context, info) { let renderers = await WIKI.db.renderers.getRenderers() @@ -42,10 +42,10 @@ module.exports = { }).where('key', rdr.key) } return { - responseResult: graphHelper.generateSuccess('Renderers updated successfully') + responseResult: generateSuccess('Renderers updated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } } diff --git a/server/graph/resolvers/search.js b/server/graph/resolvers/search.js deleted file mode 100644 index ee7a448d..00000000 --- a/server/graph/resolvers/search.js +++ /dev/null @@ -1,16 +0,0 @@ -const graphHelper = require('../../helpers/graph') - -module.exports = { - Mutation: { - async rebuildSearchIndex (obj, args, context) { - try { - await WIKI.data.searchEngine.rebuild() - return { - responseResult: graphHelper.generateSuccess('Index rebuilt successfully') - } - } catch (err) { - return graphHelper.generateError(err) - } - } - } -} diff --git a/server/graph/resolvers/search.mjs b/server/graph/resolvers/search.mjs new file mode 100644 index 00000000..22e9a4d7 --- /dev/null +++ b/server/graph/resolvers/search.mjs @@ -0,0 +1,16 @@ +import { generateError, generateSuccess } from '../../helpers/graph.mjs' + +export default { + Mutation: { + async rebuildSearchIndex (obj, args, context) { + try { + await WIKI.data.searchEngine.rebuild() + return { + responseResult: generateSuccess('Index rebuilt successfully') + } + } catch (err) { + return generateError(err) + } + } + } +} diff --git a/server/graph/resolvers/site.js b/server/graph/resolvers/site.mjs similarity index 91% rename from server/graph/resolvers/site.js rename to server/graph/resolvers/site.mjs index 0df8150f..b3efefb4 100644 --- a/server/graph/resolvers/site.js +++ b/server/graph/resolvers/site.mjs @@ -1,11 +1,11 @@ -const graphHelper = require('../../helpers/graph') -const _ = require('lodash') -const CleanCSS = require('clean-css') -const path = require('path') -const fs = require('fs-extra') -const { v4: uuid } = require('uuid') +import { generateError, generateSuccess } from '../../helpers/graph.mjs' +import _ from 'lodash-es' +import CleanCSS from 'clean-css' +import path from 'node:path' +import fs from 'fs-extra' +import { v4 as uuid } from 'uuid' -module.exports = { +export default { Query: { async sites () { const sites = await WIKI.db.sites.query().orderBy('hostname') @@ -72,12 +72,12 @@ module.exports = { title: args.title }) return { - operation: graphHelper.generateSuccess('Site created successfully'), + operation: generateSuccess('Site created successfully'), site: newSite } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -117,11 +117,11 @@ module.exports = { }) return { - operation: graphHelper.generateSuccess('Site updated successfully') + operation: generateSuccess('Site updated successfully') } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -137,11 +137,11 @@ module.exports = { // -> Delete site await WIKI.db.sites.deleteSite(args.id) return { - operation: graphHelper.generateSuccess('Site deleted successfully') + operation: generateSuccess('Site deleted successfully') } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -197,11 +197,11 @@ module.exports = { }).onConflict('id').merge() WIKI.logger.info('New site logo processed successfully.') return { - operation: graphHelper.generateSuccess('Site logo uploaded successfully') + operation: generateSuccess('Site logo uploaded successfully') } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -258,11 +258,11 @@ module.exports = { }).onConflict('id').merge() WIKI.logger.info('New site favicon processed successfully.') return { - operation: graphHelper.generateSuccess('Site favicon uploaded successfully') + operation: generateSuccess('Site favicon uploaded successfully') } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -316,11 +316,11 @@ module.exports = { }).onConflict('id').merge() WIKI.logger.info('New site login bg processed successfully.') return { - operation: graphHelper.generateSuccess('Site login bg uploaded successfully') + operation: generateSuccess('Site login bg uploaded successfully') } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } } } diff --git a/server/graph/resolvers/storage.js b/server/graph/resolvers/storage.mjs similarity index 92% rename from server/graph/resolvers/storage.js rename to server/graph/resolvers/storage.mjs index 3abe6695..5821e84b 100644 --- a/server/graph/resolvers/storage.js +++ b/server/graph/resolvers/storage.mjs @@ -1,8 +1,8 @@ -const _ = require('lodash') -const graphHelper = require('../../helpers/graph') -const { v4: uuid } = require('uuid') +import _ from 'lodash-es' +import { generateError, generateSuccess } from '../../helpers/graph.mjs' +import { v4 as uuid } from 'uuid' -module.exports = { +export default { Query: { async storageTargets (obj, args, context, info) { const dbTargets = await WIKI.db.storage.getTargets({ siteId: args.siteId }) @@ -164,10 +164,10 @@ module.exports = { } // await WIKI.db.storage.initTargets() return { - status: graphHelper.generateSuccess('Storage targets updated successfully') + status: generateSuccess('Storage targets updated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async setupStorageTarget (obj, args, context) { @@ -186,11 +186,11 @@ module.exports = { const result = await WIKI.storage.modules[md.key].setup(args.targetId, args.state) return { - status: graphHelper.generateSuccess('Storage target setup step succeeded'), + status: generateSuccess('Storage target setup step succeeded'), state: result } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async destroyStorageTargetSetup (obj, args, context) { @@ -209,20 +209,20 @@ module.exports = { await WIKI.storage.modules[md.key].setupDestroy(args.targetId) return { - status: graphHelper.generateSuccess('Storage target setup configuration destroyed succesfully.') + status: generateSuccess('Storage target setup configuration destroyed succesfully.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async executeStorageAction (obj, args, context) { try { await WIKI.db.storage.executeAction(args.targetKey, args.handler) return { - status: graphHelper.generateSuccess('Action completed.') + status: generateSuccess('Action completed.') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } } } diff --git a/server/graph/resolvers/system.js b/server/graph/resolvers/system.mjs similarity index 89% rename from server/graph/resolvers/system.js rename to server/graph/resolvers/system.mjs index 8e636890..c6175440 100644 --- a/server/graph/resolvers/system.js +++ b/server/graph/resolvers/system.mjs @@ -1,14 +1,16 @@ -const _ = require('lodash') -const util = require('node:util') -const getos = util.promisify(require('getos')) -const os = require('node:os') -const filesize = require('filesize') -const path = require('path') -const fs = require('fs-extra') -const { DateTime } = require('luxon') -const graphHelper = require('../../helpers/graph') +import _ from 'lodash-es' +import util from 'node:util' +import getosSync from 'getos' +import os from 'node:os' +import filesize from 'filesize' +import path from 'node:path' +import fs from 'fs-extra' +import { DateTime } from 'luxon' +import { generateError, generateSuccess } from '../../helpers/graph.mjs' -module.exports = { +const getos = util.promisify(getosSync) + +export default { Query: { systemFlags () { return WIKI.config.flags @@ -89,18 +91,18 @@ module.exports = { throw new Error('Job has already entered active state or does not exist.') } return { - operation: graphHelper.generateSuccess('Cancelled job successfully.') + operation: generateSuccess('Cancelled job successfully.') } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } }, async disconnectWS (obj, args, context) { WIKI.servers.ws.disconnectSockets(true) WIKI.logger.info('All active websocket connections have been terminated.') return { - operation: graphHelper.generateSuccess('All websocket connections closed successfully.') + operation: generateSuccess('All websocket connections closed successfully.') } }, async installExtension (obj, args, context) { @@ -108,10 +110,10 @@ module.exports = { await WIKI.extensions.ext[args.key].install() // TODO: broadcast ext install return { - operation: graphHelper.generateSuccess('Extension installed successfully') + operation: generateSuccess('Extension installed successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async retryJob (obj, args, context) { @@ -140,11 +142,11 @@ module.exports = { }) WIKI.logger.info(`Job ${args.id} has been rescheduled [ OK ]`) return { - operation: graphHelper.generateSuccess('Job rescheduled successfully.') + operation: generateSuccess('Job rescheduled successfully.') } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } }, async updateSystemFlags (obj, args, context) { @@ -155,7 +157,7 @@ module.exports = { await WIKI.configSvc.applyFlags() await WIKI.configSvc.saveToDb(['flags']) return { - operation: graphHelper.generateSuccess('System Flags applied successfully') + operation: generateSuccess('System Flags applied successfully') } }, async updateSystemSecurity (obj, args, context) { @@ -163,7 +165,7 @@ module.exports = { // TODO: broadcast config update await WIKI.configSvc.saveToDb(['security']) return { - operation: graphHelper.generateSuccess('System Security configuration applied successfully') + operation: generateSuccess('System Security configuration applied successfully') } } }, diff --git a/server/graph/resolvers/tree.js b/server/graph/resolvers/tree.mjs similarity index 92% rename from server/graph/resolvers/tree.js rename to server/graph/resolvers/tree.mjs index e2f17c0b..2d3d9719 100644 --- a/server/graph/resolvers/tree.js +++ b/server/graph/resolvers/tree.mjs @@ -1,5 +1,5 @@ -const _ = require('lodash') -const graphHelper = require('../../helpers/graph') +import _ from 'lodash-es' +import { generateError, generateSuccess } from '../../helpers/graph.mjs' const typeResolvers = { folder: 'TreeItemFolder', @@ -10,7 +10,7 @@ const typeResolvers = { const rePathName = /^[a-z0-9-]+$/ const reTitle = /^[^<>"]+$/ -module.exports = { +export default { Query: { /** * FETCH TREE @@ -162,11 +162,11 @@ module.exports = { await WIKI.db.tree.createFolder(args) return { - operation: graphHelper.generateSuccess('Folder created successfully') + operation: generateSuccess('Folder created successfully') } } catch (err) { WIKI.logger.debug(`Failed to create folder: ${err.message}`) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -177,11 +177,11 @@ module.exports = { await WIKI.db.tree.renameFolder(args) return { - operation: graphHelper.generateSuccess('Folder renamed successfully') + operation: generateSuccess('Folder renamed successfully') } } catch (err) { WIKI.logger.debug(`Failed to rename folder ${args.folderId}: ${err.message}`) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -192,11 +192,11 @@ module.exports = { await WIKI.db.tree.deleteFolder(args.folderId) return { - operation: graphHelper.generateSuccess('Folder deleted successfully') + operation: generateSuccess('Folder deleted successfully') } } catch (err) { WIKI.logger.debug(`Failed to delete folder ${args.folderId}: ${err.message}`) - return graphHelper.generateError(err) + return generateError(err) } } }, diff --git a/server/graph/resolvers/user.js b/server/graph/resolvers/user.mjs similarity index 86% rename from server/graph/resolvers/user.js rename to server/graph/resolvers/user.mjs index b9900500..c066062d 100644 --- a/server/graph/resolvers/user.js +++ b/server/graph/resolvers/user.mjs @@ -1,9 +1,9 @@ -const graphHelper = require('../../helpers/graph') -const _ = require('lodash') -const path = require('node:path') -const fs = require('fs-extra') +import { generateError, generateSuccess } from '../../helpers/graph.mjs' +import _ from 'lodash-es' +import path from 'node:path' +import fs from 'fs-extra' -module.exports = { +export default { Query: { /** * FETCH ALL USERS @@ -93,10 +93,10 @@ module.exports = { await WIKI.db.users.createNewUser({ ...args, passwordRaw: args.password, isVerified: true }) return { - operation: graphHelper.generateSuccess('User created successfully') + operation: generateSuccess('User created successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async deleteUser (obj, args) { @@ -110,13 +110,13 @@ module.exports = { WIKI.events.outbound.emit('addAuthRevoke', { id: args.id, kind: 'u' }) return { - operation: graphHelper.generateSuccess('User deleted successfully') + operation: generateSuccess('User deleted successfully') } } catch (err) { if (err.message.indexOf('foreign') >= 0) { - return graphHelper.generateError(new WIKI.Error.UserDeleteForeignConstraint()) + return generateError(new WIKI.Error.UserDeleteForeignConstraint()) } else { - return graphHelper.generateError(err) + return generateError(err) } } }, @@ -125,10 +125,10 @@ module.exports = { await WIKI.db.users.updateUser(args.id, args.patch) return { - operation: graphHelper.generateSuccess('User updated successfully') + operation: generateSuccess('User updated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async verifyUser (obj, args) { @@ -136,10 +136,10 @@ module.exports = { await WIKI.db.users.query().patch({ isVerified: true }).findById(args.id) return { - operation: graphHelper.generateSuccess('User verified successfully') + operation: generateSuccess('User verified successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async activateUser (obj, args) { @@ -147,10 +147,10 @@ module.exports = { await WIKI.db.users.query().patch({ isActive: true }).findById(args.id) return { - operation: graphHelper.generateSuccess('User activated successfully') + operation: generateSuccess('User activated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async deactivateUser (obj, args) { @@ -164,10 +164,10 @@ module.exports = { WIKI.events.outbound.emit('addAuthRevoke', { id: args.id, kind: 'u' }) return { - operation: graphHelper.generateSuccess('User deactivated successfully') + operation: generateSuccess('User deactivated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async enableUserTFA (obj, args) { @@ -175,10 +175,10 @@ module.exports = { await WIKI.db.users.query().patch({ tfaIsActive: true, tfaSecret: null }).findById(args.id) return { - operation: graphHelper.generateSuccess('User 2FA enabled successfully') + operation: generateSuccess('User 2FA enabled successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async disableUserTFA (obj, args) { @@ -186,10 +186,10 @@ module.exports = { await WIKI.db.users.query().patch({ tfaIsActive: false, tfaSecret: null }).findById(args.id) return { - operation: graphHelper.generateSuccess('User 2FA disabled successfully') + operation: generateSuccess('User 2FA disabled successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, resetUserPassword (obj, args) { @@ -235,10 +235,10 @@ module.exports = { }) return { - operation: graphHelper.generateSuccess('User profile updated successfully') + operation: generateSuccess('User profile updated successfully') } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, async changePassword (obj, args, context) { @@ -270,11 +270,11 @@ module.exports = { const newToken = await WIKI.db.users.refreshToken(usr) return { - responseResult: graphHelper.generateSuccess('Password changed successfully'), + responseResult: generateSuccess('Password changed successfully'), jwt: newToken.token } } catch (err) { - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -316,11 +316,11 @@ module.exports = { }).onConflict('id').merge() WIKI.logger.debug(`Processed user ${args.id} avatar successfully.`) return { - operation: graphHelper.generateSuccess('User avatar uploaded successfully') + operation: generateSuccess('User avatar uploaded successfully') } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } }, /** @@ -333,11 +333,11 @@ module.exports = { await WIKI.db.knex('userAvatars').where({ id: args.id }).del() WIKI.logger.debug(`Cleared user ${args.id} avatar successfully.`) return { - operation: graphHelper.generateSuccess('User avatar cleared successfully') + operation: generateSuccess('User avatar cleared successfully') } } catch (err) { WIKI.logger.warn(err) - return graphHelper.generateError(err) + return generateError(err) } } }, diff --git a/server/graph/scalars/date.js b/server/graph/scalars/date.mjs similarity index 83% rename from server/graph/scalars/date.js rename to server/graph/scalars/date.mjs index f2939711..8b67f22a 100644 --- a/server/graph/scalars/date.js +++ b/server/graph/scalars/date.mjs @@ -1,12 +1,12 @@ -const gql = require('graphql') -const { DateTime } = require('luxon') +import gql from 'graphql' +import { DateTime } from 'luxon' function parseDateTime (value) { const nDate = DateTime.fromISO(value) return nDate.isValid ? nDate : null } -module.exports = new gql.GraphQLScalarType({ +export default new gql.GraphQLScalarType({ name: 'Date', description: 'ISO date-time string at UTC', parseValue(value) { diff --git a/server/graph/scalars/json.js b/server/graph/scalars/json.mjs similarity index 94% rename from server/graph/scalars/json.js rename to server/graph/scalars/json.mjs index 9fd63409..1513bde0 100644 --- a/server/graph/scalars/json.js +++ b/server/graph/scalars/json.mjs @@ -1,4 +1,4 @@ -const { Kind, GraphQLScalarType } = require('graphql') +import { Kind, GraphQLScalarType } from 'graphql' function ensureObject (value) { if (typeof value !== 'object' || value === null || Array.isArray(value)) { @@ -39,7 +39,7 @@ function parseObject (typeName, ast, variables) { return value } -module.exports = new GraphQLScalarType({ +export default new GraphQLScalarType({ name: 'JSON', description: 'The `JSON` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).', diff --git a/server/graph/scalars/uuid.js b/server/graph/scalars/uuid.mjs similarity index 90% rename from server/graph/scalars/uuid.js rename to server/graph/scalars/uuid.mjs index 046c4b4a..4311a021 100644 --- a/server/graph/scalars/uuid.js +++ b/server/graph/scalars/uuid.mjs @@ -1,4 +1,4 @@ -const { Kind, GraphQLScalarType } = require('graphql') +import { Kind, GraphQLScalarType } from 'graphql' const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i const nilUUID = '00000000-0000-0000-0000-000000000000' @@ -7,7 +7,7 @@ function isUUID (value) { return uuidRegex.test(value) || nilUUID === value } -module.exports = new GraphQLScalarType({ +export default new GraphQLScalarType({ name: 'UUID', description: 'The `UUID` scalar type represents UUID values as specified by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122).', serialize: (value) => { diff --git a/server/helpers/brute-knex.js b/server/helpers/brute-knex.mjs similarity index 96% rename from server/helpers/brute-knex.js rename to server/helpers/brute-knex.mjs index 4c185774..49ba5e18 100644 --- a/server/helpers/brute-knex.js +++ b/server/helpers/brute-knex.mjs @@ -1,6 +1,6 @@ -const AbstractClientStore = require('express-brute/lib/AbstractClientStore') +import AbstractClientStore from 'express-brute/lib/AbstractClientStore.js' -const KnexStore = module.exports = function (options) { +const KnexStore = function (options) { options = options || Object.create(null) AbstractClientStore.apply(this, arguments) @@ -146,3 +146,5 @@ KnexStore.defaultsKnex = { filename: './brute-knex.sqlite' } } + +export default KnexStore diff --git a/server/helpers/common.js b/server/helpers/common.js deleted file mode 100644 index 59185df2..00000000 --- a/server/helpers/common.js +++ /dev/null @@ -1,99 +0,0 @@ -const _ = require('lodash') -const crypto = require('node:crypto') - -module.exports = { - /* eslint-disable promise/param-names */ - createDeferred () { - let result, resolve, reject - return { - resolve: function (value) { - if (resolve) { - resolve(value) - } else { - result = result || new Promise(function (r) { r(value) }) - } - }, - reject: function (reason) { - if (reject) { - reject(reason) - } else { - result = result || new Promise(function (x, j) { j(reason) }) - } - }, - promise: new Promise(function (r, j) { - if (result) { - r(result) - } else { - resolve = r - reject = j - } - }) - } - }, - /** - * Decode a tree path - * - * @param {string} str String to decode - * @returns Decoded tree path - */ - decodeTreePath (str) { - return str.replaceAll('_', '-').replaceAll('.', '/') - }, - /** - * Encode a tree path - * - * @param {string} str String to encode - * @returns Encoded tree path - */ - encodeTreePath (str) { - return str?.toLowerCase()?.replaceAll('-', '_')?.replaceAll('/', '.') || '' - }, - /** - * Generate SHA-1 Hash of a string - * - * @param {string} str String to hash - * @returns Hashed string - */ - generateHash (str) { - return crypto.createHash('sha1').update(str).digest('hex') - }, - /** - * Get default value of type - * - * @param {any} type primitive type name - * @returns Default value - */ - getTypeDefaultValue (type) { - switch (type.toLowerCase()) { - case 'string': - return '' - case 'number': - return 0 - case 'boolean': - return false - } - }, - parseModuleProps (props) { - return _.transform(props, (result, value, key) => { - let defaultValue = '' - if (_.isPlainObject(value)) { - defaultValue = !_.isNil(value.default) ? value.default : this.getTypeDefaultValue(value.type) - } else { - defaultValue = this.getTypeDefaultValue(value) - } - _.set(result, key, { - default: defaultValue, - type: (value.type || value).toLowerCase(), - title: value.title || _.startCase(key), - hint: value.hint || '', - enum: value.enum || false, - enumDisplay: value.enumDisplay || 'select', - multiline: value.multiline || false, - sensitive: value.sensitive || false, - icon: value.icon || 'rename', - order: value.order || 100 - }) - return result - }, {}) - } -} diff --git a/server/helpers/common.mjs b/server/helpers/common.mjs new file mode 100644 index 00000000..3dc200c0 --- /dev/null +++ b/server/helpers/common.mjs @@ -0,0 +1,102 @@ +import { isNil, isPlainObject, set, startCase, transform } from 'lodash-es' +import crypto from 'node:crypto' + +/* eslint-disable promise/param-names */ +export function createDeferred () { + let result, resolve, reject + return { + resolve: function (value) { + if (resolve) { + resolve(value) + } else { + result = result || new Promise(function (r) { r(value) }) + } + }, + reject: function (reason) { + if (reject) { + reject(reason) + } else { + result = result || new Promise(function (x, j) { j(reason) }) + } + }, + promise: new Promise(function (r, j) { + if (result) { + r(result) + } else { + resolve = r + reject = j + } + }) + } +} + +/** + * Decode a tree path + * + * @param {string} str String to decode + * @returns Decoded tree path + */ +export function decodeTreePath (str) { + return str.replaceAll('_', '-').replaceAll('.', '/') +} + +/** + * Encode a tree path + * + * @param {string} str String to encode + * @returns Encoded tree path + */ +export function encodeTreePath (str) { + return str?.toLowerCase()?.replaceAll('-', '_')?.replaceAll('/', '.') || '' +} + +/** + * Generate SHA-1 Hash of a string + * + * @param {string} str String to hash + * @returns Hashed string + */ +export function generateHash (str) { + return crypto.createHash('sha1').update(str).digest('hex') +} + +/** + * Get default value of type + * + * @param {any} type primitive type name + * @returns Default value + */ +export function getTypeDefaultValue (type) { + switch (type.toLowerCase()) { + case 'string': + return '' + case 'number': + return 0 + case 'boolean': + return false + } +} + +export function parseModuleProps (props) { + return transform(props, (result, value, key) => { + let defaultValue = '' + if (isPlainObject(value)) { + defaultValue = !isNil(value.default) ? value.default : this.getTypeDefaultValue(value.type) + } else { + defaultValue = this.getTypeDefaultValue(value) + } + set(result, key, { + default: defaultValue, + type: (value.type || value).toLowerCase(), + title: value.title || startCase(key), + hint: value.hint || '', + enum: value.enum || false, + enumDisplay: value.enumDisplay || 'select', + multiline: value.multiline || false, + sensitive: value.sensitive || false, + icon: value.icon || 'rename', + order: value.order || 100 + }) + return result + }, {}) +} diff --git a/server/helpers/config.js b/server/helpers/config.mjs similarity index 89% rename from server/helpers/config.js rename to server/helpers/config.mjs index 6f972d40..352c24f8 100644 --- a/server/helpers/config.js +++ b/server/helpers/config.mjs @@ -1,10 +1,8 @@ -'use strict' - -const _ = require('lodash') +import { replace } from 'lodash-es' const isoDurationReg = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/ -module.exports = { +export default { /** * Parse configuration value for environment vars * @@ -16,7 +14,7 @@ module.exports = { * @returns Parse configuration value */ parseConfigValue (cfg) { - return _.replace( + return replace( cfg, /\$\(([A-Z0-9_]+)(?::(.+))?\)/g, (fm, m, d) => { return process.env[m] || d } diff --git a/server/helpers/error.js b/server/helpers/error.mjs similarity index 99% rename from server/helpers/error.js rename to server/helpers/error.mjs index 72a3b326..976c55f5 100644 --- a/server/helpers/error.js +++ b/server/helpers/error.mjs @@ -1,6 +1,6 @@ -const CustomError = require('custom-error-instance') +import CustomError from 'custom-error-instance' -module.exports = { +export default { Custom (slug, message) { return CustomError(slug, { message }) }, diff --git a/server/helpers/graph.js b/server/helpers/graph.js deleted file mode 100644 index 46eb1e27..00000000 --- a/server/helpers/graph.js +++ /dev/null @@ -1,21 +0,0 @@ -const _ = require('lodash') - -module.exports = { - generateSuccess (msg) { - return { - succeeded: true, - errorCode: 0, - slug: 'ok', - message: _.defaultTo(msg, 'Operation succeeded.') - } - }, - generateError (err, complete = true) { - const error = { - succeeded: false, - errorCode: _.isFinite(err.code) ? err.code : 1, - slug: err.name, - message: err.message || 'An unexpected error occured.' - } - return (complete) ? { operation: error } : error - } -} diff --git a/server/helpers/graph.mjs b/server/helpers/graph.mjs new file mode 100644 index 00000000..4c709f10 --- /dev/null +++ b/server/helpers/graph.mjs @@ -0,0 +1,20 @@ +import { defaultTo, isFinite } from 'lodash-es' + +export function generateSuccess (msg) { + return { + succeeded: true, + errorCode: 0, + slug: 'ok', + message: defaultTo(msg, 'Operation succeeded.') + } +} + +export function generateError (err, complete = true) { + const error = { + succeeded: false, + errorCode: isFinite(err.code) ? err.code : 1, + slug: err.name, + message: err.message || 'An unexpected error occured.' + } + return (complete) ? { operation: error } : error +} diff --git a/server/helpers/page.js b/server/helpers/page.js deleted file mode 100644 index 2b4ca8ab..00000000 --- a/server/helpers/page.js +++ /dev/null @@ -1,151 +0,0 @@ -const qs = require('querystring') -const _ = require('lodash') -const crypto = require('crypto') -const path = require('path') - -const localeSegmentRegex = /^[A-Z]{2}(-[A-Z]{2})?$/i -const localeFolderRegex = /^([a-z]{2}(?:-[a-z]{2})?\/)?(.*)/i -// eslint-disable-next-line no-control-regex -const unsafeCharsRegex = /[\x00-\x1f\x80-\x9f\\"|<>:*?]/ - -const contentToExt = { - markdown: 'md', - html: 'html' -} -const extToContent = _.invert(contentToExt) - -module.exports = { - /** - * Parse raw url path and make it safe - */ - parsePath (rawPath, opts = {}) { - let pathObj = { - // TODO: use site base lang - locale: 'en', // WIKI.config.lang.code, - path: 'home', - private: false, - privateNS: '', - explicitLocale: false - } - - // Clean Path - rawPath = _.trim(qs.unescape(rawPath)) - if (_.startsWith(rawPath, '/')) { rawPath = rawPath.substring(1) } - rawPath = rawPath.replace(unsafeCharsRegex, '') - if (rawPath === '') { rawPath = 'home' } - - rawPath = rawPath.replace(/\\/g, '').replace(/\/\//g, '').replace(/\.\.+/ig, '') - - // Extract Info - let pathParts = _.filter(_.split(rawPath, '/'), p => { - p = _.trim(p) - return !_.isEmpty(p) && p !== '..' && p !== '.' - }) - if (pathParts[0].startsWith('_')) { - pathParts.shift() - } - if (localeSegmentRegex.test(pathParts[0])) { - pathObj.locale = pathParts[0] - pathObj.explicitLocale = true - pathParts.shift() - } - - // Strip extension - if (opts.stripExt && pathParts.length > 0) { - const lastPart = _.last(pathParts) - if (lastPart.indexOf('.') > 0) { - pathParts.pop() - const lastPartMeta = path.parse(lastPart) - pathParts.push(lastPartMeta.name) - } - } - - pathObj.path = _.join(pathParts, '/') - return pathObj - }, - /** - * Generate unique hash from page - */ - generateHash(opts) { - return crypto.createHash('sha1').update(`${opts.locale}|${opts.path}|${opts.privateNS}`).digest('hex') - }, - /** - * Inject Page Metadata - */ - injectPageMetadata(page) { - let meta = [ - ['title', page.title], - ['description', page.description], - ['published', page.isPublished.toString()], - ['date', page.updatedAt], - ['tags', page.tags ? page.tags.map(t => t.tag).join(', ') : ''], - ['editor', page.editorKey], - ['dateCreated', page.createdAt] - ] - switch (page.contentType) { - case 'markdown': - return '---\n' + meta.map(mt => `${mt[0]}: ${mt[1]}`).join('\n') + '\n---\n\n' + page.content - case 'html': - return '\n\n' + page.content - case 'json': - return { - ...page.content, - _meta: _.fromPairs(meta) - } - default: - return page.content - } - }, - /** - * Check if path is a reserved path - */ - isReservedPath(rawPath) { - const firstSection = _.head(rawPath.split('/')) - if (firstSection.length < 1) { - return true - } else if (localeSegmentRegex.test(firstSection)) { - return true - } else if ( - _.some(WIKI.data.reservedPaths, p => { - return p === firstSection - })) { - return true - } else { - return false - } - }, - /** - * Get file extension from content type - */ - getFileExtension(contentType) { - return _.get(contentToExt, contentType, 'txt') - }, - /** - * Get content type from file extension - */ - getContentType (filePath) { - const ext = _.last(filePath.split('.')) - return _.get(extToContent, ext, false) - }, - /** - * Get Page Meta object from disk path - */ - getPagePath (filePath) { - let fpath = filePath - if (process.platform === 'win32') { - fpath = filePath.replace(/\\/g, '/') - } - let meta = { - locale: WIKI.config.lang.code, - path: _.initial(fpath.split('.')).join('') - } - const result = localeFolderRegex.exec(meta.path) - if (result[1]) { - meta = { - locale: result[1].replace('/', ''), - path: result[2] - } - } - return meta - } -} diff --git a/server/helpers/page.mjs b/server/helpers/page.mjs new file mode 100644 index 00000000..1082f0d3 --- /dev/null +++ b/server/helpers/page.mjs @@ -0,0 +1,155 @@ +import qs from 'querystring' +import { fromPairs, get, initial, invert, isEmpty, last } from 'lodash-es' +import crypto from 'node:crypto' +import path from 'node:path' + +const localeSegmentRegex = /^[A-Z]{2}(-[A-Z]{2})?$/i +const localeFolderRegex = /^([a-z]{2}(?:-[a-z]{2})?\/)?(.*)/i +// eslint-disable-next-line no-control-regex +const unsafeCharsRegex = /[\x00-\x1f\x80-\x9f\\"|<>:*?]/ + +const contentToExt = { + markdown: 'md', + html: 'html' +} +const extToContent = invert(contentToExt) + +/** + * Parse raw url path and make it safe + */ +export function parsePath (rawPath, opts = {}) { + const pathObj = { + // TODO: use site base lang + locale: 'en', // WIKI.config.lang.code, + path: 'home', + private: false, + privateNS: '', + explicitLocale: false + } + + // Clean Path + rawPath = qs.unescape(rawPath).trim() + if (rawPath.startsWith('/')) { rawPath = rawPath.substring(1) } + rawPath = rawPath.replace(unsafeCharsRegex, '') + if (rawPath === '') { rawPath = 'home' } + + rawPath = rawPath.replace(/\\/g, '').replace(/\/\//g, '').replace(/\.\.+/ig, '') + + // Extract Info + let pathParts = rawPath.split('/').filter(p => { + p = p.trim() + return !isEmpty(p) && p !== '..' && p !== '.' + }) + if (pathParts[0].startsWith('_')) { + pathParts.shift() + } + if (localeSegmentRegex.test(pathParts[0])) { + pathObj.locale = pathParts[0] + pathObj.explicitLocale = true + pathParts.shift() + } + + // Strip extension + if (opts.stripExt && pathParts.length > 0) { + const lastPart = last(pathParts) + if (lastPart.indexOf('.') > 0) { + pathParts.pop() + const lastPartMeta = path.parse(lastPart) + pathParts.push(lastPartMeta.name) + } + } + + pathObj.path = _.join(pathParts, '/') + return pathObj +} + +/** + * Generate unique hash from page + */ +export function generateHash(opts) { + return crypto.createHash('sha1').update(`${opts.locale}|${opts.path}|${opts.privateNS}`).digest('hex') +} + +/** + * Inject Page Metadata + */ +export function injectPageMetadata(page) { + const meta = [ + ['title', page.title], + ['description', page.description], + ['published', page.isPublished.toString()], + ['date', page.updatedAt], + ['tags', page.tags ? page.tags.map(t => t.tag).join(', ') : ''], + ['editor', page.editorKey], + ['dateCreated', page.createdAt] + ] + switch (page.contentType) { + case 'markdown': + return '---\n' + meta.map(mt => `${mt[0]}: ${mt[1]}`).join('\n') + '\n---\n\n' + page.content + case 'html': + return '\n\n' + page.content + case 'json': + return { + ...page.content, + _meta: fromPairs(meta) + } + default: + return page.content + } +} + +/** + * Check if path is a reserved path + */ +export function isReservedPath(rawPath) { + const firstSection = _.head(rawPath.split('/')) + if (firstSection.length < 1) { + return true + } else if (localeSegmentRegex.test(firstSection)) { + return true + } else if ( + WIKI.data.reservedPaths.some(p => { + return p === firstSection + })) { + return true + } else { + return false + } +} + +/** + * Get file extension from content type + */ +export function getFileExtension(contentType) { + return get(contentToExt, contentType, 'txt') +} + +/** + * Get content type from file extension + */ +export function getContentType (filePath) { + const ext = last(filePath.split('.')) + return get(extToContent, ext, false) +} + +/** + * Get Page Meta object from disk path + */ +export function getPagePath (filePath) { + let fpath = filePath + if (process.platform === 'win32') { + fpath = filePath.replace(/\\/g, '/') + } + let meta = { + locale: WIKI.config.lang.code, + path: initial(fpath.split('.')).join('') + } + const result = localeFolderRegex.exec(meta.path) + if (result[1]) { + meta = { + locale: result[1].replace('/', ''), + path: result[2] + } + } + return meta +} diff --git a/server/helpers/security.js b/server/helpers/security.js deleted file mode 100644 index 2e970dfc..00000000 --- a/server/helpers/security.js +++ /dev/null @@ -1,38 +0,0 @@ -const util = require('node:util') -const crypto = require('node:crypto') -const randomBytes = util.promisify(crypto.randomBytes) -const passportJWT = require('passport-jwt') - -module.exports = { - sanitizeCommitUser (user) { - // let wlist = new RegExp('[^a-zA-Z0-9-_.\',& ' + appdata.regex.cjk + appdata.regex.arabic + ']', 'g') - // return { - // name: _.chain(user.name).replace(wlist, '').trim().value(), - // email: appconfig.git.showUserEmail ? user.email : appconfig.git.serverEmail - // } - }, - /** - * Generate a random token - * - * @param {any} length - * @returns - */ - async generateToken (length) { - return (await randomBytes(length)).toString('hex') - }, - - extractJWT: passportJWT.ExtractJwt.fromExtractors([ - passportJWT.ExtractJwt.fromAuthHeaderAsBearerToken(), - (req) => { - let token = null - if (req && req.cookies) { - token = req.cookies['jwt'] - } - // Force uploads to use Auth headers - if (req.path.toLowerCase() === '/u') { - return null - } - return token - } - ]) -} diff --git a/server/helpers/security.mjs b/server/helpers/security.mjs new file mode 100644 index 00000000..a0f66c15 --- /dev/null +++ b/server/helpers/security.mjs @@ -0,0 +1,38 @@ +import util from 'node:util' +import crypto from 'node:crypto' +import passportJWT from 'passport-jwt' + +const randomBytes = util.promisify(crypto.randomBytes) + +export function sanitizeCommitUser (user) { + // let wlist = new RegExp('[^a-zA-Z0-9-_.\',& ' + appdata.regex.cjk + appdata.regex.arabic + ']', 'g') + // return { + // name: _.chain(user.name).replace(wlist, '').trim().value(), + // email: appconfig.git.showUserEmail ? user.email : appconfig.git.serverEmail + // } +} + +/** + * Generate a random token + * + * @param {any} length + * @returns + */ +export async function generateToken (length) { + return (await randomBytes(length)).toString('hex') +} + +export const extractJWT = passportJWT.ExtractJwt.fromExtractors([ + passportJWT.ExtractJwt.fromAuthHeaderAsBearerToken(), + (req) => { + let token = null + if (req && req.cookies) { + token = req.cookies['jwt'] + } + // Force uploads to use Auth headers + if (req.path.toLowerCase() === '/u') { + return null + } + return token + } +]) diff --git a/server/index.js b/server/index.mjs similarity index 70% rename from server/index.js rename to server/index.mjs index eee47819..2b9502a8 100644 --- a/server/index.js +++ b/server/index.mjs @@ -3,30 +3,34 @@ // Licensed under AGPLv3 // =========================================== -const path = require('path') -const { DateTime } = require('luxon') -const semver = require('semver') -const nanoid = require('nanoid').customAlphabet('1234567890abcdef', 10) -const fs = require('fs-extra') +import path from 'node:path' +import { DateTime } from 'luxon' +import semver from 'semver' +import { customAlphabet } from 'nanoid' +import fse from 'fs-extra' +import configSvc from './core/config.mjs' +import kernel from './core/kernel.mjs' +import logger from './core/logger.mjs' + +const nanoid = customAlphabet('1234567890abcdef', 10) if (!semver.satisfies(process.version, '>=18')) { console.error('ERROR: Node.js 18.x or later required!') process.exit(1) } -if (fs.pathExistsSync('./package.json')) { +if (fse.pathExistsSync('./package.json')) { console.error('ERROR: Must run server from the parent directory!') process.exit(1) } -let WIKI = { +const WIKI = { IS_DEBUG: process.env.NODE_ENV === 'development', ROOTPATH: process.cwd(), INSTANCE_ID: nanoid(10), SERVERPATH: path.join(process.cwd(), 'server'), - Error: require('./helpers/error'), - configSvc: require('./core/config'), - kernel: require('./core/kernel'), + configSvc, + kernel, sites: {}, sitesMappings: {}, startedAt: DateTime.utc(), @@ -37,13 +41,13 @@ let WIKI = { } global.WIKI = WIKI -WIKI.configSvc.init() +await WIKI.configSvc.init() // ---------------------------------------- // Init Logger // ---------------------------------------- -WIKI.logger = require('./core/logger').init() +WIKI.logger = logger.init() // ---------------------------------------- // Start Kernel diff --git a/server/locales/README.md b/server/locales/README.md deleted file mode 100644 index 9777fe80..00000000 --- a/server/locales/README.md +++ /dev/null @@ -1,20 +0,0 @@ -## IMPORTANT - -Localization files are not stored into files! - -Contact us on Gitter to request access to the translation web service: https://gitter.im/Requarks/wiki - -## Development Mode - -If you need to add new keys and test them live, simply create a {LANG}.yml file in this folder containing the values you want to test. e.g.: - -### en.yml -```yml -admin: - api.title: 'API Access' - auth.title: 'Authentication' -``` - -The official localization keys will still be loaded first, but your local files will overwrite any existing keys (and add new ones). - -Note that you must restart Wiki.js to load any changes made to the files, which happens automatically on save when in dev mode. diff --git a/server/middlewares/security.js b/server/middlewares/security.js deleted file mode 100644 index 4f2e4e8f..00000000 --- a/server/middlewares/security.js +++ /dev/null @@ -1,46 +0,0 @@ -/* global WIKI */ - -/** - * Security Middleware - * - * @param {Express Request} req Express request object - * @param {Express Response} res Express response object - * @param {Function} next next callback function - * @return {any} void - */ -module.exports = function (req, res, next) { - // -> Disable X-Powered-By - req.app.disable('x-powered-by') - - // -> Disable Frame Embedding - if (WIKI.config.security.securityIframe) { - res.set('X-Frame-Options', 'deny') - } - - // -> Re-enable XSS Fitler if disabled - res.set('X-XSS-Protection', '1; mode=block') - - // -> Disable MIME-sniffing - res.set('X-Content-Type-Options', 'nosniff') - - // -> Disable IE Compatibility Mode - res.set('X-UA-Compatible', 'IE=edge') - - // -> Disables referrer header when navigating to a different origin - if (WIKI.config.security.securityReferrerPolicy) { - res.set('Referrer-Policy', 'same-origin') - } - - // -> Enforce HSTS - if (WIKI.config.security.securityHSTS) { - res.set('Strict-Transport-Security', `max-age=${WIKI.config.security.securityHSTSDuration}; includeSubDomains`) - } - - // -> Prevent Open Redirect from user provided URL - if (WIKI.config.security.securityOpenRedirect) { - // Strips out all repeating / character in the provided URL - req.url = req.url.replace(/(\/)(?=\/*\1)/g, '') - } - - return next() -} diff --git a/server/middlewares/seo.js b/server/middlewares/seo.js deleted file mode 100644 index 3c608f02..00000000 --- a/server/middlewares/seo.js +++ /dev/null @@ -1,19 +0,0 @@ -const _ = require('lodash') - -/** - * SEO Middleware - * - * @param {Express Request} req Express request object - * @param {Express Response} res Express response object - * @param {Function} next next callback function - * @return {any} void - */ -module.exports = function (req, res, next) { - if (req.path.length > 1 && _.endsWith(req.path, '/')) { - let query = req.url.slice(req.path.length) || '' - res.redirect(301, req.path.slice(0, -1) + query) - } else { - _.set(res.locals, 'pageMeta.url', `${WIKI.config.host}${req.path}`) - return next() - } -} diff --git a/server/models/analytics.js b/server/models/analytics.mjs similarity index 71% rename from server/models/analytics.js rename to server/models/analytics.mjs index 27cdc115..0e16563a 100644 --- a/server/models/analytics.js +++ b/server/models/analytics.mjs @@ -1,14 +1,14 @@ -const Model = require('objection').Model -const fs = require('fs-extra') -const path = require('path') -const _ = require('lodash') -const yaml = require('js-yaml') -const commonHelper = require('../helpers/common') +import { Model } from 'objection' +import fs from 'node:fs/promises' +import path from 'node:path' +import { defaultTo, forOwn, isBoolean, replace, sortBy } from 'lodash-es' +import yaml from 'js-yaml' +import { parseModuleProps } from '../helpers/common.mjs' /** * Analytics model */ -module.exports = class Analytics extends Model { +export class Analytics extends Model { static get tableName() { return 'analytics' } static get jsonSchema () { @@ -29,8 +29,8 @@ module.exports = class Analytics extends Model { } static async getProviders(isEnabled) { - const providers = await WIKI.db.analytics.query().where(_.isBoolean(isEnabled) ? { isEnabled } : {}) - return _.sortBy(providers, ['module']) + const providers = await WIKI.db.analytics.query().where(isBoolean(isEnabled) ? { isEnabled } : {}) + return sortBy(providers, ['module']) } static async refreshProvidersFromDisk() { @@ -42,7 +42,7 @@ module.exports = class Analytics extends Model { const def = await fs.readFile(path.join(WIKI.SERVERPATH, 'modules/analytics', dir, 'definition.yml'), 'utf8') const defParsed = yaml.load(def) defParsed.key = dir - defParsed.props = commonHelper.parseModuleProps(defParsed.props) + defParsed.props = parseModuleProps(defParsed.props) WIKI.data.analytics.push(defParsed) WIKI.logger.debug(`Loaded analytics module definition ${dir}: [ OK ]`) } @@ -72,14 +72,14 @@ module.exports = class Analytics extends Model { for (let provider of providers) { const def = await fs.readFile(path.join(WIKI.SERVERPATH, 'modules/analytics', provider.key, 'code.yml'), 'utf8') let code = yaml.safeLoad(def) - code.head = _.defaultTo(code.head, '') - code.bodyStart = _.defaultTo(code.bodyStart, '') - code.bodyEnd = _.defaultTo(code.bodyEnd, '') + code.head = defaultTo(code.head, '') + code.bodyStart = defaultTo(code.bodyStart, '') + code.bodyEnd = defaultTo(code.bodyEnd, '') - _.forOwn(provider.config, (value, key) => { - code.head = _.replace(code.head, new RegExp(`{{${key}}}`, 'g'), value) - code.bodyStart = _.replace(code.bodyStart, `{{${key}}}`, value) - code.bodyEnd = _.replace(code.bodyEnd, `{{${key}}}`, value) + forOwn(provider.config, (value, key) => { + code.head = replace(code.head, new RegExp(`{{${key}}}`, 'g'), value) + code.bodyStart = replace(code.bodyStart, `{{${key}}}`, value) + code.bodyEnd = replace(code.bodyEnd, `{{${key}}}`, value) }) analyticsCode.head += code.head diff --git a/server/models/apiKeys.js b/server/models/apiKeys.mjs similarity index 89% rename from server/models/apiKeys.js rename to server/models/apiKeys.mjs index 1d821ae5..7893e840 100644 --- a/server/models/apiKeys.js +++ b/server/models/apiKeys.mjs @@ -1,14 +1,14 @@ /* global WIKI */ -const Model = require('objection').Model -const { DateTime } = require('luxon') -const ms = require('ms') -const jwt = require('jsonwebtoken') +import { Model } from 'objection' +import { DateTime } from 'luxon' +import ms from 'ms' +import jwt from 'jsonwebtoken' /** * Users model */ -module.exports = class ApiKey extends Model { +export class ApiKey extends Model { static get tableName() { return 'apiKeys' } static get jsonSchema () { diff --git a/server/models/assets.js b/server/models/assets.mjs similarity index 85% rename from server/models/assets.js rename to server/models/assets.mjs index 721eafcb..0b75e306 100644 --- a/server/models/assets.js +++ b/server/models/assets.mjs @@ -1,14 +1,15 @@ -const Model = require('objection').Model -const moment = require('moment') -const path = require('path') -const fs = require('fs-extra') -const _ = require('lodash') -const commonHelper = require('../helpers/common') +import { Model } from 'objection' +import path from 'path' +import fse from 'fs-extra' +import { startsWith } from 'lodash-es' +import { generateHash } from '../helpers/common.mjs' + +import { User } from './users.mjs' /** * Users model */ -module.exports = class Asset extends Model { +export class Asset extends Model { static get tableName() { return 'assets' } static get jsonSchema () { @@ -34,19 +35,11 @@ module.exports = class Asset extends Model { return { author: { relation: Model.BelongsToOneRelation, - modelClass: require('./users'), + modelClass: User, join: { from: 'assets.authorId', to: 'users.id' } - }, - folder: { - relation: Model.BelongsToOneRelation, - modelClass: require('./assetFolders'), - join: { - from: 'assets.folderId', - to: 'assetFolders.id' - } } } } @@ -72,7 +65,7 @@ module.exports = class Asset extends Model { } async deleteAssetCache() { - await fs.remove(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, `cache/${this.hash}.dat`)) + await fse.remove(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, `cache/${this.hash}.dat`)) } static async upload(opts) { @@ -88,7 +81,7 @@ module.exports = class Asset extends Model { let assetRow = { filename: opts.originalname, ext: fileInfo.ext, - kind: _.startsWith(opts.mimetype, 'image/') ? 'image' : 'binary', + kind: startsWith(opts.mimetype, 'image/') ? 'image' : 'binary', mime: opts.mimetype, fileSize: opts.size, folderId: opts.folderId @@ -112,7 +105,7 @@ module.exports = class Asset extends Model { // Save asset data try { - const fileBuffer = await fs.readFile(opts.path) + const fileBuffer = await fse.readFile(opts.path) if (asset) { // Patch existing asset @@ -166,7 +159,7 @@ module.exports = class Asset extends Model { .select('tree.*', 'assets.preview', 'assets.previewState') .innerJoin('assets', 'tree.id', 'assets.id') .where(id ? { 'tree.id': id } : { - 'tree.hash': commonHelper.generateHash(path), + 'tree.hash': generateHash(path), 'tree.localeCode': locale, 'tree.siteId': siteId }) @@ -202,7 +195,7 @@ module.exports = class Asset extends Model { static async getAssetFromCache(assetPath, cachePath, res) { try { - await fs.access(cachePath, fs.constants.R_OK) + await fse.access(cachePath, fse.constants.R_OK) } catch (err) { return false } @@ -217,7 +210,7 @@ module.exports = class Asset extends Model { path: assetPath } }) - for (let location of _.filter(localLocations, location => Boolean(location.path))) { + for (let location of localLocations.filter(location => Boolean(location.path))) { const assetExists = await WIKI.db.assets.getAssetFromCache(assetPath, location.path, res) if (assetExists) { return true @@ -232,13 +225,13 @@ module.exports = class Asset extends Model { const assetData = await WIKI.db.knex('assetData').where('id', asset.id).first() res.type(asset.ext) res.send(assetData.data) - await fs.outputFile(cachePath, assetData.data) + await fse.outputFile(cachePath, assetData.data) } else { res.sendStatus(404) } } static async flushTempUploads() { - return fs.emptyDir(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, `uploads`)) + return fse.emptyDir(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, `uploads`)) } } diff --git a/server/models/authentication.js b/server/models/authentication.mjs similarity index 78% rename from server/models/authentication.js rename to server/models/authentication.mjs index ba026bcf..e675f8bc 100644 --- a/server/models/authentication.js +++ b/server/models/authentication.mjs @@ -1,14 +1,14 @@ -const Model = require('objection').Model -const fs = require('fs-extra') -const path = require('path') -const _ = require('lodash') -const yaml = require('js-yaml') -const commonHelper = require('../helpers/common') +import { Model } from 'objection' +import fs from 'node:fs/promises' +import path from 'node:path' +import { get } from 'lodash-es' +import yaml from 'js-yaml' +import { parseModuleProps } from '../helpers/common.mjs' /** * Authentication model */ -module.exports = class Authentication extends Model { +export class Authentication extends Model { static get tableName() { return 'authentication' } static get jsonSchema () { @@ -37,8 +37,8 @@ module.exports = class Authentication extends Model { const strategies = await WIKI.db.authentication.query().where(enabledOnly ? { isEnabled: true } : {}) return strategies.map(str => ({ ...str, - domainWhitelist: _.get(str.domainWhitelist, 'v', []), - autoEnrollGroups: _.get(str.autoEnrollGroups, 'v', []) + domainWhitelist: get(str.domainWhitelist, 'v', []), + autoEnrollGroups: get(str.autoEnrollGroups, 'v', []) })) } @@ -52,7 +52,7 @@ module.exports = class Authentication extends Model { const defParsed = yaml.load(def) if (!defParsed.isAvailable) { continue } defParsed.key = dir - defParsed.props = commonHelper.parseModuleProps(defParsed.props) + defParsed.props = parseModuleProps(defParsed.props) WIKI.data.authentication.push(defParsed) WIKI.logger.debug(`Loaded authentication module definition ${dir}: [ OK ]`) } diff --git a/server/models/commentProviders.js b/server/models/commentProviders.mjs similarity index 69% rename from server/models/commentProviders.js rename to server/models/commentProviders.mjs index 1abc447b..e45d5624 100644 --- a/server/models/commentProviders.js +++ b/server/models/commentProviders.mjs @@ -1,14 +1,14 @@ -const Model = require('objection').Model -const fs = require('fs-extra') -const path = require('path') -const _ = require('lodash') -const yaml = require('js-yaml') -const commonHelper = require('../helpers/common') +import { Model } from 'objection' +import fs from 'node:fs/promises' +import path from 'node:path' +import { defaultTo, find, forOwn, isBoolean, replace, sortBy } from 'lodash-es' +import yaml from 'js-yaml' +import { parseModuleProps } from '../helpers/common.mjs' /** * CommentProvider model */ -module.exports = class CommentProvider extends Model { +export class CommentProvider extends Model { static get tableName() { return 'commentProviders' } static get idColumn() { return 'key' } @@ -33,8 +33,8 @@ module.exports = class CommentProvider extends Model { } static async getProviders(isEnabled) { - const providers = await WIKI.db.commentProviders.query().where(_.isBoolean(isEnabled) ? { isEnabled } : {}) - return _.sortBy(providers, ['module']) + const providers = await WIKI.db.commentProviders.query().where(isBoolean(isEnabled) ? { isEnabled } : {}) + return sortBy(providers, ['module']) } static async refreshProvidersFromDisk() { @@ -46,7 +46,7 @@ module.exports = class CommentProvider extends Model { const def = await fs.readFile(path.join(WIKI.SERVERPATH, 'modules/comments', dir, 'definition.yml'), 'utf8') const defParsed = yaml.load(def) defParsed.key = dir - defParsed.props = commonHelper.parseModuleProps(defParsed.props) + defParsed.props = parseModuleProps(defParsed.props) WIKI.data.commentProviders.push(defParsed) WIKI.logger.debug(`Loaded comments provider module definition ${dir}: [ OK ]`) } @@ -62,7 +62,7 @@ module.exports = class CommentProvider extends Model { const commentProvider = await WIKI.db.commentProviders.query().findOne('isEnabled', true) if (commentProvider) { WIKI.data.commentProvider = { - ..._.find(WIKI.data.commentProviders, ['key', commentProvider.module]), + ...find(WIKI.data.commentProviders, ['key', commentProvider.module]), head: '', bodyStart: '', bodyEnd: '', @@ -72,14 +72,14 @@ module.exports = class CommentProvider extends Model { if (WIKI.data.commentProvider.codeTemplate) { const def = await fs.readFile(path.join(WIKI.SERVERPATH, 'modules/comments', commentProvider.key, 'code.yml'), 'utf8') let code = yaml.safeLoad(def) - code.head = _.defaultTo(code.head, '') - code.body = _.defaultTo(code.body, '') - code.main = _.defaultTo(code.main, '') + code.head = defaultTo(code.head, '') + code.body = defaultTo(code.body, '') + code.main = defaultTo(code.main, '') - _.forOwn(commentProvider.config, (value, key) => { - code.head = _.replace(code.head, new RegExp(`{{${key}}}`, 'g'), value) - code.body = _.replace(code.body, new RegExp(`{{${key}}}`, 'g'), value) - code.main = _.replace(code.main, new RegExp(`{{${key}}}`, 'g'), value) + forOwn(commentProvider.config, (value, key) => { + code.head = replace(code.head, new RegExp(`{{${key}}}`, 'g'), value) + code.body = replace(code.body, new RegExp(`{{${key}}}`, 'g'), value) + code.main = replace(code.main, new RegExp(`{{${key}}}`, 'g'), value) }) WIKI.data.commentProvider.head = code.head @@ -88,7 +88,7 @@ module.exports = class CommentProvider extends Model { } else { WIKI.data.commentProvider = { ...WIKI.data.commentProvider, - ...require(`../modules/comments/${commentProvider.key}/comment`), + ...(await import(`../modules/comments/${commentProvider.key}/comment.mjs`)), config: commentProvider.config } await WIKI.data.commentProvider.init() diff --git a/server/models/comments.js b/server/models/comments.mjs similarity index 92% rename from server/models/comments.js rename to server/models/comments.mjs index 0d133855..70870ad0 100644 --- a/server/models/comments.js +++ b/server/models/comments.mjs @@ -1,11 +1,13 @@ -const Model = require('objection').Model -const validate = require('validate.js') -const _ = require('lodash') +import { Model } from 'objection' +import validate from 'validate.js' + +import { Page } from './pages.mjs' +import { User } from './users.mjs' /** * Comments model */ -module.exports = class Comment extends Model { +export class Comment extends Model { static get tableName() { return 'comments' } static get jsonSchema () { @@ -30,7 +32,7 @@ module.exports = class Comment extends Model { return { author: { relation: Model.BelongsToOneRelation, - modelClass: require('./users'), + modelClass: User, join: { from: 'comments.authorId', to: 'users.id' @@ -38,7 +40,7 @@ module.exports = class Comment extends Model { }, page: { relation: Model.BelongsToOneRelation, - modelClass: require('./pages'), + modelClass: Page, join: { from: 'comments.pageId', to: 'pages.id' @@ -62,7 +64,7 @@ module.exports = class Comment extends Model { // -> Input validation if (user.id === 2) { const validation = validate({ - email: _.toLower(guestEmail), + email: guestEmail.toLowerCase(), name: guestName }, { email: { @@ -87,7 +89,7 @@ module.exports = class Comment extends Model { } } - content = _.trim(content) + content = content.trim() if (content.length < 2) { throw new WIKI.Error.CommentContentMissing() } diff --git a/server/models/groups.js b/server/models/groups.mjs similarity index 88% rename from server/models/groups.js rename to server/models/groups.mjs index 23d9ad7c..dd3c40b8 100644 --- a/server/models/groups.js +++ b/server/models/groups.mjs @@ -1,9 +1,11 @@ -const Model = require('objection').Model +import { Model } from 'objection' + +import { User } from './users.mjs' /** * Groups model */ -module.exports = class Group extends Model { +export class Group extends Model { static get tableName() { return 'groups' } static get jsonSchema () { @@ -30,7 +32,7 @@ module.exports = class Group extends Model { return { users: { relation: Model.ManyToManyRelation, - modelClass: require('./users'), + modelClass: User, join: { from: 'groups.id', through: { diff --git a/server/models/hooks.js b/server/models/hooks.mjs similarity index 90% rename from server/models/hooks.js rename to server/models/hooks.mjs index 6cf28528..785312a3 100644 --- a/server/models/hooks.js +++ b/server/models/hooks.mjs @@ -1,9 +1,9 @@ -const Model = require('objection').Model +import { Model } from 'objection' /** * Hook model */ -module.exports = class Hook extends Model { +export class Hook extends Model { static get tableName () { return 'hooks' } static get jsonAttributes () { diff --git a/server/models/index.mjs b/server/models/index.mjs new file mode 100644 index 00000000..3e36af7a --- /dev/null +++ b/server/models/index.mjs @@ -0,0 +1,45 @@ +import { Analytics } from './analytics.mjs' +import { ApiKey } from './apiKeys.mjs' +import { Asset } from './assets.mjs' +import { Authentication } from './authentication.mjs' +import { CommentProvider } from './commentProviders.mjs' +import { Comment } from './comments.mjs' +import { Group } from './groups.mjs' +import { Hook } from './hooks.mjs' +import { Locale } from './locales.mjs' +import { Navigation } from './navigation.mjs' +import { PageHistory } from './pageHistory.mjs' +import { PageLink } from './pageLinks.mjs' +import { Page } from './pages.mjs' +import { Renderer } from './renderers.mjs' +import { Setting } from './settings.mjs' +import { Site } from './sites.mjs' +import { Storage } from './storage.mjs' +import { Tag } from './tags.mjs' +import { Tree } from './tree.mjs' +import { UserKey } from './userKeys.mjs' +import { User } from './users.mjs' + +export default { + analytics: Analytics, + apiKeys: ApiKey, + assets: Asset, + authentication: Authentication, + commentProviders: CommentProvider, + comments: Comment, + groups: Group, + hooks: Hook, + locales: Locale, + navigation: Navigation, + pageHistory: PageHistory, + pageLinks: PageLink, + pages: Page, + renderers: Renderer, + settings: Setting, + sites: Site, + storage: Storage, + tags: Tag, + tree: Tree, + userKeys: UserKey, + users: User +} diff --git a/server/models/locales.js b/server/models/locales.mjs similarity index 94% rename from server/models/locales.js rename to server/models/locales.mjs index 6f6571bc..9aa16eda 100644 --- a/server/models/locales.js +++ b/server/models/locales.mjs @@ -1,9 +1,9 @@ -const Model = require('objection').Model +import { Model } from 'objection' /** * Locales model */ -module.exports = class Locale extends Model { +export class Locale extends Model { static get tableName() { return 'locales' } static get idColumn() { return 'code' } diff --git a/server/models/navigation.js b/server/models/navigation.mjs similarity index 89% rename from server/models/navigation.js rename to server/models/navigation.mjs index 7cef2049..d1662810 100644 --- a/server/models/navigation.js +++ b/server/models/navigation.mjs @@ -1,10 +1,10 @@ -const Model = require('objection').Model -const _ = require('lodash') +import { Model } from 'objection' +import { has } from 'lodash-es' /** * Navigation model */ -module.exports = class Navigation extends Model { +export class Navigation extends Model { static get tableName() { return 'navigation' } static get idColumn() { return 'key' } @@ -30,7 +30,7 @@ module.exports = class Navigation extends Model { const navTree = await WIKI.db.navigation.query().findOne('key', `site`) if (navTree) { // Check for pre-2.3 format - if (_.has(navTree.config[0], 'kind')) { + if (has(navTree.config[0], 'kind')) { navTree.config = [{ locale: 'en', items: navTree.config.map(item => ({ @@ -58,7 +58,7 @@ module.exports = class Navigation extends Model { } static getAuthorizedItems(tree = [], groups = []) { - return _.filter(tree, leaf => { + return tree.filter(leaf => { return leaf.visibilityMode === 'all' || _.intersection(leaf.visibilityGroups, groups).length > 0 }) } diff --git a/server/models/pageHistory.js b/server/models/pageHistory.mjs similarity index 90% rename from server/models/pageHistory.js rename to server/models/pageHistory.mjs index bcf72ec5..3d502561 100644 --- a/server/models/pageHistory.js +++ b/server/models/pageHistory.mjs @@ -1,11 +1,16 @@ -const Model = require('objection').Model -const _ = require('lodash') -const { DateTime, Duration } = require('luxon') +import { Model } from 'objection' +import { get, reduce, reverse } from 'lodash-es' +import { DateTime, Duration } from 'luxon' + +import { Locale } from './locales.mjs' +import { Page } from './pages.mjs' +import { User } from './users.mjs' +import { Tag } from './tags.mjs' /** * Page History model */ -module.exports = class PageHistory extends Model { +export class PageHistory extends Model { static get tableName() { return 'pageHistory' } static get jsonSchema () { @@ -34,7 +39,7 @@ module.exports = class PageHistory extends Model { return { tags: { relation: Model.ManyToManyRelation, - modelClass: require('./tags'), + modelClass: Tag, join: { from: 'pageHistory.id', through: { @@ -46,7 +51,7 @@ module.exports = class PageHistory extends Model { }, page: { relation: Model.BelongsToOneRelation, - modelClass: require('./pages'), + modelClass: Page, join: { from: 'pageHistory.pageId', to: 'pages.id' @@ -54,7 +59,7 @@ module.exports = class PageHistory extends Model { }, author: { relation: Model.BelongsToOneRelation, - modelClass: require('./users'), + modelClass: User, join: { from: 'pageHistory.authorId', to: 'users.id' @@ -62,7 +67,7 @@ module.exports = class PageHistory extends Model { }, locale: { relation: Model.BelongsToOneRelation, - modelClass: require('./locales'), + modelClass: Locale, join: { from: 'pageHistory.localeCode', to: 'locales.code' @@ -189,16 +194,16 @@ module.exports = class PageHistory extends Model { } return { - trail: _.reduce(_.reverse(history.results), (res, ph) => { + trail: reduce(reverse(history.results), (res, ph) => { let actionType = 'edit' let valueBefore = null let valueAfter = null if (!prevPh && history.total < upperLimit) { actionType = 'initial' - } else if (_.get(prevPh, 'path', '') !== ph.path) { + } else if (get(prevPh, 'path', '') !== ph.path) { actionType = 'move' - valueBefore = _.get(prevPh, 'path', '') + valueBefore = get(prevPh, 'path', '') valueAfter = ph.path } diff --git a/server/models/pageLinks.js b/server/models/pageLinks.mjs similarity index 79% rename from server/models/pageLinks.js rename to server/models/pageLinks.mjs index 980642f1..a0d42cb4 100644 --- a/server/models/pageLinks.js +++ b/server/models/pageLinks.mjs @@ -1,9 +1,11 @@ -const Model = require('objection').Model +import { Model } from 'objection' + +import { Page } from './pages.mjs' /** * Users model */ -module.exports = class PageLink extends Model { +export class PageLink extends Model { static get tableName() { return 'pageLinks' } static get jsonSchema () { @@ -23,7 +25,7 @@ module.exports = class PageLink extends Model { return { page: { relation: Model.BelongsToOneRelation, - modelClass: require('./pages'), + modelClass: Page, join: { from: 'pageLinks.pageId', to: 'pages.id' diff --git a/server/models/pages.js b/server/models/pages.mjs similarity index 94% rename from server/models/pages.js rename to server/models/pages.mjs index 97c0a354..d3268600 100644 --- a/server/models/pages.js +++ b/server/models/pages.mjs @@ -1,17 +1,22 @@ -const Model = require('objection').Model -const _ = require('lodash') -const JSBinType = require('js-binary').Type -const pageHelper = require('../helpers/page') -const path = require('path') -const fs = require('fs-extra') -const yaml = require('js-yaml') -const striptags = require('striptags') -const emojiRegex = require('emoji-regex') -const he = require('he') -const CleanCSS = require('clean-css') -const TurndownService = require('turndown') -const turndownPluginGfm = require('@joplin/turndown-plugin-gfm').gfm -const cheerio = require('cheerio') +import { Model } from 'objection' +import { find, get, has, isEmpty, isString, pick } from 'lodash-es' +import { Type as JSBinType } from 'js-binary' +import { generateHash, getFileExtension, injectPageMetadata } from '../helpers/page.mjs' +import path from 'node:path' +import fse from 'fs-extra' +import yaml from 'js-yaml' +import striptags from 'striptags' +import emojiRegex from 'emoji-regex' +import he from 'he' +import CleanCSS from 'clean-css' +import TurndownService from 'turndown' +import { gfm as turndownPluginGfm } from '@joplin/turndown-plugin-gfm' +import cheerio from 'cheerio' + +import { Locale } from './locales.mjs' +import { PageLink } from './pageLinks.mjs' +import { Tag } from './tags.mjs' +import { User } from './users.mjs' const pageRegex = /^[a-zA0-90-9-_/]*$/ @@ -27,7 +32,7 @@ const punctuationRegex = /[!,:;/\\_+\-=()&#@<>$~%^*[\]{}"'|]+|(\.\s)|(\s\.)/ig /** * Pages model */ -module.exports = class Page extends Model { +export class Page extends Model { static get tableName() { return 'pages' } static get jsonSchema () { @@ -62,7 +67,7 @@ module.exports = class Page extends Model { return { tags: { relation: Model.ManyToManyRelation, - modelClass: require('./tags'), + modelClass: Tag, join: { from: 'pages.id', through: { @@ -74,7 +79,7 @@ module.exports = class Page extends Model { }, links: { relation: Model.HasManyRelation, - modelClass: require('./pageLinks'), + modelClass: PageLink, join: { from: 'pages.id', to: 'pageLinks.pageId' @@ -82,7 +87,7 @@ module.exports = class Page extends Model { }, author: { relation: Model.BelongsToOneRelation, - modelClass: require('./users'), + modelClass: User, join: { from: 'pages.authorId', to: 'users.id' @@ -90,7 +95,7 @@ module.exports = class Page extends Model { }, creator: { relation: Model.BelongsToOneRelation, - modelClass: require('./users'), + modelClass: User, join: { from: 'pages.creatorId', to: 'users.id' @@ -98,7 +103,7 @@ module.exports = class Page extends Model { }, locale: { relation: Model.BelongsToOneRelation, - modelClass: require('./locales'), + modelClass: Locale, join: { from: 'pages.localeCode', to: 'locales.code' @@ -162,7 +167,7 @@ module.exports = class Page extends Model { * @returns {string} Page Contents with Injected Metadata */ injectMetadata () { - return pageHelper.injectPageMetadata(this) + return injectPageMetadata(this) } /** @@ -171,7 +176,7 @@ module.exports = class Page extends Model { * @returns {string} File Extension */ getFileExtension() { - return pageHelper.getFileExtension(this.contentType) + return getFileExtension(this.contentType) } /** @@ -312,7 +317,7 @@ module.exports = class Page extends Model { contentType: WIKI.data.editors[opts.editor]?.contentType ?? 'text', description: opts.description, editor: opts.editor, - hash: pageHelper.generateHash({ path: opts.path, locale: opts.locale }), + hash: generateHash({ path: opts.path, locale: opts.locale }), icon: opts.icon, isBrowsable: opts.isBrowsable ?? true, localeCode: opts.locale, @@ -561,7 +566,7 @@ module.exports = class Page extends Model { })) { patch.scripts = { ...patch.scripts ?? ogPage.scripts ?? {}, - css: !_.isEmpty(opts.patch.scriptCss) ? new CleanCSS({ inline: false }).minify(opts.patch.scriptCss).styles : '' + css: !isEmpty(opts.patch.scriptCss) ? new CleanCSS({ inline: false }).minify(opts.patch.scriptCss).styles : '' } historyData.affectedFields.push('scripts.css') } @@ -698,7 +703,7 @@ module.exports = class Page extends Model { // -> Check content type const sourceContentType = ogPage.contentType - const targetContentType = _.get(_.find(WIKI.data.editors, ['key', opts.editor]), `contentType`, 'text') + const targetContentType = get(find(WIKI.data.editors, ['key', opts.editor]), `contentType`, 'text') const shouldConvert = sourceContentType !== targetContentType let convertedContent = null @@ -846,7 +851,7 @@ module.exports = class Page extends Model { */ static async movePage(opts) { let page - if (_.has(opts, 'id')) { + if (has(opts, 'id')) { page = await WIKI.db.pages.query().findById(opts.id) } else { page = await WIKI.db.pages.query().findOne({ @@ -904,7 +909,7 @@ module.exports = class Page extends Model { versionDate: page.updatedAt }) - const destinationHash = pageHelper.generateHash({ path: opts.destinationPath, locale: opts.destinationLocale }) + const destinationHash = generateHash({ path: opts.destinationPath, locale: opts.destinationLocale }) // -> Move page const destinationTitle = (page.title === page.path ? opts.destinationPath : page.title) @@ -970,7 +975,7 @@ module.exports = class Page extends Model { * @returns {Promise} Promise with no value */ static async deletePage(opts) { - const page = await WIKI.db.pages.getPageFromDb(_.has(opts, 'id') ? opts.id : opts) + const page = await WIKI.db.pages.getPageFromDb(has(opts, 'id') ? opts.id : opts) if (!page) { throw new WIKI.Error.PageNotFound() } @@ -1209,7 +1214,7 @@ module.exports = class Page extends Model { */ static async savePageToCache(page) { const cachePath = path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, `cache/${page.hash}.bin`) - await fs.outputFile(cachePath, WIKI.db.pages.cacheSchema.encode({ + await fse.outputFile(cachePath, WIKI.db.pages.cacheSchema.encode({ id: page.id, authorId: page.authorId, authorName: page.authorName, @@ -1219,17 +1224,17 @@ module.exports = class Page extends Model { description: page.description, editor: page.editor, extra: { - css: _.get(page, 'extra.css', ''), - js: _.get(page, 'extra.js', '') + css: get(page, 'extra.css', ''), + js: get(page, 'extra.js', '') }, publishState: page.publishState ?? '', publishEndDate: page.publishEndDate ?? '', publishStartDate: page.publishStartDate ?? '', render: page.render, siteId: page.siteId, - tags: page.tags.map(t => _.pick(t, ['tag'])), + tags: page.tags.map(t => pick(t, ['tag'])), title: page.title, - toc: _.isString(page.toc) ? page.toc : JSON.stringify(page.toc), + toc: isString(page.toc) ? page.toc : JSON.stringify(page.toc), updatedAt: page.updatedAt.toISOString() })) } @@ -1241,11 +1246,11 @@ module.exports = class Page extends Model { * @returns {Promise} Promise of the Page Model Instance */ static async getPageFromCache(opts) { - const pageHash = pageHelper.generateHash({ path: opts.path, locale: opts.locale }) + const pageHash = generateHash({ path: opts.path, locale: opts.locale }) const cachePath = path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, `cache/${pageHash}.bin`) try { - const pageBuffer = await fs.readFile(cachePath) + const pageBuffer = await fse.readFile(cachePath) let page = WIKI.db.pages.cacheSchema.decode(pageBuffer) return { ...page, @@ -1268,14 +1273,14 @@ module.exports = class Page extends Model { * @returns {Promise} Promise with no value */ static async deletePageFromCache(hash) { - return fs.remove(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, `cache/${hash}.bin`)) + return fse.remove(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, `cache/${hash}.bin`)) } /** * Flush the contents of the Cache */ static async flushCache() { - return fs.emptyDir(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, `cache`)) + return fse.emptyDir(path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, `cache`)) } /** diff --git a/server/models/renderers.js b/server/models/renderers.mjs similarity index 74% rename from server/models/renderers.js rename to server/models/renderers.mjs index 6e0cd037..5be8cb3c 100644 --- a/server/models/renderers.js +++ b/server/models/renderers.mjs @@ -1,15 +1,15 @@ -const Model = require('objection').Model -const path = require('path') -const fs = require('fs-extra') -const _ = require('lodash') -const yaml = require('js-yaml') -const DepGraph = require('dependency-graph').DepGraph -const commonHelper = require('../helpers/common') +import { Model } from 'objection' +import path from 'node:path' +import fs from 'fs/promises' +import { clone, filter, find, get, has, reverse, some, transform, union } from 'lodash-es' +import yaml from 'js-yaml' +import { DepGraph } from 'dependency-graph' +import { parseModuleProps } from '../helpers/common.mjs' /** * Renderer model */ -module.exports = class Renderer extends Model { +export class Renderer extends Model { static get tableName() { return 'renderers' } static get jsonSchema () { @@ -42,7 +42,7 @@ module.exports = class Renderer extends Model { const def = await fs.readFile(path.join(WIKI.SERVERPATH, 'modules/rendering', dir, 'definition.yml'), 'utf8') const defParsed = yaml.load(def) defParsed.key = dir - defParsed.props = commonHelper.parseModuleProps(defParsed.props) + defParsed.props = parseModuleProps(defParsed.props) WIKI.data.renderers.push(defParsed) WIKI.logger.debug(`Loaded renderers module definition ${dir}: [ OK ]`) } @@ -65,20 +65,20 @@ module.exports = class Renderer extends Model { const newRenderers = [] let updatedRenderers = 0 for (const renderer of WIKI.data.renderers) { - if (!_.some(dbRenderers, ['module', renderer.key])) { + if (!some(dbRenderers, ['module', renderer.key])) { newRenderers.push({ module: renderer.key, isEnabled: renderer.enabledDefault ?? true, - config: _.transform(renderer.props, (result, value, key) => { + config: transform(renderer.props, (result, value, key) => { result[key] = value.default return result }, {}) }) } else { - const rendererConfig = _.get(_.find(dbRenderers, ['module', renderer.key]), 'config', {}) + const rendererConfig = get(find(dbRenderers, ['module', renderer.key]), 'config', {}) await WIKI.db.renderers.query().patch({ - config: _.transform(renderer.props, (result, value, key) => { - if (!_.has(result, key)) { + config: transform(renderer.props, (result, value, key) => { + if (!has(result, key)) { result[key] = value.default } return result @@ -98,7 +98,7 @@ module.exports = class Renderer extends Model { // -> Delete removed Renderers for (const renderer of dbRenderers) { - if (!_.some(WIKI.data.renderers, ['key', renderer.module])) { + if (!some(WIKI.data.renderers, ['key', renderer.module])) { await WIKI.db.renderers.query().where('module', renderer.key).del() WIKI.logger.info(`Removed renderer ${renderer.key} because it is no longer present in the modules folder: [ OK ]`) } @@ -113,7 +113,7 @@ module.exports = class Renderer extends Model { const renderersDb = await WIKI.db.renderers.query().where('isEnabled', true) if (renderersDb && renderersDb.length > 0) { const renderers = renderersDb.map(rdr => { - const renderer = _.find(WIKI.data.renderers, ['key', rdr.module]) + const renderer = find(WIKI.data.renderers, ['key', rdr.module]) return { ...renderer, config: rdr.config @@ -121,8 +121,8 @@ module.exports = class Renderer extends Model { }) // Build tree - const rawCores = _.filter(renderers, renderer => !_.has(renderer, 'dependsOn')).map(core => { - core.children = _.filter(renderers, ['dependsOn', core.key]) + const rawCores = filter(renderers, renderer => !has(renderer, 'dependsOn')).map(core => { + core.children = filter(renderers, ['dependsOn', core.key]) return core }) @@ -140,11 +140,11 @@ module.exports = class Renderer extends Model { }) // Filter unused cores - let activeCoreKeys = _.filter(rawCores, ['input', contentType]).map(core => core.key) - _.clone(activeCoreKeys).map(coreKey => { - activeCoreKeys = _.union(activeCoreKeys, graph.dependenciesOf(coreKey)) + let activeCoreKeys = filter(rawCores, ['input', contentType]).map(core => core.key) + clone(activeCoreKeys).map(coreKey => { + activeCoreKeys = union(activeCoreKeys, graph.dependenciesOf(coreKey)) }) - const activeCores = _.filter(rawCores, core => _.includes(activeCoreKeys, core.key)) + const activeCores = filter(rawCores, core => activeCoreKeys.includes(core.key)) // Rebuild dependency graph with active cores const graphActive = new DepGraph({ circular: true }) @@ -161,8 +161,8 @@ module.exports = class Renderer extends Model { // Reorder cores in reverse dependency order let orderedCores = [] - _.reverse(graphActive.overallOrder()).map(coreKey => { - orderedCores.push(_.find(rawCores, ['key', coreKey])) + reverse(graphActive.overallOrder()).map(coreKey => { + orderedCores.push(find(rawCores, ['key', coreKey])) }) return orderedCores diff --git a/server/models/settings.js b/server/models/settings.mjs similarity index 67% rename from server/models/settings.js rename to server/models/settings.mjs index b8bc3fc6..36b0bdb2 100644 --- a/server/models/settings.js +++ b/server/models/settings.mjs @@ -1,10 +1,10 @@ -const Model = require('objection').Model -const _ = require('lodash') +import { Model } from 'objection' +import { has, reduce, set } from 'lodash-es' /** * Settings model */ -module.exports = class Setting extends Model { +export class Setting extends Model { static get tableName() { return 'settings' } static get idColumn() { return 'key' } @@ -26,8 +26,8 @@ module.exports = class Setting extends Model { static async getConfig() { const settings = await WIKI.db.settings.query() if (settings.length > 0) { - return _.reduce(settings, (res, val, key) => { - _.set(res, val.key, (_.has(val.value, 'v')) ? val.value.v : val.value) + return reduce(settings, (res, val, key) => { + set(res, val.key, (has(val.value, 'v')) ? val.value.v : val.value) return res }, {}) } else { diff --git a/server/models/sites.js b/server/models/sites.mjs similarity index 94% rename from server/models/sites.js rename to server/models/sites.mjs index 2e51e970..5522fae0 100644 --- a/server/models/sites.js +++ b/server/models/sites.mjs @@ -1,12 +1,10 @@ -const Model = require('objection').Model -const crypto = require('crypto') -const pem2jwk = require('pem-jwk').pem2jwk -const _ = require('lodash') +import { Model } from 'objection' +import { defaultsDeep, keyBy } from 'lodash-es' /** * Site model */ -module.exports = class Site extends Model { +export class Site extends Model { static get tableName () { return 'sites' } static get jsonSchema () { @@ -40,7 +38,7 @@ module.exports = class Site extends Model { static async reloadCache () { WIKI.logger.info('Reloading site configurations...') const sites = await WIKI.db.sites.query().orderBy('id') - WIKI.sites = _.keyBy(sites, 'id') + WIKI.sites = keyBy(sites, 'id') WIKI.sitesMappings = {} for (const site of sites) { WIKI.sitesMappings[site.hostname] = site.id @@ -52,7 +50,7 @@ module.exports = class Site extends Model { const newSite = await WIKI.db.sites.query().insertAndFetch({ hostname, isEnabled: true, - config: _.defaultsDeep(config, { + config: defaultsDeep(config, { title: 'My Wiki Site', description: '', company: '', diff --git a/server/models/storage.js b/server/models/storage.mjs similarity index 91% rename from server/models/storage.js rename to server/models/storage.mjs index f22b851f..ed0b3ed1 100644 --- a/server/models/storage.js +++ b/server/models/storage.mjs @@ -1,14 +1,13 @@ -const Model = require('objection').Model -const path = require('path') -const fs = require('fs-extra') -const _ = require('lodash') -const yaml = require('js-yaml') -const commonHelper = require('../helpers/common') +import { Model } from 'objection' +import path from 'node:path' +import fs from 'node:fs/promises' +import { capitalize, find, has, hasIn, uniq } from 'lodash-es' +import yaml from 'js-yaml' /** * Storage model */ -module.exports = class Storage extends Model { +export class Storage extends Model { static get tableName() { return 'storage' } static get idColumn() { return 'id' } @@ -67,7 +66,7 @@ module.exports = class Storage extends Model { * Ensure a storage module is loaded */ static async ensureModule (moduleName) { - if (!_.has(WIKI.storage.modules, moduleName)) { + if (!has(WIKI.storage.modules, moduleName)) { try { WIKI.storage.modules[moduleName] = require(`../modules/storage/${moduleName}/storage`) WIKI.logger.debug(`Activated storage module ${moduleName}: [ OK ]`) @@ -87,7 +86,7 @@ module.exports = class Storage extends Model { */ static async initTargets () { const dbTargets = await WIKI.db.storage.query().where('isEnabled', true) - const activeModules = _.uniq(dbTargets.map(t => t.module)) + const activeModules = uniq(dbTargets.map(t => t.module)) try { // -> Stop and delete existing jobs // const prevjobs = _.remove(WIKI.scheduler.jobs, job => job.name === 'sync-storage') @@ -168,7 +167,7 @@ module.exports = class Storage extends Model { static async assetEvent({ event, asset }) { try { for (let target of this.targets) { - await target.fn[`asset${_.capitalize(event)}`](asset) + await target.fn[`asset${capitalize(event)}`](asset) } } catch (err) { WIKI.logger.warn(err) @@ -195,9 +194,9 @@ module.exports = class Storage extends Model { static async executeAction(targetKey, handler) { try { - const target = _.find(this.targets, ['key', targetKey]) + const target = find(this.targets, ['key', targetKey]) if (target) { - if (_.hasIn(target.fn, handler)) { + if (hasIn(target.fn, handler)) { await target.fn[handler]() } else { throw new Error('Invalid Handler for Storage Target') diff --git a/server/models/tags.js b/server/models/tags.mjs similarity index 74% rename from server/models/tags.js rename to server/models/tags.mjs index 97d75850..a2bec243 100644 --- a/server/models/tags.js +++ b/server/models/tags.mjs @@ -1,10 +1,12 @@ -const Model = require('objection').Model -const _ = require('lodash') +import { Model } from 'objection' +import { concat, differenceBy, some, uniq } from 'lodash-es' + +import { Page } from './pages.mjs' /** * Tags model */ -module.exports = class Tag extends Model { +export class Tag extends Model { static get tableName() { return 'tags' } static get jsonSchema () { @@ -26,7 +28,7 @@ module.exports = class Tag extends Model { return { pages: { relation: Model.ManyToManyRelation, - modelClass: require('./pages'), + modelClass: Page, join: { from: 'tags.id', through: { @@ -52,15 +54,15 @@ module.exports = class Tag extends Model { // Format tags - tags = _.uniq(tags.map(t => _.trim(t).toLowerCase())) + tags = uniq(tags.map(t => t.trim().toLowerCase())) // Create missing tags - const newTags = _.filter(tags, t => !_.some(existingTags, ['tag', t])).map(t => ({ tag: t })) + const newTags = tags.filter(t => !some(existingTags, ['tag', t])).map(t => ({ tag: t })) if (newTags.length > 0) { if (WIKI.config.db.type === 'postgres') { const createdTags = await WIKI.db.tags.query().insert(newTags) - existingTags = _.concat(existingTags, createdTags) + existingTags = concat(existingTags, createdTags) } else { for (const newTag of newTags) { const createdTag = await WIKI.db.tags.query().insert(newTag) @@ -71,12 +73,12 @@ module.exports = class Tag extends Model { // Fetch current page tags - const targetTags = _.filter(existingTags, t => _.includes(tags, t.tag)) + const targetTags = existingTags.filter(t => _.includes(tags, t.tag)) const currentTags = await page.$relatedQuery('tags') // Tags to relate - const tagsToRelate = _.differenceBy(targetTags, currentTags, 'id') + const tagsToRelate = differenceBy(targetTags, currentTags, 'id') if (tagsToRelate.length > 0) { if (WIKI.config.db.type === 'postgres') { await page.$relatedQuery('tags').relate(tagsToRelate) @@ -89,9 +91,9 @@ module.exports = class Tag extends Model { // Tags to unrelate - const tagsToUnrelate = _.differenceBy(currentTags, targetTags, 'id') + const tagsToUnrelate = differenceBy(currentTags, targetTags, 'id') if (tagsToUnrelate.length > 0) { - await page.$relatedQuery('tags').unrelate().whereIn('tags.id', _.map(tagsToUnrelate, 'id')) + await page.$relatedQuery('tags').unrelate().whereIn('tags.id', tagsToUnrelate.map(t => t.id)) } page.tags = targetTags diff --git a/server/models/tree.js b/server/models/tree.mjs similarity index 87% rename from server/models/tree.js rename to server/models/tree.mjs index 448d3745..fdc5057d 100644 --- a/server/models/tree.js +++ b/server/models/tree.mjs @@ -1,7 +1,9 @@ -const Model = require('objection').Model -const _ = require('lodash') +import { Model } from 'objection' +import { differenceWith, dropRight, last, nth } from 'lodash-es' +import { decodeTreePath, encodeTreePath, generateHash } from '../helpers/common.mjs' -const commonHelper = require('../helpers/common') +import { Locale } from './locales.mjs' +import { Site } from './sites.mjs' const rePathName = /^[a-z0-9-]+$/ const reTitle = /^[^<>"]+$/ @@ -9,7 +11,7 @@ const reTitle = /^[^<>"]+$/ /** * Tree model */ -module.exports = class Tree extends Model { +export class Tree extends Model { static get tableName() { return 'tree' } static get jsonSchema () { @@ -37,7 +39,7 @@ module.exports = class Tree extends Model { return { locale: { relation: Model.BelongsToOneRelation, - modelClass: require('./locales'), + modelClass: Locale, join: { from: 'tree.localeCode', to: 'locales.code' @@ -45,7 +47,7 @@ module.exports = class Tree extends Model { }, site: { relation: Model.BelongsToOneRelation, - modelClass: require('./sites'), + modelClass: Site, join: { from: 'tree.siteId', to: 'sites.id' @@ -82,11 +84,11 @@ module.exports = class Tree extends Model { return parent } else { // Get by path - const parentPath = commonHelper.encodeTreePath(path) + const parentPath = encodeTreePath(path) const parentPathParts = parentPath.split('.') const parentFilter = { - folderPath: _.dropRight(parentPathParts).join('.'), - fileName: _.last(parentPathParts) + folderPath: dropRight(parentPathParts).join('.'), + fileName: last(parentPathParts) } const parent = await WIKI.db.knex('tree').where({ ...parentFilter, @@ -133,7 +135,7 @@ module.exports = class Tree extends Model { folderPath: '', fileName: '' } - const folderPath = commonHelper.decodeTreePath(folder.folderPath ? `${folder.folderPath}.${folder.fileName}` : folder.fileName) + const folderPath = decodeTreePath(folder.folderPath ? `${folder.folderPath}.${folder.fileName}` : folder.fileName) const fullPath = folderPath ? `${folderPath}/${fileName}` : fileName WIKI.logger.debug(`Adding page ${fullPath} to tree...`) @@ -144,7 +146,7 @@ module.exports = class Tree extends Model { fileName, type: 'page', title: title, - hash: commonHelper.generateHash(fullPath), + hash: generateHash(fullPath), localeCode: locale, siteId, meta @@ -177,7 +179,7 @@ module.exports = class Tree extends Model { fileName: '' } const folderPath = folder.folderPath ? `${folder.folderPath}.${folder.fileName}` : folder.fileName - const decodedFolderPath = commonHelper.decodeTreePath(folderPath) + const decodedFolderPath = decodeTreePath(folderPath) const fullPath = decodedFolderPath ? `${decodedFolderPath}/${fileName}` : fileName WIKI.logger.debug(`Adding asset ${fullPath} to tree...`) @@ -188,7 +190,7 @@ module.exports = class Tree extends Model { fileName, type: 'asset', title: title, - hash: commonHelper.generateHash(fullPath), + hash: generateHash(fullPath), localeCode: locale, siteId, meta @@ -219,12 +221,12 @@ module.exports = class Tree extends Model { throw new Error('ERR_INVALID_TITLE') } - parentPath = commonHelper.encodeTreePath(parentPath) + parentPath = encodeTreePath(parentPath) WIKI.logger.debug(`Creating new folder ${pathName}...`) const parentPathParts = parentPath.split('.') const parentFilter = { - folderPath: _.dropRight(parentPathParts).join('.'), - fileName: _.last(parentPathParts) + folderPath: dropRight(parentPathParts).join('.'), + fileName: last(parentPathParts) } // Get parent path @@ -259,8 +261,8 @@ module.exports = class Tree extends Model { const parentPathParts = parentPath.split('.') for (let i = 1; i <= parentPathParts.length; i++) { const ancestor = { - folderPath: _.dropRight(parentPathParts, i).join('.'), - fileName: _.nth(parentPathParts, i * -1) + folderPath: dropRight(parentPathParts, i).join('.'), + fileName: nth(parentPathParts, i * -1) } expectedAncestors.push(ancestor) builder.orWhere({ @@ -269,14 +271,14 @@ module.exports = class Tree extends Model { }) } }) - for (const ancestor of _.differenceWith(expectedAncestors, existingAncestors, (expAnc, exsAnc) => expAnc.folderPath === exsAnc.folderPath && expAnc.fileName === exsAnc.fileName)) { + for (const ancestor of differenceWith(expectedAncestors, existingAncestors, (expAnc, exsAnc) => expAnc.folderPath === exsAnc.folderPath && expAnc.fileName === exsAnc.fileName)) { WIKI.logger.debug(`Creating missing parent folder ${ancestor.fileName} at path /${ancestor.folderPath}...`) - const newAncestorFullPath = ancestor.folderPath ? `${commonHelper.decodeTreePath(ancestor.folderPath)}/${ancestor.fileName}` : ancestor.fileName + const newAncestorFullPath = ancestor.folderPath ? `${decodeTreePath(ancestor.folderPath)}/${ancestor.fileName}` : ancestor.fileName const newAncestor = await WIKI.db.knex('tree').insert({ ...ancestor, type: 'folder', title: ancestor.fileName, - hash: commonHelper.generateHash(newAncestorFullPath), + hash: generateHash(newAncestorFullPath), localeCode: locale, siteId: siteId, meta: { @@ -292,13 +294,13 @@ module.exports = class Tree extends Model { } // Create folder - const fullPath = parentPath ? `${commonHelper.decodeTreePath(parentPath)}/${pathName}` : pathName + const fullPath = parentPath ? `${decodeTreePath(parentPath)}/${pathName}` : pathName const folder = await WIKI.db.knex('tree').insert({ folderPath: parentPath, fileName: pathName, type: 'folder', title: title, - hash: commonHelper.generateHash(fullPath), + hash: generateHash(fullPath), localeCode: locale, siteId: siteId, meta: { @@ -375,11 +377,11 @@ module.exports = class Tree extends Model { }) // Rename the folder itself - const fullPath = folder.folderPath ? `${commonHelper.decodeTreePath(folder.folderPath)}/${pathName}` : pathName + const fullPath = folder.folderPath ? `${decodeTreePath(folder.folderPath)}/${pathName}` : pathName await WIKI.db.knex('tree').where('id', folder.id).update({ fileName: pathName, title: title, - hash: commonHelper.generateHash(fullPath) + hash: generateHash(fullPath) }) } else { // Update the folder title only @@ -437,8 +439,8 @@ module.exports = class Tree extends Model { if (folder.folderPath) { const parentPathParts = folder.folderPath.split('.') const parent = await WIKI.db.knex('tree').where({ - folderPath: _.dropRight(parentPathParts).join('.'), - fileName: _.last(parentPathParts) + folderPath: dropRight(parentPathParts).join('.'), + fileName: last(parentPathParts) }).first() await WIKI.db.knex('tree').where('id', parent.id).update({ meta: { diff --git a/server/models/userKeys.js b/server/models/userKeys.mjs similarity index 89% rename from server/models/userKeys.js rename to server/models/userKeys.mjs index 3899ffb1..c47952d3 100644 --- a/server/models/userKeys.js +++ b/server/models/userKeys.mjs @@ -1,13 +1,15 @@ /* global WIKI */ -const Model = require('objection').Model -const { DateTime } = require('luxon') -const { nanoid } = require('nanoid') +import { Model } from 'objection' +import { DateTime } from 'luxon' +import { nanoid } from 'nanoid' + +import { User } from './users.mjs' /** * Users model */ -module.exports = class UserKey extends Model { +export class UserKey extends Model { static get tableName() { return 'userKeys' } static get jsonSchema () { @@ -29,7 +31,7 @@ module.exports = class UserKey extends Model { return { user: { relation: Model.BelongsToOneRelation, - modelClass: require('./users'), + modelClass: User, join: { from: 'userKeys.userId', to: 'users.id' diff --git a/server/models/users.js b/server/models/users.mjs similarity index 86% rename from server/models/users.js rename to server/models/users.mjs index 04d2e7c8..ccceb209 100644 --- a/server/models/users.js +++ b/server/models/users.mjs @@ -1,18 +1,21 @@ /* global WIKI */ -const _ = require('lodash') -const tfa = require('node-2fa') -const jwt = require('jsonwebtoken') -const Model = require('objection').Model -const validate = require('validate.js') -const qr = require('qr-image') +import { difference, find, first, flatten, flattenDeep, get, has, isArray, isEmpty, isNil, last, set, toString, truncate, uniq } from 'lodash-es' +import tfa from 'node-2fa' +import jwt from 'jsonwebtoken' +import { Model } from 'objection' +import validate from 'validate.js' +import qr from 'qr-image' + +import { Group } from './groups.mjs' +import { Locale } from './locales.mjs' const bcryptRegexp = /^\$2[ayb]\$[0-9]{2}\$[A-Za-z0-9./]{53}$/ /** * Users model */ -module.exports = class User extends Model { +export class User extends Model { static get tableName() { return 'users' } static get jsonSchema () { @@ -42,7 +45,7 @@ module.exports = class User extends Model { return { groups: { relation: Model.ManyToManyRelation, - modelClass: require('./groups'), + modelClass: Group, join: { from: 'users.id', through: { @@ -54,7 +57,7 @@ module.exports = class User extends Model { }, locale: { relation: Model.BelongsToOneRelation, - modelClass: require('./locales'), + modelClass: Locale, join: { from: 'users.localeCode', to: 'locales.code' @@ -113,15 +116,15 @@ module.exports = class User extends Model { verifyTFA(code) { let result = tfa.verifyToken(this.tfaSecret, code) - return (result && _.has(result, 'delta') && result.delta === 0) + return (result && has(result, 'delta') && result.delta === 0) } getPermissions () { - return _.uniq(_.flatten(_.map(this.groups, 'permissions'))) + return uniq(flatten(this.groups.map(g => g.permissions))) } getGroups() { - return _.uniq(_.map(this.groups, 'id')) + return uniq(this.groups.map(g => g.id)) } // ------------------------------------------------ @@ -135,32 +138,32 @@ module.exports = class User extends Model { } static async processProfile({ profile, providerKey }) { - const provider = _.get(WIKI.auth.strategies, providerKey, {}) - provider.info = _.find(WIKI.data.authentication, ['key', provider.stategyKey]) + const provider = get(WIKI.auth.strategies, providerKey, {}) + provider.info = find(WIKI.data.authentication, ['key', provider.stategyKey]) // Find existing user let user = await WIKI.db.users.query().findOne({ - providerId: _.toString(profile.id), + providerId: toString(profile.id), providerKey }) // Parse email let primaryEmail = '' - if (_.isArray(profile.emails)) { - const e = _.find(profile.emails, ['primary', true]) - primaryEmail = (e) ? e.value : _.first(profile.emails).value - } else if (_.isArray(profile.email)) { - primaryEmail = _.first(_.flattenDeep([profile.email])) - } else if (_.isString(profile.email) && profile.email.length > 5) { + if (isArray(profile.emails)) { + const e = find(profile.emails, ['primary', true]) + primaryEmail = (e) ? e.value : first(profile.emails).value + } else if (isArray(profile.email)) { + primaryEmail = first(flattenDeep([profile.email])) + } else if (isString(profile.email) && profile.email.length > 5) { primaryEmail = profile.email - } else if (_.isString(profile.mail) && profile.mail.length > 5) { + } else if (isString(profile.mail) && profile.mail.length > 5) { primaryEmail = profile.mail } else if (profile.user && profile.user.email && profile.user.email.length > 5) { primaryEmail = profile.user.email } else { throw new Error('Missing or invalid email address from profile.') } - primaryEmail = _.toLower(primaryEmail) + primaryEmail = primaryEmail.toLowerCase() // Find pending social user if (!user) { @@ -171,16 +174,16 @@ module.exports = class User extends Model { }) if (user) { user = await user.$query().patchAndFetch({ - providerId: _.toString(profile.id) + providerId: toString(profile.id) }) } } // Parse display name let displayName = '' - if (_.isString(profile.displayName) && profile.displayName.length > 0) { + if (isString(profile.displayName) && profile.displayName.length > 0) { displayName = profile.displayName - } else if (_.isString(profile.name) && profile.name.length > 0) { + } else if (isString(profile.name) && profile.name.length > 0) { displayName = profile.name } else { displayName = primaryEmail.split('@')[0] @@ -191,7 +194,7 @@ module.exports = class User extends Model { if (profile.picture && Buffer.isBuffer(profile.picture)) { pictureUrl = 'internal' } else { - pictureUrl = _.truncate(_.get(profile, 'picture', _.get(user, 'pictureUrl', null)), { + pictureUrl = truncate(get(profile, 'picture', get(user, 'pictureUrl', null)), { length: 255, omission: '' }) @@ -222,9 +225,9 @@ module.exports = class User extends Model { // Self-registration if (provider.selfRegistration) { // Check if email domain is whitelisted - if (_.get(provider, 'domainWhitelist', []).length > 0) { - const emailDomain = _.last(primaryEmail.split('@')) - if (!_.includes(provider.domainWhitelist, emailDomain)) { + if (get(provider, 'domainWhitelist', []).length > 0) { + const emailDomain = last(primaryEmail.split('@')) + if (!provider.domainWhitelist.includes(emailDomain)) { throw new WIKI.Error.AuthRegistrationDomainUnauthorized() } } @@ -232,7 +235,7 @@ module.exports = class User extends Model { // Create account user = await WIKI.db.users.query().insertAndFetch({ providerKey: providerKey, - providerId: _.toString(profile.id), + providerId: toString(profile.id), email: primaryEmail, name: displayName, pictureUrl: pictureUrl, @@ -263,19 +266,19 @@ module.exports = class User extends Model { * Login a user */ static async login (opts, context) { - if (_.has(WIKI.auth.strategies, opts.strategy)) { - const selStrategy = _.get(WIKI.auth.strategies, opts.strategy) + if (has(WIKI.auth.strategies, opts.strategy)) { + const selStrategy = get(WIKI.auth.strategies, opts.strategy) if (!selStrategy.isEnabled) { throw new WIKI.Error.AuthProviderInvalid() } - const strInfo = _.find(WIKI.data.authentication, ['key', selStrategy.module]) + const strInfo = find(WIKI.data.authentication, ['key', selStrategy.module]) // Inject form user/pass if (strInfo.useForm) { - _.set(context.req, 'body.email', opts.username) - _.set(context.req, 'body.password', opts.password) - _.set(context.req.params, 'strategy', opts.strategy) + set(context.req, 'body.email', opts.username) + set(context.req, 'body.password', opts.password) + set(context.req.params, 'strategy', opts.strategy) } // Authenticate @@ -312,7 +315,7 @@ module.exports = class User extends Model { let redirect = '/' if (user.groups && user.groups.length > 0) { for (const grp of user.groups) { - if (!_.isEmpty(grp.redirectOnLogin) && grp.redirectOnLogin !== '/') { + if (!isEmpty(grp.redirectOnLogin) && grp.redirectOnLogin !== '/') { redirect = grp.redirectOnLogin break } @@ -391,7 +394,7 @@ module.exports = class User extends Model { * Generate a new token for a user */ static async refreshToken(user, provider) { - if (_.isString(user)) { + if (isString(user)) { user = await WIKI.db.users.query().findById(user).withGraphFetched('groups').modifyGraph('groups', builder => { builder.select('groups.id', 'permissions') }) @@ -403,7 +406,7 @@ module.exports = class User extends Model { WIKI.logger.warn(`Failed to refresh token for user ${user}: Inactive.`) throw new WIKI.Error.AuthAccountBanned() } - } else if (_.isNil(user.groups)) { + } else if (isNil(user.groups)) { user.groups = await user.$relatedQuery('groups').select('groups.id', 'permissions') } @@ -523,7 +526,7 @@ module.exports = class User extends Model { */ static async createNewUser ({ providerKey, email, passwordRaw, name, groups, mustChangePassword, sendWelcomeEmail }) { // Input sanitization - email = _.toLower(email) + email = email.toLowerCase() // Input validation let validation = null @@ -643,7 +646,7 @@ module.exports = class User extends Model { const usr = await WIKI.db.users.query().findById(id) if (usr) { let usrData = {} - if (!_.isEmpty(email) && email !== usr.email) { + if (!isEmpty(email) && email !== usr.email) { const dupUsr = await WIKI.db.users.query().select('id').where({ email, providerKey: usr.providerKey @@ -651,44 +654,44 @@ module.exports = class User extends Model { if (dupUsr) { throw new WIKI.Error.AuthAccountAlreadyExists() } - usrData.email = _.toLower(email) + usrData.email = email.toLowerCase() } - if (!_.isEmpty(name) && name !== usr.name) { - usrData.name = _.trim(name) + if (!isEmpty(name) && name !== usr.name) { + usrData.name = name.trim() } - if (!_.isEmpty(newPassword)) { + if (!isEmpty(newPassword)) { if (newPassword.length < 6) { throw new WIKI.Error.InputInvalid('Password must be at least 6 characters!') } usrData.password = newPassword } - if (_.isArray(groups)) { + if (isArray(groups)) { const usrGroupsRaw = await usr.$relatedQuery('groups') - const usrGroups = _.map(usrGroupsRaw, 'id') + const usrGroups = usrGroupsRaw.map(g => g.id) // Relate added groups - const addUsrGroups = _.difference(groups, usrGroups) + const addUsrGroups = difference(groups, usrGroups) for (const grp of addUsrGroups) { await usr.$relatedQuery('groups').relate(grp) } // Unrelate removed groups - const remUsrGroups = _.difference(usrGroups, groups) + const remUsrGroups = difference(usrGroups, groups) for (const grp of remUsrGroups) { await usr.$relatedQuery('groups').unrelate().where('groupId', grp) } } - if (!_.isEmpty(location) && location !== usr.location) { - usrData.location = _.trim(location) + if (!isEmpty(location) && location !== usr.location) { + usrData.location = location.trim() } - if (!_.isEmpty(jobTitle) && jobTitle !== usr.jobTitle) { - usrData.jobTitle = _.trim(jobTitle) + if (!isEmpty(jobTitle) && jobTitle !== usr.jobTitle) { + usrData.jobTitle = jobTitle.trim() } - if (!_.isEmpty(timezone) && timezone !== usr.timezone) { + if (!isEmpty(timezone) && timezone !== usr.timezone) { usrData.timezone = timezone } - if (!_.isNil(dateFormat) && dateFormat !== usr.dateFormat) { + if (!isNil(dateFormat) && dateFormat !== usr.dateFormat) { usrData.dateFormat = dateFormat } - if (!_.isNil(appearance) && appearance !== usr.appearance) { + if (!isNil(appearance) && appearance !== usr.appearance) { usrData.appearance = appearance } await WIKI.db.users.query().patch(usrData).findById(id) @@ -729,7 +732,7 @@ module.exports = class User extends Model { // Check if self-registration is enabled if (localStrg.selfRegistration || bypassChecks) { // Input sanitization - email = _.toLower(email) + email = email.toLowerCase() // Input validation const validation = validate({ @@ -766,9 +769,9 @@ module.exports = class User extends Model { } // Check if email domain is whitelisted - if (_.get(localStrg, 'domainWhitelist.v', []).length > 0 && !bypassChecks) { - const emailDomain = _.last(email.split('@')) - if (!_.includes(localStrg.domainWhitelist.v, emailDomain)) { + if (get(localStrg, 'domainWhitelist.v', []).length > 0 && !bypassChecks) { + const emailDomain = last(email.split('@')) + if (!localStrg.domainWhitelist.v.includes(emailDomain)) { throw new WIKI.Error.AuthRegistrationDomainUnauthorized() } } @@ -790,7 +793,7 @@ module.exports = class User extends Model { }) // Assign to group(s) - if (_.get(localStrg, 'autoEnrollGroups.v', []).length > 0) { + if (get(localStrg, 'autoEnrollGroups.v', []).length > 0) { await newUsr.$relatedQuery('groups').relate(localStrg.autoEnrollGroups.v) } @@ -832,12 +835,12 @@ module.exports = class User extends Model { if (!context.req.user || context.req.user.id === WIKI.config.auth.guestUserId) { return '/' } - if (context.req.user.strategyId && _.has(WIKI.auth.strategies, context.req.user.strategyId)) { + if (context.req.user.strategyId && has(WIKI.auth.strategies, context.req.user.strategyId)) { const selStrategy = WIKI.auth.strategies[context.req.user.strategyId] if (!selStrategy.isEnabled) { throw new WIKI.Error.AuthProviderInvalid() } - const provider = _.find(WIKI.data.authentication, ['key', selStrategy.module]) + const provider = find(WIKI.data.authentication, ['key', selStrategy.module]) if (provider.logout) { return provider.logout(provider.config) } diff --git a/server/package-lock.json b/server/package-lock.json index e0f04345..f592dbd4 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -9,94 +9,91 @@ "version": "3.0.0", "license": "AGPL-3.0", "dependencies": { - "@azure/storage-blob": "12.11.0", + "@azure/storage-blob": "12.13.0", "@exlinc/keycloak-passport": "1.0.2", - "@graphql-tools/schema": "8.3.7", - "@graphql-tools/utils": "8.6.6", - "@joplin/turndown-plugin-gfm": "1.0.44", + "@graphql-tools/schema": "9.0.17", + "@graphql-tools/utils": "9.2.1", + "@joplin/turndown-plugin-gfm": "1.0.47", "@root/csr": "0.8.1", "@root/keypairs": "0.10.3", "@root/pem": "1.0.4", "acme": "3.0.3", - "akismet-api": "5.3.0", + "akismet-api": "6.0.0", "apollo-fetch": "0.7.0", "apollo-server": "3.6.7", "apollo-server-express": "3.6.7", "auto-load": "3.0.4", - "aws-sdk": "2.1208.0", + "aws-sdk": "2.1353.0", "bcryptjs-then": "1.0.1", - "body-parser": "1.20.0", - "chalk": "4.1.2", + "body-parser": "1.20.2", + "chalk": "5.2.0", "cheerio": "1.0.0-rc.12", "chokidar": "3.5.3", "chromium-pickle-js": "0.2.0", - "clean-css": "4.2.3", + "clean-css": "5.3.2", "command-exists": "1.2.9", "compression": "1.7.4", - "connect-session-knex": "3.0.0", + "connect-session-knex": "3.0.1", "cookie-parser": "1.4.6", "cors": "2.8.5", - "cron-parser": "4.6.0", + "cron-parser": "4.8.1", "cuint": "0.2.2", "custom-error-instance": "2.1.2", - "dependency-graph": "0.9.0", - "diff": "4.0.2", - "diff2html": "3.1.14", - "dompurify": "2.4.0", + "dependency-graph": "0.11.0", + "diff": "5.1.0", + "diff2html": "3.4.34", + "dompurify": "3.0.1", "dotize": "0.3.0", - "emoji-regex": "10.1.0", - "eventemitter2": "6.4.7", - "express": "4.18.1", + "emoji-regex": "10.2.1", + "eventemitter2": "6.4.9", + "express": "4.18.2", "express-brute": "1.0.1", "express-session": "1.17.3", - "file-type": "15.0.1", - "filesize": "6.1.0", - "fs-extra": "9.0.1", + "file-type": "18.2.1", + "filesize": "10.0.7", + "fs-extra": "11.1.1", "getos": "3.2.1", - "graphql": "16.3.0", + "graphql": "16.6.0", "graphql-list-fields": "2.0.2", - "graphql-rate-limit-directive": "2.0.2", - "graphql-tools": "8.2.5", - "graphql-upload": "13.0.0", + "graphql-rate-limit-directive": "2.0.3", + "graphql-tools": "8.3.19", + "graphql-upload": "16.0.2", "he": "1.2.0", - "highlight.js": "10.3.1", - "i18next": "19.8.3", + "highlight.js": "11.7.0", + "i18next": "22.4.14", "i18next-node-fs-backend": "2.1.3", - "image-size": "0.9.2", - "js-base64": "3.7.2", + "image-size": "1.0.2", + "js-base64": "3.7.5", "js-binary": "1.2.0", "js-yaml": "4.1.0", - "jsdom": "16.4.0", - "jsonwebtoken": "8.5.1", - "katex": "0.12.0", - "klaw": "4.0.1", - "knex": "2.3.0", + "jsdom": "21.1.1", + "jsonwebtoken": "9.0.0", + "katex": "0.16.4", + "klaw": "4.1.0", + "knex": "2.4.2", "lodash": "4.17.21", - "luxon": "2.3.1", - "markdown-it": "11.0.1", + "lodash-es": "4.17.21", + "luxon": "3.3.0", + "markdown-it": "13.0.1", "markdown-it-abbr": "1.0.4", - "markdown-it-attrs": "3.0.3", - "markdown-it-emoji": "1.4.0", + "markdown-it-emoji": "2.0.2", "markdown-it-expand-tabs": "1.0.13", "markdown-it-external-links": "0.0.6", "markdown-it-footnote": "3.0.3", "markdown-it-imsize": "2.0.1", "markdown-it-mark": "3.0.1", "markdown-it-mathjax": "2.0.0", - "markdown-it-multimd-table": "4.0.3", "markdown-it-sub": "1.0.0", "markdown-it-sup": "1.0.0", "markdown-it-task-lists": "2.1.1", - "mathjax": "3.1.2", + "mathjax": "3.2.2", "mime-types": "2.1.35", - "moment": "2.29.2", - "moment-timezone": "0.5.31", "ms": "2.1.3", "multer": "1.4.4", - "nanoid": "3.3.2", - "node-2fa": "1.1.2", + "nanoid": "4.0.2", + "node-2fa": "2.0.3", "node-cache": "5.1.2", - "nodemailer": "6.7.8", + "nodemailer": "6.9.1", "objection": "3.0.1", "passport": "0.6.0", "passport-auth0": "1.4.3", @@ -108,60 +105,59 @@ "passport-github2": "0.1.12", "passport-gitlab2": "5.0.0", "passport-google-oauth20": "2.0.0", - "passport-jwt": "4.0.0", + "passport-jwt": "4.0.1", "passport-ldapauth": "3.0.1", "passport-local": "1.0.0", "passport-microsoft": "1.0.0", - "passport-oauth2": "1.6.1", + "passport-oauth2": "1.7.0", "passport-okta-oauth": "0.0.1", "passport-openidconnect": "0.1.1", "passport-saml": "3.2.1", "passport-slack-oauth2": "1.1.1", "passport-twitch-strategy": "2.2.0", "pem-jwk": "2.0.0", - "pg": "8.8.0", + "pg": "8.10.0", "pg-hstore": "2.3.4", - "pg-pubsub": "0.8.0", - "pg-query-stream": "4.2.4", - "pg-tsquery": "8.4.0", - "poolifier": "2.2.0", + "pg-pubsub": "0.8.1", + "pg-query-stream": "4.4.0", + "pg-tsquery": "8.4.1", + "poolifier": "2.4.4", "pug": "3.0.2", - "punycode": "2.1.1", - "puppeteer-core": "17.1.3", + "punycode": "2.3.0", + "puppeteer-core": "19.8.5", "qr-image": "3.2.0", - "rate-limiter-flexible": "2.3.8", - "remove-markdown": "0.3.0", + "rate-limiter-flexible": "2.4.1", + "remove-markdown": "0.5.0", "request": "2.88.2", "request-promise": "4.2.6", "safe-regex": "2.1.1", "sanitize-filename": "1.6.3", "scim-query-filter-parser": "2.0.4", - "semver": "7.3.7", + "semver": "7.3.8", "serve-favicon": "2.5.0", - "sharp": "0.31.0", - "simple-git": "2.21.0", - "socket.io": "4.5.2", - "ssh2": "1.9.0", - "ssh2-promise": "1.0.2", + "sharp": "0.32.0", + "simple-git": "3.17.0", + "socket.io": "4.6.1", + "ssh2": "1.11.0", + "ssh2-promise": "1.0.3", "striptags": "3.2.0", "tar-fs": "2.1.1", - "turndown": "7.1.1", - "twemoji": "13.1.0", + "turndown": "7.1.2", "uslug": "1.0.4", - "uuid": "8.3.2", + "uuid": "9.0.0", "validate.js": "0.13.1", "xss": "1.0.14", - "yargs": "16.1.0" + "yargs": "17.7.1" }, "devDependencies": { - "eslint": "7.12.0", + "eslint": "8.38.0", "eslint-config-requarks": "1.0.7", - "eslint-config-standard": "15.0.0", - "eslint-plugin-import": "2.22.1", + "eslint-config-standard": "17.0.0", + "eslint-plugin-import": "2.27.5", "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.2.1", - "eslint-plugin-standard": "4.0.2", - "nodemon": "2.0.15" + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-standard": "4.1.0", + "nodemon": "2.0.22" }, "engines": { "node": ">=18.0" @@ -379,9 +375,9 @@ } }, "node_modules/@azure/core-http": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz", - "integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.0.tgz", + "integrity": "sha512-BxI2SlGFPPz6J1XyZNIVUf0QZLBKFX+ViFjKOkzqD18J1zOINIQ8JSBKKr+i+v8+MB6LacL6Nn/sP/TE13+s2Q==", "dependencies": { "@azure/abort-controller": "^1.0.0", "@azure/core-auth": "^1.3.0", @@ -393,7 +389,6 @@ "form-data": "^4.0.0", "node-fetch": "^2.6.7", "process": "^0.11.10", - "tough-cookie": "^4.0.0", "tslib": "^2.2.0", "tunnel": "^0.0.6", "uuid": "^8.3.0", @@ -403,6 +398,14 @@ "node": ">=14.0.0" } }, + "node_modules/@azure/core-http/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@azure/core-lro": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.5.1.tgz", @@ -440,9 +443,9 @@ } }, "node_modules/@azure/core-util": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.2.0.tgz", - "integrity": "sha512-ffGIw+Qs8bNKNLxz5UPkz4/VBM/EZY07mPve1ZYFqYUdPwFqRj0RPk0U7LZMOfT7GCck9YjuT1Rfp1PApNl1ng==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.3.0.tgz", + "integrity": "sha512-ANP0Er7R2KHHHjwmKzPF9wbd0gXvOX7yRRHeYL1eNd/OaNrMLyfZH/FQasHRVAf6rMXX+EAUpvYwLMFDHDI5Gw==", "dependencies": { "@azure/abort-controller": "^1.0.0", "tslib": "^2.2.0" @@ -463,12 +466,12 @@ } }, "node_modules/@azure/storage-blob": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.11.0.tgz", - "integrity": "sha512-na+FisoARuaOWaHWpmdtk3FeuTWf2VWamdJ9/TJJzj5ZdXPLC3juoDgFs6XVuJIoK30yuBpyFBEDXVRK4pB7Tg==", + "version": "12.13.0", + "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.13.0.tgz", + "integrity": "sha512-t3Q2lvBMJucgTjQcP5+hvEJMAsJSk0qmAnjDLie2td017IiduZbbC9BOcFfmwzR6y6cJdZOuewLCNFmEx9IrXA==", "dependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/core-http": "^2.0.0", + "@azure/core-http": "^3.0.0", "@azure/core-lro": "^2.2.0", "@azure/core-paging": "^1.1.1", "@azure/core-tracing": "1.0.0-preview.13", @@ -477,19 +480,7 @@ "tslib": "^2.2.0" }, "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" + "node": ">=14.0.0" } }, "node_modules/@babel/helper-string-parser": { @@ -508,82 +499,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { "version": "7.21.3", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.3.tgz", @@ -619,34 +534,51 @@ "node": ">=6.9.0" } }, - "node_modules/@eslint/eslintrc": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz", - "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==", + "node_modules/@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==", "dev": true, "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/@eslint-community/regexpp": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", + "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", "dev": true, "dependencies": { - "sprintf-js": "~1.0.2" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.5.1", + "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" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/eslintrc/node_modules/debug": { @@ -666,30 +598,20 @@ } } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@eslint/eslintrc/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/@eslint/eslintrc/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "node_modules/@eslint/js": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz", + "integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } }, "node_modules/@exlinc/keycloak-passport": { "version": "1.0.2", @@ -700,22 +622,17 @@ } }, "node_modules/@graphql-tools/merge": { - "version": "8.2.7", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.7.tgz", - "integrity": "sha512-rKxjNogqu1UYAG/y5FOb6lJsmSQbWA+jq4inWjNEVX54VGGE7/WGnmPaqcsyomNOfS3vIRS6NnG+DxiQSqetjg==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.4.0.tgz", + "integrity": "sha512-3XYCWe0d3I4F1azNj1CdShlbHfTIfiDgj00R9uvFH8tHKh7i1IWN3F7QQYovcHKhayaR6zPok3YYMESYQcBoaA==", "dependencies": { - "@graphql-tools/utils": "8.6.6", - "tslib": "~2.3.0" + "@graphql-tools/utils": "9.2.1", + "tslib": "^2.4.0" }, "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-tools/merge/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, "node_modules/@graphql-tools/mock": { "version": "8.7.19", "resolved": "https://registry.npmjs.org/@graphql-tools/mock/-/mock-8.7.19.tgz", @@ -730,19 +647,7 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-tools/mock/node_modules/@graphql-tools/merge": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.4.0.tgz", - "integrity": "sha512-3XYCWe0d3I4F1azNj1CdShlbHfTIfiDgj00R9uvFH8tHKh7i1IWN3F7QQYovcHKhayaR6zPok3YYMESYQcBoaA==", - "dependencies": { - "@graphql-tools/utils": "9.2.1", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-tools/mock/node_modules/@graphql-tools/schema": { + "node_modules/@graphql-tools/schema": { "version": "9.0.17", "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.17.tgz", "integrity": "sha512-HVLq0ecbkuXhJlpZ50IHP5nlISqH2GbNgjBJhhRzHeXhfwlUOT4ISXGquWTmuq61K0xSaO0aCjMpxe4QYbKTng==", @@ -756,7 +661,7 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-tools/mock/node_modules/@graphql-tools/utils": { + "node_modules/@graphql-tools/utils": { "version": "9.2.1", "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", @@ -768,49 +673,6 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-tools/mock/node_modules/value-or-promise": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", - "integrity": "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==", - "engines": { - "node": ">=12" - } - }, - "node_modules/@graphql-tools/schema": { - "version": "8.3.7", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.7.tgz", - "integrity": "sha512-7byr9J6rfMPFPfiR4u65dy20xHATTvbgOY7KYd1sYPnMKKfRZe0tUgpnE+noXcfob7N8s366WaVh7bEoztQMwg==", - "dependencies": { - "@graphql-tools/merge": "8.2.7", - "@graphql-tools/utils": "8.6.6", - "tslib": "~2.3.0", - "value-or-promise": "1.0.11" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-tools/schema/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, - "node_modules/@graphql-tools/utils": { - "version": "8.6.6", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.6.tgz", - "integrity": "sha512-wjY2ljKLCnnbRrDNPPgPNqCujou0LFSOWcxAjV6DYUlfFWTsAEvlYmsmY4T+K12wI/fnqoJ2bUwIlap1plFDMg==", - "dependencies": { - "tslib": "~2.3.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-tools/utils/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, "node_modules/@graphql-typed-document-node/core": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", @@ -830,10 +692,66 @@ "node": ">=0.10.0" } }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@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==", + "dev": true + }, "node_modules/@joplin/turndown-plugin-gfm": { - "version": "1.0.44", - "resolved": "https://registry.npmjs.org/@joplin/turndown-plugin-gfm/-/turndown-plugin-gfm-1.0.44.tgz", - "integrity": "sha512-lpVI/fpj0CKzWzpsOxsmqwjWlIrw+IZlIEz3h8Vqoviz8dCYbqSSY/4VxpiUDmBpxX/3Xk73R5BfzqiAHBmYqA==" + "version": "1.0.47", + "resolved": "https://registry.npmjs.org/@joplin/turndown-plugin-gfm/-/turndown-plugin-gfm-1.0.47.tgz", + "integrity": "sha512-VjY7ER5O+AUfhPkaxY25hh4N8PnZEc6311kJj040CHIXV9EYH7xuaS/MLeZL296FNLbsPaHbl5aQiOQ3xwTLJw==" }, "node_modules/@josephg/resolvable": { "version": "1.0.1", @@ -874,6 +792,41 @@ "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" }, + "node_modules/@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==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@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==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@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==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@opentelemetry/api": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.1.tgz", @@ -936,6 +889,56 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "node_modules/@puppeteer/browsers": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-0.4.0.tgz", + "integrity": "sha512-3iB5pWn9Sr55PKKwqFWSWjLsTKCOEhKNI+uV3BZesgXuA3IhsX8I3hW0HI+3ksMIPkh2mVYzKSpvgq3oicjG2Q==", + "dependencies": { + "debug": "4.3.4", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.1", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "yargs": "17.7.1" + }, + "bin": { + "browsers": "lib/cjs/main-cli.js" + }, + "engines": { + "node": ">=14.1.0" + }, + "peerDependencies": { + "typescript": ">= 4.7.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@puppeteer/browsers/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@puppeteer/browsers/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "node_modules/@root/acme": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@root/acme/-/acme-3.1.0.tgz", @@ -1002,37 +1005,24 @@ "@root/encoding": "^1.0.1" } }, - "node_modules/@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/@socket.io/component-emitter": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, - "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@tokenizer/token": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "engines": { + "node": ">= 10" + } + }, "node_modules/@types/accepts": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", @@ -1050,6 +1040,14 @@ "@types/node": "*" } }, + "node_modules/@types/busboy": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@types/busboy/-/busboy-1.5.0.tgz", + "integrity": "sha512-ncOOhwmyFDW76c/Tuvv9MA9VGYUCn8blzyWmzYELcNGDb0WXWLSmFi7hJq25YdRBYJrmMBB5jZZwUjlJe9HCjQ==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -1119,9 +1117,9 @@ "integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==" }, "node_modules/@types/node-fetch": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz", - "integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz", + "integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==", "dependencies": { "@types/node": "*", "form-data": "^3.0.0" @@ -1140,6 +1138,19 @@ "node": ">= 6" } }, + "node_modules/@types/notp": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/notp/-/notp-2.0.2.tgz", + "integrity": "sha512-JUcVYN9Tmw0AjoAfvjslS4hbv39fPBbZdftBK3b50g5z/DmhLsu6cd0UOEBiQuMwy2FirshF2Gk9gAvfWjshMw==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/object-path": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/@types/object-path/-/object-path-0.11.1.tgz", + "integrity": "sha512-219LSCO9HPcoXcRTC6DbCs0FRhZgBnEMzf16RRqkT40WbkKx3mOeQuz3e2XqbfhOz/AHfbru0kzB1n1RCAsIIg==" + }, "node_modules/@types/qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", @@ -1267,12 +1278,23 @@ } }, "node_modules/acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", + "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" + "acorn": "^8.1.0", + "acorn-walk": "^8.0.2" + } + }, + "node_modules/acorn-globals/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" } }, "node_modules/acorn-jsx": { @@ -1285,9 +1307,9 @@ } }, "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "engines": { "node": ">=0.4.0" } @@ -1340,62 +1362,15 @@ } }, "node_modules/akismet-api": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/akismet-api/-/akismet-api-5.3.0.tgz", - "integrity": "sha512-mFkZptwjdPt73gH63vqzVXe2kYZBgGV05FNS3BWLolYG4B8mVRxgoXtuSyg+jXl/pRPC37a92E9fX6tKwrMErg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/akismet-api/-/akismet-api-6.0.0.tgz", + "integrity": "sha512-IqPwdqKOpRXXJg/T2772BB1RoCFfB5kBX1Zeef98T/RkIIFuRqO1kPM4wAjgIdGtvP7YNQ8VYh9kTszpR0637g==", "dependencies": { "bluebird": "^3.1.1", - "superagent": "^7.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "dependencies": { - "string-width": "^4.1.0" - } - }, - "node_modules/ansi-align/node_modules/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==", - "dev": true - }, - "node_modules/ansi-align/node_modules/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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-align/node_modules/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==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "superagent": "^8.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/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==", - "dev": true, - "engines": { - "node": ">=6" + "node": ">=14.0.0" } }, "node_modules/ansi-regex": { @@ -1561,12 +1536,49 @@ "graphql": "^15.3.0 || ^16.0.0" } }, - "node_modules/apollo-server-core/node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", - "bin": { - "uuid": "dist/bin/uuid" + "node_modules/apollo-server-core/node_modules/@graphql-tools/merge": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.3.1.tgz", + "integrity": "sha512-BMm99mqdNZbEYeTPK3it9r9S6rsZsQKtlqJsSBknAclXq2pGEfOxjcIZi+kBSkHZKPKCRrYDd5vY0+rUmIHVLg==", + "dependencies": { + "@graphql-tools/utils": "8.9.0", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/apollo-server-core/node_modules/@graphql-tools/schema": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.5.1.tgz", + "integrity": "sha512-0Esilsh0P/qYcB5DKQpiKeQs/jevzIadNTaT0jeWklPMwNbT7yMX4EqZany7mbeRRlSRwMzNzL5olyFdffHBZg==", + "dependencies": { + "@graphql-tools/merge": "8.3.1", + "@graphql-tools/utils": "8.9.0", + "tslib": "^2.4.0", + "value-or-promise": "1.0.11" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/apollo-server-core/node_modules/@graphql-tools/utils": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.9.0.tgz", + "integrity": "sha512-pjJIWH0XOVnYGXCqej8g/u/tsfV4LvLlj0eATKQu5zwnxd/TiTHq7Cg313qUPTFFHZ3PP5wJ15chYVtLDwaymg==", + "dependencies": { + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/apollo-server-core/node_modules/value-or-promise": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz", + "integrity": "sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==", + "engines": { + "node": ">=12" } }, "node_modules/apollo-server-env": { @@ -1717,6 +1729,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -1754,15 +1784,6 @@ "node": ">=0.8" } }, - "node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", @@ -1781,14 +1802,6 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/auto-load": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/auto-load/-/auto-load-3.0.4.tgz", @@ -1809,9 +1822,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1208.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1208.0.tgz", - "integrity": "sha512-Wyq9TJyvRZMcHmcGwmOJag5/94m+Gq3BHcK2klwFvgUf1OWWJc4OYqmi90d7qJ09ydTeGGMeodNJildQdkOrYQ==", + "version": "2.1353.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1353.0.tgz", + "integrity": "sha512-IEzWRxeecNYwUEvHVvYlE9Q85VF1uytzL0SeZp67xl9BQHAhwPVMZyTqqxUq3z4A/8iDUteZe/o0DIJhttoeTg==", "dependencies": { "buffer": "4.9.2", "events": "1.1.1", @@ -1908,7 +1921,8 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "devOptional": true }, "node_modules/base64-js": { "version": "1.5.1", @@ -2032,20 +2046,20 @@ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.10.3", - "raw-body": "2.5.1", + "qs": "6.11.0", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -2059,73 +2073,11 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, - "node_modules/boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dev": true, - "dependencies": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/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==", - "dev": true - }, - "node_modules/boxen/node_modules/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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/boxen/node_modules/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==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/boxen/node_modules/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==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "devOptional": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2142,11 +2094,6 @@ "node": ">=8" } }, - "node_modules/browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" - }, "node_modules/buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -2192,6 +2139,16 @@ "node": ">=10.0.0" } }, + "node_modules/builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "peer": true, + "dependencies": { + "semver": "^7.0.0" + } + }, "node_modules/bunyan": { "version": "1.8.15", "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.15.tgz", @@ -2210,14 +2167,22 @@ } }, "node_modules/busboy": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.3.1.tgz", - "integrity": "sha512-y7tTxhGKXcyBxRKAni+awqx8uqaJKrSFSNFSeRG5CsWNdmy2BIK+6VGWEW7TZnIO/533mtMEA4rOevQV815YJw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", "dependencies": { - "dicer": "0.3.0" + "streamsearch": "^1.1.0" }, "engines": { - "node": ">=4.5.0" + "node": ">=10.16.0" + } + }, + "node_modules/busboy/node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" } }, "node_modules/bytes": { @@ -2243,33 +2208,6 @@ "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" }, - "node_modules/cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -2291,33 +2229,17 @@ "node": ">=6" } }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -2398,74 +2320,44 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, + "node_modules/chromium-bidi": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.6.tgz", + "integrity": "sha512-TQOkWRaLI/IWvoP8XC+7jO4uHTIiAUiklXU1T0qszlUFEai9LgKXIBXy3pOS3EnQZ3bQtMbKUPkug0fTAEHCSw==", + "dependencies": { + "mitt": "3.0.0" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, "node_modules/chromium-pickle-js": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz", "integrity": "sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw==" }, - "node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, "node_modules/clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", - "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", + "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==", "dependencies": { "source-map": "~0.6.0" }, "engines": { - "node": ">= 4.0" - } - }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/cliui/node_modules/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==" - }, - "node_modules/cliui/node_modules/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==", - "engines": { - "node": ">=8" + "node": ">= 10.0" } }, - "node_modules/cliui/node_modules/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==", + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/clone": { @@ -2476,27 +2368,6 @@ "node": ">=0.8" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clone-response/node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", @@ -2604,7 +2475,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "devOptional": true }, "node_modules/concat-stream": { "version": "1.6.2", @@ -2620,30 +2492,13 @@ "typedarray": "^0.0.6" } }, - "node_modules/configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/connect-session-knex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/connect-session-knex/-/connect-session-knex-3.0.0.tgz", - "integrity": "sha512-2XmV0ELjLvtda1MhRQhTfdjLhZ3My6Ebz7TCO718O2MEo0+l6Vn3UQVpvu9wLu/dNFUnfE3UgsJIk2ZJ/OR6pA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/connect-session-knex/-/connect-session-knex-3.0.1.tgz", + "integrity": "sha512-w+sNn/mdEmAGCfw90hyXlC0QixGvkfzTs9hZpDWLnzdyI3BQqnWUxZshWJlYNeZza45OrTxT+yqe3epNMPbs2Q==", "dependencies": { "bluebird": "^3.7.2", - "knex": "^2.0.0" + "knex": "^2.3.0" }, "engines": { "node": ">=8" @@ -2658,15 +2513,6 @@ "@babel/types": "^7.6.1" } }, - "node_modules/contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha512-OKZnPGeMQy2RPaUIBPFFd71iNf4791H12MCRuVQDnzGRwCYNYmTDy5pdafo2SLAcEMKzTOQnLWG4QdcjeJUMEg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -2767,24 +2613,16 @@ } }, "node_modules/cron-parser": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.6.0.tgz", - "integrity": "sha512-guZNLMGUgg6z4+eGhmHGw7ft+v6OQeuHzd1gcLxCo9Yg/qoxmG3nindp2/uwGCLizEisf2H0ptqeVXeoCpP6FA==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.8.1.tgz", + "integrity": "sha512-jbokKWGcyU4gl6jAfX97E1gDpY12DJ1cLJZmoDzaAln/shZ+S3KBFBuA2Q6WeUN4gJf/8klnV1EfvhA2lK5IRQ==", "dependencies": { - "luxon": "^3.0.1" + "luxon": "^3.2.1" }, "engines": { "node": ">=12.0.0" } }, - "node_modules/cron-parser/node_modules/luxon": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz", - "integrity": "sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg==", - "engines": { - "node": ">=12" - } - }, "node_modules/cross-fetch": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-1.1.1.tgz", @@ -2817,15 +2655,6 @@ "node": ">= 8" } }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -2857,27 +2686,17 @@ "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz", "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==" }, - "node_modules/cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==" - }, "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", + "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", "dependencies": { - "cssom": "~0.3.6" + "rrweb-cssom": "^0.6.0" }, "engines": { - "node": ">=8" + "node": ">=14" } }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" - }, "node_modules/cuint": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", @@ -2900,23 +2719,18 @@ } }, "node_modules/data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", + "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^12.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" } }, - "node_modules/data-urls/node_modules/whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" - }, "node_modules/db-errors": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/db-errors/-/db-errors-0.2.3.tgz", @@ -2967,12 +2781,6 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, - "node_modules/defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, "node_modules/define-properties": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", @@ -3006,9 +2814,9 @@ } }, "node_modules/dependency-graph": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.9.0.tgz", - "integrity": "sha512-9YLIBURXj4DJMFALxXw9K3Y3rwb5Fk0X5/8ipCzaN84+gKxoHK43tVKRNakCQbiEx07E8Uwhuq21BpUagFhZ8w==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", + "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==", "engines": { "node": ">= 0.6.0" } @@ -3031,9 +2839,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1036444", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1036444.tgz", - "integrity": "sha512-0y4f/T8H9lsESV9kKP1HDUXgHxCdniFeJh6Erq+FbdOEvp/Ydp9t8kcAAM5gOd17pMrTDlFWntoHtzzeTUWKNw==" + "version": "0.0.1107588", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1107588.tgz", + "integrity": "sha512-yIR+pG9x65Xko7bErCUSQaDLrO/P1p3JUzEk7JCU4DowPcGHkTGUGQapcfcLc4qj0UaALwZ+cr0riFgiqpixcg==" }, "node_modules/dezalgo": { "version": "1.0.4", @@ -3044,48 +2852,36 @@ "wrappy": "1" } }, - "node_modules/dicer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.3.0.tgz", - "integrity": "sha512-MdceRRWqltEG2dZqO769g27N/3PXfcKl04VhYnBlo2YhH7zPi88VebsjTKclaOyiuMaGU72hTfw3VkUitGcVCA==", - "dependencies": { - "streamsearch": "0.1.2" - }, - "engines": { - "node": ">=4.5.0" - } - }, "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", "engines": { "node": ">=0.3.1" } }, "node_modules/diff2html": { - "version": "3.1.14", - "resolved": "https://registry.npmjs.org/diff2html/-/diff2html-3.1.14.tgz", - "integrity": "sha512-Qot+l+v+aqGcuvJe1C8ZPev17deSyg+DOwICF3m8Ka/C3af1K2Wh2WENYulxv9CQyVhy2VarluR5fMfN5BEHIg==", + "version": "3.4.34", + "resolved": "https://registry.npmjs.org/diff2html/-/diff2html-3.4.34.tgz", + "integrity": "sha512-lHWZdusoYg/E9bT7BbmQKv6xGN7yCDx/OysZTQbtGBtHLu2y5SHlhO1zkzh1AjH7V909TXyPZGUeS6Ce9xPh/Q==", "dependencies": { - "diff": "4.0.2", + "diff": "5.1.0", "hogan.js": "3.0.2" }, "engines": { - "node": ">=10" + "node": ">=12" }, "optionalDependencies": { - "highlight.js": "10.2.1" + "highlight.js": "11.6.0" } }, "node_modules/diff2html/node_modules/highlight.js": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.2.1.tgz", - "integrity": "sha512-A+sckVPIb9zQTUydC9lpRX1qRFO/N0OKEh0NwIr65ckvWA/oMY8v9P3+kGRK3w2ULSh9E8v5MszXafodQ6039g==", - "deprecated": "Potential vulnerability. Please upgrade to @latest", + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.6.0.tgz", + "integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==", "optional": true, "engines": { - "node": "*" + "node": ">=12.0.0" } }, "node_modules/doctrine": { @@ -3130,22 +2926,14 @@ ] }, "node_modules/domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", "dependencies": { - "webidl-conversions": "^5.0.0" + "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/domhandler": { @@ -3168,9 +2956,9 @@ "integrity": "sha512-3VdM/SXBZX2omc9JF9nOPCtDaYQ67BGp5CoLpIQlO2KCAPETs8TcDHacF26jXadGbvUteZzRTeos2fhID5+ucQ==" }, "node_modules/dompurify": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.0.tgz", - "integrity": "sha512-Be9tbQMZds4a3C6xTmz68NlMfeONA//4dOavl/1rNw50E+/QO0KVpbcU0PcaW0nsQxurXls9ZocqFxk8R2mWEA==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.1.tgz", + "integrity": "sha512-60tsgvPKwItxZZdfLmamp0MTcecCta3avOhsLgPZ0qcWt96OasFfhkeIRbJ6br5i0fQawT1/RBGB5L58/Jpwuw==" }, "node_modules/domutils": { "version": "3.0.1", @@ -3185,18 +2973,6 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, - "node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/dotize": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/dotize/-/dotize-0.3.0.tgz", @@ -3215,12 +2991,6 @@ "node": ">=0.10" } }, - "node_modules/duplexer3": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", - "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", - "dev": true - }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -3249,9 +3019,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/emoji-regex": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.1.0.tgz", - "integrity": "sha512-xAEnNCT3w2Tg6MA7ly6QqYJvEoY1tm9iIjJ3yMKK9JPlWuRHAMoe5iETwQnx3M9TVbFMfsrBgWKR+IsmswwNjg==" + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.2.1.tgz", + "integrity": "sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==" }, "node_modules/encodeurl": { "version": "1.0.2", @@ -3289,9 +3059,9 @@ } }, "node_modules/engine.io": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.1.tgz", - "integrity": "sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.1.tgz", + "integrity": "sha512-JFYQurD/nbsA5BSPmbaOSLa3tSVj8L6o4srSwXXY3NqE+gGUNmmPTbhn8tjzcCtSqhFgIeqef81ngny8JM25hw==", "dependencies": { "@types/cookie": "^0.4.1", "@types/cors": "^2.8.12", @@ -3302,7 +3072,7 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" + "ws": "~8.11.0" }, "engines": { "node": ">=10.0.0" @@ -3338,9 +3108,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/engine.io/node_modules/ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "engines": { "node": ">=10.0.0" }, @@ -3357,18 +3127,6 @@ } } }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/entities": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", @@ -3380,15 +3138,6 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, "node_modules/es-abstract": { "version": "1.21.2", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", @@ -3490,36 +3239,30 @@ "node": ">=6" } }, - "node_modules/escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "node_modules/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==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", - "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dependencies": { "esprima": "^4.0.1", - "estraverse": "^4.2.0", + "estraverse": "^5.2.0", "esutils": "^2.0.2", "optionator": "^0.8.1" }, @@ -3528,7 +3271,7 @@ "esgenerate": "bin/esgenerate.js" }, "engines": { - "node": ">=4.0" + "node": ">=6.0" }, "optionalDependencies": { "source-map": "~0.6.1" @@ -3582,54 +3325,57 @@ } }, "node_modules/eslint": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.12.0.tgz", - "integrity": "sha512-n5pEU27DRxCSlOhJ2rO57GDLcNsxO0LPpAbpFdh7xmcDmjmlGUfoyrsB3I7yYdQXO5N3gkSTiDrPSPNFiiirXA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.2.0", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", + "integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.38.0", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.0", - "esquery": "^1.2.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.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", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -3649,9 +3395,9 @@ } }, "node_modules/eslint-config-standard": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-15.0.0.tgz", - "integrity": "sha512-MZ8KRhUJLtMbjQo9PsEzFG29vqbQJfLoLBHrTaAaFMtDx9PIm1GZgyUanOLgf1xOE1aWrtZZSbxBYCy8dJCCBg==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz", + "integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==", "dev": true, "funding": [ { @@ -3668,11 +3414,10 @@ } ], "peerDependencies": { - "eslint": ">=7.11.0", - "eslint-plugin-import": ">=2.22.1", - "eslint-plugin-node": ">=11.1.0", - "eslint-plugin-promise": ">=4.2.1", - "eslint-plugin-standard": ">=4.0.2" + "eslint": "^8.0.1", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0", + "eslint-plugin-promise": "^6.0.0" } }, "node_modules/eslint-import-resolver-node": { @@ -3741,45 +3486,165 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", - "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", - "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.4", - "eslint-module-utils": "^2.6.0", + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", "has": "^1.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" } }, "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha512-lsGyRuYr4/PIB0txi+Fy2xOMI2dGaTguCaotzFGkVZuKR5usKfcRWIFKNM3QNrU7hh/+w2bwTW+ZeXPK5l8uVg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "dependencies": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "^2.0.2" }, "engines": { "node": ">=0.10.0" } }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-n": { + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz", + "integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==", + "dev": true, + "peer": true, + "dependencies": { + "builtins": "^5.0.1", + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", + "ignore": "^5.1.1", + "is-core-module": "^2.11.0", + "minimatch": "^3.1.2", + "resolve": "^1.22.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-plugin-es": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "dev": true, + "peer": true, + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-plugin-es/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "peer": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-plugin-es/node_modules/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==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "peer": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + } + }, "node_modules/eslint-plugin-node": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", @@ -3800,15 +3665,6 @@ "eslint": ">=5.16.0" } }, - "node_modules/eslint-plugin-node/node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/eslint-plugin-node/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -3819,18 +3675,21 @@ } }, "node_modules/eslint-plugin-promise": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", - "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", + "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", "dev": true, "engines": { - "node": ">=6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" } }, "node_modules/eslint-plugin-standard": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz", - "integrity": "sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz", + "integrity": "sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ==", "dev": true, "funding": [ { @@ -3851,16 +3710,16 @@ } }, "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=8.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/eslint-utils": { @@ -3887,22 +3746,32 @@ "node": ">=4" } }, - "node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "dev": true, "engines": { - "node": ">=10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "sprintf-js": "~1.0.2" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/eslint/node_modules/debug": { @@ -3922,17 +3791,16 @@ } } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/eslint/node_modules/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==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "is-glob": "^4.0.3" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=10.13.0" } }, "node_modules/eslint/node_modules/ms": { @@ -3941,12 +3809,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/eslint/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, "node_modules/esm": { "version": "3.2.25", "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", @@ -3956,26 +3818,32 @@ } }, "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "dev": true, "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/espree/node_modules/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==", + "node_modules/espree/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">=4" + "node": ">=0.4.0" } }, "node_modules/esprima": { @@ -4002,15 +3870,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -4023,19 +3882,10 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "engines": { "node": ">=4.0" } @@ -4057,9 +3907,9 @@ } }, "node_modules/eventemitter2": { - "version": "6.4.7", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", - "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==" + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", + "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==" }, "node_modules/events": { "version": "3.3.0", @@ -4078,13 +3928,13 @@ } }, "node_modules/express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.0", + "body-parser": "1.20.1", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.5.0", @@ -4103,7 +3953,7 @@ "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.10.3", + "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "0.18.0", @@ -4175,6 +4025,29 @@ } ] }, + "node_modules/express/node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, "node_modules/express/node_modules/cookie": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", @@ -4183,6 +4056,20 @@ "node": ">= 0.6" } }, + "node_modules/express/node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/express/node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -4275,6 +4162,15 @@ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", @@ -4284,40 +4180,39 @@ } }, "node_modules/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==", "dev": true, "dependencies": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/file-type": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-15.0.1.tgz", - "integrity": "sha512-0LieQlSA3bWUdErNrxzxfI4rhsvNAVPBO06R8pTc1hp9SE6nhqlVyvhcaXoMmtXkBTPnQenbMPLW9X76hH76oQ==", + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.2.1.tgz", + "integrity": "sha512-Yw5MtnMv7vgD2/6Bjmmuegc8bQEVA9GmAyaR18bMYWKqsWDG9wgYZ1j4I6gNMF5Y5JBDcUcjRQqNQx7Y8uotcg==", "dependencies": { - "readable-web-to-node-stream": "^2.0.0", - "strtok3": "^6.0.3", - "token-types": "^2.0.0", - "typedarray-to-buffer": "^3.1.5" + "readable-web-to-node-stream": "^3.0.2", + "strtok3": "^7.0.0", + "token-types": "^5.0.1" }, "engines": { - "node": ">=8" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, "node_modules/filesize": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", - "integrity": "sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg==", + "version": "10.0.7", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-10.0.7.tgz", + "integrity": "sha512-iMRG7Qo9nayLoU3PNCiLizYtsy4W1ClrapeCwEgtiQelOAOuRJiw4QaLI+sSr8xr901dgHv+EYP2bCusGZgoiA==", "engines": { - "node": ">= 0.4.0" + "node": ">= 10.4.0" } }, "node_modules/fill-range": { @@ -4349,35 +4244,38 @@ } }, "node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "locate-path": "^2.0.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/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.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, "node_modules/follow-redirects": { @@ -4429,9 +4327,9 @@ } }, "node_modules/formidable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.1.tgz", - "integrity": "sha512-0EcS9wCFEzLvfiks7omJ+SiYJAiD+TzK4Pcw1UlUoGnhUxDcMKjt0P7x8wEb0u6OHu8Nb98WG3nxtlF5C7bvUQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", + "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==", "dependencies": { "dezalgo": "^1.0.4", "hexoid": "^1.0.0", @@ -4442,20 +4340,6 @@ "url": "https://ko-fi.com/tunnckoCore/commissions" } }, - "node_modules/formidable/node_modules/qs": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", - "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -4473,11 +4357,11 @@ } }, "node_modules/fs-capacitor": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/fs-capacitor/-/fs-capacitor-6.2.0.tgz", - "integrity": "sha512-nKcE1UduoSKX27NSZlg879LdQc94OtbOsEmKMN2MBNudXREvijRKx2GEBsTMTfws+BrbkJoEuynbGSVRSpauvw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/fs-capacitor/-/fs-capacitor-8.0.0.tgz", + "integrity": "sha512-+Lk6iSKajdGw+7XYxUkwIzreJ2G1JFlYOdnKJv5PzwFLVsoJYBpCuS7WPIUSNT1IbQaEWT1nhYU63Ud03DyzLA==", "engines": { - "node": ">=10" + "node": "^14.17.0 || >=16.0.0" } }, "node_modules/fs-constants": { @@ -4486,23 +4370,23 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "node_modules/fs-extra": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", - "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", "dependencies": { - "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", - "universalify": "^1.0.0" + "universalify": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=14.14" } }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "node_modules/fsevents": { "version": "2.3.2", @@ -4540,12 +4424,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -4644,6 +4522,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4670,37 +4549,13 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", - "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", - "dev": true, - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/global-dirs/node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "dependencies": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" @@ -4735,72 +4590,23 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/got/node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/got/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/got/node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/graphql": { - "version": "16.3.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.3.0.tgz", - "integrity": "sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A==", + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.6.0.tgz", + "integrity": "sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw==", "engines": { - "node": "^12.22.0 || ^14.16.0 || >=16.0.0" + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } }, "node_modules/graphql-list-fields": { @@ -4809,11 +4615,11 @@ "integrity": "sha512-9TSAwcVA3KWw7JWYep5NCk2aw3wl1ayLtbMpmG7l26vh1FZ+gZexNPP+XJfUFyJa71UU0zcKSgtgpsrsA3Xv9Q==" }, "node_modules/graphql-rate-limit-directive": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/graphql-rate-limit-directive/-/graphql-rate-limit-directive-2.0.2.tgz", - "integrity": "sha512-Q4EvMv3xUt3woSMQMsHEJqm3K74JKd3JnIYr/YlSztkAp2pUNlVuI9AokB27qAc47OavWw1TUIXPau1ePPznew==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/graphql-rate-limit-directive/-/graphql-rate-limit-directive-2.0.3.tgz", + "integrity": "sha512-ruDuPJ8GyjIWm3X3K4OpHEYzMIycTOP6IB+YgqSPt+Xey3MikRCPUffwf8g6q1Ajcc9kgOlOSgvieCCRrVl+Jw==", "peerDependencies": { - "@graphql-tools/utils": "^8.0.0", + "@graphql-tools/utils": "^8.0.0 || ^9.0.0", "graphql": "^16.0.0", "rate-limiter-flexible": "^2.0.0" } @@ -4833,74 +4639,51 @@ } }, "node_modules/graphql-tools": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-8.2.5.tgz", - "integrity": "sha512-9OS0j2iaz7Hjawm2FbznBjAAFB35rAUvBsSPWqfL4yY5YJQgrSy9ZGHLPwEtYhEqRcN0m1/0KgOEakbeuXIWKw==", + "version": "8.3.19", + "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-8.3.19.tgz", + "integrity": "sha512-K/BCebBd6b+iMNREi6TdSsI8Ot0Oiux43c4TixH/a1nOzXl8KDUfEygl6F7W8AHw0ks35UfRSWBIOWhdws9o7Q==", "dependencies": { - "@graphql-tools/schema": "8.3.7", - "tslib": "~2.3.0" + "@graphql-tools/schema": "9.0.17", + "tslib": "^2.4.0" }, "optionalDependencies": { - "@apollo/client": "~3.2.5 || ~3.3.0 || ~3.4.0 || ~3.5.0" + "@apollo/client": "~3.2.5 || ~3.3.0 || ~3.4.0 || ~3.5.0 || ~3.6.0 || ~3.7.0" }, "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/graphql-tools/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, "node_modules/graphql-upload": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/graphql-upload/-/graphql-upload-13.0.0.tgz", - "integrity": "sha512-YKhx8m/uOtKu4Y1UzBFJhbBGJTlk7k4CydlUUiNrtxnwZv0WigbRHP+DVhRNKt7u7DXOtcKZeYJlGtnMXvreXA==", + "version": "16.0.2", + "resolved": "https://registry.npmjs.org/graphql-upload/-/graphql-upload-16.0.2.tgz", + "integrity": "sha512-enwIkZqUELdNH9lrjHlTNfj7gLitSa0EAX4TNXZtg2frnmQzPhpjH0l+6K7ft274fhoRCIcz8SKiNRJDf/cG4Q==", "dependencies": { - "busboy": "^0.3.1", - "fs-capacitor": "^6.2.0", - "http-errors": "^1.8.1", + "@types/busboy": "^1.5.0", + "@types/node": "*", + "@types/object-path": "^0.11.1", + "busboy": "^1.6.0", + "fs-capacitor": "^8.0.0", + "http-errors": "^2.0.0", "object-path": "^0.11.8" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >= 16.0.0" + "node": "^14.17.0 || ^16.0.0 || >= 18.0.0" }, "funding": { "url": "https://github.com/sponsors/jaydenseric" }, "peerDependencies": { - "graphql": "0.13.1 - 16" - } - }, - "node_modules/graphql-upload/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/graphql-upload/node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" + "@types/express": "^4.0.29", + "@types/koa": "^2.11.4", + "graphql": "^16.3.0" }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/graphql-upload/node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "engines": { - "node": ">= 0.6" + "peerDependenciesMeta": { + "@types/express": { + "optional": true + }, + "@types/koa": { + "optional": true + } } }, "node_modules/har-schema": { @@ -4948,6 +4731,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "engines": { "node": ">=8" } @@ -5001,15 +4785,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -5027,12 +4802,11 @@ } }, "node_modules/highlight.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.3.1.tgz", - "integrity": "sha512-jeW8rdPdhshYKObedYg5XGbpVgb1/DT4AHvDFXhkU7UnGSIjy9kkJ7zHG7qplhFHMitTSzh5/iClKQk3Kb2RFQ==", - "deprecated": "Potential vulnerability. Please upgrade to @latest", + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.7.0.tgz", + "integrity": "sha512-1rRqesRFhMO/PRF+G86evnyJkCgaZFOI+Z6kdj15TA18funfoqJXvgPCLSf0SWq3SRfg1j3HlDs8o4s3EGq1oQ==", "engines": { - "node": "*" + "node": ">=12.0.0" } }, "node_modules/hogan.js": { @@ -5056,21 +4830,15 @@ "react-is": "^16.7.0" } }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, "node_modules/html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", "dependencies": { - "whatwg-encoding": "^1.0.5" + "whatwg-encoding": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/htmlparser2": { @@ -5091,12 +4859,6 @@ "entities": "^4.4.0" } }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -5109,9 +4871,43 @@ "toidentifier": "1.0.1" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.8" + } + }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -5160,11 +4956,25 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/i18next": { - "version": "19.8.3", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-19.8.3.tgz", - "integrity": "sha512-eVrqAw2gGGYYJaJMYw4VM1FNFawLD4b84IsoTZMVXeWHaxAM2gyTa34j2Sip15UkBz/LrSxdFJj0Jhlrz7EvHA==", + "version": "22.4.14", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-22.4.14.tgz", + "integrity": "sha512-VtLPtbdwGn0+DAeE00YkiKKXadkwg+rBUV+0v8v0ikEjwdiJ0gmYChVE4GIa9HXymY6wKapkL93vGT7xpq6aTw==", + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], "dependencies": { - "@babel/runtime": "^7.12.0" + "@babel/runtime": "^7.20.6" } }, "node_modules/i18next-node-fs-backend": { @@ -5219,9 +5029,9 @@ "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" }, "node_modules/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.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, "engines": { "node": ">= 4" @@ -5234,17 +5044,17 @@ "dev": true }, "node_modules/image-size": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.9.2.tgz", - "integrity": "sha512-spzCX3sjQjIk19U+UqpGYNgoaJTOJ7yTQ/9XtvVjXbjNNzwH2fP8NeMKdGbh867rK+Ngy5IVYkcsij2udJuDLw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.2.tgz", + "integrity": "sha512-xfOoWjceHntRb3qFCrh5ZFORYH8XCdYpASltMhZ/Q0KZiOwjdE/Yl2QCiWdwD+lygV5bMCvauzgu5PxBX/Yerg==", "dependencies": { - "queue": "6.0.1" + "queue": "6.0.2" }, "bin": { "image-size": "bin/image-size.js" }, "engines": { - "node": ">=10.18.0" + "node": ">=14.0.0" } }, "node_modules/import-fresh": { @@ -5263,15 +5073,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -5285,6 +5086,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "devOptional": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -5335,14 +5137,6 @@ "node": ">= 0.10" } }, - "node_modules/ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==", - "engines": { - "node": ">=4" - } - }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -5380,12 +5174,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -5436,18 +5224,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, "node_modules/is-core-module": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", @@ -5492,12 +5268,11 @@ } }, "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, + "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==", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/is-generator-function": { @@ -5525,22 +5300,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "dependencies": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -5553,18 +5312,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -5588,15 +5335,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -5716,12 +5454,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true - }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -5747,9 +5479,9 @@ } }, "node_modules/js-base64": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.2.tgz", - "integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==" + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.5.tgz", + "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==" }, "node_modules/js-binary": { "version": "1.2.0", @@ -5759,6 +5491,16 @@ "node": ">=4" } }, + "node_modules/js-sdsl": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", + "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/js-stringify": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", @@ -5768,7 +5510,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "devOptional": true + "optional": true }, "node_modules/js-yaml": { "version": "4.1.0", @@ -5787,39 +5529,39 @@ "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" }, "node_modules/jsdom": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.4.0.tgz", - "integrity": "sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w==", - "dependencies": { - "abab": "^2.0.3", - "acorn": "^7.1.1", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.2.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.0", - "domexception": "^2.0.1", - "escodegen": "^1.14.1", - "html-encoding-sniffer": "^2.0.1", - "is-potential-custom-element-name": "^1.0.0", - "nwsapi": "^2.2.0", - "parse5": "5.1.1", - "request": "^2.88.2", - "request-promise-native": "^1.0.8", - "saxes": "^5.0.0", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-21.1.1.tgz", + "integrity": "sha512-Jjgdmw48RKcdAIQyUD1UdBh2ecH7VqwaXPN3ehoZN6MqgVbMn+lRm1aAT1AsdJRAJpwfa4IpwgzySn61h2qu3w==", + "dependencies": { + "abab": "^2.0.6", + "acorn": "^8.8.2", + "acorn-globals": "^7.0.0", + "cssstyle": "^3.0.0", + "data-urls": "^4.0.0", + "decimal.js": "^10.4.3", + "domexception": "^4.0.0", + "escodegen": "^2.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.2", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.6.0", + "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^3.0.1", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0", - "ws": "^7.2.3", - "xml-name-validator": "^3.0.0" + "tough-cookie": "^4.1.2", + "w3c-xmlserializer": "^4.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^12.0.1", + "ws": "^8.13.0", + "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" }, "peerDependencies": { "canvas": "^2.5.0" @@ -5830,35 +5572,17 @@ } } }, - "node_modules/jsdom/node_modules/parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==" - }, - "node_modules/jsdom/node_modules/tough-cookie": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", - "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", - "dependencies": { - "ip-regex": "^2.1.0", - "psl": "^1.1.28", - "punycode": "^2.1.1" + "node_modules/jsdom/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=6" + "node": ">=0.4.0" } }, - "node_modules/jsdom/node_modules/whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" - }, - "node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==", - "dev": true - }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -5905,41 +5629,19 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsonfile/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", "dependencies": { "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", + "lodash": "^4.17.21", "ms": "^2.1.1", - "semver": "^5.6.0" + "semver": "^7.3.8" }, "engines": { - "node": ">=4", - "npm": ">=1.4.28" - } - }, - "node_modules/jsonwebtoken/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" + "node": ">=12", + "npm": ">=6" } }, "node_modules/jsprim": { @@ -6003,37 +5705,40 @@ } }, "node_modules/katex": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.12.0.tgz", - "integrity": "sha512-y+8btoc/CK70XqcHqjxiGWBOeIL8upbS0peTPXTvgrh21n1RiWWcIpSWM+4uXq+IAgNh9YYQWdc7LVDPDAEEAg==", + "version": "0.16.4", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.4.tgz", + "integrity": "sha512-WudRKUj8yyBeVDI4aYMNxhx5Vhh2PjpzQw1GRu/LVGqL4m1AxwD1GcUp0IMbdJaf5zsjtj8ghP0DOQRYhroNkw==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], "dependencies": { - "commander": "^2.19.0" + "commander": "^8.0.0" }, "bin": { "katex": "cli.js" } }, - "node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.0" + "node_modules/katex/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "engines": { + "node": ">= 12" } }, "node_modules/klaw": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-4.0.1.tgz", - "integrity": "sha512-pgsE40/SvC7st04AHiISNewaIMUbY5V/K8b21ekiPiFoYs/EYSdsGa+FJArB1d441uq4Q8zZyIxvAzkGNlBdRw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-4.1.0.tgz", + "integrity": "sha512-1zGZ9MF9H22UnkpVeuaGKOjfA2t6WrfdrJmGjy16ykcjnKQDmHVX+KI477rpbGevz/5FD4MC3xf1oxylBgcaQw==", "engines": { "node": ">=14.14.0" } }, "node_modules/knex": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/knex/-/knex-2.3.0.tgz", - "integrity": "sha512-WMizPaq9wRMkfnwKXKXgBZeZFOSHGdtoSz5SaLAVNs3WRDfawt9O89T4XyH52PETxjV8/kRk0Yf+8WBEP/zbYw==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/knex/-/knex-2.4.2.tgz", + "integrity": "sha512-tMI1M7a+xwHhPxjbl/H9K1kHX+VncEYcvCx5K00M16bWvpYPKAZd6QrCu68PtHAdIZNQPWZn0GVhqVBEthGWCg==", "dependencies": { "colorette": "2.0.19", "commander": "^9.1.0", @@ -6117,18 +5822,6 @@ "node": ">=8" } }, - "node_modules/latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "dependencies": { - "package-json": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ldap-filter": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/ldap-filter/-/ldap-filter-0.3.3.tgz", @@ -6194,39 +5887,26 @@ } }, "node_modules/linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz", + "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", "dependencies": { "uc.micro": "^1.0.1" } }, - "node_modules/load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash": { @@ -6234,45 +5914,21 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + }, "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" }, - "node_modules/lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" - }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" - }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" - }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" - }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" - }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true }, "node_modules/lodash.repeat": { "version": "4.1.0", @@ -6318,15 +5974,6 @@ "loose-envify": "cli.js" } }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -6339,45 +5986,21 @@ } }, "node_modules/luxon": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-2.3.1.tgz", - "integrity": "sha512-I8vnjOmhXsMSlNMZlMkSOvgrxKJl0uOsEzdGgGNZuZPaS9KlefpE9KV95QFftlJSC+1UyCC9/I69R02cz/zcCA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz", + "integrity": "sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg==", "engines": { "node": ">=12" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/markdown-it": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-11.0.1.tgz", - "integrity": "sha512-aU1TzmBKcWNNYvH9pjq6u92BML+Hz3h5S/QpfTFwiQF852pLT+9qHsrhM9JYipkOXZxGn+sGH8oyJE9FD9WezQ==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz", + "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==", "dependencies": { - "argparse": "^1.0.7", - "entities": "~2.0.0", - "linkify-it": "^3.0.1", + "argparse": "^2.0.1", + "entities": "~3.0.1", + "linkify-it": "^4.0.1", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" }, @@ -6390,21 +6013,10 @@ "resolved": "https://registry.npmjs.org/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz", "integrity": "sha512-ZeA4Z4SaBbYysZap5iZcxKmlPL6bYA8grqhzJIHB1ikn7njnzaP8uwbtuXc4YXD5LicI4/2Xmc0VwmSiFV04gg==" }, - "node_modules/markdown-it-attrs": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/markdown-it-attrs/-/markdown-it-attrs-3.0.3.tgz", - "integrity": "sha512-cLnICU2t61skNCr4Wih/sdza+UbQcqJGZwvqAypnbWA284nzDm+Gpc90iaRk/JjsIy4emag5v3s0rXFhFBWhCA==", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "markdown-it": ">= 9.0.0 < 12.0.0" - } - }, "node_modules/markdown-it-emoji": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/markdown-it-emoji/-/markdown-it-emoji-1.4.0.tgz", - "integrity": "sha512-QCz3Hkd+r5gDYtS2xsFXmBYrgw6KuWcJZLCEkdfAuwzZbShCmCfta+hwAMq4NX/4xPzkSHduMKgMkkPUJxSXNg==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz", + "integrity": "sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ==" }, "node_modules/markdown-it-expand-tabs": { "version": "1.0.13", @@ -6439,14 +6051,6 @@ "resolved": "https://registry.npmjs.org/markdown-it-mathjax/-/markdown-it-mathjax-2.0.0.tgz", "integrity": "sha512-Fafv7TnMENccWYTNjMZzV4BzONPxpK9Mknr1iMEK6m7PI5a5UTCOFctPzx7Nhv81fFzYEY8WHDkSu9n43fTV9g==" }, - "node_modules/markdown-it-multimd-table": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/markdown-it-multimd-table/-/markdown-it-multimd-table-4.0.3.tgz", - "integrity": "sha512-uVLriNj6doq1dGyJppQdwbaGcK6uSzbrk7osxRHjOmZBeShgMtPS6/d+pnIKkohOjaRyP9e5kwTAlAIe/lEaIQ==", - "dependencies": { - "markdown-it": "^11.0.0" - } - }, "node_modules/markdown-it-sub": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz", @@ -6462,28 +6066,21 @@ "resolved": "https://registry.npmjs.org/markdown-it-task-lists/-/markdown-it-task-lists-2.1.1.tgz", "integrity": "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA==" }, - "node_modules/markdown-it/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/markdown-it/node_modules/entities": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", - "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" - }, - "node_modules/markdown-it/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } }, "node_modules/mathjax": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/mathjax/-/mathjax-3.1.2.tgz", - "integrity": "sha512-BojKspBv4nNWzO1wC6VEI+g9gHDOhkaGHGgLxXkasdU4pwjdO5AXD5M/wcLPkXYPjZ/N+6sU8rjQTlyvN2cWiQ==" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/mathjax/-/mathjax-3.2.2.tgz", + "integrity": "sha512-Bt+SSVU8eBG27zChVewOicYs7Xsdt40qm4+UpHyX7k0/O9NliPc+x77k1/FEsPsjKPZGJvtRZM1vO+geW0OhGw==" }, "node_modules/mdurl": { "version": "1.0.1", @@ -6561,6 +6158,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "devOptional": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -6576,6 +6174,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/mitt": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", + "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==" + }, "node_modules/mkdirp": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", @@ -6588,23 +6191,13 @@ "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" - }, - "node_modules/moment": { - "version": "2.29.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.2.tgz", - "integrity": "sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg==", - "engines": { - "node": "*" - } + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, - "node_modules/moment-timezone": { - "version": "0.5.31", - "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz", - "integrity": "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==", - "dependencies": { - "moment": ">= 2.9.0" - }, + "node_modules/moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "optional": true, "engines": { "node": "*" } @@ -6750,14 +6343,20 @@ "optional": true }, "node_modules/nanoid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.2.tgz", - "integrity": "sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { - "nanoid": "bin/nanoid.cjs" + "nanoid": "bin/nanoid.js" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": "^14 || ^16 || >=18" } }, "node_modules/napi-build-utils": { @@ -6789,12 +6388,14 @@ } }, "node_modules/node-2fa": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/node-2fa/-/node-2fa-1.1.2.tgz", - "integrity": "sha512-ar6+2EiYRk4RV4jU35EuOz+bOxJd3m+tJ2RvWrsxrZhWLjwLsor5lKz825f++sCIWA7cOQen0ZVORhQJcYoX1w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/node-2fa/-/node-2fa-2.0.3.tgz", + "integrity": "sha512-PQldrOhjuoZyoydMvMSctllPN1ZPZ1/NwkEcgYwY9faVqE/OymxR+3awPpbWZxm6acLKqvmNqQmdqTsqYyflFw==", "dependencies": { + "@types/notp": "^2.0.0", "notp": "^2.0.3", - "thirty-two": "0.0.2" + "thirty-two": "1.0.2", + "tslib": "^2.1.0" } }, "node_modules/node-abi": { @@ -6814,9 +6415,9 @@ "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" }, "node_modules/node-addon-api": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.0.0.tgz", + "integrity": "sha512-GyHvgPvUXBvAkXa0YvYnhilSB1A+FRYMpIVggKzPZqdaZfevZOuzfWzyvgzOwRLHBeo/MMswmJFsrNF4Nw1pmA==" }, "node_modules/node-cache": { "version": "5.1.2", @@ -6938,14 +6539,6 @@ "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz", "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==" }, - "node_modules/node-jose/node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/node-uuid": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz", @@ -6953,30 +6546,29 @@ "deprecated": "Use uuid module instead" }, "node_modules/nodemailer": { - "version": "6.7.8", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.8.tgz", - "integrity": "sha512-2zaTFGqZixVmTxpJRCFC+Vk5eGRd/fYtvIR+dl5u9QXLTQWGIf48x/JXvo58g9sa0bU6To04XUv554Paykum3g==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.1.tgz", + "integrity": "sha512-qHw7dOiU5UKNnQpXktdgQ1d3OFgRAekuvbJLcdG5dnEo/GtcTHRYM7+UfJARdOFU9WUQO8OiIamgWPmiSFHYAA==", "engines": { "node": ">=6.0.0" } }, "node_modules/nodemon": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz", - "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==", + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", "dev": true, - "hasInstallScript": true, "dependencies": { "chokidar": "^3.5.2", "debug": "^3.2.7", "ignore-by-default": "^1.0.1", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "pstree.remy": "^1.1.8", "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", "supports-color": "^5.5.0", "touch": "^3.1.0", - "undefsafe": "^2.0.5", - "update-notifier": "^5.1.0" + "undefsafe": "^2.0.5" }, "bin": { "nodemon": "bin/nodemon.js" @@ -7042,27 +6634,6 @@ "node": "*" } }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -7071,15 +6642,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/notp": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/notp/-/notp-2.0.3.tgz", @@ -7286,70 +6848,34 @@ "node": ">= 0.8.0" } }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "p-try": "^1.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "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==", "dev": true, "dependencies": { - "p-limit": "^1.1.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=4" - } - }, - "node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" + "node": ">=10" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/package-json/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/packet-reader": { @@ -7374,18 +6900,6 @@ "node": ">=6" } }, - "node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "dependencies": { - "error-ex": "^1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/parse5": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", @@ -7559,11 +7073,11 @@ } }, "node_modules/passport-jwt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/passport-jwt/-/passport-jwt-4.0.0.tgz", - "integrity": "sha512-BwC0n2GP/1hMVjR4QpnvqA61TxenUMlmfNjYNgK0ZAs0HK4SOQkHcSv4L328blNTLtHq7DbmvyNJiH+bn6C5Mg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/passport-jwt/-/passport-jwt-4.0.1.tgz", + "integrity": "sha512-UCKMDYhNuGOBE9/9Ycuoyh7vP6jpeTp/+sfMJl7nLff/t6dps+iaeE0hhNkKN8/HZHcJ7lCdOyDxHdDoxoSvdQ==", "dependencies": { - "jsonwebtoken": "^8.2.0", + "jsonwebtoken": "^9.0.0", "passport-strategy": "^1.0.0" } }, @@ -7602,6 +7116,25 @@ "node": ">= 0.4.0" } }, + "node_modules/passport-microsoft/node_modules/passport-oauth2": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.6.1.tgz", + "integrity": "sha512-ZbV43Hq9d/SBSYQ22GOiglFsjsD1YY/qdiptA+8ej+9C1dL1TVB+mBE5kDH/D4AJo50+2i8f4bx0vg4/yDDZCQ==", + "dependencies": { + "base64url": "3.x.x", + "oauth": "0.9.x", + "passport-strategy": "1.x.x", + "uid2": "0.0.x", + "utils-merge": "1.x.x" + }, + "engines": { + "node": ">= 0.4.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jaredhanson" + } + }, "node_modules/passport-microsoft/node_modules/pkginfo": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", @@ -7640,9 +7173,9 @@ } }, "node_modules/passport-oauth2": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.6.1.tgz", - "integrity": "sha512-ZbV43Hq9d/SBSYQ22GOiglFsjsD1YY/qdiptA+8ej+9C1dL1TVB+mBE5kDH/D4AJo50+2i8f4bx0vg4/yDDZCQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.7.0.tgz", + "integrity": "sha512-j2gf34szdTF2Onw3+76alNnaAExlUmHvkc7cL+cmaS5NzHzDP/BvFHJruueQ9XAeNOdpI+CH+PWid8RA7KCwAQ==", "dependencies": { "base64url": "3.x.x", "oauth": "0.9.x", @@ -7763,18 +7296,19 @@ } }, "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -7798,29 +7332,17 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, - "node_modules/path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha512-dUnb5dXUf+kzhC/W/F4e5/SkluXIFf5VUHolW1Eg1irn1hGWjPGdsRcvYJ1nD6lhk8Ir7VM0bHJKsYTx8Jx9OQ==", - "dev": true, - "dependencies": { - "pify": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/pause": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" }, "node_modules/peek-readable": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz", - "integrity": "sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", "engines": { - "node": ">=8" + "node": ">=14.16" }, "funding": { "type": "github", @@ -7852,15 +7374,15 @@ "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, "node_modules/pg": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.8.0.tgz", - "integrity": "sha512-UXYN0ziKj+AeNNP7VDMwrehpACThH7LUl/p8TDFpEUuSejCUIwGSfxpHsPvtM6/WXFy6SU4E5RG4IJV/TZAGjw==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.10.0.tgz", + "integrity": "sha512-ke7o7qSTMb47iwzOSaZMfeR7xToFdkE71ifIipOAAaLIM0DYzfOAXlgFFmYUIE2BcJtvnVlGCID84ZzCegE8CQ==", "dependencies": { "buffer-writer": "2.0.0", "packet-reader": "1.0.0", "pg-connection-string": "^2.5.0", - "pg-pool": "^3.5.2", - "pg-protocol": "^1.5.0", + "pg-pool": "^3.6.0", + "pg-protocol": "^1.6.0", "pg-types": "^2.1.0", "pgpass": "1.x" }, @@ -7935,13 +7457,13 @@ "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==" }, "node_modules/pg-pubsub": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/pg-pubsub/-/pg-pubsub-0.8.0.tgz", - "integrity": "sha512-2F3X0nu6yeeBEaW+SMNANqW/jB2leqS6+nWKj4Qn2BFzO+dQjXenb8WxJB6Dapg/M3TTvz7g4OAwgFFHHcIMlA==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/pg-pubsub/-/pg-pubsub-0.8.1.tgz", + "integrity": "sha512-b/EHOwCrag4isghc4XgRipeAjfgyNg1DiL3Dwwh1Ojp91Lriltn5eg2nSWjBe4pzcFzhTM6HiB7LOG9NN1nx5g==", "dependencies": { "pg": "^8.7.3", "pg-format": "^1.0.2", - "pony-cause": "^2.0.0", + "pony-cause": "^2.1.8", "promised-retry": "^0.5.0" }, "engines": { @@ -7949,17 +7471,20 @@ } }, "node_modules/pg-query-stream": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.2.4.tgz", - "integrity": "sha512-Et3gTrWn4C2rj4LVioNq1QDd7aH/3mSJcBm79jZALv3wopvx9bWENtbOYZbHQ6KM+IkfFxs0JF1ZLjMDJ9/N6Q==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.4.0.tgz", + "integrity": "sha512-shmP973/ruBw3exSmIEBW9iubWvyyZMzp6oWfcHgvlqAe4LtaRyVqPGxgnuorbRqksK03mjOC9PU+Ohz3b0GkQ==", "dependencies": { - "pg-cursor": "^2.7.4" + "pg-cursor": "^2.9.0" + }, + "peerDependencies": { + "pg": "^8" } }, "node_modules/pg-tsquery": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/pg-tsquery/-/pg-tsquery-8.4.0.tgz", - "integrity": "sha512-m0jIxUVwLKSdmOAlqtlbo6K+EFIOZ/hyOMnoe8DmYFqEmOmvafIjGQFmcPP+z5MWd/p7ExxoKNIL31gmM+CwxQ==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/pg-tsquery/-/pg-tsquery-8.4.1.tgz", + "integrity": "sha512-GoeRhw6o4Bpt7awdUwHq6ITOw40IWSrb5IC2qR6dF9ZECtHFGdSpnjHOl9Rumd8Rx12kLI2T9TGV0gvxD5pFgA==", "engines": { "node": ">=10" } @@ -7998,15 +7523,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/pkginfo": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.2.3.tgz", @@ -8024,12 +7540,22 @@ } }, "node_modules/poolifier": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/poolifier/-/poolifier-2.2.0.tgz", - "integrity": "sha512-bzthEM2MRwt4mDVC7sWYBRu7pTpb+aDj+Bw2EhoxtYTSL6wbWTu94gW7wuTwjCPClNRDiCPxV5bHQz5X/M/PnA==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/poolifier/-/poolifier-2.4.4.tgz", + "integrity": "sha512-kPzCuva//h+gW9pdpGzdqG5Y8WoueXxQkJ0J1YiIuAKRljCjuMJ/XCYpLOyp0rHTKvXT5mrA5m+fEuVlT2EESg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/poolifier" + }, + { + "type": "github", + "url": "https://github.com/sponsors/poolifier" + } + ], + "hasInstallScript": true, "engines": { - "node": ">=16.0.0", - "npm": ">=8.0.0" + "node": ">=16.0.0" } }, "node_modules/postgres-array": { @@ -8109,15 +7635,6 @@ "node": ">= 0.8.0" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -8327,44 +7844,40 @@ } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "engines": { "node": ">=6" } }, - "node_modules/pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "dev": true, - "dependencies": { - "escape-goat": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/puppeteer-core": { - "version": "17.1.3", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-17.1.3.tgz", - "integrity": "sha512-gm3d5fTVEc+h7jVtT3Y1k8OL1awaOzln44UfsJhUJKH/tyO/wn/zOxyAHTQt9aX/yo37IS0dfisU3i3P8qvZnw==", + "version": "19.8.5", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-19.8.5.tgz", + "integrity": "sha512-zoGhim/oBQbkND6h4Xz4X7l5DkWVH9wH7z0mVty5qa/c0P1Yad47t/npVtt2xS10BiQwzztWKx7Pa2nJ5yykdw==", "dependencies": { + "@puppeteer/browsers": "0.4.0", + "chromium-bidi": "0.4.6", "cross-fetch": "3.1.5", "debug": "4.3.4", - "devtools-protocol": "0.0.1036444", + "devtools-protocol": "0.0.1107588", "extract-zip": "2.0.1", "https-proxy-agent": "5.0.1", - "progress": "2.0.3", "proxy-from-env": "1.1.0", - "rimraf": "3.0.2", "tar-fs": "2.1.1", "unbzip2-stream": "1.4.3", - "ws": "8.8.1" + "ws": "8.13.0" }, "engines": { - "node": ">=14.1.0" + "node": ">=14.14.0" + }, + "peerDependencies": { + "typescript": ">= 4.7.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/puppeteer-core/node_modules/cross-fetch": { @@ -8415,20 +7928,6 @@ } } }, - "node_modules/puppeteer-core/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/puppeteer-core/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -8448,35 +7947,15 @@ "webidl-conversions": "^3.0.0" } }, - "node_modules/puppeteer-core/node_modules/ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/qr-image": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/qr-image/-/qr-image-3.2.0.tgz", "integrity": "sha512-rXKDS5Sx3YipVsqmlMJsJsk6jXylEpiHRC2+nJy66fxA5ExYyGa4PqwteW69SaVmAb2OQ18HbYriT7cGQMbduw==" }, "node_modules/qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dependencies": { "side-channel": "^1.0.4" }, @@ -8502,13 +7981,33 @@ "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, "node_modules/queue": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.1.tgz", - "integrity": "sha512-AJBQabRCCNr9ANq8v77RJEv73DPbn55cdTb+Giq4X0AVnNVZvMHlYp7XlQiN+1npCZj1DuSmaA2hYVUUDgxFDg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", + "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", "dependencies": { "inherits": "~2.0.3" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/random-bytes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", @@ -8526,14 +8025,14 @@ } }, "node_modules/rate-limiter-flexible": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/rate-limiter-flexible/-/rate-limiter-flexible-2.3.8.tgz", - "integrity": "sha512-ENCiteaxQKSFhTPxNq3Trb2dtyVoO2/PyewCicUoRi/ewmNyPdW6nowSYGUZhSE0r7udmf6FaU+tOUIOmVUKGg==" + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/rate-limiter-flexible/-/rate-limiter-flexible-2.4.1.tgz", + "integrity": "sha512-dgH4T44TzKVO9CLArNto62hJOwlWJMLUjVVr/ii0uUzZXEXthDNr7/yefW5z/1vvHAfycc1tnuiYyNJ8CTRB3g==" }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -8557,48 +8056,21 @@ "bin": { "rc": "cli.js" } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "optional": true - }, - "node_modules/read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==", - "dev": true, - "dependencies": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha512-1orxQfbWGUiTn9XsPlChs6rLie/AV9jwZTGmu2NZw/CUDJQchXJFYE0Fq5j7+n558T1JhDWLdhyd1Zj+wLY//w==", - "dev": true, - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - }, + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "optional": true + }, "node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -8614,9 +8086,32 @@ } }, "node_modules/readable-web-to-node-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-2.0.0.tgz", - "integrity": "sha512-+oZJurc4hXpaaqsN68GoZGQAQIA3qr09Or4fqEsargABnbe5Aau8hFn6ISVleT3cpY/0n/8drn7huyyEvTbghA==" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", + "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", + "dependencies": { + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/readable-web-to-node-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } }, "node_modules/readdirp": { "version": "3.6.0", @@ -8682,34 +8177,10 @@ "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/registry-auth-token": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz", - "integrity": "sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==", - "dev": true, - "dependencies": { - "rc": "1.2.8" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dev": true, - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/remove-markdown": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.3.0.tgz", - "integrity": "sha512-5392eIuy1mhjM74739VunOlsOYKjsH82rQcTBlJ1bkICVC3dQ3ksQzTHh4jGHQFnM+1xzLzcFOMH+BofqXhroQ==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.5.0.tgz", + "integrity": "sha512-x917M80K97K5IN1L8lUvFehsfhR8cYjGQ/yAMRI9E7JIKivtl5Emo5iD13DhMr+VojzMCiYk8V2byNPwT/oapg==" }, "node_modules/request": { "version": "2.88.2", @@ -8774,35 +8245,6 @@ "request": "^2.34" } }, - "node_modules/request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", - "dependencies": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - }, - "engines": { - "node": ">=0.12.0" - }, - "peerDependencies": { - "request": "^2.34" - } - }, - "node_modules/request-promise-native/node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/request-promise/node_modules/tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -8903,15 +8345,6 @@ "node": ">=4" } }, - "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==", - "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0" - } - }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -8920,16 +8353,57 @@ "node": ">= 4" } }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/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==", "dev": true, "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rrweb-cssom": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", + "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==" + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" } }, "node_modules/safe-buffer": { @@ -8984,14 +8458,14 @@ "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" }, "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dependencies": { "xmlchars": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=v12.22.7" } }, "node_modules/scim-query-filter-parser": { @@ -9006,9 +8480,9 @@ } }, "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -9019,27 +8493,6 @@ "node": ">=10" } }, - "node_modules/semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "dependencies": { - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semver-diff/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/send": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", @@ -9120,16 +8573,16 @@ } }, "node_modules/sharp": { - "version": "0.31.0", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.0.tgz", - "integrity": "sha512-ft96f8WzGxavg0rkLpMw90MTPMUZDyf0tHjPPh8Ob59xt6KzX8EqtotcqZGUm7kwqpX2pmYiyYX2LL0IZ/FDEw==", + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.0.tgz", + "integrity": "sha512-yLAypVcqj1toSAqRSwbs86nEzfyZVDYqjuUX8grhFpeij0DDNagKJXELS/auegDBRDg1XBtELdOGfo2X1cCpeA==", "hasInstallScript": true, "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.1", - "node-addon-api": "^5.0.0", + "node-addon-api": "^6.0.0", "prebuild-install": "^7.1.1", - "semver": "^7.3.7", + "semver": "^7.3.8", "simple-get": "^4.0.1", "tar-fs": "^2.1.1", "tunnel-agent": "^0.6.0" @@ -9175,12 +8628,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/simple-concat": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", @@ -9225,13 +8672,17 @@ } }, "node_modules/simple-git": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-2.21.0.tgz", - "integrity": "sha512-rohCHmEjD/ESXFLxF4bVeqgdb4Awc65ZyyuCKl3f7BvgMbZOBa/Ye3HN/GFnvruiUOAWWNupxhz3Rz5/3vJLTg==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.17.0.tgz", + "integrity": "sha512-JozI/s8jr3nvLd9yn2jzPVHnhVzt7t7QWfcIoDcqRIGN+f1IINGv52xoZti2kkYfoRhhRvzMSNPfogHMp97rlw==", "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", - "debug": "^4.1.1" + "debug": "^4.3.4" + }, + "funding": { + "type": "github", + "url": "https://github.com/steveukx/git-js?sponsor=1" } }, "node_modules/simple-git/node_modules/debug": { @@ -9268,67 +8719,70 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, - "node_modules/slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/simple-update-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", + "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "semver": "~7.0.0" }, "engines": { - "node": ">=4" + "node": ">=8.10.0" } }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", "dev": true, - "dependencies": { - "color-name": "1.1.3" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, "node_modules/socket.io": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", - "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", + "integrity": "sha512-KMcaAi4l/8+xEjkRICl6ak8ySoxsYG+gG6/XfRCPJPQ/haCRIJBTL4wIl8YCsmtaBovcAXGLOShyVWQ/FG8GZA==", "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" + "engine.io": "~6.4.1", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.1" }, "engines": { "node": ">=10.0.0" } }, "node_modules/socket.io-adapter": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", - "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==" + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", + "dependencies": { + "ws": "~8.11.0" + } + }, + "node_modules/socket.io-adapter/node_modules/ws": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } }, "node_modules/socket.io-parser": { "version": "4.2.2", @@ -9392,38 +8846,6 @@ "node": ">=0.10.0" } }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", - "dev": true - }, "node_modules/split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", @@ -9438,9 +8860,9 @@ "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" }, "node_modules/ssh2": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.9.0.tgz", - "integrity": "sha512-rhhIZT0eMPvCBSOG8CpqZZ7gre2vgXaIqmb3Jb83t88rjsxIsFzDanqBJM9Ns8BmP1835A5IbQ199io4EUZwOA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.11.0.tgz", + "integrity": "sha512-nfg0wZWGSsfUe/IBJkXVll3PEZ//YH2guww+mP88gTpuSU4FtZN7zu9JoeTGOyCNx2dTDtT9fOpWwlzyj4uOOw==", "hasInstallScript": true, "dependencies": { "asn1": "^0.2.4", @@ -9451,16 +8873,16 @@ }, "optionalDependencies": { "cpu-features": "~0.0.4", - "nan": "^2.15.0" + "nan": "^2.16.0" } }, "node_modules/ssh2-promise": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ssh2-promise/-/ssh2-promise-1.0.2.tgz", - "integrity": "sha512-W+nNjW/kGSZn/Ln2wrjo/hlC4ZlCDyLck2FAY7zv72IA4ULPyybVdjVB31SzGFuLY+zlauc4SFGEICDlpVdVAg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ssh2-promise/-/ssh2-promise-1.0.3.tgz", + "integrity": "sha512-842MuERRLuGdTneOZhc5HeogBtGFI/WeeJ9LH3Jp+eB57av8hHGDzxZqgWuQmuxVDniRf7B+agSfgc2wKfLY4w==", "dependencies": { "@heroku/socksv5": "^0.0.9", - "ssh2": "^1.4.0" + "ssh2": "^1.10.0" } }, "node_modules/sshpk": { @@ -9525,45 +8947,22 @@ } }, "node_modules/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==", - "dev": true, + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=6" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/string-width/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/string.prototype.trim": { "version": "1.2.7", @@ -9648,15 +9047,15 @@ "integrity": "sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw==" }, "node_modules/strtok3": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.3.0.tgz", - "integrity": "sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", + "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", "dependencies": { "@tokenizer/token": "^0.3.0", - "peek-readable": "^4.1.0" + "peek-readable": "^5.0.0" }, "engines": { - "node": ">=10" + "node": ">=14.16" }, "funding": { "type": "github", @@ -9664,21 +9063,20 @@ } }, "node_modules/superagent": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-7.1.5.tgz", - "integrity": "sha512-HQYyGuDRFGmZ6GNC4hq2f37KnsY9Lr0/R1marNZTgMweVDQLTLJJ6DGQ9Tj/xVVs5HEnop9EMmTbywb5P30aqw==", + "version": "8.0.9", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.9.tgz", + "integrity": "sha512-4C7Bh5pyHTvU33KpZgwrNKh/VQnvgtCSqPRfJAUdmrtSYePVzVg4E4OzsrbkhJj9O7SO6Bnv75K/F8XVZT8YHA==", "dependencies": { "component-emitter": "^1.3.0", - "cookiejar": "^2.1.3", + "cookiejar": "^2.1.4", "debug": "^4.3.4", "fast-safe-stringify": "^2.1.1", "form-data": "^4.0.0", - "formidable": "^2.0.1", + "formidable": "^2.1.2", "methods": "^1.1.2", - "mime": "^2.5.0", - "qs": "^6.10.3", - "readable-stream": "^3.6.0", - "semver": "^7.3.7" + "mime": "2.6.0", + "qs": "^6.11.0", + "semver": "^7.3.8" }, "engines": { "node": ">=6.4.0 <13 || >=14" @@ -9716,23 +9114,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node_modules/superagent/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/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==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -9765,21 +9151,6 @@ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, - "node_modules/table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "dependencies": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", @@ -9834,9 +9205,9 @@ "dev": true }, "node_modules/thirty-two": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/thirty-two/-/thirty-two-0.0.2.tgz", - "integrity": "sha512-0j1A9eqbP8dSEtkqqEJGpYFN2lPgQR1d0qKS2KNAmIxkK6gV37D5hRa5b/mYzVL1fyAVWBkeUDIXybZdCLVBzA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/thirty-two/-/thirty-two-1.0.2.tgz", + "integrity": "sha512-OEI0IWCe+Dw46019YLl6V10Us5bi574EvlJEOcAkB29IzQ/mYD1A6RyNHLjZPiHCmuodxvgF6U+vZO1L15lxVA==", "engines": { "node": ">=0.2.6" } @@ -9862,15 +9233,6 @@ "node": ">=4" } }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -9896,26 +9258,21 @@ "integrity": "sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==" }, "node_modules/token-types": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-2.1.1.tgz", - "integrity": "sha512-wnQcqlreS6VjthyHO3Y/kpK/emflxDBNhlNUPfh7wE39KnuDdOituXomIbyI79vBtF0Ninpkh72mcuRHo+RG3Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", + "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", "dependencies": { - "@tokenizer/token": "^0.1.1", + "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" }, "engines": { - "node": ">=0.1.98" + "node": ">=14.16" }, "funding": { "type": "github", "url": "https://github.com/sponsors/Borewit" } }, - "node_modules/token-types/node_modules/@tokenizer/token": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.1.1.tgz", - "integrity": "sha512-XO6INPbZCxdprl+9qa/AAbFFOMzzwqYxpjPgLICrMD6C2FCw6qfJOPcBk6JqqPLSaZ/Qx87qn4rpPmPMwaAK6w==" - }, "node_modules/token-types/node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -9970,14 +9327,14 @@ } }, "node_modules/tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", "dependencies": { - "punycode": "^2.1.1" + "punycode": "^2.3.0" }, "engines": { - "node": ">=8" + "node": ">=14" } }, "node_modules/truncate-utf8-bytes": { @@ -10049,9 +9406,9 @@ } }, "node_modules/turndown": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/turndown/-/turndown-7.1.1.tgz", - "integrity": "sha512-BEkXaWH7Wh7e9bd2QumhfAXk5g34+6QUmmWx+0q6ThaVOLuLUqsnkq35HQ5SBHSaxjSfSM7US5o4lhJNH7B9MA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/turndown/-/turndown-7.1.2.tgz", + "integrity": "sha512-ntI9R7fcUKjqBP6QU8rBK2Ehyt8LAzt3UBT9JR9tgo6GtuKvyUzpayWmeMKJw1DPdXzktvtIT8m2mVXz+bL/Qg==", "dependencies": { "domino": "^2.1.6" } @@ -10061,62 +9418,6 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" }, - "node_modules/twemoji": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/twemoji/-/twemoji-13.1.0.tgz", - "integrity": "sha512-e3fZRl2S9UQQdBFLYXtTBT6o4vidJMnpWUAhJA+yLGR+kaUTZAt3PixC0cGvvxWSuq2MSz/o0rJraOXrWw/4Ew==", - "dependencies": { - "fs-extra": "^8.0.1", - "jsonfile": "^5.0.0", - "twemoji-parser": "13.1.0", - "universalify": "^0.1.2" - } - }, - "node_modules/twemoji-parser": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-13.1.0.tgz", - "integrity": "sha512-AQOzLJpYlpWMy8n+0ATyKKZzWlZBJN+G0C+5lhX7Ftc2PeEVdUU/7ns2Pn2vVje26AIZ/OHwFoUbdv6YYD/wGg==" - }, - "node_modules/twemoji/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/twemoji/node_modules/fs-extra/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/twemoji/node_modules/jsonfile": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz", - "integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==", - "dependencies": { - "universalify": "^0.1.2" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/twemoji/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -10130,12 +9431,15 @@ } }, "node_modules/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==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/type-is": { @@ -10169,14 +9473,6 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/uc.micro": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", @@ -10256,22 +9552,10 @@ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", "integrity": "sha512-5WsVTFcH1ut/kkhAaHf4PVgI8c7++GiVcpCGxPouI6ZVjsqPnSDf8h/8HtVqc0t4fzRXwnMK70EcZeAs3PIddg==" }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/universalify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", - "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "engines": { "node": ">= 10.0.0" } @@ -10292,34 +9576,6 @@ "node": ">= 0.8" } }, - "node_modules/update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "dev": true, - "dependencies": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -10346,18 +9602,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==", - "dev": true, - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/url/node_modules/punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", @@ -10405,43 +9649,27 @@ } }, "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", "bin": { "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "node_modules/valid-url": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", "integrity": "sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA==" }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "node_modules/validate.js": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/validate.js/-/validate.js-0.13.1.tgz", "integrity": "sha512-PnFM3xiZ+kYmLyTiMgTYmU7ZHkjBZz2/+F0DaALc/uUtVzdCt1wAosvYJ5hFQi/hz8O4zb52FQhHZRC+uVkJ+g==" }, "node_modules/value-or-promise": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz", - "integrity": "sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", + "integrity": "sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==", "engines": { "node": ">=12" } @@ -10509,40 +9737,45 @@ "node": ">=0.10.0" } }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "deprecated": "Use your platform's native performance.now() and performance.timeOrigin.", - "dependencies": { - "browser-process-hrtime": "^1.0.0" - } - }, "node_modules/w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", + "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", "dependencies": { - "xml-name-validator": "^3.0.0" + "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "engines": { - "node": ">=10.4" + "node": ">=12" } }, "node_modules/whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dependencies": { - "iconv-lite": "0.4.24" + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, "node_modules/whatwg-fetch": { @@ -10559,16 +9792,15 @@ } }, "node_modules/whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", + "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" + "tr46": "^4.1.1", + "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/which": { @@ -10621,47 +9853,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/widest-line/node_modules/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==", - "dev": true - }, - "node_modules/widest-line/node_modules/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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/widest-line/node_modules/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==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/with": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz", @@ -10700,83 +9891,21 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/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==" - }, - "node_modules/wrap-ansi/node_modules/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==", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/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==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "node_modules/write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "dependencies": { - "mkdirp": "^0.5.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/write/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -10787,15 +9916,6 @@ } } }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/xml-crypto": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-2.1.5.tgz", @@ -10822,9 +9942,12 @@ } }, "node_modules/xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "engines": { + "node": ">=12" + } }, "node_modules/xml2js": { "version": "0.4.23", @@ -10904,54 +10027,28 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yargs": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", - "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "version": "17.7.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", + "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.2", - "yargs-parser": "^20.2.2" + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs/node_modules/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==" - }, - "node_modules/yargs/node_modules/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==", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/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==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/yauzl": { @@ -10963,6 +10060,18 @@ "fd-slicer": "~1.1.0" } }, + "node_modules/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==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zen-observable": { "version": "0.8.15", "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", diff --git a/server/package.json b/server/package.json index 94114e20..1edabc5e 100644 --- a/server/package.json +++ b/server/package.json @@ -3,12 +3,13 @@ "version": "3.0.0", "releaseDate": "2023-01-01T01:01:01.000Z", "description": "The most powerful and extensible open source Wiki software", - "main": "index.js", + "main": "index.mjs", + "type": "module", "private": true, "dev": true, "scripts": { "start": "cd .. && node server", - "dev": "cd .. && nodemon server --watch server --ext js,json,graphql,gql" + "dev": "cd .. && nodemon server --watch server --ext mjs,js,json,graphql,gql" }, "repository": { "type": "git", @@ -33,94 +34,91 @@ "node": ">=18.0" }, "dependencies": { - "@azure/storage-blob": "12.11.0", + "@azure/storage-blob": "12.13.0", "@exlinc/keycloak-passport": "1.0.2", - "@graphql-tools/schema": "8.3.7", - "@graphql-tools/utils": "8.6.6", - "@joplin/turndown-plugin-gfm": "1.0.44", + "@graphql-tools/schema": "9.0.17", + "@graphql-tools/utils": "9.2.1", + "@joplin/turndown-plugin-gfm": "1.0.47", "@root/csr": "0.8.1", "@root/keypairs": "0.10.3", "@root/pem": "1.0.4", "acme": "3.0.3", - "akismet-api": "5.3.0", + "akismet-api": "6.0.0", "apollo-fetch": "0.7.0", "apollo-server": "3.6.7", "apollo-server-express": "3.6.7", "auto-load": "3.0.4", - "aws-sdk": "2.1208.0", + "aws-sdk": "2.1353.0", "bcryptjs-then": "1.0.1", - "body-parser": "1.20.0", - "chalk": "4.1.2", + "body-parser": "1.20.2", + "chalk": "5.2.0", "cheerio": "1.0.0-rc.12", "chokidar": "3.5.3", "chromium-pickle-js": "0.2.0", - "clean-css": "4.2.3", + "clean-css": "5.3.2", "command-exists": "1.2.9", "compression": "1.7.4", - "connect-session-knex": "3.0.0", + "connect-session-knex": "3.0.1", "cookie-parser": "1.4.6", "cors": "2.8.5", - "cron-parser": "4.6.0", + "cron-parser": "4.8.1", "cuint": "0.2.2", "custom-error-instance": "2.1.2", - "dependency-graph": "0.9.0", - "diff": "4.0.2", - "diff2html": "3.1.14", - "dompurify": "2.4.0", + "dependency-graph": "0.11.0", + "diff": "5.1.0", + "diff2html": "3.4.34", + "dompurify": "3.0.1", "dotize": "0.3.0", - "emoji-regex": "10.1.0", - "eventemitter2": "6.4.7", - "express": "4.18.1", + "emoji-regex": "10.2.1", + "eventemitter2": "6.4.9", + "express": "4.18.2", "express-brute": "1.0.1", "express-session": "1.17.3", - "file-type": "15.0.1", - "filesize": "6.1.0", - "fs-extra": "9.0.1", + "file-type": "18.2.1", + "filesize": "10.0.7", + "fs-extra": "11.1.1", "getos": "3.2.1", - "graphql": "16.3.0", + "graphql": "16.6.0", "graphql-list-fields": "2.0.2", - "graphql-rate-limit-directive": "2.0.2", - "graphql-tools": "8.2.5", - "graphql-upload": "13.0.0", + "graphql-rate-limit-directive": "2.0.3", + "graphql-tools": "8.3.19", + "graphql-upload": "16.0.2", "he": "1.2.0", - "highlight.js": "10.3.1", - "i18next": "19.8.3", + "highlight.js": "11.7.0", + "i18next": "22.4.14", "i18next-node-fs-backend": "2.1.3", - "image-size": "0.9.2", - "js-base64": "3.7.2", + "image-size": "1.0.2", + "js-base64": "3.7.5", "js-binary": "1.2.0", "js-yaml": "4.1.0", - "jsdom": "16.4.0", - "jsonwebtoken": "8.5.1", - "katex": "0.12.0", - "klaw": "4.0.1", - "knex": "2.3.0", + "jsdom": "21.1.1", + "jsonwebtoken": "9.0.0", + "katex": "0.16.4", + "klaw": "4.1.0", + "knex": "2.4.2", "lodash": "4.17.21", - "luxon": "2.3.1", - "markdown-it": "11.0.1", + "lodash-es": "4.17.21", + "luxon": "3.3.0", + "markdown-it": "13.0.1", "markdown-it-abbr": "1.0.4", - "markdown-it-attrs": "3.0.3", - "markdown-it-emoji": "1.4.0", + "markdown-it-emoji": "2.0.2", "markdown-it-expand-tabs": "1.0.13", "markdown-it-external-links": "0.0.6", "markdown-it-footnote": "3.0.3", "markdown-it-imsize": "2.0.1", "markdown-it-mark": "3.0.1", "markdown-it-mathjax": "2.0.0", - "markdown-it-multimd-table": "4.0.3", "markdown-it-sub": "1.0.0", "markdown-it-sup": "1.0.0", "markdown-it-task-lists": "2.1.1", - "mathjax": "3.1.2", + "mathjax": "3.2.2", "mime-types": "2.1.35", - "moment": "2.29.2", - "moment-timezone": "0.5.31", "ms": "2.1.3", "multer": "1.4.4", - "nanoid": "3.3.2", - "node-2fa": "1.1.2", + "nanoid": "4.0.2", + "node-2fa": "2.0.3", "node-cache": "5.1.2", - "nodemailer": "6.7.8", + "nodemailer": "6.9.1", "objection": "3.0.1", "passport": "0.6.0", "passport-auth0": "1.4.3", @@ -132,60 +130,59 @@ "passport-github2": "0.1.12", "passport-gitlab2": "5.0.0", "passport-google-oauth20": "2.0.0", - "passport-jwt": "4.0.0", + "passport-jwt": "4.0.1", "passport-ldapauth": "3.0.1", "passport-local": "1.0.0", "passport-microsoft": "1.0.0", - "passport-oauth2": "1.6.1", + "passport-oauth2": "1.7.0", "passport-okta-oauth": "0.0.1", "passport-openidconnect": "0.1.1", "passport-saml": "3.2.1", "passport-slack-oauth2": "1.1.1", "passport-twitch-strategy": "2.2.0", "pem-jwk": "2.0.0", - "pg": "8.8.0", + "pg": "8.10.0", "pg-hstore": "2.3.4", - "pg-pubsub": "0.8.0", - "pg-query-stream": "4.2.4", - "pg-tsquery": "8.4.0", - "poolifier": "2.2.0", + "pg-pubsub": "0.8.1", + "pg-query-stream": "4.4.0", + "pg-tsquery": "8.4.1", + "poolifier": "2.4.4", "pug": "3.0.2", - "punycode": "2.1.1", - "puppeteer-core": "17.1.3", + "punycode": "2.3.0", + "puppeteer-core": "19.8.5", "qr-image": "3.2.0", - "rate-limiter-flexible": "2.3.8", - "remove-markdown": "0.3.0", + "rate-limiter-flexible": "2.4.1", + "remove-markdown": "0.5.0", "request": "2.88.2", "request-promise": "4.2.6", "safe-regex": "2.1.1", "sanitize-filename": "1.6.3", "scim-query-filter-parser": "2.0.4", - "semver": "7.3.7", + "semver": "7.3.8", "serve-favicon": "2.5.0", - "sharp": "0.31.0", - "simple-git": "2.21.0", - "socket.io": "4.5.2", - "ssh2": "1.9.0", - "ssh2-promise": "1.0.2", + "sharp": "0.32.0", + "simple-git": "3.17.0", + "socket.io": "4.6.1", + "ssh2": "1.11.0", + "ssh2-promise": "1.0.3", "striptags": "3.2.0", "tar-fs": "2.1.1", - "turndown": "7.1.1", - "twemoji": "13.1.0", + "turndown": "7.1.2", "uslug": "1.0.4", - "uuid": "8.3.2", + "uuid": "9.0.0", "validate.js": "0.13.1", "xss": "1.0.14", - "yargs": "16.1.0" + "yargs": "17.7.1" }, "devDependencies": { - "eslint": "7.12.0", + "eslint": "8.38.0", "eslint-config-requarks": "1.0.7", - "eslint-config-standard": "15.0.0", - "eslint-plugin-import": "2.22.1", + "eslint-config-standard": "17.0.0", + "eslint-plugin-import": "2.27.5", "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.2.1", - "eslint-plugin-standard": "4.0.2", - "nodemon": "2.0.15" + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-standard": "4.1.0", + "nodemon": "2.0.22" }, "collective": { "type": "opencollective", diff --git a/server/tasks/simple/check-version.js b/server/tasks/simple/check-version.mjs similarity index 88% rename from server/tasks/simple/check-version.js rename to server/tasks/simple/check-version.mjs index 644ee1d4..b6c0662a 100644 --- a/server/tasks/simple/check-version.js +++ b/server/tasks/simple/check-version.mjs @@ -1,4 +1,4 @@ -module.exports = async (payload) => { +export async function task (payload) { WIKI.logger.info('Checking for latest version...') try { diff --git a/server/tasks/simple/clean-job-history.js b/server/tasks/simple/clean-job-history.mjs similarity index 86% rename from server/tasks/simple/clean-job-history.js rename to server/tasks/simple/clean-job-history.mjs index 484642ca..72f4d465 100644 --- a/server/tasks/simple/clean-job-history.js +++ b/server/tasks/simple/clean-job-history.mjs @@ -1,6 +1,6 @@ -const { DateTime } = require('luxon') +import { DateTime } from 'luxon' -module.exports = async (payload) => { +export async function task (payload) { WIKI.logger.info('Cleaning scheduler job history...') try { diff --git a/server/tasks/simple/update-locales.js b/server/tasks/simple/update-locales.mjs similarity index 88% rename from server/tasks/simple/update-locales.js rename to server/tasks/simple/update-locales.mjs index 5d3535bc..1929fc9c 100644 --- a/server/tasks/simple/update-locales.js +++ b/server/tasks/simple/update-locales.mjs @@ -1,4 +1,4 @@ -module.exports = async (payload) => { +export async function task (payload) { WIKI.logger.info('Fetching latest localization data...') try { diff --git a/server/tasks/workers/purge-uploads.js b/server/tasks/workers/purge-uploads.mjs similarity index 60% rename from server/tasks/workers/purge-uploads.js rename to server/tasks/workers/purge-uploads.mjs index 062e9514..4fc4fa8f 100644 --- a/server/tasks/workers/purge-uploads.js +++ b/server/tasks/workers/purge-uploads.mjs @@ -1,20 +1,20 @@ -const path = require('node:path') -const fs = require('fs-extra') -const { DateTime } = require('luxon') +import path from 'node:path' +import fse from 'fs-extra' +import { DateTime } from 'luxon' -module.exports = async ({ payload }) => { +export async function task ({ payload }) { WIKI.logger.info('Purging orphaned upload files...') try { const uplTempPath = path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'uploads') - await fs.ensureDir(uplTempPath) - const ls = await fs.readdir(uplTempPath) + await fse.ensureDir(uplTempPath) + const ls = await fse.readdir(uplTempPath) const fifteenAgo = DateTime.now().minus({ minutes: 15 }) for (const f of ls) { - const stat = fs.stat(path.join(uplTempPath, f)) + const stat = fse.stat(path.join(uplTempPath, f)) if ((await stat).isFile && stat.ctime < fifteenAgo) { - await fs.unlink(path.join(uplTempPath, f)) + await fse.unlink(path.join(uplTempPath, f)) } } diff --git a/server/tasks/workers/render-page.js b/server/tasks/workers/render-page.mjs similarity index 83% rename from server/tasks/workers/render-page.js rename to server/tasks/workers/render-page.mjs index 6e3d236b..d144468d 100644 --- a/server/tasks/workers/render-page.js +++ b/server/tasks/workers/render-page.mjs @@ -1,7 +1,7 @@ -const _ = require('lodash') -const cheerio = require('cheerio') +import { get, has, isEmpty, reduce, times, toSafeInteger } from 'lodash-es' +import cheerio from 'cheerio' -module.exports = async ({ payload }) => { +export async function task ({ payload }) { WIKI.logger.info(`Rendering page ${payload.id}...`) try { @@ -20,7 +20,7 @@ module.exports = async ({ payload }) => { let output = page.render - if (_.isEmpty(page.content)) { + if (isEmpty(page.content)) { WIKI.logger.warn(`Failed to render page ID ${payload.id} because content was empty: [ FAILED ]`) } @@ -41,11 +41,11 @@ module.exports = async ({ payload }) => { let toc = { root: [] } $('h1,h2,h3,h4,h5,h6').each((idx, el) => { - const depth = _.toSafeInteger(el.name.substring(1)) - (isStrict ? 1 : 2) + const depth = toSafeInteger(el.name.substring(1)) - (isStrict ? 1 : 2) let leafPathError = false - const leafPath = _.reduce(_.times(depth), (curPath, curIdx) => { - if (_.has(toc, curPath)) { + const leafPath = reduce(times(depth), (curPath, curIdx) => { + if (has(toc, curPath)) { const lastLeafIdx = _.get(toc, curPath).length - 1 if (lastLeafIdx >= 0) { curPath = `${curPath}[${lastLeafIdx}].children` @@ -61,8 +61,8 @@ module.exports = async ({ payload }) => { const leafSlug = $('.toc-anchor', el).first().attr('href') $('.toc-anchor', el).remove() - _.get(toc, leafPath).push({ - label: _.trim($(el).text()), + get(toc, leafPath).push({ + label: $(el).text().trim(), key: leafSlug.substring(1), children: [] }) diff --git a/server/web.js b/server/web.mjs similarity index 67% rename from server/web.js rename to server/web.mjs index 92b62922..6c4e1404 100644 --- a/server/web.js +++ b/server/web.mjs @@ -1,30 +1,31 @@ -const autoload = require('auto-load') -const bodyParser = require('body-parser') -const compression = require('compression') -const cookieParser = require('cookie-parser') -const cors = require('cors') -const express = require('express') -const session = require('express-session') -const KnexSessionStore = require('connect-session-knex')(session) -const favicon = require('serve-favicon') -const path = require('path') -const _ = require('lodash') - -module.exports = async () => { +import bodyParser from 'body-parser' +import compression from 'compression' +import cookieParser from 'cookie-parser' +import cors from 'cors' +import express from 'express' +import session from 'express-session' +import KnexSessionStore from 'connect-session-knex' +import favicon from 'serve-favicon' +import path from 'node:path' +import { set } from 'lodash-es' + +import auth from './core/auth.mjs' +import mail from './core/mail.mjs' +import system from './core/system.mjs' + +import ctrlAuth from './controllers/auth.mjs' +import ctrlCommon from './controllers/common.mjs' +import ctrlSsl from './controllers/ssl.mjs' +import ctrlWs from './controllers/ws.mjs' + +export async function init () { // ---------------------------------------- // Load core modules // ---------------------------------------- - WIKI.auth = require('./core/auth').init() - WIKI.mail = require('./core/mail').init() - WIKI.system = require('./core/system').init() - - // ---------------------------------------- - // Load middlewares - // ---------------------------------------- - - const mw = autoload(path.join(WIKI.SERVERPATH, '/middlewares')) - const ctrl = autoload(path.join(WIKI.SERVERPATH, '/controllers')) + WIKI.auth = auth.init() + WIKI.mail = mail.init() + WIKI.system = system.init() // ---------------------------------------- // Define Express App @@ -41,24 +42,57 @@ module.exports = async () => { const useHTTPS = WIKI.config.ssl.enabled === true || WIKI.config.ssl.enabled === 'true' || WIKI.config.ssl.enabled === 1 || WIKI.config.ssl.enabled === '1' await WIKI.servers.initHTTP() - if (useHTTPS) { await WIKI.servers.initHTTPS() } - await WIKI.servers.initWebSocket() // ---------------------------------------- // Attach WebSocket Server // ---------------------------------------- - ctrl.ws() + ctrlWs() // ---------------------------------------- // Security // ---------------------------------------- - app.use(mw.security) + app.use((req, res, next) => { + // -> Disable X-Powered-By + req.app.disable('x-powered-by') + + // -> Disable Frame Embedding + if (WIKI.config.security.securityIframe) { + res.set('X-Frame-Options', 'deny') + } + + // -> Re-enable XSS Fitler if disabled + res.set('X-XSS-Protection', '1; mode=block') + + // -> Disable MIME-sniffing + res.set('X-Content-Type-Options', 'nosniff') + + // -> Disable IE Compatibility Mode + res.set('X-UA-Compatible', 'IE=edge') + + // -> Disables referrer header when navigating to a different origin + if (WIKI.config.security.securityReferrerPolicy) { + res.set('Referrer-Policy', 'same-origin') + } + + // -> Enforce HSTS + if (WIKI.config.security.securityHSTS) { + res.set('Strict-Transport-Security', `max-age=${WIKI.config.security.securityHSTSDuration}; includeSubDomains`) + } + + // -> Prevent Open Redirect from user provided URL + if (WIKI.config.security.securityOpenRedirect) { + // Strips out all repeating / character in the provided URL + req.url = req.url.replace(/(\/)(?=\/*\1)/g, '') + } + + next() + }) app.use(cors({ origin: false })) app.options('*', cors({ origin: false })) if (WIKI.config.security.securityTrustProxy) { @@ -86,7 +120,7 @@ module.exports = async () => { // SSL Handlers // ---------------------------------------- - app.use('/', ctrl.ssl) + app.use('/', ctrlSsl()) // ---------------------------------------- // Passport Authentication @@ -97,7 +131,7 @@ module.exports = async () => { secret: WIKI.config.auth.secret, resave: false, saveUninitialized: false, - store: new KnexSessionStore({ + store: new KnexSessionStore(session)({ knex: WIKI.db.knex }) })) @@ -115,7 +149,15 @@ module.exports = async () => { // SEO // ---------------------------------------- - app.use(mw.seo) + app.use((req, res, next) => { + if (req.path.length > 1 && req.path.endsWith('/')) { + let query = req.url.slice(req.path.length) || '' + res.redirect(301, req.path.slice(0, -1) + query) + } else { + set(res.locals, 'pageMeta.url', `${WIKI.config.host}${req.path}`) + next() + } + }) // ---------------------------------------- // View Engine Setup @@ -177,9 +219,8 @@ module.exports = async () => { next() }) - app.use('/', ctrl.auth) - app.use('/', ctrl.upload) - app.use('/', ctrl.common) + app.use('/', ctrlAuth()) + app.use('/', ctrlCommon()) // ---------------------------------------- // Error handling @@ -202,7 +243,7 @@ module.exports = async () => { }) } else { res.status(err.status || 500) - _.set(res.locals, 'pageMeta.title', 'Error') + set(res.locals, 'pageMeta.title', 'Error') res.render('error', { message: err.message, error: WIKI.IS_DEBUG ? err : {} diff --git a/server/worker.js b/server/worker.js index 71456a73..247b3c05 100644 --- a/server/worker.js +++ b/server/worker.js @@ -1,12 +1,12 @@ -const { ThreadWorker } = require('poolifier') -const { kebabCase } = require('lodash') -const path = require('node:path') +import { ThreadWorker } from 'poolifier' +import { kebabCase } from 'lodash-es' +import path from 'node:path' // ---------------------------------------- // Init Minimal Core // ---------------------------------------- -let WIKI = { +const WIKI = { IS_DEBUG: process.env.NODE_ENV === 'development', ROOTPATH: process.cwd(), INSTANCE_ID: 'worker', @@ -39,9 +39,9 @@ WIKI.logger = require('./core/logger').init() // Execute Task // ---------------------------------------- -module.exports = new ThreadWorker(async (job) => { +export default new ThreadWorker(async (job) => { WIKI.INSTANCE_ID = job.INSTANCE_ID - const task = require(`./tasks/workers/${kebabCase(job.task)}.js`) + const task = (await import(`./tasks/workers/${kebabCase(job.task)}.mjs`)).task await task(job) return true }, { async: true }) diff --git a/ux/package-lock.json b/ux/package-lock.json index 44a57cc2..f223d639 100644 --- a/ux/package-lock.json +++ b/ux/package-lock.json @@ -11,32 +11,32 @@ "@apollo/client": "3.7.11", "@lezer/common": "1.0.2", "@mdi/font": "7.2.96", - "@quasar/extras": "1.16.1", - "@tiptap/core": "2.0.1", - "@tiptap/extension-code-block": "2.0.1", - "@tiptap/extension-code-block-lowlight": "2.0.1", - "@tiptap/extension-color": "2.0.1", - "@tiptap/extension-dropcursor": "2.0.1", - "@tiptap/extension-font-family": "2.0.1", - "@tiptap/extension-gapcursor": "2.0.1", - "@tiptap/extension-hard-break": "2.0.1", - "@tiptap/extension-highlight": "2.0.1", - "@tiptap/extension-history": "2.0.1", - "@tiptap/extension-image": "2.0.1", - "@tiptap/extension-mention": "2.0.1", - "@tiptap/extension-placeholder": "2.0.1", - "@tiptap/extension-table": "2.0.1", - "@tiptap/extension-table-cell": "2.0.1", - "@tiptap/extension-table-header": "2.0.1", - "@tiptap/extension-table-row": "2.0.1", - "@tiptap/extension-task-item": "2.0.1", - "@tiptap/extension-task-list": "2.0.1", - "@tiptap/extension-text-align": "2.0.1", - "@tiptap/extension-text-style": "2.0.1", - "@tiptap/extension-typography": "2.0.1", - "@tiptap/pm": "2.0.1", - "@tiptap/starter-kit": "2.0.1", - "@tiptap/vue-3": "2.0.1", + "@quasar/extras": "1.16.2", + "@tiptap/core": "2.0.2", + "@tiptap/extension-code-block": "2.0.2", + "@tiptap/extension-code-block-lowlight": "2.0.2", + "@tiptap/extension-color": "2.0.2", + "@tiptap/extension-dropcursor": "2.0.2", + "@tiptap/extension-font-family": "2.0.2", + "@tiptap/extension-gapcursor": "2.0.2", + "@tiptap/extension-hard-break": "2.0.2", + "@tiptap/extension-highlight": "2.0.2", + "@tiptap/extension-history": "2.0.2", + "@tiptap/extension-image": "2.0.2", + "@tiptap/extension-mention": "2.0.2", + "@tiptap/extension-placeholder": "2.0.2", + "@tiptap/extension-table": "2.0.2", + "@tiptap/extension-table-cell": "2.0.2", + "@tiptap/extension-table-header": "2.0.2", + "@tiptap/extension-table-row": "2.0.2", + "@tiptap/extension-task-item": "2.0.2", + "@tiptap/extension-task-list": "2.0.2", + "@tiptap/extension-text-align": "2.0.2", + "@tiptap/extension-text-style": "2.0.2", + "@tiptap/extension-typography": "2.0.2", + "@tiptap/pm": "2.0.2", + "@tiptap/starter-kit": "2.0.2", + "@tiptap/vue-3": "2.0.2", "apollo-upload-client": "17.0.0", "browser-fs-access": "0.33.0", "clipboard": "2.0.11", @@ -78,7 +78,7 @@ "prosemirror-transform": "1.7.1", "prosemirror-view": "1.30.2", "pug": "3.0.2", - "quasar": "2.11.9", + "quasar": "2.11.10", "slugify": "1.6.6", "socket.io-client": "4.6.1", "tabulator-tables": "5.4.4", @@ -652,9 +652,9 @@ } }, "node_modules/@quasar/extras": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/@quasar/extras/-/extras-1.16.1.tgz", - "integrity": "sha512-bRnWSC469Qogw0ceDVd0yTQVBQjyhV6L10EMixXK1dpOs9tWGKRVgyyGZ5DEBkDgyn4BeRuV5s5e9VrQdQPsOg==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/@quasar/extras/-/extras-1.16.2.tgz", + "integrity": "sha512-spDc1DrwxGts0MjmOAJ11xpxJANhCI1vEadxaw89wRQJ/QfKd0HZrwN7uN1U15cRozGRkJpdbsnP4cVXpkPysA==", "funding": { "type": "github", "url": "https://donate.quasar.dev" @@ -762,9 +762,9 @@ "license": "MIT" }, "node_modules/@tiptap/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.1.tgz", - "integrity": "sha512-IY5K17e1YdlJIykCt3NuOyqK/SHyGwk2X7eyLYfZJGJwqzuPuf3y8X1zZQQN53t5UVfsgqsF9RweVEee40o1Aw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.2.tgz", + "integrity": "sha512-DBry6tpX7mYaTJkEDjVA4WmF8Kgthr275L0uIIOVdwW5nG5PAnOvREKyVOoMQnN3vR7CjtaCK+c3y+MCQhMA/g==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -774,9 +774,9 @@ } }, "node_modules/@tiptap/extension-blockquote": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.0.1.tgz", - "integrity": "sha512-j4n5iTeBc/YIoW83nZPoc1/fKeoA32tPaOH/quQdtkBgXEM9r4PiK7NfsJxbFq7UGk0oa3ibRSiBxzODgZIVlw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.0.2.tgz", + "integrity": "sha512-KY4PZtQRf06sC2B1nKkm1hI2y7XFWqqA2lAmWRu12m7Zofc9aabLipEY8yijY7se0QMc4kDTVWp8d2uvbhyDFA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -786,9 +786,9 @@ } }, "node_modules/@tiptap/extension-bold": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.0.1.tgz", - "integrity": "sha512-SYzs0e3FcAmJbYQkQ+LLRnoBNrFvG0i2zc+lFbrSYVCiEpqb5QPz5mgmQvnrH/Sl89WewnoeMu7pLqVEpfAWuw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.0.2.tgz", + "integrity": "sha512-WRqc8WeKx3pmi0u0Svre5rhMeTT1c/Vch48BWTkUsmn2PAufg/mrmmR1fJ8Bp5soazEKknOT5LVe69OYKLfHIQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -798,9 +798,9 @@ } }, "node_modules/@tiptap/extension-bubble-menu": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.0.1.tgz", - "integrity": "sha512-ZA8T7+yjlHzEjBeOlWAqz/9XvBb/rJ7/PiYjM57UXuT/ZgPMPL7KXI/KtS7vaRCnmKaGL6EJ1tBcZhjU24vNzA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.0.2.tgz", + "integrity": "sha512-cZDAMnf1+E711zY9RApWFajNp+ScRdN3L9+k6XEUnmTHlfVIeE1jsPmpH3PIZpMUpAO4TQ76DvLfEb4hKSu3eQ==", "dependencies": { "tippy.js": "^6.3.7" }, @@ -814,9 +814,9 @@ } }, "node_modules/@tiptap/extension-bullet-list": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.0.1.tgz", - "integrity": "sha512-IniXv9VgHkyWF2wJKxoILhNnJPwWNlIRW2LNSlXzkl70k0BsPGcAfiEIJtPqpVwh03QPc5v1y5UeuOOO6VQbqA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.0.2.tgz", + "integrity": "sha512-n6P4N+3dZqBnyxpc6pz4qYHLOYr2oy6+K662GKzNQqe1TFSVr9+Vc/JmXiVPgwERs6RW6/Kdo7/9s454eDTIzg==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -826,9 +826,9 @@ } }, "node_modules/@tiptap/extension-code": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.0.1.tgz", - "integrity": "sha512-9Ygk2Ijfu89JFRwtId1x/u3yJUMfVSo6bkiUUmIFf04evgIgzBYMNl/KQerapmkcbkXWGCZ7/gcu+WUmU4c7lQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.0.2.tgz", + "integrity": "sha512-YG8BlqK50ZyYpBZ3KtO9/Ao+hQr3Z9wuW0fi7VIlwWferB20Px9WlBolAipRxfCh+oLmiacipHBIdGZGD+rC6A==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -838,9 +838,9 @@ } }, "node_modules/@tiptap/extension-code-block": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.0.1.tgz", - "integrity": "sha512-dPGKAlg0P2Qpikp8IF3r3kAD9II/Mc9cB8Wa3czwPr8r9Oobyy3UL7R7WqMy33abLgHmS/RuerOsTXz6sHBMww==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.0.2.tgz", + "integrity": "sha512-GL8ogok1tl1FkXwk0P0ZWYh6oAmSA+R3oubtDZJG1fLlezKLcLYCN/Q2jgYDHDwEOnxMc4JIiT7EYwJ0pqmNaQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -851,9 +851,9 @@ } }, "node_modules/@tiptap/extension-code-block-lowlight": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block-lowlight/-/extension-code-block-lowlight-2.0.1.tgz", - "integrity": "sha512-AUEeOfHSYh9a7+Lv57LSnYOJkC1lUhQC3AtjJK/1LG8NzDuL1XY+wpP0WKLKsH2qr95bJNi26amIcdVGtIVupg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block-lowlight/-/extension-code-block-lowlight-2.0.2.tgz", + "integrity": "sha512-7BbRCKJE2oxsZ5n7HIjS0r/y1S/bSxEJgAFF1Tj3KN2IG3x48w+sqYxRMYmCZdoTexmmBpNF64uYXngKXB9/Ig==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -865,9 +865,9 @@ } }, "node_modules/@tiptap/extension-color": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-color/-/extension-color-2.0.1.tgz", - "integrity": "sha512-NCfrwXvGjXbfHbm4DBjvJz1rXlWEXUtsXIXCVhRj/bUJHx/g1gV9Q5wcOLVWpd2h3y18H2YbO0LS1OypW8huYQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-color/-/extension-color-2.0.2.tgz", + "integrity": "sha512-2TwXnGpMgbc1VYgUSWEEReR4Yy4K0rbdifO7RKy9xOuccT8+F5EccoWzb8R7ZMB4QVJ1cE9b3Pc0miPL43Tt3w==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -878,9 +878,9 @@ } }, "node_modules/@tiptap/extension-document": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-2.0.1.tgz", - "integrity": "sha512-9T14qBa6uKieJ+FCGm0nL9o8LTjwqlfc2pYQkkjXXWFivMXoVeL9rVIlarANgbJZKYsZ4L5tkyXcKQ32nZmMjg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-2.0.2.tgz", + "integrity": "sha512-rY87m1sezlD37v5hGndiA/B/3upR3hQurSEsWhWyQE/11lOshPQKCCHfDV6KLwKdjd8lfwfbXueH/SBFHtrYAQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -890,9 +890,9 @@ } }, "node_modules/@tiptap/extension-dropcursor": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.0.1.tgz", - "integrity": "sha512-OuqMhj13hPSdxc6G3xDmGvwe3AfczMQjAoSPakNW9pSSzrjJJa3Tr08kI+TyZDUm3vKM4af+lL/oCeXSupGAbQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.0.2.tgz", + "integrity": "sha512-jHBq5fAlgUeZBHPtdAeS40Xmx+2sUvzTnHonU6cDKOpD3+dzwNHEqVSk/9vcjEIcqeM5w3eOIS/AGvoFq7RCjA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -903,9 +903,9 @@ } }, "node_modules/@tiptap/extension-floating-menu": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.0.1.tgz", - "integrity": "sha512-gOf7FyromNyQpdaU/MWV99KMu6vypN+IlK8ViCBPvcM7w+e5eTh39wY/u5OquM7LsXd8KXLC2neq1XzQsAVmzw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.0.2.tgz", + "integrity": "sha512-sYBBmMyjygHimtekZMzOAU1yvHjn36O1tZ+lXR/K2F97WWd5Y9WJo+iUrnbzBDMTXGvPi5ZTByXg36YKFRTmPg==", "dependencies": { "tippy.js": "^6.3.7" }, @@ -919,9 +919,9 @@ } }, "node_modules/@tiptap/extension-font-family": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-font-family/-/extension-font-family-2.0.1.tgz", - "integrity": "sha512-uUJippccCmy6qKCvzLJSphS79Cu1FghHLFQwc2NETmXAVNmyRcb8/61tF4hqDt8eEokvEdi8YNWD3JDm/wOBuw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-font-family/-/extension-font-family-2.0.2.tgz", + "integrity": "sha512-uJ52qvSml2r8vtaZg4A2Cz7jx4+V5lT9cEKXsctH0uJJ4r5kMWOp0u7YB3AUGasOIpi/Mg++IK9dqt8zMadAlg==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -932,9 +932,9 @@ } }, "node_modules/@tiptap/extension-gapcursor": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.0.1.tgz", - "integrity": "sha512-NZbT4BIpXlf3gxqQMsZ173bJreGfr43eBwR/tJ8nBLcgBmFKiDfRTW3Whj7+EGD6Ek6rqUX0EekKG93Wes+I4w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.0.2.tgz", + "integrity": "sha512-NimvDbM8Cc8+l/ZWJW8aqZRH6hzz1iJLOAMyj23UjHQWvKO0yqE1KBLGZI2GU+vizEK3LkZZXhXnh76rnTwgSQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -945,9 +945,9 @@ } }, "node_modules/@tiptap/extension-hard-break": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.0.1.tgz", - "integrity": "sha512-H8NdmOuYehuMMRd0iWOeyN8ukAebqu6BWbDiZUKm+yx+1b7woadVofojLnGlreQT2II3cC4g8D9J7JfrcQtbyg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.0.2.tgz", + "integrity": "sha512-X/HG9Mzb4Qx/x67tkLK0JdG/fNL7IMP5gTpqOdgRT4m4vQA4ItuZHi4GlvWXfvtP6J0qfKKNimJvBQ5TZCZV1A==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -957,9 +957,9 @@ } }, "node_modules/@tiptap/extension-heading": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.0.1.tgz", - "integrity": "sha512-JkwlePSyDraVrWisr5lE/yqK4FXm5YSiiQiIo/1W9vFLdMPsAbRCSZrBO4fV7gyppbFgQQikEWDgxYHshq/TOg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.0.2.tgz", + "integrity": "sha512-99PL9Rx8mioo13SNuIkhZm1VW6UuUKKG0b7fAimsunaEbbLNtToXIasS68pX8BkgWnsBfDhR0HyhnpIBRg7W0w==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -969,9 +969,9 @@ } }, "node_modules/@tiptap/extension-highlight": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-highlight/-/extension-highlight-2.0.1.tgz", - "integrity": "sha512-k9rJnAGzjXWQSN3RqSVPQfsbtFAgZu2AnwSFH2VQ2Ea7oiAUOaD7Qcqrs0PLo/CxLEuWPAbULNngXUXZVseMBA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-highlight/-/extension-highlight-2.0.2.tgz", + "integrity": "sha512-FLW7VvHr6UjiHCxzGMrnTBCslDfUqpLJjg0j6P4+0ksKKEcjfgRNkI8ln5NB1IyphXYUvWczeD83rMTtX8+feA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -981,9 +981,9 @@ } }, "node_modules/@tiptap/extension-history": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.0.1.tgz", - "integrity": "sha512-nT4XbZUEyi+xSnwIeG+JqfHmWhF+amCwYsr7oYM/oa/BFDGaRHaNIrS3D+DpzjRrKguuLDxyhZkJEu1K2Rjsqw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.0.2.tgz", + "integrity": "sha512-K7u8HCEh9g35DSB4+c7z1wj9ais2cF3STDhyCRjBuLcCTgWVAim5cto4MkSdrXnLuWGgNK0jloWxVlMk3E1HPg==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -994,9 +994,9 @@ } }, "node_modules/@tiptap/extension-horizontal-rule": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.0.1.tgz", - "integrity": "sha512-JNgu0ioOBhn3Djn8vd41y3DrqeEfWMLIWNRVO81OqQRvWZhpRwIUuDoRrzR45wxjymq9flc+iz7zuFW1kszpQA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.0.2.tgz", + "integrity": "sha512-QUqNnHqRXMZRE6uFRX0UDFn07JDiiNukPRCIL4vyV/YJ6HmQiBjbsS/1hLjAwBuqaN8dtlHLdR4PjMuA6qrUYw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1007,9 +1007,9 @@ } }, "node_modules/@tiptap/extension-image": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.0.1.tgz", - "integrity": "sha512-FMXY0Y3nsDtAb1gNGidNhXnyJTZw6bOwYXg6jEV/K05HIz/svMQVkXLR04vSKczr7DWnlOmaJiqzge9Hc9WJ9Q==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.0.2.tgz", + "integrity": "sha512-Jyfzp78Mn20R1Bcpz4Cm47EOU5xrOcDkhSisvNcFqcaxSV/CHyNVPDRpRMussK3k7qDcDuf2flDjrTRXPWZqIg==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1019,9 +1019,9 @@ } }, "node_modules/@tiptap/extension-italic": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.0.1.tgz", - "integrity": "sha512-lVIyKa3qjqD4rUKSzVghkS5xonJ8k+msvy5Sr5xd6duwEBOk7e0oKtXmdn7B1VBH64i/U3Cx0QRgDlEyukvV2Q==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.0.2.tgz", + "integrity": "sha512-AK8m4JKvjv2LgTho2GLPW4UI9Z8Oc1tErG9TAeJzud8NFFZ2iOOueAwyGjPLaEQxWaE2p5xlKjbBUWDV5bd6AQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1031,9 +1031,9 @@ } }, "node_modules/@tiptap/extension-list-item": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.0.1.tgz", - "integrity": "sha512-WxLRcwhMGp12+hV1nLTRVxPJ3ZsjLzA3tyaYySBf6IQpmoikH8DbzvprwV30lHfYbZvcQWQJx3ECIcQdGbtPPg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.0.2.tgz", + "integrity": "sha512-q8nz79iB6EvkBucm0OwUg7SX3vDGCRttmf0OrEBsoUCoFt/NhrejUCMDSbysHtYp+EtZcKu4VsPuNHU3C7F1vQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1043,9 +1043,9 @@ } }, "node_modules/@tiptap/extension-mention": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-mention/-/extension-mention-2.0.1.tgz", - "integrity": "sha512-Wb7uX+MgjxMvhaaO6oTRcMBkhmsA7Rd5cERe4Yc2jkqIZKoyoL91AL5qqFJxVEhn18bXsqxbaCBpcjLxjYNCIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-mention/-/extension-mention-2.0.2.tgz", + "integrity": "sha512-5nUSlqYi5x+I5Q84+l8OL+4R/NRAN0wBrEN0Cps4GJB3dqINMsTbjSbIwRk8bw79XBHNJI1PndBjVktBgwYxNA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1057,9 +1057,9 @@ } }, "node_modules/@tiptap/extension-ordered-list": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.0.1.tgz", - "integrity": "sha512-7Q3hqAy2TYZ1p3J0GtEDcUJrbC/NxzWNF1H4zKW3VQGQhffUDNgHBk4uCLLVyf1A3vm50JmEAwQFrrwoozFmqQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.0.2.tgz", + "integrity": "sha512-fgWIQNDlC2pYNnS9Iqw2UZaNIInfks3mZm0Aj9DQ78LbTYDAcGvHcWaulLkd0CcfD6smTYwi9oBzP3dpPbcPTw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1069,9 +1069,9 @@ } }, "node_modules/@tiptap/extension-paragraph": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.0.1.tgz", - "integrity": "sha512-fVr5BZ7glyf/80vIO+GSQdeIcTvuXKGW9QvU0Mw8y1ek9Edd3MLWMxKdDurTswApnxIluvJFjmzp4XEogHHlhg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.0.2.tgz", + "integrity": "sha512-BuiUV8Wh8DjRrNmmk5sIlVlk0V8P4BT2fCB4H7Ar+QDUPKY1g0djB/5g3F70iZh1Z7CiY1ctoL8VQznvtb0KsQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1081,9 +1081,9 @@ } }, "node_modules/@tiptap/extension-placeholder": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-2.0.1.tgz", - "integrity": "sha512-Jc0SrZw6HQ6Ddxr58SAAw5QPYh2pgjc1OSfrKn7+zBzcZDMFLWWgx9lTRwlR5L5VqTEuWqatJCfDrgjbnE4hLw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-2.0.2.tgz", + "integrity": "sha512-5D46ONEN4Hcgn9xwWgY0mSUp9DAM/z74P9vZcdChUXxj96L2ngM/nU92qEby0kGCSGoO3ucxJGf/aL8KhGqIxQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1094,9 +1094,9 @@ } }, "node_modules/@tiptap/extension-strike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.0.1.tgz", - "integrity": "sha512-gHNO47T5tbeFzhjJUn2Ob5RrqkG4joVyvUv3fFkSqpNngTIcqT5hJ7A3tDj2CKQGmUpU5SxM68sHMoIGpXdWIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.0.2.tgz", + "integrity": "sha512-v5goRcfORMkHaA4/mQH80mO0IVFJup1sSrSd4lNUwWN68Qy2ckMVRLRgvbk0JjG2kbamFgJ4LmN/3ceZvUj27A==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1106,9 +1106,9 @@ } }, "node_modules/@tiptap/extension-table": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-2.0.1.tgz", - "integrity": "sha512-HpFuDrBolIC9E2KGZ4PAEncgX+Kk3kcCccG/Cuiigb3M/VnJm6l5m5UEOa9egSVW2wmdj4xsM9adfHNcsWi6Mw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-2.0.2.tgz", + "integrity": "sha512-0HUpCQ+roTZqgMDtKQfgq8Yjo5SSxUJc+lMVHqcdeW2UwPkwXfAPCZ0ojle8SyQgQjv6GTcVTssvzq7+HGpd0Q==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1119,9 +1119,9 @@ } }, "node_modules/@tiptap/extension-table-cell": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-2.0.1.tgz", - "integrity": "sha512-ymxDC5leH/e7/V1JAup478nt3ellxMxJ9F+q/y3O/mN0wkisZXGWue2GYPMx+ymrKyF1K0pS2I0AYqxQ6HzMPw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-2.0.2.tgz", + "integrity": "sha512-tz4H+GPhV/Ed7DG4GXChlq1+sbWwBNb1v9Lp0D1JiU3VKzO9ZbOiPg0YDn+m3cE2rhpVXNKvZzlAG0IALl0VEQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1131,9 +1131,9 @@ } }, "node_modules/@tiptap/extension-table-header": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-2.0.1.tgz", - "integrity": "sha512-QBpoIZQ7skaqQZE62xjwxtaVuJb42g7w4sqLYLwH2ChYBurpsbBp8fb2V/8GtuTsJNdXNmsYmZAkJw0KkHk4jA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-2.0.2.tgz", + "integrity": "sha512-v0diLuGQ200uZ1cl+xkFpRozLtuMpAFd/G2JFsi2o2bRNh2U7y5F48LOCIoeOOr5vqDy4qD04feUVWv/qdYMjg==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1143,9 +1143,9 @@ } }, "node_modules/@tiptap/extension-table-row": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-2.0.1.tgz", - "integrity": "sha512-Asa7f6no2z+yGZ7BVmvBLEMFCs5oW2c4a6aMuoG/qHQzuIRfI7y433Pe+SUJRhWXNLNLJLhM42g+fBgzFABo0g==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-2.0.2.tgz", + "integrity": "sha512-R5mI/S9iMNVqvdUVHEOC96C55vmIkvYEO7UQUijXgsjPHufoKQr+i2EH85BbmzHL+JdF9S5MMShczQJzJuAAkA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1155,9 +1155,9 @@ } }, "node_modules/@tiptap/extension-task-item": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-2.0.1.tgz", - "integrity": "sha512-JKiXxvBJqn4d6vdJ2ejDFXExxGPwlAeaj8uQNzUMI93v5pkqyeU22lYMoMBK0EPeBy7EhMiIEcxY8tonNFT73g==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-2.0.2.tgz", + "integrity": "sha512-YGzQuLXC4HQOHcvGw2MArUVDxEW2LX7IV3qeS89+H2HWZQDoWOoGRMHBZoRRAgzppG36Y5rQVWae/avDc5RuOQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1168,9 +1168,9 @@ } }, "node_modules/@tiptap/extension-task-list": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-2.0.1.tgz", - "integrity": "sha512-jGP94bR2FyvZwOE2f6SmW7H6RBfhMkwc+HaFwYHadECbDbmXgIzITI85T4qWm481PhXKOEK0i2OTcJiEjU5P5Q==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-2.0.2.tgz", + "integrity": "sha512-lxrRYNKwX1P/Q8HmbtL+IqoMwr4A4MSWUKdXFKde/bbXfFczeOopfW9ioaIvvMiXYIoDz8x3/QpHRxt8t11pCA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1180,9 +1180,9 @@ } }, "node_modules/@tiptap/extension-text": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.0.1.tgz", - "integrity": "sha512-jwfpf71JZn04T4xcOMGJXCHTZoyvVtBusn6ZyRSQT4cVnDUgWcIbmIW5xccvGy8klBepBDS2ff+Nce3pxQnqug==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.0.2.tgz", + "integrity": "sha512-kAO+WurWOyHIV/x8qHMF3bSlWrdlPtjEYmf+w8wHKy3FzE55eF6SsGt4FymClNkJmyXdgflXBB3Wv/Z53myy8g==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1192,9 +1192,9 @@ } }, "node_modules/@tiptap/extension-text-align": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.0.1.tgz", - "integrity": "sha512-XhMcx7qaReJlB5BeaXFQ+8QZED45/BRwCFqE+WkfwvWH1M/ySiiazOJyootDTudx0lijbf2rUCUKYc4oexoMew==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.0.2.tgz", + "integrity": "sha512-cNYOQPpqAOquTjSm2lSzP9J1d5T9FueWArq2A3FsYzOSZfVAJmqp9gn/bfCKveKgE5m7nLN3g3o+RNryIWTr2w==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1204,9 +1204,9 @@ } }, "node_modules/@tiptap/extension-text-style": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text-style/-/extension-text-style-2.0.1.tgz", - "integrity": "sha512-fAS3zGsSW2xOuozmpKiRzOkC031GLK+V3yXWOOMWPOKwx1YoA7Q3RFELXgZGIO1lHJnwcrKZBCcu+4VAxmaNug==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text-style/-/extension-text-style-2.0.2.tgz", + "integrity": "sha512-0XJJA4MKBi/jOfN60LC8beSzjx0BMWFhZqtFczfOq73YTbQriDOkKFLn3AiEc8oRlYNdRnIg4chVPCheBkoKwg==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1216,9 +1216,9 @@ } }, "node_modules/@tiptap/extension-typography": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-typography/-/extension-typography-2.0.1.tgz", - "integrity": "sha512-0yyM9YjNx71zmb8EYIVIxU0C2zi5IDe3FzCDEdqMzi6bwZZzrtqYeX/fG1IW974RVWKGu+ScrNDd5Y5lcUriOw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-typography/-/extension-typography-2.0.2.tgz", + "integrity": "sha512-EopmjSP9ZKM98vUa+W29L5SxfQgBOgJTZJ6oR3jvQ15Ctu0pssOAI+7u7U5OnzUaaiR3w4M6a9iDAwCjSmwNiA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1228,9 +1228,9 @@ } }, "node_modules/@tiptap/pm": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.0.1.tgz", - "integrity": "sha512-Vu6PAVNbIArhNCA3TXC9bX4Qj4duI+3jZhGptTDU+4wLHSjp6p1zM+RKRHFdIIBZG+v9uATWyitrvNd7qHlJdQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.0.2.tgz", + "integrity": "sha512-vXlI82bZ4XrmVD6m/pO27gqlm+tU57mpjy9WjkJpEUOifQZK8LihR3l5k55Z0RqalV4/E79iU1cp8mw0v13nhA==", "dependencies": { "prosemirror-changeset": "^2.2.0", "prosemirror-collab": "^1.3.0", @@ -1260,29 +1260,29 @@ } }, "node_modules/@tiptap/starter-kit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.0.1.tgz", - "integrity": "sha512-LxSAwVpaLsbUodDQRvfAiWc6QYG2Fq1m5ZDzoPBAFJq/aCcI0Gt5Gf3AQrOWpuj9FV8kelbr9gUkPqJR60K+Pg==", - "dependencies": { - "@tiptap/core": "^2.0.1", - "@tiptap/extension-blockquote": "^2.0.1", - "@tiptap/extension-bold": "^2.0.1", - "@tiptap/extension-bullet-list": "^2.0.1", - "@tiptap/extension-code": "^2.0.1", - "@tiptap/extension-code-block": "^2.0.1", - "@tiptap/extension-document": "^2.0.1", - "@tiptap/extension-dropcursor": "^2.0.1", - "@tiptap/extension-gapcursor": "^2.0.1", - "@tiptap/extension-hard-break": "^2.0.1", - "@tiptap/extension-heading": "^2.0.1", - "@tiptap/extension-history": "^2.0.1", - "@tiptap/extension-horizontal-rule": "^2.0.1", - "@tiptap/extension-italic": "^2.0.1", - "@tiptap/extension-list-item": "^2.0.1", - "@tiptap/extension-ordered-list": "^2.0.1", - "@tiptap/extension-paragraph": "^2.0.1", - "@tiptap/extension-strike": "^2.0.1", - "@tiptap/extension-text": "^2.0.1" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.0.2.tgz", + "integrity": "sha512-s0yE6nEVYnxnHHdLxZ6McMhOAMbZ1czAj9qvmc1Mra0U/p08fg3VTn1gIgy8FA3t0TWUNpuwsO4FcgKlWaQ+eg==", + "dependencies": { + "@tiptap/core": "^2.0.2", + "@tiptap/extension-blockquote": "^2.0.2", + "@tiptap/extension-bold": "^2.0.2", + "@tiptap/extension-bullet-list": "^2.0.2", + "@tiptap/extension-code": "^2.0.2", + "@tiptap/extension-code-block": "^2.0.2", + "@tiptap/extension-document": "^2.0.2", + "@tiptap/extension-dropcursor": "^2.0.2", + "@tiptap/extension-gapcursor": "^2.0.2", + "@tiptap/extension-hard-break": "^2.0.2", + "@tiptap/extension-heading": "^2.0.2", + "@tiptap/extension-history": "^2.0.2", + "@tiptap/extension-horizontal-rule": "^2.0.2", + "@tiptap/extension-italic": "^2.0.2", + "@tiptap/extension-list-item": "^2.0.2", + "@tiptap/extension-ordered-list": "^2.0.2", + "@tiptap/extension-paragraph": "^2.0.2", + "@tiptap/extension-strike": "^2.0.2", + "@tiptap/extension-text": "^2.0.2" }, "funding": { "type": "github", @@ -1304,12 +1304,12 @@ } }, "node_modules/@tiptap/vue-3": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tiptap/vue-3/-/vue-3-2.0.1.tgz", - "integrity": "sha512-4szBIsZZvnnRv6G7MoQ4nFIYwAvcOSbj+FsR/H666VK+sU0zwaD3opqN/5c2kYMeeCmmU/UuMbnQ9slQEnETjA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@tiptap/vue-3/-/vue-3-2.0.2.tgz", + "integrity": "sha512-Z0Znj1a+4AW58749PvEPi/YjSY3U4Pu28g7jjD6rGcae0DCa0g8TQuPsPqgxBsZkFJ0JJisasEAKJRX96zlUbg==", "dependencies": { - "@tiptap/extension-bubble-menu": "^2.0.1", - "@tiptap/extension-floating-menu": "^2.0.1" + "@tiptap/extension-bubble-menu": "^2.0.2", + "@tiptap/extension-floating-menu": "^2.0.2" }, "funding": { "type": "github", @@ -6433,9 +6433,9 @@ } }, "node_modules/quasar": { - "version": "2.11.9", - "resolved": "https://registry.npmjs.org/quasar/-/quasar-2.11.9.tgz", - "integrity": "sha512-ZHSZRQJk/zN6whhvihh0EyRpAs3IYBZZ+1O5/RSe7nXyOXOVi6RwPBzleab5HoTxtHL5Yuk3/bKgb3CywAyBQQ==", + "version": "2.11.10", + "resolved": "https://registry.npmjs.org/quasar/-/quasar-2.11.10.tgz", + "integrity": "sha512-pV7bMdY/FUmOvNhZ2XjKSXJH92fsDu0cU/z7a9roPKV54cW41N1en3sLATrirjPComyZnk4uXrMdGtXp8+IpCg==", "engines": { "node": ">= 10.18.1", "npm": ">= 6.13.4", diff --git a/ux/package.json b/ux/package.json index 1db895f5..b3f3ca07 100644 --- a/ux/package.json +++ b/ux/package.json @@ -8,38 +8,40 @@ "scripts": { "dev": "quasar dev", "build": "quasar build", - "lint": "eslint --ext .js,.vue ./" + "lint": "eslint --ext .js,.vue ./", + "ncu": "ncu -x codemirror,codemirror-asciidoc", + "ncu-u": "ncu -u -x codemirror,codemirror-asciidoc" }, "dependencies": { "@apollo/client": "3.7.11", "@lezer/common": "1.0.2", "@mdi/font": "7.2.96", - "@quasar/extras": "1.16.1", - "@tiptap/core": "2.0.1", - "@tiptap/extension-code-block": "2.0.1", - "@tiptap/extension-code-block-lowlight": "2.0.1", - "@tiptap/extension-color": "2.0.1", - "@tiptap/extension-dropcursor": "2.0.1", - "@tiptap/extension-font-family": "2.0.1", - "@tiptap/extension-gapcursor": "2.0.1", - "@tiptap/extension-hard-break": "2.0.1", - "@tiptap/extension-highlight": "2.0.1", - "@tiptap/extension-history": "2.0.1", - "@tiptap/extension-image": "2.0.1", - "@tiptap/extension-mention": "2.0.1", - "@tiptap/extension-placeholder": "2.0.1", - "@tiptap/extension-table": "2.0.1", - "@tiptap/extension-table-cell": "2.0.1", - "@tiptap/extension-table-header": "2.0.1", - "@tiptap/extension-table-row": "2.0.1", - "@tiptap/extension-task-item": "2.0.1", - "@tiptap/extension-task-list": "2.0.1", - "@tiptap/extension-text-align": "2.0.1", - "@tiptap/extension-text-style": "2.0.1", - "@tiptap/extension-typography": "2.0.1", - "@tiptap/pm": "2.0.1", - "@tiptap/starter-kit": "2.0.1", - "@tiptap/vue-3": "2.0.1", + "@quasar/extras": "1.16.2", + "@tiptap/core": "2.0.2", + "@tiptap/extension-code-block": "2.0.2", + "@tiptap/extension-code-block-lowlight": "2.0.2", + "@tiptap/extension-color": "2.0.2", + "@tiptap/extension-dropcursor": "2.0.2", + "@tiptap/extension-font-family": "2.0.2", + "@tiptap/extension-gapcursor": "2.0.2", + "@tiptap/extension-hard-break": "2.0.2", + "@tiptap/extension-highlight": "2.0.2", + "@tiptap/extension-history": "2.0.2", + "@tiptap/extension-image": "2.0.2", + "@tiptap/extension-mention": "2.0.2", + "@tiptap/extension-placeholder": "2.0.2", + "@tiptap/extension-table": "2.0.2", + "@tiptap/extension-table-cell": "2.0.2", + "@tiptap/extension-table-header": "2.0.2", + "@tiptap/extension-table-row": "2.0.2", + "@tiptap/extension-task-item": "2.0.2", + "@tiptap/extension-task-list": "2.0.2", + "@tiptap/extension-text-align": "2.0.2", + "@tiptap/extension-text-style": "2.0.2", + "@tiptap/extension-typography": "2.0.2", + "@tiptap/pm": "2.0.2", + "@tiptap/starter-kit": "2.0.2", + "@tiptap/vue-3": "2.0.2", "apollo-upload-client": "17.0.0", "browser-fs-access": "0.33.0", "clipboard": "2.0.11", @@ -81,7 +83,7 @@ "prosemirror-transform": "1.7.1", "prosemirror-view": "1.30.2", "pug": "3.0.2", - "quasar": "2.11.9", + "quasar": "2.11.10", "slugify": "1.6.6", "socket.io-client": "4.6.1", "tabulator-tables": "5.4.4",