From: Justin Wind Date: Sun, 15 May 2022 20:53:36 +0000 (-0700) Subject: Merge branch 'v1.3-dev' as v1.3.8 X-Git-Tag: v1.3.8 X-Git-Url: http://git.squeep.com/?p=websub-hub;a=commitdiff_plain;h=992908fa9b00364d23ca1899e1856e7a0ad5edd5;hp=8f63eeebd08491cdc82e12f178dc500f6d19d65c Merge branch 'v1.3-dev' as v1.3.8 --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 73ae6cb..d9fdf81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ Releases and notable changes to this project are documented here. +## [v1.3.8] - 2022-05-15 + +### Fixed + +- Badge requests are allowed to be cached. +- Dependency updates. +- Minor fixes. + ## [v1.3.7] - 2022-04-08 ### Added @@ -145,7 +153,8 @@ Releases and notable changes to this project are documented here. --- -[Unreleased]: https://git.squeep.com/?p=websub-hub;a=commitdiff;h=HEAD;hp=v1.3.7 +[Unreleased]: https://git.squeep.com/?p=websub-hub;a=commitdiff;h=HEAD;hp=v1.3.8 +[v1.3.8]: https://git.squeep.com/?p=websub-hub;a=commitdiff;h=v1.3.8;hp=v1.3.7 [v1.3.7]: https://git.squeep.com/?p=websub-hub;a=commitdiff;h=v1.3.7;hp=v1.3.6 [v1.3.6]: https://git.squeep.com/?p=websub-hub;a=commitdiff;h=v1.3.6;hp=v1.3.5 [v1.3.5]: https://git.squeep.com/?p=websub-hub;a=commitdiff;h=v1.3.5;hp=v1.3.4 diff --git a/README.md b/README.md index 33c8674..17b4733 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ An IndieAuth profile may be used to view any topics associated with that profile One way of deploying this server is behind nginx, with the pm2 package to manage the server process, and a local postgres database. Some details on this are presented here as a rough guide to any parts of this stack which may be unfamiliar. -- Have NodeJS 12-ish available. +- Have NodeJS 14-ish available. - Have PostgreSQL available. - Clone the server repository. ```git clone https://git.squeep.com/websub-hub``` diff --git a/bin/authUserAdd.js b/bin/authUserAdd.js old mode 100644 new mode 100755 index 1c33be8..d47635f --- a/bin/authUserAdd.js +++ b/bin/authUserAdd.js @@ -1,8 +1,10 @@ +#!/usr/bin/env node +/* eslint-disable node/shebang */ 'use strict'; -const argon2 = require('argon2'); const readline = require('readline'); const stream = require('stream'); +const { Authenticator } = require('@squeep/authentication-module'); const DB = require('../src/db'); const Logger = require('../src/logger'); const Config = require('../config'); @@ -10,6 +12,7 @@ const config = new Config(process.env.NODE_ENV); const logger = new Logger(config); const db = new DB(logger, config); +const authenticator = new Authenticator(logger, db, config); const identifier = process.argv[2]; @@ -46,7 +49,7 @@ async function readPassword(prompt) { (async () => { await db.initialize(); const password = await readPassword('password: '); - const credential = await argon2.hash(password, { type: argon2.argon2id }); + const credential = await authenticator.authn.argon2.hash(password, { type: authenticator.authn.argon2.argon2id }); console.log(`\t${identifier}:${credential}`); await db.context(async (dbCtx) => { const result = await db.authenticationUpsert(dbCtx, identifier, credential); diff --git a/bin/dumpConfig.js b/bin/dumpConfig.js old mode 100644 new mode 100755 index 6a8450a..12bb9ce --- a/bin/dumpConfig.js +++ b/bin/dumpConfig.js @@ -1,3 +1,6 @@ +#!/usr/bin/env node +/* eslint-disable node/shebang */ + 'use strict'; const Config = require('../config'); diff --git a/package-lock.json b/package-lock.json index 749d390..e147b16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@squeep/websub-hub", - "version": "1.3.7", + "version": "1.3.8", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -288,18 +288,18 @@ } }, "@eslint/eslintrc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", - "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", + "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.1", + "espree": "^9.3.2", "globals": "^13.9.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "dependencies": { @@ -315,6 +315,14 @@ "requires": { "argparse": "^2.0.1" } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } } } }, @@ -410,14 +418,6 @@ "rimraf": "^3.0.2", "semver": "^7.3.5", "tar": "^6.1.11" - }, - "dependencies": { - "detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", - "optional": true - } } }, "@phc/format": { @@ -435,9 +435,9 @@ } }, "@sinonjs/fake-timers": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.0.0.tgz", - "integrity": "sha512-+shXA2X7KNP7H7qNbQTJ3SA+NQc0pZDSBrdvFSRwF8sAo/ohw+ZQFD8Moc+gnz51+1eRXtEQBpKWPiQ4jsRC/w==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", "requires": { "@sinonjs/commons": "^1.7.0" } @@ -458,10 +458,10 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==" }, "@squeep/api-dingus": { - "version": "git+https://git.squeep.com/squeep-api-dingus/#12568946a94e853c3c16974d57dd34de1ad3877c", - "from": "git+https://git.squeep.com/squeep-api-dingus/#v1.2.5", + "version": "git+https://git.squeep.com/squeep-api-dingus/#ca2260cda9495a10a4daff923df56c3751efd809", + "from": "git+https://git.squeep.com/squeep-api-dingus/#v1.2.7", "requires": { - "mime-db": "^1.51.0", + "mime-db": "^1.52.0", "uuid": "^8.3.2" }, "dependencies": { @@ -473,73 +473,94 @@ } }, "@squeep/authentication-module": { - "version": "git+https://git.squeep.com/squeep-authentication-module/#69041023d56cd6f36ebc838bac931bba7e032c40", - "from": "git+https://git.squeep.com/squeep-authentication-module/#v1.2.2", - "requires": { - "@squeep/api-dingus": "git+https://git.squeep.com/squeep-api-dingus/#v1.2.5", - "@squeep/html-template-helper": "git+https://git.squeep.com/squeep-html-template-helper#v1.1.1", - "@squeep/indieauth-helper": "git+https://git.squeep.com/squeep-indieauth-helper/#v1.1.1", - "@squeep/mystery-box": "git+https://git.squeep.com/squeep-mystery-box/#v1.0.6", - "argon2": "^0.28.4", + "version": "git+https://git.squeep.com/squeep-authentication-module/#df9be924442837d9ba2bf6d80bf2563aee264103", + "from": "git+https://git.squeep.com/squeep-authentication-module/#v1.2.3", + "requires": { + "@squeep/api-dingus": "git+https://git.squeep.com/squeep-api-dingus/#v1.2.7", + "@squeep/html-template-helper": "git+https://git.squeep.com/squeep-html-template-helper#v1.2.0", + "@squeep/indieauth-helper": "git+https://git.squeep.com/squeep-indieauth-helper/#v1.1.2", + "@squeep/mystery-box": "git+https://git.squeep.com/squeep-mystery-box/#v1.0.7", + "argon2": "^0.28.5", "node-linux-pam": "^0.2.1" } }, "@squeep/base64url": { - "version": "git+https://git.squeep.com/squeep-base64url#3a5f50494917a415f5fb3d43f3b0cacb961186f9", - "from": "git+https://git.squeep.com/squeep-base64url#v1.0.0" + "version": "git+https://git.squeep.com/squeep-base64url#11756bafd458e15207cc476637ee1dd3c6812d44", + "from": "git+https://git.squeep.com/squeep-base64url#v1.0.1" }, "@squeep/html-template-helper": { - "version": "git+https://git.squeep.com/squeep-html-template-helper#292abdfd6500142f063909cfdec3b6c2184141b1", - "from": "git+https://git.squeep.com/squeep-html-template-helper#v1.1.1", + "version": "git+https://git.squeep.com/squeep-html-template-helper#8ffb058e22bd37ecfc4de489cab9efdc4b496afb", + "from": "git+https://git.squeep.com/squeep-html-template-helper#v1.2.0", "requires": { - "@squeep/lazy": "git+https://git.squeep.com/squeep-lazy-property/#v1.0.0" + "@squeep/lazy-property": "git+https://git.squeep.com/squeep-lazy-property/#v1.0.1" } }, "@squeep/indieauth-helper": { - "version": "git+https://git.squeep.com/squeep-indieauth-helper/#f26fc3563484621523dd4d8a8efdc0e020ab6943", - "from": "git+https://git.squeep.com/squeep-indieauth-helper/#v1.1.1", + "version": "git+https://git.squeep.com/squeep-indieauth-helper/#07146c0584504bd0322d368ae739fc607d42bd85", + "from": "git+https://git.squeep.com/squeep-indieauth-helper/#v1.1.2", "requires": { - "@squeep/web-linking": "git+https://git.squeep.com/squeep-web-linking/#v1.0.4", - "axios": "^0.26.1", + "@squeep/web-linking": "git+https://git.squeep.com/squeep-web-linking/#v1.0.5", + "axios": "^0.27.2", "iconv": "^3.0.1", "microformats-parser": "^1.4.1" } }, - "@squeep/lazy": { - "version": "git+https://git.squeep.com/squeep-lazy-property/#1017c96958b07004f5dae64d0004d6104fedebd9", - "from": "git+https://git.squeep.com/squeep-lazy-property/#v1.0.0", + "@squeep/lazy-property": { + "version": "git+https://git.squeep.com/squeep-lazy-property/#c652fc35d808cf6e03c1d4aa0e3ccaab6d5e0a9a", + "from": "git+https://git.squeep.com/squeep-lazy-property/#v1.0.1", "requires": { - "eslint": "^8.12.0", + "eslint": "^8.14.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-security": "^1.4.0", - "eslint-plugin-sonarjs": "^0.12.0", - "mocha": "^9.2.2", + "eslint-plugin-security": "^1.5.0", + "eslint-plugin-sonarjs": "^0.13.0", + "mocha": "^10.0.0", "nyc": "^15.1.0", "pre-commit": "^1.2.2", - "sinon": "^13.0.1" + "sinon": "^13.0.2" }, "dependencies": { - "eslint-plugin-sonarjs": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.12.0.tgz", - "integrity": "sha512-soxjK67hoYxO8hesKqXWN50GSM+oG2r35N5WnAMehetahO6zoVpv3HZbdziP0jYWNopEe6te/BFUZOYAZI+qhg==" + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "sinon": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.2.tgz", + "integrity": "sha512-KvOrztAVqzSJWMDoxM4vM+GPys1df2VBoXm+YciyB/OLMamfS3VXh3oGh5WtrAGSzrgczNWFFY22oKb7Fi5eeA==", + "requires": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^9.1.2", + "@sinonjs/samsam": "^6.1.1", + "diff": "^5.0.0", + "nise": "^5.1.1", + "supports-color": "^7.2.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } } } }, "@squeep/logger-json-console": { - "version": "git+https://git.squeep.com/squeep-logger-json-console#229dafe0003708b9fad190b4c0fc68136efd4f8c", - "from": "git+https://git.squeep.com/squeep-logger-json-console#v1.0.0" + "version": "git+https://git.squeep.com/squeep-logger-json-console#dbff0fa5f018f7a302f73250e55f761c0ccf24b1", + "from": "git+https://git.squeep.com/squeep-logger-json-console#v1.0.2" }, "@squeep/mystery-box": { - "version": "git+https://git.squeep.com/squeep-mystery-box/#4a7973e78ebbe86b85d37198d9a90b473b8bd4dd", - "from": "git+https://git.squeep.com/squeep-mystery-box/#v1.0.6", + "version": "git+https://git.squeep.com/squeep-mystery-box/#f14566229acc97c45f30ae776019d4732f7765fc", + "from": "git+https://git.squeep.com/squeep-mystery-box/#v1.0.7", "requires": { - "@squeep/base64url": "git+https://git.squeep.com/squeep-base64url#v1.0.0" + "@squeep/base64url": "git+https://git.squeep.com/squeep-base64url#v1.0.1" } }, "@squeep/web-linking": { - "version": "git+https://git.squeep.com/squeep-web-linking/#9a786b67a16416996df95b63c1a295dae98cf663", - "from": "git+https://git.squeep.com/squeep-web-linking/#v1.0.4" + "version": "git+https://git.squeep.com/squeep-web-linking/#e2033244c7d8b22d54c0607884a09de627826f84", + "from": "git+https://git.squeep.com/squeep-web-linking/#v1.0.5" }, "@ungap/promise-all-settled": { "version": "1.1.2", @@ -553,9 +574,9 @@ "optional": true }, "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==" + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==" }, "acorn-jsx": { "version": "5.3.2", @@ -695,12 +716,18 @@ "integrity": "sha512-7q9uNH/Dh8gFgpIIb9ja8PJEWA5AQy3xnBC8jtKs8K/gNVCr1K6kIvlm59HUyYgvM7oEDoLzGgPcGd9FqhtXEQ==", "optional": true }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, "axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "requires": { - "follow-redirects": "^1.14.8" + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" } }, "balanced-match": { @@ -715,13 +742,13 @@ "optional": true }, "better-sqlite3": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.5.1.tgz", - "integrity": "sha512-+i6tH1y9KEIol1iYpZJrqDwBDQZGHioDENU49Rnidorp3bSXvw/QTYDjQGq9+TFF7RX4q0YV1sEOIRq4vDZdRg==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.5.2.tgz", + "integrity": "sha512-qJHsZRS3bo0zC/pBbhE7yuRMMLGVCGukqdWvs+EpcrT/ZDnvLiiCv+RNqu7YuiE3qpDqHdsm+IkwCU9dXZsh+Q==", "optional": true, "requires": { "bindings": "^1.5.0", - "prebuild-install": "^7.0.0" + "prebuild-install": "^7.1.0" } }, "binary-extensions": { @@ -990,6 +1017,14 @@ "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==" }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "commander": { "version": "2.17.1", "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", @@ -1094,6 +1129,11 @@ "strip-bom": "^4.0.0" } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -1101,9 +1141,9 @@ "optional": true }, "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", "optional": true }, "diff": { @@ -1120,43 +1160,36 @@ } }, "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "dependencies": { - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" - } + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" } }, "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" }, "domhandler": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", - "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "requires": { - "domelementtype": "^2.2.0" + "domelementtype": "^2.3.0" } }, "domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" } }, "electron-to-chromium": { @@ -1179,9 +1212,9 @@ } }, "entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==" + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.0.tgz", + "integrity": "sha512-/iP1rZrSEJ0DTlPiX+jbzlA3eVkY/e8L8SozroF395fIqE3TYF/Nz7YOMAawta+vLmyJ/hkGNNPcSbMADCCXbg==" }, "es6-error": { "version": "4.1.1", @@ -1199,11 +1232,11 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz", - "integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", + "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", "requires": { - "@eslint/eslintrc": "^1.2.1", + "@eslint/eslintrc": "^1.2.3", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -1214,7 +1247,7 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", + "espree": "^9.3.2", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1230,7 +1263,7 @@ "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", "regexpp": "^3.2.0", @@ -1273,6 +1306,14 @@ "argparse": "^2.0.1" } }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -1313,18 +1354,17 @@ } }, "eslint-plugin-security": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.4.0.tgz", - "integrity": "sha512-xlS7P2PLMXeqfhyf3NpqbvbnW04kN8M9NtmhpR3XGyOvt/vNKS7XPXT5EDbwKW9vCjWH4PpfQvgD/+JgN0VJKA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.5.0.tgz", + "integrity": "sha512-hAFVwLZ/UeXrlyVD2TDarv/x00CoFVpaY0IUZhKjPjiFxqkuQVixsK4f2rxngeQOqSxi6OUjzJM/jMwKEVjJ8g==", "requires": { - "safe-regex": "^1.1.0" + "safe-regex": "^2.1.1" } }, "eslint-plugin-sonarjs": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.13.0.tgz", - "integrity": "sha512-t3m7ta0EspzDxSOZh3cEOJIJVZgN/TlJYaBGnQlK6W/PZNbWep8q4RQskkJkA7/zwNpX0BaoEOSUUrqaADVoqA==", - "dev": true + "integrity": "sha512-t3m7ta0EspzDxSOZh3cEOJIJVZgN/TlJYaBGnQlK6W/PZNbWep8q4RQskkJkA7/zwNpX0BaoEOSUUrqaADVoqA==" }, "eslint-scope": { "version": "7.1.1", @@ -1356,12 +1396,12 @@ "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==" }, "espree": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", - "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", + "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", "requires": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" } }, @@ -1494,9 +1534,9 @@ "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==" }, "follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.0.tgz", + "integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==" }, "foreground-child": { "version": "2.0.0", @@ -1507,6 +1547,16 @@ "signal-exit": "^3.0.2" } }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -1624,9 +1674,9 @@ } }, "globals": { - "version": "13.13.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", - "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", "requires": { "type-fest": "^0.20.2" }, @@ -1643,11 +1693,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -1711,20 +1756,20 @@ } }, "htmlparser2": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", - "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", + "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.2", - "domutils": "^2.8.0", - "entities": "^3.0.1" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "entities": "^4.3.0" } }, "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "optional": true, "requires": { "agent-base": "6", @@ -2097,6 +2142,14 @@ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, "mimic-response": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", @@ -2148,31 +2201,29 @@ "optional": true }, "mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", "requires": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", - "debug": "4.3.3", + "debug": "4.3.4", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", "glob": "7.2.0", - "growl": "1.10.5", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", - "minimatch": "4.2.1", + "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.1", + "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", + "workerpool": "6.2.1", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" @@ -2184,9 +2235,9 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { "ms": "2.1.2" }, @@ -2240,11 +2291,21 @@ } }, "minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + } } }, "ms": { @@ -2279,9 +2340,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==" + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==" }, "napi-build-utils": { "version": "1.0.2", @@ -2316,9 +2377,9 @@ } }, "node-abi": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.8.0.tgz", - "integrity": "sha512-tzua9qWWi7iW4I42vUPKM+SfaF0vQSLAm4yO5J83mSwB7GeoWrDKC/K+8YCnYNwqP5duwazbw2X9l4m8SC2cUw==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.15.0.tgz", + "integrity": "sha512-Ic6z/j6I9RLm4ov7npo1I48UQr2BEyFCqh6p7S1dhEx9jPO0GPGq/e2Rb7x7DroQrmiVMz/Bw1vJm9sPAl2nxA==", "optional": true, "requires": { "semver": "^7.3.5" @@ -2472,6 +2533,12 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "optional": true }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "optional": true + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -3237,9 +3304,9 @@ } }, "prebuild-install": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.0.1.tgz", - "integrity": "sha512-QBSab31WqkyxpnMWQxubYAHR5S9B2+r81ucocew34Fkl98FhvKIF50jIJnNOBmAZfyNV7vE5T6gd3hTVWgY6tg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.0.tgz", + "integrity": "sha512-CNcMgI1xBypOyGqjp3wOc8AAo1nMhZS3Cwd3iHIxOdAUbb+YxdNuM4Z5iIrZ8RLvOsf3F3bl7b7xGq6DjQoNYA==", "optional": true, "requires": { "detect-libc": "^2.0.0", @@ -3279,12 +3346,6 @@ "readable-stream": "^2.0.6" } }, - "detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", - "optional": true - }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -3447,6 +3508,11 @@ "picomatch": "^2.2.1" } }, + "regexp-tree": { + "version": "0.1.24", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.24.tgz", + "integrity": "sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==" + }, "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -3490,11 +3556,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -3509,11 +3570,11 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", "requires": { - "ret": "~0.1.10" + "regexp-tree": "~0.1.1" } }, "sax": { @@ -3579,12 +3640,13 @@ } }, "sinon": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.1.tgz", - "integrity": "sha512-8yx2wIvkBjIq/MGY1D9h1LMraYW+z1X0mb648KZnKSdvLasvDu7maa0dFaNYdTDczFgbjNw2tOmWdTk9saVfwQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", + "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", + "dev": true, "requires": { "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.0.0", + "@sinonjs/fake-timers": "^9.1.2", "@sinonjs/samsam": "^6.1.1", "diff": "^5.0.0", "nise": "^5.1.1", @@ -3594,12 +3656,14 @@ "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "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, "requires": { "has-flag": "^4.0.0" } @@ -3948,9 +4012,9 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" }, "workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==" }, "wrap-ansi": { "version": "7.0.0", diff --git a/package.json b/package.json index 801e7a4..318ff97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@squeep/websub-hub", - "version": "1.3.7", + "version": "1.3.8", "description": "A WebSub Hub server implementation.", "main": "server.js", "scripts": { @@ -22,7 +22,7 @@ "syndication" ], "engines": { - "node": ">=12.9" + "node": ">=14" }, "author": "Justin Wind ", "license": "ISC", @@ -32,30 +32,30 @@ "coverage-check" ], "dependencies": { - "@squeep/api-dingus": "git+https://git.squeep.com/squeep-api-dingus/#v1.2.5", - "@squeep/authentication-module": "git+https://git.squeep.com/squeep-authentication-module/#v1.2.2", - "@squeep/html-template-helper": "git+https://git.squeep.com/squeep-html-template-helper#v1.1.1", - "@squeep/logger-json-console": "git+https://git.squeep.com/squeep-logger-json-console#v1.0.0", - "@squeep/web-linking": "git+https://git.squeep.com/squeep-web-linking/#v1.0.4", - "axios": "^0.26.1", + "@squeep/api-dingus": "git+https://git.squeep.com/squeep-api-dingus/#v1.2.7", + "@squeep/authentication-module": "git+https://git.squeep.com/squeep-authentication-module/#v1.2.3", + "@squeep/html-template-helper": "git+https://git.squeep.com/squeep-html-template-helper#v1.2.0", + "@squeep/logger-json-console": "git+https://git.squeep.com/squeep-logger-json-console#v1.0.2", + "@squeep/web-linking": "git+https://git.squeep.com/squeep-web-linking/#v1.0.5", + "axios": "^0.27.2", "feedparser": "^2.2.10", - "htmlparser2": "^7.2.0", + "htmlparser2": "^8.0.1", "iconv": "^3.0.1" }, "optionalDependencies": { - "better-sqlite3": "^7.5.1", + "better-sqlite3": "^7.5.2", "pg-promise": "^10.11.1" }, "devDependencies": { - "eslint": "^8.12.0", + "eslint": "^8.15.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-security": "^1.4.0", + "eslint-plugin-security": "^1.5.0", "eslint-plugin-sonarjs": "^0.13.0", "html-minifier-lint": "^2.0.0", - "mocha": "^9.2.2", + "mocha": "^10.0.0", "mocha-steps": "^1.3.0", "nyc": "^15.1.0", "pre-commit": "^1.2.2", - "sinon": "^13.0.1" + "sinon": "^14.0.0" } } diff --git a/src/manager.js b/src/manager.js index c570671..9d4a282 100644 --- a/src/manager.js +++ b/src/manager.js @@ -543,7 +543,10 @@ class Manager { ctx.count = count.count; }); - res.end(this.infoContent(ctx)); + const content = this.infoContent(ctx); + res.setHeader(Enum.Header.ETag, common.generateETag(undefined, undefined, content)); + res.setHeader(Enum.Header.CacheControl, 'no-cache'); + res.end(content); this.logger.info(_scope, 'finished', { ctx }); } diff --git a/src/service.js b/src/service.js index 7e07a49..e769599 100644 --- a/src/service.js +++ b/src/service.js @@ -171,9 +171,9 @@ class Service extends Dingus { this.setResponseType(this.responseTypes, req, res, ctx); - await this.authenticator.sessionRequired(req, res, ctx, this.loginPath); - - await this.manager.getAdminOverview(res, ctx); + if (await this.authenticator.sessionRequired(req, res, ctx, this.loginPath)) { + await this.manager.getAdminOverview(res, ctx); + } } @@ -190,9 +190,9 @@ class Service extends Dingus { this.setResponseType(this.responseTypes, req, res, ctx); - await this.authenticator.sessionRequired(req, res, ctx, this.loginPath); - - await this.manager.getTopicDetails(res, ctx); + if (await this.authenticator.sessionRequired(req, res, ctx, this.loginPath)) { + await this.manager.getTopicDetails(res, ctx); + } } diff --git a/test/src/service.js b/test/src/service.js index 9afaf13..62c0059 100644 --- a/test/src/service.js +++ b/test/src/service.js @@ -108,19 +108,33 @@ describe('Service', function () { }); // handlerGetHistorySVG describe('handlerGetAdminOverview', function () { - it('covers', async function () { + it('covers authenticated', async function () { + service.authenticator.sessionRequired.resolves(false); + await service.handlerGetAdminOverview(req, res, ctx); + assert(service.authenticator.sessionRequired.called); + assert(service.manager.getAdminOverview.notCalled); + }); + it('covers unauthenticated', async function () { + service.authenticator.sessionRequired.resolves(true); await service.handlerGetAdminOverview(req, res, ctx); assert(service.authenticator.sessionRequired.called); assert(service.manager.getAdminOverview.called); - }) + }); }); // handlerGetAdminOverview describe('handlerGetAdminTopicDetails', function () { - it('covers', async function () { + it('covers unauthenticated', async function () { + service.authenticator.sessionRequired.resolves(false); + await service.handlerGetAdminTopicDetails(req, res, ctx); + assert(service.authenticator.sessionRequired.called); + assert(service.manager.getTopicDetails.notCalled); + }); + it('covers authenticated', async function () { + service.authenticator.sessionRequired.resolves(true); await service.handlerGetAdminTopicDetails(req, res, ctx); assert(service.authenticator.sessionRequired.called); assert(service.manager.getTopicDetails.called); - }) + }); }); // handlerGetAdminTopicDetails describe('handlerPostAdminProcess', function () { diff --git a/test/stub-logger.js b/test/stub-logger.js index 5ac0b98..6085928 100644 --- a/test/stub-logger.js +++ b/test/stub-logger.js @@ -12,7 +12,7 @@ stubLogger['_reset'] = () => { sinon.spy(stubLogger, 'debug'); sinon.spy(stubLogger, 'error'); sinon.spy(stubLogger, 'info'); -}, +}; module.exports = stubLogger; \ No newline at end of file