This run took 738 seconds.
From c091e3f230a36d9b2aada2fe5558ebe7a10fda1a Mon Sep 17 00:00:00 2001 From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org> Date: Sat, 29 Mar 2025 04:56:27 +0000 Subject: [PATCH] build: Updating eslint-config-wikimedia to 0.29.1 Change-Id: I876e2b37f3e319300e3fe50359c271d9280adf03 --- package-lock.json | 19 +++++++++++-------- package.json | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9d0bad..1667911 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "@wikimedia/jsonschema-tools": "^0.7.5", "ajv": "^6.12.2", "coveralls": "^3.1.0", - "eslint-config-wikimedia": "0.28.2", + "eslint-config-wikimedia": "0.29.1", "js-yaml": "^3.14.0", "kafka-test-tools": "^0.1.13", "mocha": "^8.0.1", @@ -1851,9 +1851,9 @@ } }, "node_modules/eslint-config-wikimedia": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz", - "integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==", + "version": "0.29.1", + "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.29.1.tgz", + "integrity": "sha512-4dbL5o3hKGSvreyrGZWLPoTDLFubZ575IQOPhUaTcpbTsi0u05TBEMsOyYkthTaK21vsFQqhSYtxp/xU93BSdA==", "dev": true, "dependencies": { "browserslist-config-wikimedia": "^0.7.0", @@ -1866,13 +1866,16 @@ "eslint-plugin-mediawiki": "^0.7.0", "eslint-plugin-mocha": "^10.4.3", "eslint-plugin-n": "^17.7.0", - "eslint-plugin-no-jquery": "^3.0.1", + "eslint-plugin-no-jquery": "^3.1.1", "eslint-plugin-qunit": "^8.1.1", "eslint-plugin-security": "^1.7.1", "eslint-plugin-unicorn": "^53.0.0", "eslint-plugin-vue": "^9.26.0", "eslint-plugin-wdio": "^8.24.12", "eslint-plugin-yml": "^1.14.0" + }, + "engines": { + "node": ">=18 <23" } }, "node_modules/eslint-plugin-compat": { @@ -2151,9 +2154,9 @@ } }, "node_modules/eslint-plugin-no-jquery": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.1.tgz", - "integrity": "sha512-GrzdjIxox/3x8hpSwpxiMuEQFipiJHTGiVsp0T1TI6GH+KVSbXa4z/56xTV1WiIe66u3iRgvCIipu9CRthecpQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.1.1.tgz", + "integrity": "sha512-LTLO3jH/Tjr1pmxCEqtV6qmt+OChv8La4fwgG470JRpgxyFF4NOzoC9CRy92GIWD3Yjl0qLEgPmD2FLQWcNEjg==", "dev": true, "peerDependencies": { "eslint": ">=8.0.0" diff --git a/package.json b/package.json index 37596dd..661ae1b 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@wikimedia/jsonschema-tools": "^0.7.5", "ajv": "^6.12.2", "coveralls": "^3.1.0", - "eslint-config-wikimedia": "0.28.2", + "eslint-config-wikimedia": "0.29.1", "js-yaml": "^3.14.0", "kafka-test-tools": "^0.1.13", "mocha": "^8.0.1", -- 2.39.2
$ date --- stdout --- Sat Mar 29 04:44:11 UTC 2025 --- end --- $ git clone file:///srv/git/mediawiki-services-change-propagation.git repo --depth=1 -b master --- stderr --- Cloning into 'repo'... --- stdout --- --- end --- $ git config user.name libraryupgrader --- stdout --- --- end --- $ git config user.email tools.libraryupgrader@tools.wmflabs.org --- stdout --- --- end --- $ git submodule update --init --- stdout --- --- end --- $ grr init --- stdout --- Installed commit-msg hook. --- end --- $ git show-ref refs/heads/master --- stdout --- 1c8a2bad777b4087910c16975b460f2fe5944a8c refs/heads/master --- end --- $ /usr/bin/npm audit --json --- stdout --- { "auditReportVersion": 2, "vulnerabilities": { "busboy": { "name": "busboy", "severity": "high", "isDirect": false, "via": [ "dicer" ], "effects": [ "hyperswitch" ], "range": "<=0.3.1", "nodes": [ "node_modules/busboy" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "coveralls": { "name": "coveralls", "severity": "moderate", "isDirect": true, "via": [ "request" ], "effects": [], "range": "*", "nodes": [ "node_modules/coveralls" ], "fixAvailable": false }, "debug": { "name": "debug", "severity": "low", "isDirect": false, "via": [ { "source": 1096792, "name": "debug", "dependency": "debug", "title": "Regular Expression Denial of Service in debug", "url": "https://github.com/advisories/GHSA-gxpj-cx7g-858c", "severity": "low", "cwe": [ "CWE-400" ], "cvss": { "score": 3.7, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L" }, "range": ">=4.0.0 <4.3.1" } ], "effects": [], "range": "4.0.0 - 4.3.0", "nodes": [ "node_modules/gc-stats/node_modules/debug" ], "fixAvailable": true }, "dicer": { "name": "dicer", "severity": "high", "isDirect": false, "via": [ { "source": 1093150, "name": "dicer", "dependency": "dicer", "title": "Crash in HeaderParser in dicer", "url": "https://github.com/advisories/GHSA-wm7h-9275-46v2", "severity": "high", "cwe": [ "CWE-248" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<=0.3.1" } ], "effects": [ "busboy" ], "range": "*", "nodes": [ "node_modules/dicer" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "hyperswitch": { "name": "hyperswitch", "severity": "high", "isDirect": true, "via": [ "busboy", "preq", "swagger-ui-dist" ], "effects": [], "range": ">=0.1.0", "nodes": [ "node_modules/hyperswitch" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "ini": { "name": "ini", "severity": "high", "isDirect": false, "via": [ { "source": 1093224, "name": "ini", "dependency": "ini", "title": "ini before 1.3.6 vulnerable to Prototype Pollution via ini.parse", "url": "https://github.com/advisories/GHSA-qqgx-2p2h-9c37", "severity": "high", "cwe": [ "CWE-1321" ], "cvss": { "score": 7.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L" }, "range": "<1.3.6" } ], "effects": [], "range": "<1.3.6", "nodes": [ "node_modules/gc-stats/node_modules/ini" ], "fixAvailable": true }, "limitation": { "name": "limitation", "severity": "moderate", "isDirect": false, "via": [ "wikimedia-kad-fork" ], "effects": [], "range": ">=0.2.3", "nodes": [ "node_modules/limitation" ], "fixAvailable": true }, "minimatch": { "name": "minimatch", "severity": "high", "isDirect": false, "via": [ { "source": 1096485, "name": "minimatch", "dependency": "minimatch", "title": "minimatch ReDoS vulnerability", "url": "https://github.com/advisories/GHSA-f8q6-p94x-37v3", "severity": "high", "cwe": [ "CWE-400", "CWE-1333" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<3.0.5" } ], "effects": [ "mocha" ], "range": "<3.0.5", "nodes": [ "node_modules/gc-stats/node_modules/minimatch", "node_modules/minimatch" ], "fixAvailable": { "name": "mocha", "version": "11.1.0", "isSemVerMajor": true } }, "minimist": { "name": "minimist", "severity": "critical", "isDirect": false, "via": [ { "source": 1096465, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L" }, "range": ">=1.0.0 <1.2.3" }, { "source": 1096466, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L" }, "range": "<0.2.1" }, { "source": 1097677, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": [ "CWE-1321" ], "cvss": { "score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H" }, "range": "<0.2.4" }, { "source": 1097678, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": [ "CWE-1321" ], "cvss": { "score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H" }, "range": ">=1.0.0 <1.2.6" } ], "effects": [ "mkdirp" ], "range": "<=0.2.3 || 1.0.0 - 1.2.5", "nodes": [ "node_modules/gc-stats/node_modules/minimist", "node_modules/gc-stats/node_modules/rc/node_modules/minimist" ], "fixAvailable": true }, "mkdirp": { "name": "mkdirp", "severity": "critical", "isDirect": false, "via": [ "minimist" ], "effects": [], "range": "0.4.1 - 0.5.1", "nodes": [ "node_modules/gc-stats/node_modules/mkdirp" ], "fixAvailable": true }, "mocha": { "name": "mocha", "severity": "high", "isDirect": true, "via": [ "minimatch", "nanoid" ], "effects": [], "range": "5.1.0 - 10.2.0", "nodes": [ "node_modules/mocha" ], "fixAvailable": { "name": "mocha", "version": "11.1.0", "isSemVerMajor": true } }, "ms": { "name": "ms", "severity": "moderate", "isDirect": false, "via": [ { "source": 1094419, "name": "ms", "dependency": "ms", "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability", "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f", "severity": "moderate", "cwe": [ "CWE-1333" ], "cvss": { "score": 5.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L" }, "range": "<2.0.0" } ], "effects": [ "wikimedia-kad-fork" ], "range": "<2.0.0", "nodes": [ "node_modules/ms" ], "fixAvailable": true }, "nanoid": { "name": "nanoid", "severity": "moderate", "isDirect": false, "via": [ { "source": 1089011, "name": "nanoid", "dependency": "nanoid", "title": "Exposure of Sensitive Information to an Unauthorized Actor in nanoid", "url": "https://github.com/advisories/GHSA-qrpm-p2h7-hrv2", "severity": "moderate", "cwe": [ "CWE-200" ], "cvss": { "score": 5.5, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N" }, "range": ">=3.0.0 <3.1.31" }, { "source": 1101163, "name": "nanoid", "dependency": "nanoid", "title": "Predictable results in nanoid generation when given non-integer values", "url": "https://github.com/advisories/GHSA-mwcw-c2x4-8c55", "severity": "moderate", "cwe": [ "CWE-835" ], "cvss": { "score": 4.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N" }, "range": "<3.3.8" } ], "effects": [ "mocha" ], "range": "<=3.3.7", "nodes": [ "node_modules/nanoid" ], "fixAvailable": { "name": "mocha", "version": "11.1.0", "isSemVerMajor": true } }, "preq": { "name": "preq", "severity": "high", "isDirect": true, "via": [ "request", "requestretry" ], "effects": [], "range": "*", "nodes": [ "node_modules/preq" ], "fixAvailable": false }, "request": { "name": "request", "severity": "moderate", "isDirect": false, "via": [ { "source": 1096727, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": [ "CWE-918" ], "cvss": { "score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N" }, "range": "<=2.88.2" }, "tough-cookie" ], "effects": [ "coveralls", "preq", "requestretry" ], "range": "*", "nodes": [ "node_modules/request" ], "fixAvailable": false }, "requestretry": { "name": "requestretry", "severity": "high", "isDirect": false, "via": [ { "source": 1090420, "name": "requestretry", "dependency": "requestretry", "title": "Cookie exposure in requestretry", "url": "https://github.com/advisories/GHSA-hjp8-2cm3-cc45", "severity": "high", "cwe": [ "CWE-200" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N" }, "range": "<7.0.0" }, "request" ], "effects": [ "preq" ], "range": "*", "nodes": [ "node_modules/requestretry" ], "fixAvailable": false }, "semver": { "name": "semver", "severity": "high", "isDirect": false, "via": [ { "source": 1101089, "name": "semver", "dependency": "semver", "title": "semver vulnerable to Regular Expression Denial of Service", "url": "https://github.com/advisories/GHSA-c2qf-rxjj-qqgw", "severity": "high", "cwe": [ "CWE-1333" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<5.7.2" } ], "effects": [], "range": "<5.7.2", "nodes": [ "node_modules/gc-stats/node_modules/semver" ], "fixAvailable": true }, "swagger-ui-dist": { "name": "swagger-ui-dist", "severity": "moderate", "isDirect": false, "via": [ { "source": 1088759, "name": "swagger-ui-dist", "dependency": "swagger-ui-dist", "title": "Spoofing attack in swagger-ui-dist", "url": "https://github.com/advisories/GHSA-6c9x-mj3g-h47x", "severity": "moderate", "cwe": [ "CWE-1021" ], "cvss": { "score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N" }, "range": "<4.1.3" }, { "source": 1092160, "name": "swagger-ui-dist", "dependency": "swagger-ui-dist", "title": "Server side request forgery in SwaggerUI", "url": "https://github.com/advisories/GHSA-qrmm-w75w-3wpx", "severity": "moderate", "cwe": [ "CWE-918" ], "cvss": { "score": 0, "vectorString": null }, "range": "<4.1.3" } ], "effects": [ "hyperswitch" ], "range": "<=4.1.2", "nodes": [ "node_modules/swagger-ui-dist" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "tar": { "name": "tar", "severity": "high", "isDirect": false, "via": [ { "source": 1089684, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization", "url": "https://github.com/advisories/GHSA-3jfq-g458-7qm9", "severity": "high", "cwe": [ "CWE-22" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=4.0.0 <4.4.14" }, { "source": 1095117, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization", "url": "https://github.com/advisories/GHSA-5955-9wpr-37jh", "severity": "high", "cwe": [ "CWE-22" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": "<4.4.18" }, { "source": 1096309, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning", "url": "https://github.com/advisories/GHSA-r628-mhmh-qjhw", "severity": "high", "cwe": [ "CWE-22", "CWE-23", "CWE-59" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=4.0.0 <4.4.15" }, { "source": 1096376, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links", "url": "https://github.com/advisories/GHSA-9r2w-394v-53qc", "severity": "high", "cwe": [ "CWE-22", "CWE-59" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=3.0.0 <4.4.16" }, { "source": 1096411, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links", "url": "https://github.com/advisories/GHSA-qq89-hq3f-393p", "severity": "high", "cwe": [ "CWE-22", "CWE-59" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=3.0.0 <4.4.18" }, { "source": 1097493, "name": "tar", "dependency": "tar", "title": "Denial of service while parsing a tar file due to lack of folders count validation", "url": "https://github.com/advisories/GHSA-f5x3-32g6-xq36", "severity": "moderate", "cwe": [ "CWE-400" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H" }, "range": "<6.2.1" } ], "effects": [], "range": "<=6.2.0", "nodes": [ "node_modules/gc-stats/node_modules/tar" ], "fixAvailable": true }, "tough-cookie": { "name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [ { "source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N" }, "range": "<4.1.3" } ], "effects": [ "request" ], "range": "<4.1.3", "nodes": [ "node_modules/tough-cookie" ], "fixAvailable": false }, "wikimedia-kad-fork": { "name": "wikimedia-kad-fork", "severity": "moderate", "isDirect": false, "via": [ "ms" ], "effects": [ "limitation" ], "range": "*", "nodes": [ "node_modules/wikimedia-kad-fork" ], "fixAvailable": true } }, "metadata": { "vulnerabilities": { "info": 0, "low": 1, "moderate": 8, "high": 10, "critical": 2, "total": 21 }, "dependencies": { "prod": 154, "dev": 453, "optional": 78, "peer": 1, "peerOptional": 0, "total": 683 } } } --- end --- Upgrading n:eslint-config-wikimedia from 0.28.2 -> 0.29.1 $ /usr/bin/npm install --- stderr --- npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'change-propagation@0.13.0', npm WARN EBADENGINE required: { node: '>=20' }, npm WARN EBADENGINE current: { node: 'v18.19.0', npm: '9.2.0' } npm WARN EBADENGINE } npm WARN deprecated kad-fs@0.0.4: This package is no longer maintained. npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated kad-memstore@0.0.1: This package is no longer maintained. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated json-schema-ref-parser@7.1.4: Please switch to @apidevtools/json-schema-ref-parser --- stdout --- added 616 packages, and audited 683 packages in 2m 75 packages are looking for funding run `npm fund` for details 21 vulnerabilities (1 low, 8 moderate, 10 high, 2 critical) To address issues that do not require attention, run: npm audit fix To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. --- end --- $ package-lock-lint package-lock.json --- stdout --- Checking package-lock.json --- end --- $ package-lock-lint package-lock.json --- stdout --- Checking package-lock.json --- end --- $ ./node_modules/.bin/eslint . --fix --- stdout --- /src/repo/config.example.wikimedia.yaml 116:1 warning This line has a length of 112. Maximum allowed is 100 max-len 157:1 warning This line has a length of 122. Maximum allowed is 100 max-len 200:1 warning This line has a length of 106. Maximum allowed is 100 max-len 208:1 warning This line has a length of 126. Maximum allowed is 100 max-len 230:1 warning This line has a length of 106. Maximum allowed is 100 max-len 238:1 warning This line has a length of 126. Maximum allowed is 100 max-len 264:1 warning This line has a length of 106. Maximum allowed is 100 max-len 272:1 warning This line has a length of 126. Maximum allowed is 100 max-len 285:1 warning This line has a length of 117. Maximum allowed is 100 max-len 319:1 warning This line has a length of 107. Maximum allowed is 100 max-len 350:1 warning This line has a length of 112. Maximum allowed is 100 max-len 366:1 warning This line has a length of 113. Maximum allowed is 100 max-len 367:1 warning This line has a length of 125. Maximum allowed is 100 max-len 368:1 warning This line has a length of 121. Maximum allowed is 100 max-len 369:1 warning This line has a length of 102. Maximum allowed is 100 max-len 406:1 warning This line has a length of 101. Maximum allowed is 100 max-len 407:1 warning This line has a length of 125. Maximum allowed is 100 max-len 408:1 warning This line has a length of 120. Maximum allowed is 100 max-len 505:1 warning This line has a length of 107. Maximum allowed is 100 max-len 565:1 warning This line has a length of 102. Maximum allowed is 100 max-len 620:1 warning This line has a length of 109. Maximum allowed is 100 max-len /src/repo/lib/base_executor.js 267:14 warning Expected no linebreak before this expression implicit-arrow-linebreak 335:1 warning This line has a length of 108. Maximum allowed is 100 max-len /src/repo/lib/rule.js 69:1 warning This line has a length of 109. Maximum allowed is 100 max-len 272:1 warning This line has a length of 107. Maximum allowed is 100 max-len 286:1 warning This line has a length of 102. Maximum allowed is 100 max-len /src/repo/lib/rule_subscriber.js 69:1 warning This line has a length of 111. Maximum allowed is 100 max-len 70:1 warning This line has a length of 109. Maximum allowed is 100 max-len /src/repo/sys/deduplicator.js 9:28 warning ES2023 'Array.prototype.with' method is forbidden es-x/no-array-prototype-with /src/repo/sys/dep_updates.js 69:1 warning This line has a length of 105. Maximum allowed is 100 max-len /src/repo/sys/kafka.js 41:1 warning This line has a length of 113. Maximum allowed is 100 max-len /src/repo/sys/rate_limiter.js 9:27 warning ES2023 'Array.prototype.with' method is forbidden es-x/no-array-prototype-with ✖ 32 problems (0 errors, 32 warnings) --- end --- $ ./node_modules/.bin/eslint . -f json --- stdout --- [{"filePath":"/src/repo/.eslintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"no-extra-parens","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/.mocharc.yaml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/.travis.yml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/app.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/config.example.wikimedia.yaml","messages":[{"ruleId":"max-len","severity":1,"message":"This line has a length of 112. Maximum allowed is 100.","line":116,"column":1,"nodeType":"Program","messageId":"max","endLine":116,"endColumn":113},{"ruleId":"max-len","severity":1,"message":"This line has a length of 122. Maximum allowed is 100.","line":157,"column":1,"nodeType":"Program","messageId":"max","endLine":157,"endColumn":123},{"ruleId":"max-len","severity":1,"message":"This line has a length of 106. Maximum allowed is 100.","line":200,"column":1,"nodeType":"Program","messageId":"max","endLine":200,"endColumn":107},{"ruleId":"max-len","severity":1,"message":"This line has a length of 126. Maximum allowed is 100.","line":208,"column":1,"nodeType":"Program","messageId":"max","endLine":208,"endColumn":127},{"ruleId":"max-len","severity":1,"message":"This line has a length of 106. Maximum allowed is 100.","line":230,"column":1,"nodeType":"Program","messageId":"max","endLine":230,"endColumn":107},{"ruleId":"max-len","severity":1,"message":"This line has a length of 126. Maximum allowed is 100.","line":238,"column":1,"nodeType":"Program","messageId":"max","endLine":238,"endColumn":127},{"ruleId":"max-len","severity":1,"message":"This line has a length of 106. Maximum allowed is 100.","line":264,"column":1,"nodeType":"Program","messageId":"max","endLine":264,"endColumn":107},{"ruleId":"max-len","severity":1,"message":"This line has a length of 126. Maximum allowed is 100.","line":272,"column":1,"nodeType":"Program","messageId":"max","endLine":272,"endColumn":127},{"ruleId":"max-len","severity":1,"message":"This line has a length of 117. Maximum allowed is 100.","line":285,"column":1,"nodeType":"Program","messageId":"max","endLine":285,"endColumn":118},{"ruleId":"max-len","severity":1,"message":"This line has a length of 107. Maximum allowed is 100.","line":319,"column":1,"nodeType":"Program","messageId":"max","endLine":319,"endColumn":108},{"ruleId":"max-len","severity":1,"message":"This line has a length of 112. Maximum allowed is 100.","line":350,"column":1,"nodeType":"Program","messageId":"max","endLine":350,"endColumn":113},{"ruleId":"max-len","severity":1,"message":"This line has a length of 113. Maximum allowed is 100.","line":366,"column":1,"nodeType":"Program","messageId":"max","endLine":366,"endColumn":114},{"ruleId":"max-len","severity":1,"message":"This line has a length of 125. Maximum allowed is 100.","line":367,"column":1,"nodeType":"Program","messageId":"max","endLine":367,"endColumn":126},{"ruleId":"max-len","severity":1,"message":"This line has a length of 121. Maximum allowed is 100.","line":368,"column":1,"nodeType":"Program","messageId":"max","endLine":368,"endColumn":122},{"ruleId":"max-len","severity":1,"message":"This line has a length of 102. Maximum allowed is 100.","line":369,"column":1,"nodeType":"Program","messageId":"max","endLine":369,"endColumn":103},{"ruleId":"max-len","severity":1,"message":"This line has a length of 101. Maximum allowed is 100.","line":406,"column":1,"nodeType":"Program","messageId":"max","endLine":406,"endColumn":102},{"ruleId":"max-len","severity":1,"message":"This line has a length of 125. Maximum allowed is 100.","line":407,"column":1,"nodeType":"Program","messageId":"max","endLine":407,"endColumn":126},{"ruleId":"max-len","severity":1,"message":"This line has a length of 120. Maximum allowed is 100.","line":408,"column":1,"nodeType":"Program","messageId":"max","endLine":408,"endColumn":121},{"ruleId":"max-len","severity":1,"message":"This line has a length of 107. Maximum allowed is 100.","line":505,"column":1,"nodeType":"Program","messageId":"max","endLine":505,"endColumn":108},{"ruleId":"max-len","severity":1,"message":"This line has a length of 102. Maximum allowed is 100.","line":565,"column":1,"nodeType":"Program","messageId":"max","endLine":565,"endColumn":103},{"ruleId":"max-len","severity":1,"message":"This line has a length of 109. Maximum allowed is 100.","line":620,"column":1,"nodeType":"Program","messageId":"max","endLine":620,"endColumn":110}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":21,"fixableErrorCount":0,"fixableWarningCount":0,"source":"spec: &spec\n x-sub-request-filters:\n - type: default\n name: http\n options:\n allow:\n - pattern: /^https?:\\/\\//\n forward_headers:\n user-agent: true\n title: The Change Propagation root\n paths:\n /sys/ores:\n x-modules:\n - path: sys/ores_updates.js\n options:\n ores_precache_uris:\n - \"https://ores.wikimedia.org/v3/precache\"\n event_service_uri: \"https://eventgate.stubfortests.org/v1/events\"\n /sys/limit:\n x-modules:\n - path: sys/rate_limiter.js\n options:\n redis: &redis_config\n host: localhost\n port: 6379\n\n limiters:\n blacklist:\n # First, allow no more then 100 errors per week\n # The precision parameter controls the step a sliding window moves by\n - interval: 604800\n limit: 100\n precision: 86400\n # Secondly to avoid bursts in case of outages, don't allow more then 10\n # errors per hour\n - interval: 3600\n limit: 10\n /sys/dedupe:\n x-modules:\n - path: sys/deduplicator.js\n options:\n redis: *redis_config\n /sys/purge:\n x-modules:\n - path: sys/purge.js\n options:\n host: 127.0.0.1\n port: 4321\n /sys/links:\n x-modules:\n - path: sys/dep_updates.js\n options:\n templates:\n mw_api:\n uri: \"https://{{message.meta.domain}}/w/api.php\"\n headers:\n host: \"{{message.meta.domain}}\"\n body:\n formatversion: 2\n /sys/queue:\n x-modules:\n - path: sys/kafka.js\n options:\n metadata_broker_list: 127.0.0.1:9092\n dc_name: test_dc\n startup_delay: 0\n consumer:\n # These options should not be copied to puppet config.\n # We're using this config for testing, so need to configure\n # for minimal latency\n fetch.wait.max.ms: \"1\"\n fetch.min.bytes: \"1\"\n queue.buffering.max.ms: \"1\"\n producer:\n queue.buffering.max.messages: \"10\"\n compression.codec: snappy\n concurrency: 250\n # Redis-mock does not support evalsha that rate limiting depend on.\n disable_ratelimit: \"{env(MOCK_SERVICES)}\"\n blacklist:\n en.wikipedia.org:\n - \"User:Nolelover\"\n - '/User:Cyberbot_I\\//'\n templates:\n\n summary_definition_rerender: &summary_definition_rerender_spec\n topic: resource_change\n retry_limit: 2\n retry_delay: 500\n retry_on:\n status:\n - 5xx\n limiters:\n blacklist: \"summary:{message.meta.uri}\"\n cases: # Non wiktionary domains - rerender summary\n - match:\n meta:\n uri: '/^(?<proto>https?):\\/\\/[^\\/]+\\/api\\/rest_v1\\/page\\/html\\/(?<title>[^/]+)$/'\n tags:\n - restbase\n match_not:\n - meta:\n domain: /wiktionary.org$/\n - meta:\n domain: /\\.wikidata\\.org$/\n exec:\n method: get\n # Don't encode title since it should be already encoded\n uri: \"{{match.meta.uri.proto}}://{{message.meta.domain}}/api/rest_v1/page/summary/{{match.meta.uri.title}}\"\n query:\n redirect: false\n headers:\n cache-control: no-cache\n - match: # Wiktionary domains - rerender definitions\n meta:\n # These URIs are coming from RESTBase, so we know that article titles will be normalized\n # and main namespace articles will not have : (uri-encoded, so %3a or %3A)\n uri: '/^(?<proto>https?):\\/\\/[^\\/]+\\/api\\/rest_v1\\/page\\/html\\/(?<title>(?:(?!%3a|%3A|\\/).)+)$/'\n domain: '/^en\\.wiktionary\\.org$/'\n tags:\n - restbase\n exec:\n method: get\n # Don't encode title since it should be already encoded\n uri: \"{{match.meta.uri.proto}}://{{message.meta.domain}}/api/rest_v1/page/definition/{{match.meta.uri.title}}\"\n query:\n redirect: false\n headers:\n cache-control: no-cache\n\n summary_definition_rerender_transcludes: &summary_definition_rerender_transcludes_spec\n <<: *summary_definition_rerender_spec\n topic: change-prop.transcludes.resource-change\n\n mobile_rerender: &mobile_rerender_spec\n topic: resource_change\n retry_limit: 2\n retry_delay: 500\n retry_on:\n status:\n - 5xx\n limiters:\n blacklist: \"mobile:{message.meta.uri}\"\n match:\n meta:\n uri: '/^(?<proto>https?):\\/\\/[^\\/]+\\/api\\/rest_v1\\/page\\/html\\/(?<title>[^/]+)$/'\n domain: '/^.+\\.wikipedia\\.org$/'\n tags:\n - restbase\n exec:\n - method: get\n uri: \"{{match.meta.uri.proto}}://{{message.meta.domain}}/api/rest_v1/page/mobile-sections/{{match.meta.uri.title}}\"\n query:\n redirect: false\n headers:\n cache-control: no-cache\n # Until we start storing and actively rerendering PCS endpoints we still need to purge it from Varnish\n - method: post\n uri: /sys/purge/\n body:\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/media-list/{{match.meta.uri.title}}\"\n\n mobile_rerender_transcludes: &mobile_rerender_transcludes_spec\n <<: *mobile_rerender_spec\n topic: change-prop.transcludes.resource-change\n\n purge_varnish: &purge_varnish_spec\n topic: resource_change\n match:\n meta:\n uri: '/^https?:\\/\\/[^\\/]+\\/api\\/rest_v1\\/(?<title>.+)$/'\n tags:\n - restbase\n exec:\n method: post\n uri: /sys/purge/\n body:\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/{{match.meta.uri.title}}\"\n\n purge_varnish_transcludes: &purge_varnish_transcludes_spec\n <<: *purge_varnish_spec\n topic: change-prop.transcludes.resource-change\n\n # RESTBase update jobs\n mw_purge:\n topic: resource_change\n limiters:\n blacklist: \"html:{message.meta.uri}\"\n cases:\n - match:\n meta:\n uri: '/^(?<proto>https?):\\/\\/[^\\/]+\\/wiki\\/(?<title>.+)$/'\n domain: '/.*\\.wikipedia.org$/'\n tags:\n - purge\n exec: &mw_purge_wikipedia_rerender\n - method: get\n # This even comes directly from MediaWiki, so title is encoded in MW-specific way.\n # Re-encode the title in standard `encodeURIComponent` encoding.\n uri: \"{{match.meta.uri.proto}}://{{message.meta.domain}}/api/rest_v1/page/html/{decode(match.meta.uri.title)}\"\n headers:\n cache-control: no-cache\n if-unmodified-since: \"{{date(message.meta.dt)}}\"\n query:\n redirect: false\n # The HTML might not change but sometimes editors use a purge to drop incorrectly rendered summary/MCS\n # content, so let's purge them as well just in case. The rate is low.\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/summary/{decode(match.meta.uri.title)}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/mobile-sections/{decode(match.meta.uri.title)}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n - match:\n meta:\n uri: '/^(?<proto>https?):\\/\\/[^\\/]+\\/wiki\\/(?<title>.+)$/'\n domain: '/.*\\.wiktionary.org$/'\n tags:\n - purge\n exec: &mw_purge_wiktionary_rerender\n - method: get\n # This even comes directly from MediaWiki, so title is encoded in MW-specific way.\n # Re-encode the title in standard `encodeURIComponent` encoding.\n uri: \"{{match.meta.uri.proto}}://{{message.meta.domain}}/api/rest_v1/page/html/{decode(match.meta.uri.title)}\"\n headers:\n cache-control: no-cache\n if-unmodified-since: \"{{date(message.meta.dt)}}\"\n query:\n redirect: false\n # The HTML might not change but sometimes editors use a purge to drop incorrectly rendered summary/MCS\n # content, so let's purge them as well just in case. The rate is low.\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/definition/{decode(match.meta.uri.title)}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n - match:\n meta:\n uri: '/^(?<proto>https?):\\/\\/[^\\/]+\\/wiki\\/(?<title>.+)$/'\n tags:\n - purge\n match_not: &others_match_not\n - meta:\n domain: '/.*\\.wikipedia\\.org$/'\n - meta:\n domain: '/.*\\.wiktionary\\.org$/'\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 0\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 120\n exec: &mw_purge_others_rerender\n - method: get\n # This even comes directly from MediaWiki, so title is encoded in MW-specific way.\n # Re-encode the title in standard `encodeURIComponent` encoding.\n uri: \"{{match.meta.uri.proto}}://{{message.meta.domain}}/api/rest_v1/page/html/{decode(match.meta.uri.title)}\"\n headers:\n cache-control: no-cache\n if-unmodified-since: \"{{date(message.meta.dt)}}\"\n query:\n redirect: false\n # The HTML might not change but sometimes editors use a purge to drop incorrectly rendered summary/MCS\n # content, so let's purge them as well just in case. The rate is low.\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/summary/{decode(match.meta.uri.title)}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n\n null_edit:\n topic: resource_change\n ignore:\n status:\n - 403 # Ignoring 403 since some of the pages with high number of null_edit events are blacklisted\n - 412\n limiters:\n blacklist: \"html:{message.meta.uri}\"\n cases:\n - match:\n meta:\n uri: '/^(?<proto>https?):\\/\\/[^\\/]+\\/wiki\\/(?<title>.+)$/'\n domain: '/.*\\.wikipedia.org$/'\n tags:\n - null_edit\n exec: *mw_purge_wikipedia_rerender\n - match:\n meta:\n uri: '/^(?<proto>https?):\\/\\/[^\\/]+\\/wiki\\/(?<title>.+)$/'\n domain: '/.*\\.wiktionary.org$/'\n tags:\n - purge\n exec: *mw_purge_wiktionary_rerender\n - match:\n meta:\n uri: '/^(?<proto>https?):\\/\\/[^\\/]+\\/wiki\\/(?<title>.+)$/'\n tags:\n - purge\n match_not: *others_match_not\n exec: *mw_purge_others_rerender\n\n page_edit:\n topic: mediawiki.revision-create\n limiters:\n blacklist: \"html:{message.meta.uri}\"\n retry_on:\n status:\n - 5xx\n - 404 # Sometimes occasional 404s happen because of the mysql replication lag, so retry\n match:\n rev_content_changed: true\n match_not:\n # Test-only. We use undefined rev_parent_id to test backlinks so we\n # don't want transclusions to interfere with backlinks test\n - rev_parent_id: undefined\n # end of test-only config\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 0\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 120\n exec:\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/html/{message.page_title}/{{message.rev_id}}\"\n headers:\n cache-control: no-cache\n x-restbase-parentrevision: \"{{message.rev_parent_id}}\"\n if-unmodified-since: \"{{date(message.meta.dt)}}\"\n query:\n redirect: false\n - method: post\n uri: \"/sys/links/transcludes/{message.page_title}\"\n body: \"{{globals.message}}\"\n\n revision_visibility_change:\n topic: mediawiki.revision-visibility-change\n ignore:\n status:\n - 403 # When the revision is hidden 403 will be returned by RESTBase, it's a valid situation\n - 412\n match_not:\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 0\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 120\n exec:\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/title/{message.page_title}/{{message.rev_id}}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n # For page revision restriction RESTBase doesn't emit resource_change events, and to go through\n # the normal purge chain (html update -> html resource_change -> summary update -> summary resource_change)\n # we need to add many workarounds/shortcurst in RESTBase. So having this list here is an OK compromise.\n # Only purge the URIs with a rev_id since the latest revision can not be restricted.\n - method: post\n uri: /sys/purge/\n body:\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/html/{message.page_title}/{{message.rev_id}}\"\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/mobile-sections/{message.page_title}/{{message.rev_id}}\"\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/mobile-sections-lead/{message.page_title}/{{message.rev_id}}\"\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/mobile-sections-remaining/{message.page_title}/{{message.rev_id}}\"\n\n page_delete:\n topic: mediawiki.page-delete\n ignore:\n status:\n - 404 # 404 is a normal response for page deletion\n - 412\n match_not:\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 0\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 120\n exec:\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/title/{message.page_title}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n # The links to the deleted page should become red again\n - method: post\n uri: \"/sys/links/backlinks/{message.page_title}\"\n body: \"{{globals.message}}\"\n # For page deletion RESTBase doesn't emit resource_change events, and to go through\n # the normal purge chain (html update -> html resource_change -> summary update -> summary resource_change)\n # we need to add many workarounds/shortcuts in RESTBase. So having this list here is an OK compromise.\n - method: post\n uri: /sys/purge/\n body:\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/html/{message.page_title}\"\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/html/{message.page_title}/{{message.rev_id}}\"\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/summary/{message.page_title}\"\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/definition/{message.page_title}\"\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/mobile-sections/{message.page_title}\"\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/mobile-sections-lead/{message.page_title}\"\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/mobile-sections-remaining/{message.page_title}\"\n - meta:\n uri: \"//{{message.meta.domain}}/api/rest_v1/page/media-list/{message.page_title}\"\n\n page_restore:\n topic: mediawiki.page-undelete\n match_not:\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 0\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 120\n exec:\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/title/{message.page_title}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n # The links to the deleted page should become red again\n - method: post\n uri: \"/sys/links/backlinks/{message.page_title}\"\n body: \"{{globals.message}}\"\n\n page_move:\n topic: mediawiki.page-move\n match_not:\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 0\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 120\n exec:\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/html/{message.page_title}/{{message.rev_id}}\"\n headers:\n cache-control: no-cache\n if-unmodified-since: \"{{date(message.meta.dt)}}\"\n query:\n redirect: false\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/title/{message.prior_state.page_title}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n\n on_transclusion_update:\n topic: change-prop.transcludes.resource-change\n limiters:\n blacklist: \"html:{message.meta.uri}\"\n cases:\n - match:\n $schema: '/^\\/resource_change\\/.*/'\n meta:\n uri: '/https?:\\/\\/[^\\/]+\\/wiki\\/(?<title>.+)/'\n tags: [ transcludes ]\n exec:\n method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/html/{{match.meta.uri.title}}\"\n headers:\n cache-control: no-cache\n if-unmodified-since: \"{{date(message.root_event.dt)}}\"\n x-restbase-mode: \"{{message.tags[1]}}\"\n query:\n redirect: false\n - match:\n $schema: '/^\\/change-prop\\/continue\\/.*/'\n exec:\n method: post\n uri: \"/sys/links/transcludes/{message.original_event.page_title}\"\n body: \"{{globals.message}}\"\n\n page_create:\n topic: mediawiki.page-create\n retry_on:\n status:\n - 5xx\n - 404 # Sometimes occasional 404s happen because of the mysql replication lag, so retry\n match_not:\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 0\n - meta:\n domain: /\\.wikidata\\.org$/\n page_namespace: 120\n exec:\n - method: post\n uri: \"/sys/links/backlinks/{message.page_title}\"\n body: \"{{globals.message}}\"\n\n on_backlinks_update:\n topic: change-prop.backlinks.resource-change\n limiters:\n blacklist: \"html:{message.meta.uri}\"\n cases:\n - match:\n $schema: '/^\\/resource_change\\/.*/'\n meta:\n uri: '/https?:\\/\\/[^\\/]+\\/wiki\\/(?<title>.+)/'\n tags: [ backlinks ]\n exec:\n method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/html/{{match.meta.uri.title}}\"\n headers:\n cache-control: no-cache\n if-unmodified-since: \"{{date(message.root_event.dt)}}\"\n x-restbase-mode: \"{{message.tags[1]}}\"\n query:\n redirect: false\n - match:\n $schema: '/^\\/change-prop\\/continue\\/.*/'\n exec:\n method: post\n uri: \"/sys/links/backlinks/{message.original_event.page_title}\"\n body: \"{{globals.message}}\"\n\n # ORES caching updates\n ores_cache:\n topic: mediawiki.revision-create\n concurrency: 10\n ignore:\n status:\n - 503\n exec:\n method: post\n uri: /sys/ores/\n query:\n postevent: true\n body: \"{{globals.message}}\"\n\n wikidata_description_on_edit:\n topic: mediawiki.revision-create\n match:\n meta:\n domain: www.wikidata.org\n page_namespace: 0\n # It's impossible to modify a comment in wikidata while editing the entity.\n # TODO: This is a temp solution until we get a more general fragment support T148079\n comment: \"/wbeditentity|wbsetdescription|undo|restore/\"\n rev_content_changed: true\n exec:\n method: post\n uri: /sys/links/wikidata_descriptions\n body: \"{{globals.message}}\"\n\n wikidata_description_on_undelete:\n topic: mediawiki.page-undelete\n match:\n meta:\n domain: www.wikidata.org\n page_namespace: 0\n exec:\n method: post\n uri: /sys/links/wikidata_descriptions\n body: \"{{globals.message}}\"\n\n on_wikidata_description_change:\n topic: change-prop.wikidata.resource-change\n cases:\n - match:\n meta:\n uri: '/https:\\/\\/[^\\/]+\\/wiki\\/(?<title>.+)/'\n domain: '/.*\\.wikipedia.org$/'\n tags: [ wikidata ]\n exec:\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/summary/{{match.meta.uri.title}}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/mobile-sections/{{match.meta.uri.title}}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n - match:\n meta:\n uri: '/https:\\/\\/[^\\/]+\\/wiki\\/(?<title>.+)/'\n tags: [ wikidata ]\n match_not: *others_match_not\n exec:\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/summary/{{match.meta.uri.title}}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n\n page_images:\n topic: mediawiki.page-properties-change\n # We don't support 'OR' in the match section, so workaround it by 2 cases with identical exec\n cases:\n - match:\n meta:\n domain: '/.*\\.wikipedia.org$/'\n added_properties:\n page_image: \"/.+/\"\n exec: &page_images_wikipedia_rerender\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/summary/{message.page_title}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/mobile-sections/{message.page_title}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n - match:\n added_properties:\n page_image: \"/.+/\"\n match_not: *others_match_not\n exec: &page_images_others_rerender\n - method: get\n uri: \"https://{{message.meta.domain}}/api/rest_v1/page/summary/{message.page_title}\"\n headers:\n cache-control: no-cache\n query:\n redirect: false\n - match:\n meta:\n domain: '/.*\\.wikipedia.org$/'\n removed_properties:\n page_image: \"/.+/\"\n exec: *page_images_wikipedia_rerender\n - match:\n removed_properties:\n page_image: \"/.+/\"\n match_not: *others_match_not\n exec: *page_images_others_rerender\n\n # Map tile cache invalidation\n purge_map_tile:\n topic: resource_change\n match:\n tags:\n - tilerator\n exec:\n method: post\n uri: /sys/purge/\n body:\n - meta:\n uri: \"{{message.meta.uri}}\"\n\nnum_workers: 0\nlogging:\n name: changeprop\n level: fatal\n streams:\n - type: stdout\nservices:\n - name: changeprop\n module: hyperswitch\n conf:\n port: 7272\n user_agent: SampleChangePropInstance\n spec: *spec\n","usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/config.example.yaml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/config.jobqueue.wikimedia.yaml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/config.test.yaml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/lib/base_executor.js","messages":[{"ruleId":"implicit-arrow-linebreak","severity":1,"message":"Expected no linebreak before this expression.","line":267,"column":14,"nodeType":"Boolean","messageId":"unexpected","endLine":267,"endColumn":19},{"ruleId":"max-len","severity":1,"message":"This line has a length of 108. Maximum allowed is 100.","line":335,"column":1,"nodeType":"Program","messageId":"max","endLine":335,"endColumn":109}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\n\nconst P = require('bluebird');\nconst uuidv1 = require('uuid').v1;\nconst HTTPError = require('hyperswitch').HTTPError;\nconst URI = require('hyperswitch').URI;\nconst kafka = require('node-rdkafka');\n\nconst utils = require('./utils');\n\n/**\n * The default number of tasks that could be run concurrently\n *\n * @type {number}\n * @constant\n */\nconst DEFAULT_CONCURRENCY = 30;\n\n/**\n * The default maximum delay to commit the offsets\n *\n * @constant\n * @type {number}\n */\nconst DEFAULT_COMMIT_INTERVAL = 500;\n\n/**\n * Probability of committing the offset in case the particular message\n * did not match the rule. For some rules like null edits in change-prop\n * the rule match is very unprobably, because they reuse a common topic\n * with many other rules that fire way more frequently.\n *\n * If we only commit messages when they match, that can create a large\n * false backlog - after a restart a lot of messages can be reread and\n * continuosly rejected.\n *\n * To avoid it, commit offsets of the rejected messages from time to time.\n *\n * @constant\n * @type {number}\n */\nconst NO_MATCH_COMMIT_PROBABILITY = 0.01;\n\n/**\n * The default number of messages to consume at once\n * For low-volume topics this must be one to avoid big delays in consumption.\n *\n * @constant\n * @type {number}\n */\nconst DEFAULT_CONSUMER_BATCH_SIZE = 1;\n\n/**\n * The default delay before we re-enqueue the message with delay_until set.\n * Measured in seconds\n *\n * @constant\n * @type {number}\n */\nconst DEFAULT_MINIMUM_RE_ENQUEUE_DELAY = 20;\n\nclass BaseExecutor {\n\n /**\n * Creates a new instance of a rule executor\n *\n * @param {Rule} rule\n * @param {KafkaFactory} kafkaFactory\n * @param {Object} hyper\n * @param {Object} options\n * @class\n */\n constructor(rule, kafkaFactory, hyper, options) {\n if (this.constructor.name === 'BaseExecutor') {\n throw new Error('BaseService is abstract. Create Master or Worker instance.');\n }\n\n this.rule = rule;\n this.kafkaFactory = kafkaFactory;\n this._hyper = hyper;\n this._logger = this._hyper.logger.child({\n rule_name: this.rule.name,\n executor: this.constructor.name\n });\n this.options = options;\n this.concurrency = rule.spec.concurrency || this.options.concurrency || DEFAULT_CONCURRENCY;\n this.consumerBatchSize = rule.spec.consumer_batch_size ||\n this.options.consumer_batch_size ||\n DEFAULT_CONSUMER_BATCH_SIZE;\n this.reenqueue_delay = (rule.spec.reenqueue_delay ||\n this.options.reenqueue_delay ||\n DEFAULT_MINIMUM_RE_ENQUEUE_DELAY) * 1000;\n this.disable_delayed_execution = rule.spec.disable_delayed_execution ||\n this.options.disable_delayed_execution ||\n false;\n this.disable_blacklist = rule.spec.disable_blacklist || this.options.disable_blacklist;\n this.disable_ratelimit = rule.spec.disable_ratelimit || this.options.disable_ratelimit;\n this.blacklist = BaseExecutor._compileBlacklist(\n rule.spec.blacklist || this.options.blacklist || {}\n );\n\n this._commitTimeout = null;\n this._pendingMsgs = new Set();\n this._pendingCommits = new Map();\n this._selfCheck = setInterval(() => {\n for (const message of this._pendingMsgs.entries()) {\n // If pending message is older than 1 minute then log error\n if ((Date.now() - message.dequeue_timestamp) > 60000) {\n this._logger.log('error/commit_check', () => ({\n message: 'Commit failed',\n offset: message.offset,\n description: 'Pending message is older than 1 minute'\n }));\n }\n }\n for (const commitQueue of this._pendingCommits.values()) {\n commitQueue.forEach(message => {\n // If pending commit is older than 1 minute then log error\n if ((Date.now() - message.dequeue_timestamp) > 60000) {\n this._logger.log('error/commit_check', () => ({\n message: 'Commit failed',\n offset: message.offset,\n description: 'Pending commit is older than 1 minute'\n }));\n }\n });\n }\n }, 60000);\n this._consuming = false;\n this._connected = false;\n }\n\n subscribe() {\n const prefix = this.options.test_mode ? `test-${ this._hyper.config.service_name }` : `${ this._hyper.config.service_name }`;\n return this.kafkaFactory.createConsumer(\n `${ prefix }-${ this.rule.name }`,\n this.subscribeTopics,\n this._hyper.metrics,\n this._hyper.logger,\n this.rule.spec.consumer || {}\n )\n .then((consumer) => {\n this._connected = true;\n this.consumer = consumer;\n P.delay(this.kafkaFactory.startup_delay).then(() => this._consume());\n });\n }\n\n _safeParse(payload) {\n try {\n return JSON.parse(payload);\n } catch (e) {\n this._logger.log('error/parse', e);\n this._hyper.post({\n uri: new URI('/sys/queue/events'),\n body: [ this._constructErrorMessage(e, payload) ]\n });\n }\n }\n\n _consume() {\n if (!this._connected) {\n return;\n }\n\n this._consuming = true;\n this.consumer.consumeAsync(this.consumerBatchSize)\n .then((messages) => {\n if (!messages.length) {\n // No new messages, delay a bit and try again.\n return P.delay(100);\n }\n\n messages.forEach((msg) => {\n const message = this._safeParse(msg.value.toString('utf8'));\n\n if (!message || !message.meta) {\n // no match, drop the message\n this._logger.log('debug/invalid_message', () => ({\n message: 'Invalid event message',\n event_str: utils.stringify(message)\n }));\n return;\n }\n\n this._hyper.metrics.increment(\n `${ this.statName(message) }_dequeue`,\n 1,\n 0.1);\n\n const handler = this.getHandler(message);\n if (handler) {\n // We're pushing it to pending messages only if it matched so that items\n // that don't match don't count against the concurrency limit.\n msg.dequeue_timestamp = Date.now();\n this._pendingMsgs.add(msg);\n // Note: we don't return the promise here since we wanna process messages\n // asynchronously from consuming them to be able to fill up the pendingMsg\n // queue and achieve the level of concurrency we want.\n this.processMessage(message, handler)\n .finally(() => {\n this._notifyFinished(msg);\n if (this._pendingMsgs.size < this.concurrency && !this._consuming) {\n this._consume();\n }\n });\n } else if (Math.random() < NO_MATCH_COMMIT_PROBABILITY) {\n // Again, do not return the promise as the commit can be done async\n this._notifyFinished(msg);\n }\n });\n })\n .catch((e) => {\n // This errors must come from the KafkaConsumer\n // since the actual handler must never throw errors\n switch (e.code) {\n case kafka.CODES.ERRORS.ERR__PARTITION_EOF:\n case kafka.CODES.ERRORS.ERR__TIMED_OUT:\n // We're reading to fast, nothing is there, slow down a little bit\n return P.delay(100);\n default:\n if (e.code === kafka.CODES.ERRORS.ERR__STATE) {\n if (this._connected) {\n // KafkaConsumer is disconnected or entered error state,\n // but not because we stopped it.\n // Give it some time to reconnect before the new attempt\n // to fetch messages again to avoid a tight loop\n this._logger.log('error/consumer', e);\n return P.delay(1000);\n } else {\n return;\n }\n }\n // Something else is terribly wrong.\n this._logger.log('error/consumer', e);\n }\n })\n .finally(() => {\n if (this._pendingMsgs.size < this.concurrency) {\n this._consume();\n } else {\n this._consuming = false;\n }\n });\n }\n\n /**\n * Checks whether a message should be rate-limited\n *\n * @param {Object} expander the limiter key expander\n * @return {Promise<boolean>}\n * @private\n */\n _rateLimitMessage(expander) {\n if (this.disable_ratelimit || !this.rule.getRateLimiterTypes().length) {\n return P.resolve(false);\n }\n return P.all(this.rule.getRateLimiterTypes().map((type) => {\n const key = this.rule.getLimiterKey(type, expander);\n return this._hyper.get({\n uri: new URI(`/sys/limit/${ type }/${ key }`)\n });\n }))\n .thenReturn(false)\n .catch({ status: 404 }, () =>\n // If the limiter module is not configured, ignore\n false\n )\n // Will throw if any of the limiters failed,\n // the error message will say which one is failed.\n .catch({ status: 429 }, (e) => {\n this._logger.log('error/ratelimit', () => ({\n message: 'Rate-limited message processing',\n limiter: e.body.message,\n limiter_key: e.body.key,\n event_str: utils.stringify(expander.message),\n stream: expander.message.meta.stream\n }));\n return true;\n });\n }\n\n _updateLimiters(expander, status) {\n if (this.disable_ratelimit || !this.rule.getRateLimiterTypes().length) {\n // No limiters configured, don't care.\n return;\n }\n return P.each(this.rule.getRateLimiterTypes(), (type) => {\n // TODO: calculate the cost function and actually POST the cost!\n\n if (status >= 500) {\n const limiterKey = this.rule.getLimiterKey(type, expander);\n return this._hyper.post({\n uri: new URI(`/sys/limit/${ type }/${ limiterKey }`)\n }).catch({ status: 429 }, () => {\n // No need to react here, we'll reject the next message\n }).catch({ status: 404 }, () => {\n // If the limiter module is not configured, ignore\n });\n }\n });\n }\n\n _notifyFinished(finishedMsg) {\n this._pendingMsgs.delete(finishedMsg);\n finishedMsg.dequeue_timestamp = Date.now();\n if (this._pendingCommits.has(finishedMsg.topic)) {\n this._pendingCommits.get(finishedMsg.topic).push(finishedMsg);\n } else {\n this._pendingCommits.set(finishedMsg.topic, [ finishedMsg ]);\n }\n if (this.options.test_mode) {\n this._logger.log('trace/commit', 'Running in TEST MODE; Offset commits disabled');\n return;\n }\n\n if (!this._commitTimeout) {\n this._commitTimeout = setTimeout(() => {\n const stillHasPending = (proposedToCommit) => {\n for (const pendingMsg of this._pendingMsgs.entries()) {\n if (pendingMsg.topic === proposedToCommit.topic &&\n pendingMsg.offset <= proposedToCommit.offset) {\n return true;\n }\n }\n return false;\n };\n const toCommit = [];\n this._commitTimeout = null;\n if (!this._connected) {\n return;\n }\n for (const [topic, commitQueue] of this._pendingCommits.entries()) {\n if (commitQueue.length) {\n let sortedCommitQueue = commitQueue.sort((msg1, msg2) => msg1.offset - msg2.offset);\n let msgToCommit;\n while (sortedCommitQueue.length &&\n !stillHasPending(sortedCommitQueue[0])) {\n msgToCommit = sortedCommitQueue[0];\n sortedCommitQueue = sortedCommitQueue.slice(1);\n }\n if (msgToCommit) {\n toCommit.push(msgToCommit);\n this._pendingCommits.set(topic, sortedCommitQueue);\n }\n }\n }\n return P.all(toCommit.map(message => this.consumer.commitMessageAsync(message)\n .catch((e) => {\n // Add the message back to pending commits to re-try commit on next pass\n this._pendingCommits.get(message.topic).push(message);\n this._logger.log('error/commit', () => ({\n message: 'Commit failed',\n offset: message.offset,\n raw_event: message.value.toString(),\n description: e.toString()\n }));\n })\n ));\n }, DEFAULT_COMMIT_INTERVAL);\n }\n }\n\n /** Private methods */\n\n _test(event) {\n const logger = this._logger.child({\n stream: event.meta.stream\n });\n try {\n const optionIndex = this.rule.test(event);\n if (optionIndex === -1) {\n // no match, drop the message\n logger.log('debug/drop_message', () => ({\n message: 'Dropping event message',\n event_str: utils.stringify(event),\n stream: event.meta.stream\n }));\n }\n return optionIndex;\n } catch (e) {\n logger.log('error/test', e);\n return -1;\n }\n }\n\n _sampleLog(event, request, res) {\n const sampleLog = () => {\n const log = {\n message: 'Processed event sample',\n event_str: utils.stringify(event),\n request: {\n uri: `${ request.uri }`,\n headers: request.headers,\n // Don't include the full body in the log\n body: request.body && utils.stringify(request.body).slice(0, 1024)\n },\n response: {\n status: res.status,\n headers: res.headers\n },\n stream: event.meta.stream\n };\n if (res.status >= 400) {\n log.response.body = BaseExecutor.decodeError(res).body;\n }\n return log;\n };\n this._logger.log('trace/sample', sampleLog);\n }\n\n _isBlacklisted(event) {\n if (this.disable_blacklist || !this.blacklist[event.meta.domain]) {\n return false;\n }\n // We use `decodeURIComponent` on a full URI here as we would like\n // to decode separator characters as well\n return this.blacklist[event.meta.domain].test(decodeURIComponent(event.meta.uri));\n }\n\n _exec(origEvent, handler, statDelayStartTime, retryEvent) {\n const startTime = Date.now();\n\n const expander = {\n message: origEvent,\n match: handler.expand(origEvent)\n };\n\n if (this._isBlacklisted(origEvent)) {\n this._logger.log('trace/blacklist', {\n message: 'Event was blacklisted',\n event_str: utils.stringify(origEvent),\n stream: origEvent.meta.stream,\n uri: origEvent.meta.uri\n });\n this._hyper.metrics.increment(`${ this.statName(origEvent) }_blacklist`);\n return P.resolve({ status: 200 });\n }\n\n if (origEvent.delay_until && !this.disable_delayed_execution) {\n // The delay_until in the job schema is a timestamps in seconds\n const delayUntil = Date.parse(origEvent.delay_until);\n const now = Date.now();\n if (delayUntil > Date.now()) {\n const timeLeft = delayUntil - now;\n if (timeLeft > this.reenqueue_delay) {\n // Not ready to execute yet - delay for some time and put back to the queue\n return P.delay(this.reenqueue_delay)\n .then(() => this._hyper.post({\n uri: new URI('/sys/queue/events'),\n body: [ origEvent ]\n }));\n }\n // The exec time is to soon to re-enqueue - just wait and execute\n return P.delay(timeLeft + 1)\n .then(() => this._exec(origEvent, handler, statDelayStartTime, retryEvent));\n }\n }\n\n if (handler.sampler && !handler.sampler.accept(expander)) {\n this._logger.log('trace/discard', () => ({\n message: 'Disregarding event; Filtered by sampler',\n event_str: utils.stringify(origEvent),\n stream: origEvent.meta.stream\n }));\n return P.resolve({ status: 200 });\n }\n\n if (this.rule.shouldAbandon(origEvent)) {\n this._logger.log('trace/abandon', {\n message: 'Event was abandoned',\n event_str: utils.stringify(origEvent),\n stream: origEvent.meta.stream\n });\n return P.resolve({ status: 200 });\n }\n\n this._logger.log('trace/receive', () => ({\n message: 'Event message received',\n event_str: utils.stringify(origEvent),\n stream: origEvent.meta.stream\n }));\n\n const metricStartTime = statDelayStartTime || new Date(origEvent.meta.dt);\n if (Date.now() - (Date.parse(origEvent.delay_until) || metricStartTime) > 86400000) {\n // Log a warning for jobs that has more then 1 day normal delay\n // Note: this is not the root-event delay, just normal delay.\n this._logger.log('warn/oldevent', () => ({\n message: 'Old event processed',\n event_str: utils.stringify(origEvent),\n stream: origEvent.meta.stream\n }));\n }\n // Latency from the event (if it's a retry - an original event)\n // creation time to execution time\n this._hyper.metrics.endTiming(\n [`${ this.statName(origEvent) }_delay`],\n metricStartTime\n );\n\n // This metric doesn't make much sense for retries\n if (origEvent.root_event && !retryEvent) {\n // Latency from the beginning of the recursive event chain\n // to the event execution\n this._hyper.metrics.endTiming([`${ this.statName(origEvent) }_totaldelay`],\n new Date(origEvent.root_event.dt));\n }\n\n const redirectCheck = (res) => {\n if (res.status === 301) {\n // As we don't follow redirects, and we must use normalized titles,\n // receiving 301 indicates some error. Log a warning.\n this._logger.log('warn/redirect', () => ({\n message: '301 redirect received, used a non-normalized title',\n event_str: utils.stringify(origEvent),\n stream: origEvent.meta.stream\n }));\n }\n };\n\n return this._rateLimitMessage(expander)\n .then((isRateLimited) => {\n if (isRateLimited) {\n return { status: 200 };\n }\n return this._dedupeMessage(expander)\n .then((messageDeduped) => {\n if (messageDeduped) {\n return { status: 200 };\n }\n return P.each(handler.exec, (tpl, index) => {\n const request = tpl.expand(expander);\n request.headers = Object.assign(request.headers, {\n 'x-request-id': origEvent.meta.request_id,\n 'x-triggered-by': utils.triggeredBy(retryEvent || origEvent)\n });\n return this._hyper.request(request)\n .tap(redirectCheck)\n .catch((e) => {\n if (this.rule.shouldIgnoreError(BaseExecutor.decodeError(e))) {\n return { status: 200 };\n }\n throw e;\n })\n .tap(this._sampleLog.bind(this, retryEvent || origEvent, request))\n .tapCatch(this._sampleLog.bind(this, retryEvent || origEvent, request));\n })\n .tap(() => this._updateLimiters(expander, 200))\n .tapCatch(e => this._updateLimiters(expander, e.status))\n .finally(() => this._hyper.metrics.endTiming(\n [`${ this.statName(origEvent) }_exec`],\n startTime)\n );\n });\n });\n }\n\n retryStreamName(topic) {\n return `${ this._hyper.config.service_name }.retry.${ topic }`;\n }\n\n emitterId() {\n return `${ this._hyper.config.service_name }#${ this.rule.name }`;\n }\n\n _errorStreamName() {\n return `${ this._hyper.config.service_name }.error`;\n }\n\n _constructRetryMessage(event, errorRes, retriesLeft, retryEvent) {\n const result = {\n $schema: '/change-prop/retry/1.0.0',\n meta: {\n stream: this.retryStreamName(event.meta.stream),\n uri: event.meta.uri,\n domain: event.meta.domain\n },\n triggered_by: utils.triggeredBy(retryEvent || event),\n emitter_id: this.emitterId(),\n retries_left: retriesLeft === undefined ? this.rule.spec.retry_limit : retriesLeft,\n original_event: event,\n error_status: errorRes && errorRes.status\n };\n if (errorRes && errorRes.body && typeof errorRes.body === 'object') {\n result.reason = (errorRes.body.title || errorRes.body.message);\n } else if (errorRes && errorRes.body && typeof errorRes.body === 'string') {\n // Sometimes MediaWiki will send us error body as HTML,\n // for PHP fatals or 503 for example. Record it for easier debugging.\n result.reason = errorRes.body;\n }\n return result;\n }\n\n /**\n * Checks whether retry limit for this rule is exceeded.\n *\n * @param {Object} message a retry message to check\n * @param {Error} [e] optional Error that caused a retry\n * @return {boolean}\n * @private\n */\n _isLimitExceeded(message, e) {\n if (message.retries_left <= 0) {\n this._logger.log('warn/retry_count', () => ({\n message: 'Retry count exceeded',\n event_str: utils.stringify(message),\n status: e.status,\n page: message.meta.uri,\n description: e.message,\n stack: e.stack,\n stream: message.meta.stream\n }));\n return true;\n }\n return false;\n }\n\n _catch(message, retryMessage, e) {\n const reportError = () => this._hyper.post({\n uri: new URI('/sys/queue/events'),\n body: [this._constructErrorMessage(e, message)]\n });\n\n if (e.constructor.name !== 'HTTPError') {\n // We've got an error, but it's not from the update request, it's\n // some bug in change-prop. Log and send a fatal error message.\n this._logger.log('fatal/internal_error', () => ({\n message: `Internal error in ${ this._hyper.config.service_name }`,\n description: `${ e }`,\n stack: e.stack,\n event_str: utils.stringify(message),\n stream: message.meta.stream\n }));\n return reportError();\n }\n\n /*\n JobQueue specific.\n If the DB is in readonly mode, the `x-readonly` header will be set to true\n by the job executor. In this case we ignore this retry attempt, cause it didn't\n really fail for 'natural' reasons, rather it failed due to maintenance most likely.\n Adding 1 attempt doesn't really increase the counter, as it was decremented before.\n */\n if (e.headers && e.headers['x-readonly'] &&\n retryMessage.retries_left < this.rule.spec.retry_limit) {\n retryMessage.retries_left += 1;\n }\n\n if (!this.rule.shouldIgnoreError(e)) {\n this._logger.log('error/exec_error', () => ({\n message: `Exec error in ${ this._hyper.config.service_name }`,\n status: e.status,\n event_str: utils.stringify(message),\n stream: message.meta.stream,\n error_body_str: utils.stringify(e.body)\n }));\n if (this.rule.shouldRetry(e) &&\n !this._isLimitExceeded(retryMessage, e)) {\n return this._hyper.post({\n uri: new URI('/sys/queue/events'),\n body: [ retryMessage ]\n });\n }\n return reportError();\n }\n }\n\n /**\n * Create an error message for a special Kafka topic\n *\n * @param {Error} e an exception that caused a failure\n * @param {string|Object} event an original event. In case JSON parsing failed - it's a string.\n * @return {Object} error message object\n */\n _constructErrorMessage(e, event) {\n const genericErrorURI = 'https://mediawiki.org/wiki/ChangePropagation/error';\n const eventUri = typeof event === 'string' ? genericErrorURI : event.meta.uri;\n const domain = typeof event === 'string' ? 'unknown' : event.meta.domain;\n const now = new Date();\n const errorEvent = {\n $schema: '/error/0.0.3',\n meta: {\n stream: this._errorStreamName(),\n uri: eventUri,\n id: uuidv1({ msecs: now.getTime() }),\n dt: now.toISOString(),\n domain\n },\n emitter_id: this.emitterId(),\n raw_event: typeof event === 'string' ? event : JSON.stringify(event),\n message: e.message,\n stack: e.stack\n };\n if (e.constructor === HTTPError) {\n errorEvent.details = {\n status: e.status,\n headers: e.headers,\n body: e.body\n };\n }\n return errorEvent;\n }\n\n close() {\n this._connected = false;\n return this.consumer.disconnectAsync();\n }\n\n static decodeError(e) {\n if (Buffer.isBuffer(e.body)) {\n e.body = e.body.toString();\n try {\n e.body = JSON.parse(e.body);\n } catch (err) {\n // Not a JSON error\n }\n }\n return e;\n }\n\n static _compileBlacklist(blacklist) {\n const result = {};\n blacklist = blacklist || {};\n Object.keys(blacklist).forEach((domain) => {\n result[domain] = utils.constructRegex(blacklist[domain]);\n });\n return result;\n }\n\n}\n\nmodule.exports = BaseExecutor;\n","usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/lib/kafka_factory.js","messages":[],"suppressedMessages":[{"ruleId":"security/detect-non-literal-regexp","severity":1,"message":"Found non-literal argument to RegExp Constructor","line":148,"column":31,"nodeType":"NewExpression","endLine":148,"endColumn":69,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/lib/mixins.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/lib/retry_executor.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/lib/rule.js","messages":[{"ruleId":"max-len","severity":1,"message":"This line has a length of 109. Maximum allowed is 100.","line":69,"column":1,"nodeType":"Program","messageId":"max","endLine":69,"endColumn":110},{"ruleId":"max-len","severity":1,"message":"This line has a length of 107. Maximum allowed is 100.","line":272,"column":1,"nodeType":"Program","messageId":"max","endLine":272,"endColumn":108},{"ruleId":"max-len","severity":1,"message":"This line has a length of 102. Maximum allowed is 100.","line":286,"column":1,"nodeType":"Program","messageId":"max","endLine":286,"endColumn":103}],"suppressedMessages":[{"ruleId":"no-new-func","severity":2,"message":"The Function constructor is eval.","line":78,"column":12,"nodeType":"NewExpression","messageId":"noFunctionConstructor","endLine":78,"endColumn":50,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"security/detect-non-literal-regexp","severity":1,"message":"Found non-literal argument to RegExp Constructor","line":96,"column":24,"nodeType":"NewExpression","endLine":96,"endColumn":66,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-new-func","severity":2,"message":"The Function constructor is eval.","line":337,"column":23,"nodeType":"NewExpression","messageId":"noFunctionConstructor","endLine":337,"endColumn":66,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-new-func","severity":2,"message":"The Function constructor is eval.","line":339,"column":25,"nodeType":"NewExpression","messageId":"noFunctionConstructor","endLine":339,"endColumn":85,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\n\nconst stringify = require('fast-json-stable-stringify');\nconst HyperSwitch = require('hyperswitch');\nconst Sampler = require('./sampler');\nconst Template = HyperSwitch.Template;\n\nconst DEFAULT_RETRY_DELAY = 60000; // One minute minimum retry delay\nconst DEFAULT_RETRY_FACTOR = 6; // Exponential back-off\nconst DEFAULT_RETRY_LIMIT = 2; // At most two retries\n// Set a larger request timeout then RESTBase default 6 minutes;\nconst DEFAULT_REQUEST_TIMEOUT = 7 * 60 * 1000;\n\n/**\n * If any event has meta.domain === CANARY_EVENT_META_DOMAIN,\n * and discard_canary_events is true, then the event will be discarded.\n *\n * @constant\n * @type {string}\n */\nconst CANARY_EVENT_META_DOMAIN = 'canary';\n\n/**\n * The default value for the discard_canary_events setting.\n *\n * @constant\n * @type {boolean}\n */\nconst DEFAULT_DISCARD_CANARY_EVENTS = true;\n\n/**\n * If this rule has discard_canary_events: true (the default),\n * then this condition will automatically be added to the match_not condition.\n *\n * @constant\n * @type {Object}\n */\nconst CANARY_EVENT_MATCH_CONDITION = {\n meta: {\n domain: CANARY_EVENT_META_DOMAIN\n }\n};\n\n/**\n * Creates a JS function that verifies property equality\n *\n * @param {Object} retryDefinition the condition in the format of 'retry_on' stanza\n * @return {Function} a function that verifies the condition\n */\nfunction _compileErrorCheckCondition(retryDefinition) {\n function createCondition(retryCond, option) {\n if (retryCond === 'status') {\n const opt = option.toString();\n if (/^[0-9]+$/.test(opt)) {\n return `(res[\"${ retryCond }\"] === ${ opt })`;\n }\n if (/^[0-9x]+$/.test(opt)) {\n return `/^${ opt.replace(/x/g, '\\\\d') }$/.test(res[\"${ retryCond }\"])`;\n }\n throw new Error(`Invalid retry_on condition ${ opt }`);\n } else {\n return `(stringify(res[\"${ retryCond }\"]) === '${ stringify(option) }')`;\n }\n }\n\n const condition = [];\n Object.keys(retryDefinition).forEach((catchCond) => {\n if (Array.isArray(retryDefinition[catchCond])) {\n const orCondition = retryDefinition[catchCond].map(option => createCondition(catchCond, option));\n condition.push(`(${ orCondition.join(' || ') })`);\n } else {\n condition.push(createCondition(catchCond, retryDefinition[catchCond]));\n }\n });\n const code = `return (${ condition.join(' && ') });`;\n /* jslint evil: true */\n /* eslint-disable no-new-func */\n return new Function('stringify', 'res', code).bind(null, stringify);\n /* eslint-enable no-new-func */\n}\n\nfunction _getMatchObjCode(obj) {\n if (obj.constructor === Object) {\n return `{${ Object.keys(obj).map((key) => `${ key }: ${ _getMatchObjCode(obj[key]) }`).join(', ') }}`;\n }\n return obj;\n}\n\nfunction _compileNamedRegex(obj, result, name, fieldName) {\n const captureNames = [];\n const normalRegex = obj.replace(/\\(\\?<(\\w+)>/g, (_, matchedName) => {\n captureNames.push(matchedName);\n return '(';\n });\n /* eslint-disable-next-line security/detect-non-literal-regexp */\n const numGroups = (new RegExp(`${ normalRegex.toString() }|`)).exec('').length - 1;\n\n if (captureNames.length && captureNames.length !== numGroups) {\n throw new Error(`${ 'Invalid match regex. ' +\n 'Mixing named and unnamed capture groups are not supported. Regex: ' }${ obj }`);\n }\n\n if (!captureNames.length) {\n // No named captures\n result[fieldName] = `${ normalRegex }.exec(${ name })`;\n } else {\n let code = `(() => { const execRes = ${ normalRegex }.exec(${ name }); const res = {}; `;\n captureNames.forEach((captureName, index) => {\n code += `res['${ captureName }'] = execRes[${ index + 1 }]; `;\n });\n result[fieldName] = `${ code }return res; })()`;\n }\n\n return `typeof ${ name } === \"string\" && ${ normalRegex }.test(${ name })`;\n}\n\nfunction _compileMatch(obj, result, name, fieldName) {\n function _compileArrayMatch(objToSearch, nameToSearch) {\n const itemsCheck = objToSearch.map((item, index) => `${ nameToSearch }.find((item) => ${ _compileMatch(item, {}, 'item', index) })`).join(' && ');\n return `Array.isArray(${ nameToSearch })${ itemsCheck.length ? (` && ${ itemsCheck }`) : '' }`;\n }\n\n if (obj.constructor !== Object) {\n if (Array.isArray(obj)) {\n return _compileArrayMatch(obj, name);\n }\n if (obj === 'undefined') {\n return `${ name } === undefined`;\n }\n if (typeof obj !== 'string') {\n // not a string, so it has to match exactly\n result[fieldName] = obj;\n return `${ name } === ${ obj }`;\n }\n if (!/^\\/.+\\/[gimuy]{0,5}$/.test(obj)) {\n // not a regex, quote the string\n result[fieldName] = `'${ obj }'`;\n return `${ name } === '${ obj }'`;\n }\n // it's a regex, we have to the test the arg\n return _compileNamedRegex(obj, result, name, fieldName);\n }\n\n // this is an object, we need to split it into components\n const subObj = fieldName ? {} : result;\n const test = Object.keys(obj).map(\n (key) => {\n const propertyName = `${ name }['${ key }']`;\n if (obj[key].constructor === Object) {\n return `${ propertyName } && ${ _compileMatch(obj[key], subObj, propertyName, key) }`;\n }\n return _compileMatch(obj[key], subObj, propertyName, key);\n })\n .join(' && ');\n if (fieldName) {\n result[fieldName] = subObj;\n }\n return test;\n}\n\nclass Rule {\n constructor(name, spec) {\n this.name = name;\n this.spec = spec || {};\n\n const topics = this.spec.topics || (this.spec.topic && [ this.spec.topic ]);\n if (!topics || !Array.isArray(topics) || !topics.length) {\n throw new Error(`No topics specified for rule ${ this.name }`);\n }\n this.topics = topics;\n if (this.spec.exclude_topics) {\n this.topics = this.topics.filter(topic => !this.spec.exclude_topics.includes(topic));\n }\n\n this.spec.retry_on = this.spec.retry_on || {\n status: [ '50x' ]\n };\n this.spec.ignore = this.spec.ignore || {\n status: [ 412 ]\n };\n this.spec.report = this.spec.report || {\n status: [ 400 ]\n };\n this.spec.retry_delay = this.spec.retry_delay || DEFAULT_RETRY_DELAY;\n this.spec.retry_limit = this.spec.retry_limit || DEFAULT_RETRY_LIMIT;\n this.spec.retry_factor = this.spec.retry_factor || DEFAULT_RETRY_FACTOR;\n this.spec.timeout = this.spec.timeout || DEFAULT_REQUEST_TIMEOUT;\n\n this.shouldRetry = _compileErrorCheckCondition(this.spec.retry_on);\n this.shouldIgnoreError = _compileErrorCheckCondition(this.spec.ignore);\n this.shouldReportError = _compileErrorCheckCondition(this.spec.report);\n\n // If should_discard_canary_events, then a match_not rule will automatically\n // be added to automatically not match canary events.\n // NOTE: cannot use ?? nullish coelesce here?\n // https://stackoverflow.com/questions/57378411/eslint-fails-to-parse-and-red-highlights-optional-chaining-and-nullish-coal\n this.should_discard_canary_events = 'discard_canary_events' in this.spec ?\n this.spec.discard_canary_events : DEFAULT_DISCARD_CANARY_EVENTS;\n\n this._limiterKeyTemplates = {};\n if (this.spec.limiters) {\n Object.keys(this.spec.limiters).forEach((type) => {\n try {\n this._limiterKeyTemplates[type] = new Template(this.spec.limiters[type]);\n } catch (e) {\n throw new Error(`Compilation failed for limiter ${ type }. Error: ${ e.message }`);\n }\n });\n }\n\n this._options = (this.spec.cases || [ this.spec ]).map((option) => {\n const matcher = this._processMatch(option.match) || {};\n\n if (this.should_discard_canary_events) {\n if (!Array.isArray(option.match_not)) {\n option.match_not = option.match_not ? [option.match_not] : [];\n }\n option.match_not.unshift(CANARY_EVENT_MATCH_CONDITION);\n }\n\n const result = {\n exec: this._processExec(option.exec),\n match: matcher.test || (() => true),\n expand: matcher.expand,\n match_not: this._processMatchNot(option.match_not)\n };\n if (option.sample) {\n result.sampler = new Sampler(option.sample);\n } else if (this.spec.sample) {\n result.sampler = new Sampler(this.spec.sample);\n }\n return result;\n });\n }\n\n static isBasicRule(ruleSpec) {\n const topics = ruleSpec.topics || [ ruleSpec.topic ];\n return !topics.some(topic => /^\\/.+\\/$/.test(topic));\n }\n\n static newWithTopicNames(ruleName, ruleSpec, topicNames) {\n const newSpec = Object.assign({}, ruleSpec);\n newSpec.topics = topicNames;\n return new Rule(ruleName, newSpec);\n }\n\n /**\n * Whether the claim_ttl or root_claim_ttl has passed and the event should be abandoned\n *\n * @param {Object} message the event to check\n * @return {boolean} whether to abandon the event or not\n */\n shouldAbandon(message) {\n const now = Date.now();\n if (this.spec.claim_ttl &&\n now - new Date(message.meta.dt) > this.spec.claim_ttl * 1000) {\n return true;\n }\n if (this.spec.root_claim_ttl &&\n message.root_event &&\n now - new Date(message.root_event.dt) > this.spec.root_claim_ttl * 1000) {\n return true;\n }\n return false;\n }\n\n _processMatchNot(matchNot) {\n if (!matchNot) {\n return (() => false);\n }\n if (Array.isArray(matchNot)) {\n const tests = matchNot.map((match) => (this._processMatch(match)).test).filter(func => !!func);\n return message => tests.some(test => test(message));\n }\n return (this._processMatch(matchNot)).test || (() => false);\n }\n\n /**\n * Tests the message against the compiled evaluation test. In case the rule contains\n * multiple options, the first one that's matched is choosen.\n *\n * @param {Object} message the message to test\n * @return {Integer} index of the matched option or -1 of nothing matched\n */\n test(message) {\n return this._options.findIndex(option => option.match(message) && !option.match_not(message));\n }\n\n /**\n * Returns a rule handler that contains of a set of exec template\n * and expander function\n *\n * @param {Integer} index an index of the switch option\n * @return {Object}\n */\n getHandler(index) {\n const option = this._options[index];\n return {\n exec: option.exec,\n sampler: option.sampler,\n expand: (message) => option.expand && option.expand(message) || {}\n };\n }\n\n /**\n * Returns the key to use for a rate-limiter of the certain type\n *\n * @param {string} type limiter type\n * @param {Object} expander the expander containing the message and match\n * @return {string|null}\n */\n getLimiterKey(type, expander) {\n const keyTemplate = this._limiterKeyTemplates[type];\n if (!keyTemplate) {\n return null;\n }\n return keyTemplate.expand(expander);\n }\n\n getRateLimiterTypes() {\n return Object.keys(this._limiterKeyTemplates);\n }\n\n _processMatch(match) {\n if (!match) {\n // No particular match specified, so we\n // should accept all events for this topic\n return;\n }\n\n const obj = {};\n const test = _compileMatch(match, obj, 'message');\n try {\n return {\n /* eslint-disable no-new-func */\n /* jslint evil: true */\n test: new Function('message', `return ${ test }`),\n /* jslint evil: true */\n expand: new Function('message', `return ${ _getMatchObjCode(obj) }`)\n /* eslint-enable no-new-func */\n };\n } catch (e) {\n throw new Error('Invalid match object given!');\n }\n }\n\n _processExec(exec) {\n if (!exec) {\n // nothing to do, the rule is a no-op\n this.noop = true;\n return;\n }\n\n if (!Array.isArray(exec)) {\n exec = [exec];\n }\n\n const templates = [];\n for (let idx = 0; idx < exec.length; idx++) {\n const req = exec[idx];\n if (req.constructor !== Object || !req.uri) {\n throw new Error(`In rule ${ this.name }, request number ${ idx }\n must be an object and must have the \"uri\" property`);\n }\n req.method = req.method || 'get';\n req.headers = req.headers || {};\n req.followRedirect = false;\n req.retries = 0;\n req.timeout = req.timeout || this.spec.timeout;\n\n if (!this.spec.decode_results) {\n req.encoding = null;\n }\n templates.push(new Template(req));\n }\n return templates;\n }\n}\n\nmodule.exports = Rule;\n","usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/lib/rule_executor.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/lib/rule_subscriber.js","messages":[{"ruleId":"max-len","severity":1,"message":"This line has a length of 111. Maximum allowed is 100.","line":69,"column":1,"nodeType":"Program","messageId":"max","endLine":69,"endColumn":112},{"ruleId":"max-len","severity":1,"message":"This line has a length of 109. Maximum allowed is 100.","line":70,"column":1,"nodeType":"Program","messageId":"max","endLine":70,"endColumn":110}],"suppressedMessages":[{"ruleId":"security/detect-non-literal-regexp","severity":1,"message":"Found non-literal argument to RegExp Constructor","line":61,"column":24,"nodeType":"NewExpression","endLine":61,"endColumn":68,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\n\nconst RuleExecutor = require('./rule_executor');\nconst RetryExecutor = require('./retry_executor');\nconst Rule = require('./rule');\nconst P = require('bluebird');\nconst stringify = require('fast-json-stable-stringify');\n\nclass BasicSubscription {\n constructor(options, kafkaFactory, hyper, ruleName, ruleSpec) {\n this._kafkaFactory = kafkaFactory;\n this._options = options;\n this._hyper = hyper;\n ruleSpec.sample = ruleSpec.sample || options.sample;\n this._rule = new Rule(ruleName, ruleSpec);\n this._subscribed = false;\n this._executor = new RuleExecutor(this._rule, this._kafkaFactory,\n hyper, this._options);\n this._retryExecutor = new RetryExecutor(this._rule, this._kafkaFactory,\n hyper, this._options);\n }\n\n subscribe() {\n if (this._subscribed) {\n throw new Error('Already subscribed!');\n }\n\n this._hyper.logger.log('info/subscription', {\n message: 'Subscribing based on basic topics',\n rule: this._rule.name,\n topics: this._rule.topics\n });\n\n return P.join(this._executor.subscribe(), this._retryExecutor.subscribe())\n .tap(() => {\n this._subscribed = true;\n });\n }\n\n unsubscribe() {\n if (this._subscribed) {\n this._executor.close();\n this._retryExecutor.close();\n }\n }\n}\n// TODO: rewrite this one\nclass RegexTopicSubscription {\n constructor(options, kafkaFactory, hyper, ruleName, ruleSpec, metadataWatch) {\n this._kafkaFactory = kafkaFactory;\n this._options = options;\n this._hyper = hyper;\n this._ruleName = ruleName;\n this._ruleSpec = ruleSpec;\n ruleSpec.sample = ruleSpec.sample || options.sample;\n this._topicTester = (ruleSpec.topics || (ruleSpec.topic && [ ruleSpec.topic ]))\n .map((topic) => {\n if (/^\\/.+\\/$/.test(topic)) {\n // Ok, we've got a regex topic! Compile the regex.\n /* eslint-disable-next-line security/detect-non-literal-regexp */\n return new RegExp(topic.slice(1, topic.length - 1));\n }\n return topic;\n });\n this._metadataWatch = metadataWatch;\n this._metadataWatch.on('topics_changed', (topics) => {\n const newFilteredTopics = this._filterTopics(topics);\n if (stringify(newFilteredTopics) !== stringify(this._filteredTopics)) {\n const removedTopics = this._filteredTopics.filter(topic => !newFilteredTopics.includes(topic));\n const addedTopics = newFilteredTopics.filter(topic => !this._filteredTopics.includes(topic));\n this._hyper.logger.log('info/topics_changed', {\n message: 'Subscribed topics list changed',\n added_topics: addedTopics,\n removed_topics: removedTopics,\n rule: this._ruleName\n });\n\n this.unsubscribe()\n .delay(5000) // Give some time for all the in-process consumption loops to finish up\n .then(() => this._subscribeTopics(newFilteredTopics));\n }\n });\n // Ignore the emitted errors - in 10 seconds it will retry\n this._metadataWatch.on('error', e => this._hyper.logger.log('error/metadata_refresh', e));\n\n this._subscribed = false;\n this._executors = [];\n this._filteredTopics = undefined;\n }\n\n /**\n * Filters out which topic names are ok to subscribe to.\n *\n * @param {Array} proposedTopicNames a set of available topic names\n * to check which to subscribe to\n * @return {Array}\n * @private\n */\n _filterTopics(proposedTopicNames) {\n return proposedTopicNames.filter((topic) => this._topicTester.some((topicTester) => {\n if (topicTester instanceof RegExp) {\n return topicTester.test(topic);\n }\n return topicTester === topic;\n })).sort();\n }\n\n _subscribeTopics(topicNames) {\n this._filteredTopics = topicNames;\n const topicRule = Rule.newWithTopicNames(this._ruleName,\n this._ruleSpec, this._filteredTopics);\n\n this._hyper.logger.log('info/subscription', {\n message: 'Subscribing based on regex',\n rule: this._ruleName,\n topics: topicRule.topics\n });\n\n const executor = new RuleExecutor(topicRule, this._kafkaFactory,\n this._hyper, this._options);\n this._executors.push(executor);\n\n const retryExecutor = new RetryExecutor(topicRule, this._kafkaFactory,\n this._hyper, this._options);\n this._executors.push(retryExecutor);\n\n return P.join(executor.subscribe(), retryExecutor.subscribe())\n .tap(() => {\n this._subscribed = true;\n });\n }\n\n subscribe() {\n return this._metadataWatch.getTopics()\n .then(topics => this._subscribeTopics(this._filterTopics(topics)));\n }\n\n unsubscribe() {\n if (this._subscribed) {\n this._subscribed = false;\n return P.each(this._executors, (executor => executor.close()));\n }\n return P.resolve();\n }\n}\n\nclass Subscriber {\n constructor(options, kafkaFactory) {\n this._kafkaFactory = kafkaFactory;\n this._options = options;\n\n this._subscriptions = [];\n this._metadataWatch = undefined;\n }\n\n _createSubscription(hyper, ruleName, ruleSpec) {\n if (Rule.isBasicRule(ruleSpec)) {\n return P.resolve(new BasicSubscription(this._options,\n this._kafkaFactory, hyper, ruleName, ruleSpec));\n }\n let maybeCreateWatchAction;\n if (!this._metadataWatch) {\n maybeCreateWatchAction =\n this._kafkaFactory.createMetadataWatch('metadata_refresher')\n .tap((refresher) => {\n this._metadataWatch = refresher;\n });\n } else {\n maybeCreateWatchAction = P.resolve(this._metadataWatch);\n }\n\n return maybeCreateWatchAction\n .then(() => new RegexTopicSubscription(this._options, this._kafkaFactory,\n hyper, ruleName, ruleSpec, this._metadataWatch));\n }\n\n /**\n * Subscribe a rule spec under a certain rule name\n *\n * @param {HyperSwitch} hyper the request dispatcher\n * @param {string} ruleName the name of the rule\n * @param {Object} ruleSpec the rule specification\n * @return {Promise}\n */\n subscribe(hyper, ruleName, ruleSpec) {\n return this._createSubscription(hyper, ruleName, ruleSpec)\n .then((subscription) => {\n this._subscriptions.push(subscription);\n return subscription.subscribe();\n });\n }\n\n unsubscribeAll() {\n this._subscriptions.forEach(subscription => subscription.unsubscribe());\n if (this._metadataWatch) {\n this._metadataWatch.disconnect();\n }\n }\n}\n\nmodule.exports = Subscriber;\n","usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/lib/sampler.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/lib/utils.js","messages":[],"suppressedMessages":[{"ruleId":"security/detect-non-literal-regexp","severity":1,"message":"Found non-literal argument to RegExp Constructor","line":61,"column":12,"nodeType":"NewExpression","endLine":61,"endColumn":29,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/package-lock.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"no-extra-parens","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/package.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"no-extra-parens","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/server.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/sys/deduplicator.js","messages":[{"ruleId":"es-x/no-array-prototype-with","severity":1,"message":"ES2023 'Array.prototype.with' method is forbidden.","line":9,"column":28,"nodeType":"MemberExpression","messageId":"forbidden","endLine":9,"endColumn":51}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\n\nconst mixins = require('../lib/mixins');\nconst utils = require('../lib/utils');\n\nconst DUPLICATE = { status: 200, body: true };\nconst NOT_DUPLICATE = { status: 200, body: false };\n\nclass Deduplicator extends mixins.mix(Object).with(mixins.Redis) {\n constructor(options) {\n super(options);\n\n this._options = options || {};\n this._expire_timeout = options.window || 86400;\n this._prefix = this._options.redis_prefix || 'CP';\n }\n\n /**\n * Checks whether the message is a duplicate\n *\n * @param {HyperSwitch} hyper\n * @param {Object} req\n * @return {Promise} response status shows whether it's a duplicate or not.\n */\n checkDuplicate(hyper, req) {\n const name = req.params.name;\n const message = req.body;\n const prefix = `${ this._prefix }_dedupe_${ name }`;\n\n // First, look at the individual event duplication based on ID\n // This happens when we restart ChangeProp and reread some of the\n // exact same events which were executed but was not committed.\n const messageKeyWithId = `${ prefix }_${ message.meta.domain }_${ message.meta.id }`;\n return this._redis.setnxAsync(messageKeyWithId, '1')\n // Expire the key or renew the expiration timestamp if the key existed\n .tap(() => this._redis.expireAsync(messageKeyWithId, Math.ceil(this._expire_timeout / 24)))\n // If that key already existed - that means it's a duplicate\n .then((setResult) => {\n if (setResult) {\n return NOT_DUPLICATE;\n }\n hyper.metrics.increment(`${ name }_dedupe`);\n hyper.logger.log('trace/dedupe', () => ({\n message: 'Event was deduplicated based on id',\n event_str: utils.stringify(message)\n }));\n return DUPLICATE;\n })\n .then((individualDuplicate) => {\n if (individualDuplicate.body || !message.sha1) {\n // If the message was deduped based on its event ID or if it has no SHA-1 hash,\n // don't try to deduplicate by SHA-1\n return individualDuplicate;\n }\n const messageKeyWithSha = `${ prefix }_${ message.meta.domain }_${ message.sha1 }`;\n return this._redis.getAsync(messageKeyWithSha)\n .then((previousExecutionTime) => {\n // If the same event (by sha1) was created before the previous execution\n // time, the changes that caused it were already in the database, so it\n // will be a no-op and can be deduplicated.\n if (previousExecutionTime &&\n // Give that the resolution of the event dt is 1 second, this could\n // be false-positive when the job queue is so quick that it executes\n // two jobs with the same SHA1 within a single second. To be on the safe\n // side - subtract 1 second from the previous execution time to allow for\n // some lag.\n new Date(previousExecutionTime) - 1000 > new Date(message.meta.dt)) {\n hyper.metrics.increment(`${ name }_dedupe`);\n hyper.logger.log('trace/dedupe', () => ({\n message: 'Event was deduplicated based on sha1',\n event_str: utils.stringify(message),\n newer_dt: previousExecutionTime\n }));\n return DUPLICATE;\n }\n // If the root event was created before the previous exec time for the same\n // leaf event - we can deduplicate cause by the time of the prev execution\n // the template (root_event source) changes were already in the database.\n if (previousExecutionTime &&\n message.root_event &&\n new Date(previousExecutionTime) - 1000 >\n new Date(message.root_event.dt)) {\n hyper.metrics.increment(`${ name }_dedupe`);\n hyper.logger.log('trace/dedupe', () => ({\n message: 'Event was deduplicated based on sha1 and root_event dt',\n event_str: utils.stringify(message),\n newer_dt: previousExecutionTime\n }));\n return DUPLICATE;\n }\n return this._redis.setAsync(messageKeyWithSha, new Date().toISOString())\n .then(() => this._redis.expireAsync(messageKeyWithSha,\n Math.ceil(this._expire_timeout / 24)))\n .thenReturn(NOT_DUPLICATE);\n });\n })\n .then((sha1Duplicate) => {\n if (sha1Duplicate.body || !message.root_event) {\n // If the message was sha1-deduped or if it has no root event info,\n // don't use deduplication by the root event\n return sha1Duplicate;\n }\n\n const rootEventKey = `${ prefix }_${ message.root_event.signature }`;\n return this._redis.getAsync(rootEventKey)\n .then((oldEventTimestamp) => {\n // If this event was caused by root event and there was a leaf event executed\n // already that belonged to a later root_event we can cut off this chain.\n if (oldEventTimestamp &&\n new Date(oldEventTimestamp) > new Date(message.root_event.dt)) {\n hyper.metrics.increment(`${ name }_dedupe`);\n hyper.logger.log('trace/dedupe', () => ({\n message: 'Event was deduplicated based on root event',\n event_str: utils.stringify(message),\n signature: message.root_event.signature,\n newer_dt: oldEventTimestamp\n }));\n return DUPLICATE;\n }\n return this._redis.setAsync(rootEventKey, message.root_event.dt)\n .then(() => this._redis.expireAsync(rootEventKey, this._expire_timeout))\n .thenReturn(NOT_DUPLICATE);\n });\n })\n .catch((e) => {\n hyper.logger.log('error/dedupe', {\n message: 'Error during deduplication',\n err_str: e.toString()\n });\n return NOT_DUPLICATE;\n });\n }\n}\n\nmodule.exports = (options) => {\n const ps = new Deduplicator(options);\n\n return {\n spec: {\n paths: {\n '/{name}': {\n post: {\n operationId: 'checkDuplicate'\n }\n }\n }\n },\n operations: {\n checkDuplicate: ps.checkDuplicate.bind(ps)\n }\n };\n};\n","usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/sys/dep_updates.js","messages":[{"ruleId":"max-len","severity":1,"message":"This line has a length of 105. Maximum allowed is 100.","line":69,"column":1,"nodeType":"Program","messageId":"max","endLine":69,"endColumn":106}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\n\nconst extend = require('extend');\nconst HyperSwitch = require('hyperswitch');\nconst Template = HyperSwitch.Template;\nconst utils = require('../lib/utils');\nconst Title = require('mediawiki-title').Title;\n\nfunction createBackLinksTemplate(options) {\n return {\n template: new Template(extend(true, {}, options.templates.mw_api, {\n method: 'post',\n body: {\n format: 'json',\n action: 'query',\n list: 'backlinks',\n bltitle: '{{request.params.title}}',\n blfilterredir: 'nonredirects',\n blcontinue: '{{message.continue}}',\n bllimit: 500\n }\n })),\n getContinueToken: res => res.body.continue && res.body.continue.blcontinue,\n resourceChangeTags: [ 'backlinks' ],\n leafStreamName: 'change-prop.backlinks.resource-change',\n extractResults: res => res.body.query.backlinks\n };\n}\n\nfunction createImageUsageTemplate(options) {\n return {\n template: new Template(extend(true, {}, options.templates.mw_api, {\n method: 'post',\n body: {\n format: 'json',\n action: 'query',\n list: 'imageusage',\n iutitle: '{{request.params.title}}',\n iucontinue: '{{message.continue}}',\n iulimit: 500\n // TODO: decide what do we want to do with redirects\n }\n })),\n getContinueToken: res => res.body.continue && res.body.continue.iucontinue,\n leafStreamName: 'change-prop.transcludes.resource-change',\n resourceChangeTags: [ 'transcludes', 'files' ],\n extractResults: res => res.body.query.imageusage\n };\n}\n\nfunction createTranscludeInTemplate(options) {\n return {\n template: new Template(extend(true, {}, options.templates.mw_api, {\n method: 'post',\n body: {\n format: 'json',\n action: 'query',\n prop: 'transcludedin',\n tiprop: 'title',\n tishow: '!redirect',\n titles: '{{request.params.title}}',\n ticontinue: '{{message.continue}}',\n tilimit: 500\n }\n })),\n getContinueToken: res => res.body.continue && res.body.continue.ticontinue,\n leafStreamName: 'change-prop.transcludes.resource-change',\n resourceChangeTags: [ 'transcludes', 'templates' ],\n extractResults: (res) => res.body.query.pages[Object.keys(res.body.query.pages)[0]].transcludedin\n };\n}\n\nfunction createWikidataTemplate(options) {\n return {\n template: new Template(extend(true, {}, options.templates.mw_api, {\n method: 'post',\n body: {\n format: 'json',\n action: 'wbgetentities',\n ids: '{{message.page_title}}',\n props: 'sitelinks/urls',\n normalize: true\n }\n })),\n resourceChangeTags: [ 'wikidata' ],\n leafStreamName: 'change-prop.wikidata.resource-change',\n shouldProcess: (res) => {\n if (!(res && res.body && !!res.body.success)) {\n return false;\n }\n const entities = res.body.entities || {};\n if (!Object.keys(entities).length) {\n return false;\n }\n const sitelinks = entities[Object.keys(entities)[0]].sitelinks || {};\n if (!Object.keys(sitelinks).length) {\n return false;\n }\n return true;\n },\n extractResults: (res) => {\n const siteLinks = res.body.entities[Object.keys(res.body.entities)[0]].sitelinks;\n return Object.keys(siteLinks).map((siteId) => {\n const pageURI = siteLinks[siteId].url;\n const match = /^https?:\\/\\/([^/]+)\\/wiki\\/(.+)$/.exec(pageURI);\n return {\n domain: match[1],\n title: decodeURIComponent(match[2])\n };\n });\n }\n };\n}\n\nfunction _sendContinueEvent(hyper, stream, origEvent, continueToken) {\n return hyper.post({\n uri: '/sys/queue/events',\n body: [{\n $schema: '/change-prop/continue/1.0.0',\n meta: {\n stream,\n uri: origEvent.meta.uri,\n request_id: origEvent.meta.request_id,\n domain: origEvent.meta.domain,\n dt: new Date().toISOString()\n },\n triggered_by: utils.triggeredBy(origEvent),\n root_event: {\n signature: origEvent.meta.uri,\n dt: origEvent.meta.dt\n },\n original_event: origEvent,\n continue: continueToken\n }]\n });\n}\n\nfunction _sendResourceChanges(hyper, items, originalEvent, tags, streamName) {\n return hyper.post({\n uri: '/sys/queue/events',\n body: items.map((item) => {\n // TODO: need to check whether a wiki is http or https!\n const resourceURI =\n `https://${ item.domain }/wiki/${ encodeURIComponent(item.title) }`;\n return {\n $schema: '/resource_change/1.0.0',\n meta: {\n stream: streamName,\n uri: resourceURI,\n request_id: originalEvent.meta.request_id,\n domain: item.domain,\n dt: new Date().toISOString()\n },\n triggered_by: utils.triggeredBy(originalEvent),\n tags,\n root_event: {\n signature: originalEvent.meta.uri,\n dt: originalEvent.meta.dt\n }\n };\n })\n });\n}\n\nclass DependencyProcessor {\n constructor(options) {\n this.options = options;\n this.siteInfoCache = {};\n this.backLinksRequest = createBackLinksTemplate(options);\n this.imageLinksRequest = createImageUsageTemplate(options);\n this.transcludeInRequest = createTranscludeInTemplate(options);\n this.wikidataRequest = createWikidataTemplate(options);\n this.siteInfoRequest = new Template(extend(true, {}, options.templates.mw_api, {\n method: 'post',\n body: {\n format: 'json',\n action: 'query',\n meta: 'siteinfo',\n siprop: 'general|namespaces|namespacealiases|specialpagealiases'\n }\n }));\n this.latestMessages = [];\n }\n\n processBackLinks(hyper, req) {\n const context = {\n request: req,\n message: req.body\n };\n const originalEvent = req.body.original_event || req.body;\n return this._getSiteInfo(hyper, req.body)\n .then((siteInfo) => this._fetchAndProcessBatch(hyper, this.backLinksRequest,\n context, siteInfo, originalEvent));\n }\n\n processTranscludes(hyper, req) {\n const message = req.body;\n const context = {\n request: req,\n message\n };\n const originalEvent = req.body.original_event || req.body;\n return this._getSiteInfo(hyper, message)\n .then((siteInfo) => {\n const title = Title.newFromText(req.params.title, siteInfo);\n if (title.getNamespace().isFile()) {\n return this._fetchAndProcessBatch(hyper, this.imageLinksRequest,\n context, siteInfo, originalEvent);\n }\n return this._fetchAndProcessBatch(hyper, this.transcludeInRequest,\n context, siteInfo, originalEvent);\n });\n }\n\n processWikidata(hyper, req) {\n const context = {\n request: req,\n message: req.body\n };\n return hyper.request(this.wikidataRequest.template.expand(context))\n .then((res) => {\n if (this.wikidataRequest.shouldProcess(res)) {\n const items = this.wikidataRequest.extractResults(res);\n return _sendResourceChanges(hyper, items, req.body,\n this.wikidataRequest.resourceChangeTags,\n this.wikidataRequest.leafStreamName);\n }\n\n if (res.body && res.body.error) {\n hyper.logger.log('warn/wikidata_description', () => ({\n message: 'Could not extract items',\n event_str: utils.stringify(context.message),\n error: res.body.error\n }));\n }\n })\n .thenReturn({ status: 200 });\n }\n\n _fetchAndProcessBatch(hyper, requestTemplate, context, siteInfo, originalEvent) {\n return hyper.post(requestTemplate.template.expand(context))\n .then((res) => {\n const titles = (requestTemplate.extractResults(res) || []).map((item) => ({\n title: Title.newFromText(item.title, siteInfo).getPrefixedDBKey(),\n domain: originalEvent.meta.domain\n }));\n if (!titles.length) {\n // the batch is complete or the list of transcluded titles is empty\n return { status: 200 };\n }\n let actions = _sendResourceChanges(hyper, titles,\n originalEvent, requestTemplate.resourceChangeTags,\n requestTemplate.leafStreamName);\n if (res.body.continue) {\n actions = actions.then(() => _sendContinueEvent(hyper,\n requestTemplate.leafStreamName,\n originalEvent,\n requestTemplate.getContinueToken(res)));\n }\n return actions.thenReturn({ status: 200 });\n });\n }\n\n _getSiteInfo(hyper, message) {\n const domain = message.meta.domain;\n if (!this.siteInfoCache[domain]) {\n this.siteInfoCache[domain] = hyper.post(this.siteInfoRequest.expand({\n message\n }))\n .then((res) => {\n if (!res || !res.body || !res.body.query || !res.body.query.general) {\n throw new Error(`SiteInfo is unavailable for ${ message.meta.domain }`);\n }\n return {\n general: {\n lang: res.body.query.general.lang,\n legaltitlechars: res.body.query.general.legaltitlechars,\n case: res.body.query.general.case\n },\n namespaces: res.body.query.namespaces,\n namespacealiases: res.body.query.namespacealiases,\n specialpagealiases: res.body.query.specialpagealiases\n };\n })\n .catch((e) => {\n hyper.logger.log('error/site_info', e);\n delete this.siteInfoCache[domain];\n throw e;\n });\n }\n return this.siteInfoCache[domain];\n }\n}\n\nmodule.exports = (options) => {\n const processor = new DependencyProcessor(options);\n return {\n spec: {\n paths: {\n '/backlinks/{title}': {\n post: {\n summary: 'set up the kafka listener',\n operationId: 'process_backlinks'\n }\n },\n '/transcludes/{title}': {\n post: {\n summary: 'check if the page is transcluded somewhere and update',\n operationId: 'process_transcludes'\n }\n },\n '/wikidata_descriptions': {\n post: {\n summary: 'find all pages corresponding to ' +\n 'the wikidata item and update summary',\n operationId: 'process_wikidata'\n }\n }\n }\n },\n operations: {\n process_backlinks: processor.processBackLinks.bind(processor),\n process_transcludes: processor.processTranscludes.bind(processor),\n process_wikidata: processor.processWikidata.bind(processor)\n }\n };\n};\n","usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/sys/kafka.js","messages":[{"ruleId":"max-len","severity":1,"message":"This line has a length of 113. Maximum allowed is 100.","line":41,"column":1,"nodeType":"Program","messageId":"max","endLine":41,"endColumn":114}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\n\n/**\n * restbase-mod-queue-kafka main entry point\n */\n\nconst P = require('bluebird');\nconst HyperSwitch = require('hyperswitch');\nconst HTTPError = HyperSwitch.HTTPError;\nconst uuidv1 = require('uuid').v1;\n\nconst utils = require('../lib/utils');\nconst kafkaFactory = require('../lib/kafka_factory');\nconst RuleSubscriber = require('../lib/rule_subscriber');\n\nclass Kafka {\n constructor(options) {\n this.options = options;\n this.kafkaFactory = kafkaFactory.getFactory(options);\n this.staticRules = options.templates || {};\n\n this.subscriber = new RuleSubscriber(options, this.kafkaFactory);\n }\n\n setup(hyper) {\n return this.kafkaFactory.createGuaranteedProducer(hyper.logger)\n .then((producer) => {\n this.producer = producer;\n this._connected = true;\n HyperSwitch.lifecycle.once('close', () => {\n this._connected = false;\n this.subscriber.unsubscribeAll();\n this.producer.disconnect();\n });\n return this._subscribeRules(hyper, this.staticRules);\n })\n .tap(() => hyper.logger.log('info/change-prop/init', 'Kafka Queue module initialised'));\n }\n\n _subscribeRules(hyper, rules) {\n return P.map(Object.keys(rules), ruleName => this.subscriber.subscribe(hyper, ruleName, rules[ruleName]))\n .thenReturn({ status: 201 });\n }\n\n subscribe(hyper, req) {\n return this._subscribeRules(hyper, req.body);\n }\n\n produce(hyper, req) {\n if (this.options.test_mode) {\n hyper.logger.log('trace/produce', 'Running in TEST MODE; Production disabled');\n return { status: 201 };\n }\n\n if (!this._connected) {\n hyper.logger.log('debug/produce', 'Attempt to produce while disconnected');\n return { status: 202 };\n }\n\n const partition = req.params.partition || null;\n const messages = req.body;\n if (!Array.isArray(messages) || !messages.length) {\n throw new HTTPError({\n status: 400,\n body: {\n type: 'bad_request',\n detail: 'Events should be a non-empty array'\n }\n });\n }\n // Check whether all messages contain the topic\n messages.forEach((message) => {\n const now = new Date();\n message.meta.id = message.meta.id || uuidv1({ msecs: now.getTime() });\n message.meta.dt = message.meta.dt || now.toISOString();\n message.meta.request_id = message.meta.request_id || utils.requestId();\n });\n return P.all(messages.map((message) => {\n if (!message.meta.stream) {\n throw new HTTPError({\n status: 400,\n body: {\n type: 'bad_request',\n detail: 'Event must have a meta.stream',\n event_str: message\n }\n });\n }\n hyper.metrics.increment(\n `produce_${ hyper.metrics.normalizeName(message.meta.stream.replace(/\\./g, '_')) }.${ partition }`);\n return this.producer.produce(`${ this.kafkaFactory.produceDC }.${ message.meta.stream }`,\n partition,\n Buffer.from(JSON.stringify(message)));\n }))\n .thenReturn({ status: 201 });\n }\n}\n\nmodule.exports = (options) => {\n const kafkaMod = new Kafka(options);\n return {\n spec: {\n paths: {\n '/setup': {\n put: {\n summary: 'set up the kafka listener',\n operationId: 'setup_kafka'\n }\n },\n '/events{/partition}': {\n post: {\n summary: 'produces a message the kafka topic',\n operationId: 'produce'\n }\n },\n '/subscriptions': {\n post: {\n summary: 'adds a new subscription dynamically',\n operationId: 'subscribe'\n }\n }\n }\n },\n operations: {\n setup_kafka: kafkaMod.setup.bind(kafkaMod),\n produce: kafkaMod.produce.bind(kafkaMod),\n subscribe: kafkaMod.subscribe.bind(kafkaMod)\n },\n resources: [{\n uri: '/sys/queue/setup'\n }]\n };\n};\n","usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/sys/ores_updates.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/sys/partitioner.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/sys/purge.js","messages":[],"suppressedMessages":[{"ruleId":"security/detect-unsafe-regex","severity":1,"message":"Unsafe Regular Expression","line":39,"column":52,"nodeType":"Literal","endLine":39,"endColumn":69,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/sys/rate_limiter.js","messages":[{"ruleId":"es-x/no-array-prototype-with","severity":1,"message":"ES2023 'Array.prototype.with' method is forbidden.","line":9,"column":27,"nodeType":"MemberExpression","messageId":"forbidden","endLine":9,"endColumn":50}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\n\nconst Limiter = require('ratelimit.js').RateLimit;\nconst P = require('bluebird');\nconst HyperSwitch = require('hyperswitch');\nconst HTTPError = HyperSwitch.HTTPError;\nconst mixins = require('../lib/mixins');\n\nclass RateLimiter extends mixins.mix(Object).with(mixins.Redis) {\n constructor(options) {\n super(options);\n\n this._options = options;\n\n this._LIMITERS = new Map();\n Object.keys(this._options.limiters).forEach((type) => {\n let limiterOpts = this._options.limiters[type];\n\n if (!Array.isArray(limiterOpts)) {\n limiterOpts = [ limiterOpts ];\n }\n\n limiterOpts.forEach((opt) => {\n if (!opt.interval || !opt.limit) {\n throw new Error(`Limiter ${ type } is miconfigured`);\n }\n });\n\n this._LIMITERS.set(type, new Limiter(this._redis, limiterOpts,\n { prefix: `CPLimiter_${ type }` }));\n });\n }\n\n _execLimiterFun(fun, hyper, type, key) {\n const limiter = this._LIMITERS.get(type);\n\n if (!limiter) {\n hyper.logger.log('warn/ratelimit', {\n message: 'Unconfigured rate-limiter is used',\n limiter_type: type\n });\n return { status: 204 };\n }\n\n const startTime = Date.now();\n\n return new P((resolve, reject) => {\n limiter[fun](key, (err, isRateLimited) => {\n if (err) {\n hyper.logger.log('error/ratelimit', err);\n hyper.metrics.endTiming(`ratelimit.${ fun }.err`, startTime);\n // In case we've got problems with limiting just allow everything\n return resolve({ status: 200 });\n }\n\n if (isRateLimited) {\n hyper.metrics.endTiming(`ratelimit.${ fun }.block`, startTime);\n return reject(new HTTPError({\n status: 429,\n body: {\n type: 'rate_limit',\n message: `Message rejected by limiter ${ type }`,\n key\n }\n }));\n }\n\n hyper.metrics.endTiming(`ratelimit.${ fun }.allow`, startTime);\n return resolve({ status: 201 });\n });\n });\n }\n\n increment(hyper, req) {\n return this._execLimiterFun('incr', hyper, req.params.type, req.params.key);\n }\n\n check(hyper, req) {\n return this._execLimiterFun('check', hyper, req.params.type, req.params.key);\n }\n}\n\nmodule.exports = (options) => {\n const ps = new RateLimiter(options);\n\n return {\n spec: {\n paths: {\n '/{type}/{key}': {\n post: {\n operationId: 'incrementAndCheck'\n },\n get: {\n operationId: 'check',\n // XXX: Ugly hack below so that the automatic monitoring\n // script does not complain about it correctly returning 403\n 'x-monitor': false\n }\n }\n }\n },\n operations: {\n incrementAndCheck: ps.increment.bind(ps),\n check: ps.check.bind(ps)\n }\n };\n};\n","usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-len","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/.eslintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"no-extra-parens","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/feature/job_rules.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/feature/rule.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-vars","severity":2,"message":"'r' is assigned a value but never used.","line":10,"column":19,"nodeType":"Identifier","messageId":"unusedVar","endLine":10,"endColumn":20,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'r' is assigned a value but never used.","line":118,"column":27,"nodeType":"Identifier","messageId":"unusedVar","endLine":118,"endColumn":28,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'r' is assigned a value but never used.","line":250,"column":23,"nodeType":"Identifier","messageId":"unusedVar","endLine":250,"endColumn":24,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-useless-escape","severity":2,"message":"Unnecessary escape character: \\w.","line":254,"column":49,"nodeType":"Literal","messageId":"unnecessaryEscape","endLine":254,"endColumn":50,"suggestions":[{"messageId":"removeEscape","fix":{"range":[9096,9097],"text":""},"desc":"Remove the `\\`. This maintains the current functionality."},{"messageId":"escapeBackslash","fix":{"range":[9096,9096],"text":"\\"},"desc":"Replace the `\\` with `\\\\` to include the actual backslash character."}],"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/feature/sampler.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/feature/static_rules.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/feature/update_rules.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/utils/changeProp.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/utils/common.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/test/utils/mock_kafka_factory.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"implicit-arrow-linebreak","replacedBy":[]},{"ruleId":"arrow-spacing","replacedBy":[]},{"ruleId":"lines-between-class-members","replacedBy":[]},{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"template-curly-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"operator-linebreak","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]}] --- end --- $ /usr/bin/npm ci --- stderr --- npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'change-propagation@0.13.0', npm WARN EBADENGINE required: { node: '>=20' }, npm WARN EBADENGINE current: { node: 'v18.19.0', npm: '9.2.0' } npm WARN EBADENGINE } npm WARN deprecated kad-fs@0.0.4: This package is no longer maintained. npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated kad-memstore@0.0.1: This package is no longer maintained. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated json-schema-ref-parser@7.1.4: Please switch to @apidevtools/json-schema-ref-parser --- stdout --- added 616 packages, and audited 683 packages in 2m 75 packages are looking for funding run `npm fund` for details 21 vulnerabilities (1 low, 8 moderate, 10 high, 2 critical) To address issues that do not require attention, run: npm audit fix To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. --- end --- $ /usr/bin/npm test --- stdout --- > change-propagation@0.13.0 test > export MOCK_SERVICES=true && npm run lint && mocha --recursive > change-propagation@0.13.0 lint > eslint --cache --ext .js . /src/repo/lib/base_executor.js 267:14 warning Expected no linebreak before this expression implicit-arrow-linebreak 335:1 warning This line has a length of 108. Maximum allowed is 100 max-len /src/repo/lib/rule.js 69:1 warning This line has a length of 109. Maximum allowed is 100 max-len 272:1 warning This line has a length of 107. Maximum allowed is 100 max-len 286:1 warning This line has a length of 102. Maximum allowed is 100 max-len /src/repo/lib/rule_subscriber.js 69:1 warning This line has a length of 111. Maximum allowed is 100 max-len 70:1 warning This line has a length of 109. Maximum allowed is 100 max-len /src/repo/sys/deduplicator.js 9:28 warning ES2023 'Array.prototype.with' method is forbidden es-x/no-array-prototype-with /src/repo/sys/dep_updates.js 69:1 warning This line has a length of 105. Maximum allowed is 100 max-len /src/repo/sys/kafka.js 41:1 warning This line has a length of 113. Maximum allowed is 100 max-len /src/repo/sys/rate_limiter.js 9:27 warning ES2023 'Array.prototype.with' method is forbidden es-x/no-array-prototype-with ✖ 11 problems (0 errors, 11 warnings) JobQueue rules ✓ Should propagate updateBetaFeaturesUserCounts job (503ms) ✓ Should propagate cdnPurge job (3506ms) ✓ Should support partitioned refreshLinks (503ms) ✓ Should deduplicate based on ID (2004ms) ✓ Should deduplicate based on SHA1 (4002ms) ✓ Should deduplicate based on SHA1 and root job combination (4005ms) ✓ Should deduplicate base on root job (4005ms) ✓ Should support delayed jobs with re-enqueue (13007ms) Rule ✓ topic required ✓ no-op rule ✓ simple rule - one request ✓ simple rule - multiple requests Matching ✓ all ✓ simple value match ✓ simple value mismatch ✓ regex match ✓ regex match with undefined ✓ regex mismatch ✓ array match ✓ malformed match ✓ match_not ✓ match_not array ✓ matches match and match_not ✓ matches match but not match_not ✓ matches match_not but not match ✓ matches match but is canary event and should_discard_canary_events is true ✓ matches match and is canary event and should_discard_canary_events is false ✓ expansion ✓ expansion with named groups ✓ checks for named and unnamed groups mixing Sampler ✓ Should accept the correct number of values (110ms) Basic rule management ✓ Should call simple executor (502ms) ✓ Should retry simple executor (501ms) ✓ Should retry simple executor no more than limit (2003ms) ✓ Should emit valid retry message (2713ms) ✓ Should not retry if retry_on not matched (2002ms) ✓ Should not follow redirects (2003ms) ✓ Should not crash with unparsable JSON (502ms) ✓ Should support producing to topics on exec (501ms) ✓ Should emit valid messages to error topic (198ms) ✓ Sampling should only propagate a stable subset (2001ms) ✓ Should support array topics (502ms) ✓ Should support exclude_topics stanza (2002ms) update rules ✓ Should update summary endpoint (504ms) ✓ Should update summary endpoint, transcludes topic (502ms) ✓ Should update summary endpoint on page images change (503ms) ✓ Should not update summary for a blacklisted title (2002ms) ✓ Should update definition endpoint (501ms) ✓ Should not react to revision change event from restbase for definition endpoint (2003ms) ✓ Should update mobile apps endpoint (502ms) ✓ Should not update definition endpoint for non-main namespace (2002ms) ✓ Should update RESTBase on resource_change from MW (502ms) ✓ Should update RESTBase on revision create (503ms) ✓ Should not update RESTBase on revision create for a blacklisted title (2002ms) ✓ Should not update RESTBase on revision create for wikidata (2001ms) ✓ Should update RESTBase on page delete (502ms) ✓ Should update RESTBase on page undelete (502ms) ✓ Should update RESTBase on page move (502ms) ✓ Should update RESTBase on revision visibility change (502ms) ✓ Should update ORES on revision-create (730ms) ✓ Should update ORES on revision-create, error (501ms) ✓ Should update RESTBase summary and mobile-sections on wikidata description change (5004ms) ✓ Should update RESTBase summary and mobile-sections on wikidata description revert (5002ms) ✓ Should update RESTBase summary and mobile-sections on wikidata undelete (5002ms) ✓ Should not ask Wikidata for info for non-main namespace titles (7003ms) ✓ Should not crash if wikidata description can not be found (5003ms) ✓ Should rerender image usages on file update (509ms) ✓ Should rerender transclusions on page update (504ms) ✓ Should process backlinks, on create (505ms) ✓ Should process backlinks, on delete (503ms) ✓ Should process backlinks, on undelete (503ms) ✓ Should purge caches on resource_change coming from RESTBase (107ms) ✓ Should purge caches on resource_change coming from Tilerator (98ms) 73 passing (2m) --- end --- $ /usr/bin/npm audit --json --- stdout --- { "auditReportVersion": 2, "vulnerabilities": { "busboy": { "name": "busboy", "severity": "high", "isDirect": false, "via": [ "dicer" ], "effects": [ "hyperswitch" ], "range": "<=0.3.1", "nodes": [ "node_modules/busboy" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "coveralls": { "name": "coveralls", "severity": "moderate", "isDirect": true, "via": [ "request" ], "effects": [], "range": "*", "nodes": [ "node_modules/coveralls" ], "fixAvailable": false }, "debug": { "name": "debug", "severity": "low", "isDirect": false, "via": [ { "source": 1096792, "name": "debug", "dependency": "debug", "title": "Regular Expression Denial of Service in debug", "url": "https://github.com/advisories/GHSA-gxpj-cx7g-858c", "severity": "low", "cwe": [ "CWE-400" ], "cvss": { "score": 3.7, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L" }, "range": ">=4.0.0 <4.3.1" } ], "effects": [], "range": "4.0.0 - 4.3.0", "nodes": [ "node_modules/gc-stats/node_modules/debug" ], "fixAvailable": true }, "dicer": { "name": "dicer", "severity": "high", "isDirect": false, "via": [ { "source": 1093150, "name": "dicer", "dependency": "dicer", "title": "Crash in HeaderParser in dicer", "url": "https://github.com/advisories/GHSA-wm7h-9275-46v2", "severity": "high", "cwe": [ "CWE-248" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<=0.3.1" } ], "effects": [ "busboy" ], "range": "*", "nodes": [ "node_modules/dicer" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "hyperswitch": { "name": "hyperswitch", "severity": "high", "isDirect": true, "via": [ "busboy", "preq", "swagger-ui-dist" ], "effects": [], "range": ">=0.1.0", "nodes": [ "node_modules/hyperswitch" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "ini": { "name": "ini", "severity": "high", "isDirect": false, "via": [ { "source": 1093224, "name": "ini", "dependency": "ini", "title": "ini before 1.3.6 vulnerable to Prototype Pollution via ini.parse", "url": "https://github.com/advisories/GHSA-qqgx-2p2h-9c37", "severity": "high", "cwe": [ "CWE-1321" ], "cvss": { "score": 7.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L" }, "range": "<1.3.6" } ], "effects": [], "range": "<1.3.6", "nodes": [ "node_modules/gc-stats/node_modules/ini" ], "fixAvailable": true }, "limitation": { "name": "limitation", "severity": "moderate", "isDirect": false, "via": [ "wikimedia-kad-fork" ], "effects": [], "range": ">=0.2.3", "nodes": [ "node_modules/limitation" ], "fixAvailable": true }, "minimatch": { "name": "minimatch", "severity": "high", "isDirect": false, "via": [ { "source": 1096485, "name": "minimatch", "dependency": "minimatch", "title": "minimatch ReDoS vulnerability", "url": "https://github.com/advisories/GHSA-f8q6-p94x-37v3", "severity": "high", "cwe": [ "CWE-400", "CWE-1333" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<3.0.5" } ], "effects": [ "mocha" ], "range": "<3.0.5", "nodes": [ "node_modules/gc-stats/node_modules/minimatch", "node_modules/minimatch" ], "fixAvailable": { "name": "mocha", "version": "11.1.0", "isSemVerMajor": true } }, "minimist": { "name": "minimist", "severity": "critical", "isDirect": false, "via": [ { "source": 1096465, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L" }, "range": ">=1.0.0 <1.2.3" }, { "source": 1096466, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L" }, "range": "<0.2.1" }, { "source": 1097677, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": [ "CWE-1321" ], "cvss": { "score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H" }, "range": "<0.2.4" }, { "source": 1097678, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": [ "CWE-1321" ], "cvss": { "score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H" }, "range": ">=1.0.0 <1.2.6" } ], "effects": [ "mkdirp" ], "range": "<=0.2.3 || 1.0.0 - 1.2.5", "nodes": [ "node_modules/gc-stats/node_modules/minimist", "node_modules/gc-stats/node_modules/rc/node_modules/minimist" ], "fixAvailable": true }, "mkdirp": { "name": "mkdirp", "severity": "critical", "isDirect": false, "via": [ "minimist" ], "effects": [], "range": "0.4.1 - 0.5.1", "nodes": [ "node_modules/gc-stats/node_modules/mkdirp" ], "fixAvailable": true }, "mocha": { "name": "mocha", "severity": "high", "isDirect": true, "via": [ "minimatch", "nanoid" ], "effects": [], "range": "5.1.0 - 10.2.0", "nodes": [ "node_modules/mocha" ], "fixAvailable": { "name": "mocha", "version": "11.1.0", "isSemVerMajor": true } }, "ms": { "name": "ms", "severity": "moderate", "isDirect": false, "via": [ { "source": 1094419, "name": "ms", "dependency": "ms", "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability", "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f", "severity": "moderate", "cwe": [ "CWE-1333" ], "cvss": { "score": 5.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L" }, "range": "<2.0.0" } ], "effects": [ "wikimedia-kad-fork" ], "range": "<2.0.0", "nodes": [ "node_modules/ms" ], "fixAvailable": true }, "nanoid": { "name": "nanoid", "severity": "moderate", "isDirect": false, "via": [ { "source": 1089011, "name": "nanoid", "dependency": "nanoid", "title": "Exposure of Sensitive Information to an Unauthorized Actor in nanoid", "url": "https://github.com/advisories/GHSA-qrpm-p2h7-hrv2", "severity": "moderate", "cwe": [ "CWE-200" ], "cvss": { "score": 5.5, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N" }, "range": ">=3.0.0 <3.1.31" }, { "source": 1101163, "name": "nanoid", "dependency": "nanoid", "title": "Predictable results in nanoid generation when given non-integer values", "url": "https://github.com/advisories/GHSA-mwcw-c2x4-8c55", "severity": "moderate", "cwe": [ "CWE-835" ], "cvss": { "score": 4.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N" }, "range": "<3.3.8" } ], "effects": [ "mocha" ], "range": "<=3.3.7", "nodes": [ "node_modules/nanoid" ], "fixAvailable": { "name": "mocha", "version": "11.1.0", "isSemVerMajor": true } }, "preq": { "name": "preq", "severity": "high", "isDirect": true, "via": [ "request", "requestretry" ], "effects": [], "range": "*", "nodes": [ "node_modules/preq" ], "fixAvailable": false }, "request": { "name": "request", "severity": "moderate", "isDirect": false, "via": [ { "source": 1096727, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": [ "CWE-918" ], "cvss": { "score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N" }, "range": "<=2.88.2" }, "tough-cookie" ], "effects": [ "coveralls", "preq", "requestretry" ], "range": "*", "nodes": [ "node_modules/request" ], "fixAvailable": false }, "requestretry": { "name": "requestretry", "severity": "high", "isDirect": false, "via": [ { "source": 1090420, "name": "requestretry", "dependency": "requestretry", "title": "Cookie exposure in requestretry", "url": "https://github.com/advisories/GHSA-hjp8-2cm3-cc45", "severity": "high", "cwe": [ "CWE-200" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N" }, "range": "<7.0.0" }, "request" ], "effects": [ "preq" ], "range": "*", "nodes": [ "node_modules/requestretry" ], "fixAvailable": false }, "semver": { "name": "semver", "severity": "high", "isDirect": false, "via": [ { "source": 1101089, "name": "semver", "dependency": "semver", "title": "semver vulnerable to Regular Expression Denial of Service", "url": "https://github.com/advisories/GHSA-c2qf-rxjj-qqgw", "severity": "high", "cwe": [ "CWE-1333" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<5.7.2" } ], "effects": [], "range": "<5.7.2", "nodes": [ "node_modules/gc-stats/node_modules/semver" ], "fixAvailable": true }, "swagger-ui-dist": { "name": "swagger-ui-dist", "severity": "moderate", "isDirect": false, "via": [ { "source": 1088759, "name": "swagger-ui-dist", "dependency": "swagger-ui-dist", "title": "Spoofing attack in swagger-ui-dist", "url": "https://github.com/advisories/GHSA-6c9x-mj3g-h47x", "severity": "moderate", "cwe": [ "CWE-1021" ], "cvss": { "score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N" }, "range": "<4.1.3" }, { "source": 1092160, "name": "swagger-ui-dist", "dependency": "swagger-ui-dist", "title": "Server side request forgery in SwaggerUI", "url": "https://github.com/advisories/GHSA-qrmm-w75w-3wpx", "severity": "moderate", "cwe": [ "CWE-918" ], "cvss": { "score": 0, "vectorString": null }, "range": "<4.1.3" } ], "effects": [ "hyperswitch" ], "range": "<=4.1.2", "nodes": [ "node_modules/swagger-ui-dist" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "tar": { "name": "tar", "severity": "high", "isDirect": false, "via": [ { "source": 1089684, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization", "url": "https://github.com/advisories/GHSA-3jfq-g458-7qm9", "severity": "high", "cwe": [ "CWE-22" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=4.0.0 <4.4.14" }, { "source": 1095117, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization", "url": "https://github.com/advisories/GHSA-5955-9wpr-37jh", "severity": "high", "cwe": [ "CWE-22" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": "<4.4.18" }, { "source": 1096309, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning", "url": "https://github.com/advisories/GHSA-r628-mhmh-qjhw", "severity": "high", "cwe": [ "CWE-22", "CWE-23", "CWE-59" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=4.0.0 <4.4.15" }, { "source": 1096376, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links", "url": "https://github.com/advisories/GHSA-9r2w-394v-53qc", "severity": "high", "cwe": [ "CWE-22", "CWE-59" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=3.0.0 <4.4.16" }, { "source": 1096411, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links", "url": "https://github.com/advisories/GHSA-qq89-hq3f-393p", "severity": "high", "cwe": [ "CWE-22", "CWE-59" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=3.0.0 <4.4.18" }, { "source": 1097493, "name": "tar", "dependency": "tar", "title": "Denial of service while parsing a tar file due to lack of folders count validation", "url": "https://github.com/advisories/GHSA-f5x3-32g6-xq36", "severity": "moderate", "cwe": [ "CWE-400" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H" }, "range": "<6.2.1" } ], "effects": [], "range": "<=6.2.0", "nodes": [ "node_modules/gc-stats/node_modules/tar" ], "fixAvailable": true }, "tough-cookie": { "name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [ { "source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N" }, "range": "<4.1.3" } ], "effects": [ "request" ], "range": "<4.1.3", "nodes": [ "node_modules/tough-cookie" ], "fixAvailable": false }, "wikimedia-kad-fork": { "name": "wikimedia-kad-fork", "severity": "moderate", "isDirect": false, "via": [ "ms" ], "effects": [ "limitation" ], "range": "*", "nodes": [ "node_modules/wikimedia-kad-fork" ], "fixAvailable": true } }, "metadata": { "vulnerabilities": { "info": 0, "low": 1, "moderate": 8, "high": 10, "critical": 2, "total": 21 }, "dependencies": { "prod": 154, "dev": 453, "optional": 78, "peer": 1, "peerOptional": 0, "total": 683 } } } --- end --- Attempting to npm audit fix $ /usr/bin/npm audit fix --dry-run --only=dev --json --- stderr --- npm WARN invalid config only="dev" set in command line options npm WARN invalid config Must be one of: null, prod, production npm WARN audit fix semver@5.7.0 node_modules/gc-stats/node_modules/semver npm WARN audit fix semver@5.7.0 is a bundled dependency of npm WARN audit fix semver@5.7.0 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix semver@5.7.0 It cannot be fixed automatically. npm WARN audit fix semver@5.7.0 Check for updates to the gc-stats package. npm WARN audit fix minimatch@3.0.4 node_modules/gc-stats/node_modules/minimatch npm WARN audit fix minimatch@3.0.4 is a bundled dependency of npm WARN audit fix minimatch@3.0.4 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix minimatch@3.0.4 It cannot be fixed automatically. npm WARN audit fix minimatch@3.0.4 Check for updates to the gc-stats package. npm WARN audit fix debug@4.1.1 node_modules/gc-stats/node_modules/debug npm WARN audit fix debug@4.1.1 is a bundled dependency of npm WARN audit fix debug@4.1.1 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix debug@4.1.1 It cannot be fixed automatically. npm WARN audit fix debug@4.1.1 Check for updates to the gc-stats package. npm WARN audit fix ini@1.3.5 node_modules/gc-stats/node_modules/ini npm WARN audit fix ini@1.3.5 is a bundled dependency of npm WARN audit fix ini@1.3.5 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix ini@1.3.5 It cannot be fixed automatically. npm WARN audit fix ini@1.3.5 Check for updates to the gc-stats package. npm WARN audit fix minimist@0.0.8 node_modules/gc-stats/node_modules/minimist npm WARN audit fix minimist@0.0.8 is a bundled dependency of npm WARN audit fix minimist@0.0.8 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix minimist@0.0.8 It cannot be fixed automatically. npm WARN audit fix minimist@0.0.8 Check for updates to the gc-stats package. npm WARN audit fix minimist@1.2.0 node_modules/gc-stats/node_modules/rc/node_modules/minimist npm WARN audit fix minimist@1.2.0 is a bundled dependency of npm WARN audit fix minimist@1.2.0 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix minimist@1.2.0 It cannot be fixed automatically. npm WARN audit fix minimist@1.2.0 Check for updates to the gc-stats package. npm WARN audit fix tar@4.4.8 node_modules/gc-stats/node_modules/tar npm WARN audit fix tar@4.4.8 is a bundled dependency of npm WARN audit fix tar@4.4.8 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix tar@4.4.8 It cannot be fixed automatically. npm WARN audit fix tar@4.4.8 Check for updates to the gc-stats package. npm WARN audit fix mkdirp@0.5.1 node_modules/gc-stats/node_modules/mkdirp npm WARN audit fix mkdirp@0.5.1 is a bundled dependency of npm WARN audit fix mkdirp@0.5.1 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix mkdirp@0.5.1 It cannot be fixed automatically. npm WARN audit fix mkdirp@0.5.1 Check for updates to the gc-stats package. npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'change-propagation@0.13.0', npm WARN EBADENGINE required: { node: '>=20' }, npm WARN EBADENGINE current: { node: 'v18.19.0', npm: '9.2.0' } npm WARN EBADENGINE } --- stdout --- { "added": 1, "removed": 0, "changed": 0, "audited": 684, "funding": 75, "audit": { "auditReportVersion": 2, "vulnerabilities": { "busboy": { "name": "busboy", "severity": "high", "isDirect": false, "via": [ "dicer" ], "effects": [ "hyperswitch" ], "range": "<=0.3.1", "nodes": [ "node_modules/busboy" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "coveralls": { "name": "coveralls", "severity": "moderate", "isDirect": true, "via": [ "request" ], "effects": [], "range": "*", "nodes": [ "node_modules/coveralls" ], "fixAvailable": false }, "debug": { "name": "debug", "severity": "low", "isDirect": false, "via": [ { "source": 1096792, "name": "debug", "dependency": "debug", "title": "Regular Expression Denial of Service in debug", "url": "https://github.com/advisories/GHSA-gxpj-cx7g-858c", "severity": "low", "cwe": [ "CWE-400" ], "cvss": { "score": 3.7, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L" }, "range": ">=4.0.0 <4.3.1" } ], "effects": [], "range": "4.0.0 - 4.3.0", "nodes": [ "" ], "fixAvailable": true }, "dicer": { "name": "dicer", "severity": "high", "isDirect": false, "via": [ { "source": 1093150, "name": "dicer", "dependency": "dicer", "title": "Crash in HeaderParser in dicer", "url": "https://github.com/advisories/GHSA-wm7h-9275-46v2", "severity": "high", "cwe": [ "CWE-248" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<=0.3.1" } ], "effects": [ "busboy" ], "range": "*", "nodes": [ "node_modules/dicer" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "hyperswitch": { "name": "hyperswitch", "severity": "high", "isDirect": true, "via": [ "busboy", "preq", "swagger-ui-dist" ], "effects": [], "range": ">=0.1.0", "nodes": [ "node_modules/hyperswitch" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "ini": { "name": "ini", "severity": "high", "isDirect": false, "via": [ { "source": 1093224, "name": "ini", "dependency": "ini", "title": "ini before 1.3.6 vulnerable to Prototype Pollution via ini.parse", "url": "https://github.com/advisories/GHSA-qqgx-2p2h-9c37", "severity": "high", "cwe": [ "CWE-1321" ], "cvss": { "score": 7.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L" }, "range": "<1.3.6" } ], "effects": [], "range": "<1.3.6", "nodes": [ "" ], "fixAvailable": true }, "limitation": { "name": "limitation", "severity": "moderate", "isDirect": false, "via": [ "wikimedia-kad-fork" ], "effects": [], "range": ">=0.2.3", "nodes": [ "node_modules/limitation" ], "fixAvailable": true }, "minimatch": { "name": "minimatch", "severity": "high", "isDirect": false, "via": [ { "source": 1096485, "name": "minimatch", "dependency": "minimatch", "title": "minimatch ReDoS vulnerability", "url": "https://github.com/advisories/GHSA-f8q6-p94x-37v3", "severity": "high", "cwe": [ "CWE-400", "CWE-1333" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<3.0.5" } ], "effects": [ "mocha" ], "range": "<3.0.5", "nodes": [ "", "node_modules/minimatch" ], "fixAvailable": { "name": "mocha", "version": "11.1.0", "isSemVerMajor": true } }, "minimist": { "name": "minimist", "severity": "critical", "isDirect": true, "via": [ { "source": 1096465, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L" }, "range": ">=1.0.0 <1.2.3" }, { "source": 1096466, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L" }, "range": "<0.2.1" }, { "source": 1097677, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": [ "CWE-1321" ], "cvss": { "score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H" }, "range": "<0.2.4" }, { "source": 1097678, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": [ "CWE-1321" ], "cvss": { "score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H" }, "range": ">=1.0.0 <1.2.6" } ], "effects": [ "mkdirp" ], "range": "<=0.2.3 || 1.0.0 - 1.2.5", "nodes": [ "", "node_modules/minimist" ], "fixAvailable": true }, "mkdirp": { "name": "mkdirp", "severity": "critical", "isDirect": false, "via": [ "minimist" ], "effects": [], "range": "0.4.1 - 0.5.1", "nodes": [ "" ], "fixAvailable": true }, "mocha": { "name": "mocha", "severity": "high", "isDirect": true, "via": [ "minimatch", "nanoid" ], "effects": [], "range": "5.1.0 - 10.2.0", "nodes": [ "node_modules/mocha" ], "fixAvailable": { "name": "mocha", "version": "11.1.0", "isSemVerMajor": true } }, "ms": { "name": "ms", "severity": "moderate", "isDirect": false, "via": [ { "source": 1094419, "name": "ms", "dependency": "ms", "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability", "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f", "severity": "moderate", "cwe": [ "CWE-1333" ], "cvss": { "score": 5.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L" }, "range": "<2.0.0" } ], "effects": [ "wikimedia-kad-fork" ], "range": "<2.0.0", "nodes": [ "node_modules/ms" ], "fixAvailable": true }, "nanoid": { "name": "nanoid", "severity": "moderate", "isDirect": false, "via": [ { "source": 1089011, "name": "nanoid", "dependency": "nanoid", "title": "Exposure of Sensitive Information to an Unauthorized Actor in nanoid", "url": "https://github.com/advisories/GHSA-qrpm-p2h7-hrv2", "severity": "moderate", "cwe": [ "CWE-200" ], "cvss": { "score": 5.5, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N" }, "range": ">=3.0.0 <3.1.31" }, { "source": 1101163, "name": "nanoid", "dependency": "nanoid", "title": "Predictable results in nanoid generation when given non-integer values", "url": "https://github.com/advisories/GHSA-mwcw-c2x4-8c55", "severity": "moderate", "cwe": [ "CWE-835" ], "cvss": { "score": 4.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N" }, "range": "<3.3.8" } ], "effects": [ "mocha" ], "range": "<=3.3.7", "nodes": [ "node_modules/nanoid" ], "fixAvailable": { "name": "mocha", "version": "11.1.0", "isSemVerMajor": true } }, "preq": { "name": "preq", "severity": "high", "isDirect": true, "via": [ "request", "requestretry" ], "effects": [], "range": "*", "nodes": [ "node_modules/preq" ], "fixAvailable": false }, "request": { "name": "request", "severity": "moderate", "isDirect": false, "via": [ { "source": 1096727, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": [ "CWE-918" ], "cvss": { "score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N" }, "range": "<=2.88.2" }, "tough-cookie" ], "effects": [ "coveralls", "preq", "requestretry" ], "range": "*", "nodes": [ "node_modules/request" ], "fixAvailable": false }, "requestretry": { "name": "requestretry", "severity": "high", "isDirect": false, "via": [ { "source": 1090420, "name": "requestretry", "dependency": "requestretry", "title": "Cookie exposure in requestretry", "url": "https://github.com/advisories/GHSA-hjp8-2cm3-cc45", "severity": "high", "cwe": [ "CWE-200" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N" }, "range": "<7.0.0" }, "request" ], "effects": [ "preq" ], "range": "*", "nodes": [ "node_modules/requestretry" ], "fixAvailable": false }, "semver": { "name": "semver", "severity": "high", "isDirect": false, "via": [ { "source": 1101089, "name": "semver", "dependency": "semver", "title": "semver vulnerable to Regular Expression Denial of Service", "url": "https://github.com/advisories/GHSA-c2qf-rxjj-qqgw", "severity": "high", "cwe": [ "CWE-1333" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<5.7.2" } ], "effects": [], "range": "<5.7.2", "nodes": [ "" ], "fixAvailable": true }, "swagger-ui-dist": { "name": "swagger-ui-dist", "severity": "moderate", "isDirect": false, "via": [ { "source": 1088759, "name": "swagger-ui-dist", "dependency": "swagger-ui-dist", "title": "Spoofing attack in swagger-ui-dist", "url": "https://github.com/advisories/GHSA-6c9x-mj3g-h47x", "severity": "moderate", "cwe": [ "CWE-1021" ], "cvss": { "score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N" }, "range": "<4.1.3" }, { "source": 1092160, "name": "swagger-ui-dist", "dependency": "swagger-ui-dist", "title": "Server side request forgery in SwaggerUI", "url": "https://github.com/advisories/GHSA-qrmm-w75w-3wpx", "severity": "moderate", "cwe": [ "CWE-918" ], "cvss": { "score": 0, "vectorString": null }, "range": "<4.1.3" } ], "effects": [ "hyperswitch" ], "range": "<=4.1.2", "nodes": [ "node_modules/swagger-ui-dist" ], "fixAvailable": { "name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true } }, "tar": { "name": "tar", "severity": "high", "isDirect": false, "via": [ { "source": 1089684, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization", "url": "https://github.com/advisories/GHSA-3jfq-g458-7qm9", "severity": "high", "cwe": [ "CWE-22" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=4.0.0 <4.4.14" }, { "source": 1095117, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization", "url": "https://github.com/advisories/GHSA-5955-9wpr-37jh", "severity": "high", "cwe": [ "CWE-22" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": "<4.4.18" }, { "source": 1096309, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning", "url": "https://github.com/advisories/GHSA-r628-mhmh-qjhw", "severity": "high", "cwe": [ "CWE-22", "CWE-23", "CWE-59" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=4.0.0 <4.4.15" }, { "source": 1096376, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links", "url": "https://github.com/advisories/GHSA-9r2w-394v-53qc", "severity": "high", "cwe": [ "CWE-22", "CWE-59" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=3.0.0 <4.4.16" }, { "source": 1096411, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links", "url": "https://github.com/advisories/GHSA-qq89-hq3f-393p", "severity": "high", "cwe": [ "CWE-22", "CWE-59" ], "cvss": { "score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N" }, "range": ">=3.0.0 <4.4.18" }, { "source": 1097493, "name": "tar", "dependency": "tar", "title": "Denial of service while parsing a tar file due to lack of folders count validation", "url": "https://github.com/advisories/GHSA-f5x3-32g6-xq36", "severity": "moderate", "cwe": [ "CWE-400" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H" }, "range": "<6.2.1" } ], "effects": [], "range": "<=6.2.0", "nodes": [ "" ], "fixAvailable": true }, "tough-cookie": { "name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [ { "source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N" }, "range": "<4.1.3" } ], "effects": [ "request" ], "range": "<4.1.3", "nodes": [ "node_modules/tough-cookie" ], "fixAvailable": false }, "wikimedia-kad-fork": { "name": "wikimedia-kad-fork", "severity": "moderate", "isDirect": false, "via": [ "ms" ], "effects": [ "limitation" ], "range": "*", "nodes": [ "node_modules/wikimedia-kad-fork" ], "fixAvailable": true } }, "metadata": { "vulnerabilities": { "info": 0, "low": 1, "moderate": 8, "high": 10, "critical": 2, "total": 21 }, "dependencies": { "prod": 154, "dev": 453, "optional": 78, "peer": 1, "peerOptional": 0, "total": 683 } } } } --- end --- {"added": 1, "removed": 0, "changed": 0, "audited": 684, "funding": 75, "audit": {"auditReportVersion": 2, "vulnerabilities": {"busboy": {"name": "busboy", "severity": "high", "isDirect": false, "via": ["dicer"], "effects": ["hyperswitch"], "range": "<=0.3.1", "nodes": ["node_modules/busboy"], "fixAvailable": {"name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true}}, "coveralls": {"name": "coveralls", "severity": "moderate", "isDirect": true, "via": ["request"], "effects": [], "range": "*", "nodes": ["node_modules/coveralls"], "fixAvailable": false}, "debug": {"name": "debug", "severity": "low", "isDirect": false, "via": [{"source": 1096792, "name": "debug", "dependency": "debug", "title": "Regular Expression Denial of Service in debug", "url": "https://github.com/advisories/GHSA-gxpj-cx7g-858c", "severity": "low", "cwe": ["CWE-400"], "cvss": {"score": 3.7, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"}, "range": ">=4.0.0 <4.3.1"}], "effects": [], "range": "4.0.0 - 4.3.0", "nodes": [""], "fixAvailable": true}, "dicer": {"name": "dicer", "severity": "high", "isDirect": false, "via": [{"source": 1093150, "name": "dicer", "dependency": "dicer", "title": "Crash in HeaderParser in dicer", "url": "https://github.com/advisories/GHSA-wm7h-9275-46v2", "severity": "high", "cwe": ["CWE-248"], "cvss": {"score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}, "range": "<=0.3.1"}], "effects": ["busboy"], "range": "*", "nodes": ["node_modules/dicer"], "fixAvailable": {"name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true}}, "hyperswitch": {"name": "hyperswitch", "severity": "high", "isDirect": true, "via": ["busboy", "preq", "swagger-ui-dist"], "effects": [], "range": ">=0.1.0", "nodes": ["node_modules/hyperswitch"], "fixAvailable": {"name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true}}, "ini": {"name": "ini", "severity": "high", "isDirect": false, "via": [{"source": 1093224, "name": "ini", "dependency": "ini", "title": "ini before 1.3.6 vulnerable to Prototype Pollution via ini.parse", "url": "https://github.com/advisories/GHSA-qqgx-2p2h-9c37", "severity": "high", "cwe": ["CWE-1321"], "cvss": {"score": 7.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"}, "range": "<1.3.6"}], "effects": [], "range": "<1.3.6", "nodes": [""], "fixAvailable": true}, "limitation": {"name": "limitation", "severity": "moderate", "isDirect": false, "via": ["wikimedia-kad-fork"], "effects": [], "range": ">=0.2.3", "nodes": ["node_modules/limitation"], "fixAvailable": true}, "minimatch": {"name": "minimatch", "severity": "high", "isDirect": false, "via": [{"source": 1096485, "name": "minimatch", "dependency": "minimatch", "title": "minimatch ReDoS vulnerability", "url": "https://github.com/advisories/GHSA-f8q6-p94x-37v3", "severity": "high", "cwe": ["CWE-400", "CWE-1333"], "cvss": {"score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}, "range": "<3.0.5"}], "effects": ["mocha"], "range": "<3.0.5", "nodes": ["", "node_modules/minimatch"], "fixAvailable": {"name": "mocha", "version": "11.1.0", "isSemVerMajor": true}}, "minimist": {"name": "minimist", "severity": "critical", "isDirect": true, "via": [{"source": 1096465, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": ["CWE-1321"], "cvss": {"score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"}, "range": ">=1.0.0 <1.2.3"}, {"source": 1096466, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": ["CWE-1321"], "cvss": {"score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"}, "range": "<0.2.1"}, {"source": 1097677, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": ["CWE-1321"], "cvss": {"score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}, "range": "<0.2.4"}, {"source": 1097678, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": ["CWE-1321"], "cvss": {"score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}, "range": ">=1.0.0 <1.2.6"}], "effects": ["mkdirp"], "range": "<=0.2.3 || 1.0.0 - 1.2.5", "nodes": ["", "node_modules/minimist"], "fixAvailable": true}, "mkdirp": {"name": "mkdirp", "severity": "critical", "isDirect": false, "via": ["minimist"], "effects": [], "range": "0.4.1 - 0.5.1", "nodes": [""], "fixAvailable": true}, "mocha": {"name": "mocha", "severity": "high", "isDirect": true, "via": ["minimatch", "nanoid"], "effects": [], "range": "5.1.0 - 10.2.0", "nodes": ["node_modules/mocha"], "fixAvailable": {"name": "mocha", "version": "11.1.0", "isSemVerMajor": true}}, "ms": {"name": "ms", "severity": "moderate", "isDirect": false, "via": [{"source": 1094419, "name": "ms", "dependency": "ms", "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability", "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f", "severity": "moderate", "cwe": ["CWE-1333"], "cvss": {"score": 5.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"}, "range": "<2.0.0"}], "effects": ["wikimedia-kad-fork"], "range": "<2.0.0", "nodes": ["node_modules/ms"], "fixAvailable": true}, "nanoid": {"name": "nanoid", "severity": "moderate", "isDirect": false, "via": [{"source": 1089011, "name": "nanoid", "dependency": "nanoid", "title": "Exposure of Sensitive Information to an Unauthorized Actor in nanoid", "url": "https://github.com/advisories/GHSA-qrpm-p2h7-hrv2", "severity": "moderate", "cwe": ["CWE-200"], "cvss": {"score": 5.5, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"}, "range": ">=3.0.0 <3.1.31"}, {"source": 1101163, "name": "nanoid", "dependency": "nanoid", "title": "Predictable results in nanoid generation when given non-integer values", "url": "https://github.com/advisories/GHSA-mwcw-c2x4-8c55", "severity": "moderate", "cwe": ["CWE-835"], "cvss": {"score": 4.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"}, "range": "<3.3.8"}], "effects": ["mocha"], "range": "<=3.3.7", "nodes": ["node_modules/nanoid"], "fixAvailable": {"name": "mocha", "version": "11.1.0", "isSemVerMajor": true}}, "preq": {"name": "preq", "severity": "high", "isDirect": true, "via": ["request", "requestretry"], "effects": [], "range": "*", "nodes": ["node_modules/preq"], "fixAvailable": false}, "request": {"name": "request", "severity": "moderate", "isDirect": false, "via": [{"source": 1096727, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": ["CWE-918"], "cvss": {"score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}, "range": "<=2.88.2"}, "tough-cookie"], "effects": ["coveralls", "preq", "requestretry"], "range": "*", "nodes": ["node_modules/request"], "fixAvailable": false}, "requestretry": {"name": "requestretry", "severity": "high", "isDirect": false, "via": [{"source": 1090420, "name": "requestretry", "dependency": "requestretry", "title": "Cookie exposure in requestretry", "url": "https://github.com/advisories/GHSA-hjp8-2cm3-cc45", "severity": "high", "cwe": ["CWE-200"], "cvss": {"score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}, "range": "<7.0.0"}, "request"], "effects": ["preq"], "range": "*", "nodes": ["node_modules/requestretry"], "fixAvailable": false}, "semver": {"name": "semver", "severity": "high", "isDirect": false, "via": [{"source": 1101089, "name": "semver", "dependency": "semver", "title": "semver vulnerable to Regular Expression Denial of Service", "url": "https://github.com/advisories/GHSA-c2qf-rxjj-qqgw", "severity": "high", "cwe": ["CWE-1333"], "cvss": {"score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}, "range": "<5.7.2"}], "effects": [], "range": "<5.7.2", "nodes": [""], "fixAvailable": true}, "swagger-ui-dist": {"name": "swagger-ui-dist", "severity": "moderate", "isDirect": false, "via": [{"source": 1088759, "name": "swagger-ui-dist", "dependency": "swagger-ui-dist", "title": "Spoofing attack in swagger-ui-dist", "url": "https://github.com/advisories/GHSA-6c9x-mj3g-h47x", "severity": "moderate", "cwe": ["CWE-1021"], "cvss": {"score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}, "range": "<4.1.3"}, {"source": 1092160, "name": "swagger-ui-dist", "dependency": "swagger-ui-dist", "title": "Server side request forgery in SwaggerUI", "url": "https://github.com/advisories/GHSA-qrmm-w75w-3wpx", "severity": "moderate", "cwe": ["CWE-918"], "cvss": {"score": 0, "vectorString": null}, "range": "<4.1.3"}], "effects": ["hyperswitch"], "range": "<=4.1.2", "nodes": ["node_modules/swagger-ui-dist"], "fixAvailable": {"name": "hyperswitch", "version": "0.10.5", "isSemVerMajor": true}}, "tar": {"name": "tar", "severity": "high", "isDirect": false, "via": [{"source": 1089684, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization", "url": "https://github.com/advisories/GHSA-3jfq-g458-7qm9", "severity": "high", "cwe": ["CWE-22"], "cvss": {"score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"}, "range": ">=4.0.0 <4.4.14"}, {"source": 1095117, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization", "url": "https://github.com/advisories/GHSA-5955-9wpr-37jh", "severity": "high", "cwe": ["CWE-22"], "cvss": {"score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"}, "range": "<4.4.18"}, {"source": 1096309, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning", "url": "https://github.com/advisories/GHSA-r628-mhmh-qjhw", "severity": "high", "cwe": ["CWE-22", "CWE-23", "CWE-59"], "cvss": {"score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"}, "range": ">=4.0.0 <4.4.15"}, {"source": 1096376, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links", "url": "https://github.com/advisories/GHSA-9r2w-394v-53qc", "severity": "high", "cwe": ["CWE-22", "CWE-59"], "cvss": {"score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"}, "range": ">=3.0.0 <4.4.16"}, {"source": 1096411, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links", "url": "https://github.com/advisories/GHSA-qq89-hq3f-393p", "severity": "high", "cwe": ["CWE-22", "CWE-59"], "cvss": {"score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"}, "range": ">=3.0.0 <4.4.18"}, {"source": 1097493, "name": "tar", "dependency": "tar", "title": "Denial of service while parsing a tar file due to lack of folders count validation", "url": "https://github.com/advisories/GHSA-f5x3-32g6-xq36", "severity": "moderate", "cwe": ["CWE-400"], "cvss": {"score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"}, "range": "<6.2.1"}], "effects": [], "range": "<=6.2.0", "nodes": [""], "fixAvailable": true}, "tough-cookie": {"name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [{"source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": ["CWE-1321"], "cvss": {"score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"}, "range": "<4.1.3"}], "effects": ["request"], "range": "<4.1.3", "nodes": ["node_modules/tough-cookie"], "fixAvailable": false}, "wikimedia-kad-fork": {"name": "wikimedia-kad-fork", "severity": "moderate", "isDirect": false, "via": ["ms"], "effects": ["limitation"], "range": "*", "nodes": ["node_modules/wikimedia-kad-fork"], "fixAvailable": true}}, "metadata": {"vulnerabilities": {"info": 0, "low": 1, "moderate": 8, "high": 10, "critical": 2, "total": 21}, "dependencies": {"prod": 154, "dev": 453, "optional": 78, "peer": 1, "peerOptional": 0, "total": 683}}}} $ /usr/bin/npm audit fix --only=dev --- stderr --- npm WARN invalid config only="dev" set in command line options npm WARN invalid config Must be one of: null, prod, production npm WARN audit fix semver@5.7.0 node_modules/gc-stats/node_modules/semver npm WARN audit fix semver@5.7.0 is a bundled dependency of npm WARN audit fix semver@5.7.0 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix semver@5.7.0 It cannot be fixed automatically. npm WARN audit fix semver@5.7.0 Check for updates to the gc-stats package. npm WARN audit fix minimatch@3.0.4 node_modules/gc-stats/node_modules/minimatch npm WARN audit fix minimatch@3.0.4 is a bundled dependency of npm WARN audit fix minimatch@3.0.4 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix minimatch@3.0.4 It cannot be fixed automatically. npm WARN audit fix minimatch@3.0.4 Check for updates to the gc-stats package. npm WARN audit fix debug@4.1.1 node_modules/gc-stats/node_modules/debug npm WARN audit fix debug@4.1.1 is a bundled dependency of npm WARN audit fix debug@4.1.1 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix debug@4.1.1 It cannot be fixed automatically. npm WARN audit fix debug@4.1.1 Check for updates to the gc-stats package. npm WARN audit fix ini@1.3.5 node_modules/gc-stats/node_modules/ini npm WARN audit fix ini@1.3.5 is a bundled dependency of npm WARN audit fix ini@1.3.5 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix ini@1.3.5 It cannot be fixed automatically. npm WARN audit fix ini@1.3.5 Check for updates to the gc-stats package. npm WARN audit fix minimist@0.0.8 node_modules/gc-stats/node_modules/minimist npm WARN audit fix minimist@0.0.8 is a bundled dependency of npm WARN audit fix minimist@0.0.8 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix minimist@0.0.8 It cannot be fixed automatically. npm WARN audit fix minimist@0.0.8 Check for updates to the gc-stats package. npm WARN audit fix minimist@1.2.0 node_modules/gc-stats/node_modules/rc/node_modules/minimist npm WARN audit fix minimist@1.2.0 is a bundled dependency of npm WARN audit fix minimist@1.2.0 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix minimist@1.2.0 It cannot be fixed automatically. npm WARN audit fix minimist@1.2.0 Check for updates to the gc-stats package. npm WARN audit fix tar@4.4.8 node_modules/gc-stats/node_modules/tar npm WARN audit fix tar@4.4.8 is a bundled dependency of npm WARN audit fix tar@4.4.8 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix tar@4.4.8 It cannot be fixed automatically. npm WARN audit fix tar@4.4.8 Check for updates to the gc-stats package. npm WARN audit fix mkdirp@0.5.1 node_modules/gc-stats/node_modules/mkdirp npm WARN audit fix mkdirp@0.5.1 is a bundled dependency of npm WARN audit fix mkdirp@0.5.1 gc-stats@1.4.0 at node_modules/gc-stats npm WARN audit fix mkdirp@0.5.1 It cannot be fixed automatically. npm WARN audit fix mkdirp@0.5.1 Check for updates to the gc-stats package. npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'change-propagation@0.13.0', npm WARN EBADENGINE required: { node: '>=20' }, npm WARN EBADENGINE current: { node: 'v18.19.0', npm: '9.2.0' } npm WARN EBADENGINE } --- stdout --- changed 1 package, and audited 683 packages in 2m 75 packages are looking for funding run `npm fund` for details # npm audit report debug 4.0.0 - 4.3.0 Regular Expression Denial of Service in debug - https://github.com/advisories/GHSA-gxpj-cx7g-858c fix available via `npm audit fix` node_modules/gc-stats/node_modules/debug dicer * Severity: high Crash in HeaderParser in dicer - https://github.com/advisories/GHSA-wm7h-9275-46v2 fix available via `npm audit fix --force` Will install hyperswitch@0.10.5, which is a breaking change node_modules/dicer busboy <=0.3.1 Depends on vulnerable versions of dicer node_modules/busboy hyperswitch >=0.1.0 Depends on vulnerable versions of busboy Depends on vulnerable versions of preq Depends on vulnerable versions of swagger-ui-dist node_modules/hyperswitch ini <1.3.6 Severity: high ini before 1.3.6 vulnerable to Prototype Pollution via ini.parse - https://github.com/advisories/GHSA-qqgx-2p2h-9c37 fix available via `npm audit fix` node_modules/gc-stats/node_modules/ini minimatch <3.0.5 Severity: high minimatch ReDoS vulnerability - https://github.com/advisories/GHSA-f8q6-p94x-37v3 fix available via `npm audit fix --force` Will install mocha@11.1.0, which is a breaking change node_modules/gc-stats/node_modules/minimatch node_modules/minimatch mocha 5.1.0 - 10.2.0 Depends on vulnerable versions of minimatch Depends on vulnerable versions of nanoid node_modules/mocha minimist <=0.2.3 || 1.0.0 - 1.2.5 Severity: critical Prototype Pollution in minimist - https://github.com/advisories/GHSA-vh95-rmgr-6w4m Prototype Pollution in minimist - https://github.com/advisories/GHSA-vh95-rmgr-6w4m Prototype Pollution in minimist - https://github.com/advisories/GHSA-xvch-5gv4-984h Prototype Pollution in minimist - https://github.com/advisories/GHSA-xvch-5gv4-984h fix available via `npm audit fix` node_modules/gc-stats/node_modules/minimist node_modules/gc-stats/node_modules/rc/node_modules/minimist mkdirp 0.4.1 - 0.5.1 Depends on vulnerable versions of minimist node_modules/gc-stats/node_modules/mkdirp ms <2.0.0 Severity: moderate Vercel ms Inefficient Regular Expression Complexity vulnerability - https://github.com/advisories/GHSA-w9mr-4mfr-499f fix available via `npm audit fix` node_modules/ms wikimedia-kad-fork * Depends on vulnerable versions of ms node_modules/wikimedia-kad-fork limitation >=0.2.3 Depends on vulnerable versions of wikimedia-kad-fork node_modules/limitation nanoid <=3.3.7 Severity: moderate Exposure of Sensitive Information to an Unauthorized Actor in nanoid - https://github.com/advisories/GHSA-qrpm-p2h7-hrv2 Predictable results in nanoid generation when given non-integer values - https://github.com/advisories/GHSA-mwcw-c2x4-8c55 fix available via `npm audit fix --force` Will install mocha@11.1.0, which is a breaking change node_modules/nanoid request * Severity: moderate Server-Side Request Forgery in Request - https://github.com/advisories/GHSA-p8p7-x288-28g6 Depends on vulnerable versions of tough-cookie No fix available node_modules/request coveralls * Depends on vulnerable versions of request node_modules/coveralls preq * Depends on vulnerable versions of request Depends on vulnerable versions of requestretry node_modules/preq requestretry * Depends on vulnerable versions of request node_modules/requestretry semver <5.7.2 Severity: high semver vulnerable to Regular Expression Denial of Service - https://github.com/advisories/GHSA-c2qf-rxjj-qqgw fix available via `npm audit fix` node_modules/gc-stats/node_modules/semver swagger-ui-dist <=4.1.2 Severity: moderate Spoofing attack in swagger-ui-dist - https://github.com/advisories/GHSA-6c9x-mj3g-h47x Server side request forgery in SwaggerUI - https://github.com/advisories/GHSA-qrmm-w75w-3wpx fix available via `npm audit fix --force` Will install hyperswitch@0.10.5, which is a breaking change node_modules/swagger-ui-dist tar <=6.2.0 Severity: high Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization - https://github.com/advisories/GHSA-3jfq-g458-7qm9 Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization - https://github.com/advisories/GHSA-5955-9wpr-37jh Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning - https://github.com/advisories/GHSA-r628-mhmh-qjhw Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links - https://github.com/advisories/GHSA-9r2w-394v-53qc Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links - https://github.com/advisories/GHSA-qq89-hq3f-393p Denial of service while parsing a tar file due to lack of folders count validation - https://github.com/advisories/GHSA-f5x3-32g6-xq36 fix available via `npm audit fix` node_modules/gc-stats/node_modules/tar tough-cookie <4.1.3 Severity: moderate tough-cookie Prototype Pollution vulnerability - https://github.com/advisories/GHSA-72xf-g2v4-qvf3 No fix available node_modules/tough-cookie 21 vulnerabilities (1 low, 8 moderate, 10 high, 2 critical) To address issues that do not require attention, run: npm audit fix To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. --- end --- Verifying that tests still pass $ /usr/bin/npm ci --- stderr --- npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'change-propagation@0.13.0', npm WARN EBADENGINE required: { node: '>=20' }, npm WARN EBADENGINE current: { node: 'v18.19.0', npm: '9.2.0' } npm WARN EBADENGINE } npm WARN deprecated kad-fs@0.0.4: This package is no longer maintained. npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated kad-memstore@0.0.1: This package is no longer maintained. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated json-schema-ref-parser@7.1.4: Please switch to @apidevtools/json-schema-ref-parser --- stdout --- added 616 packages, and audited 683 packages in 2m 75 packages are looking for funding run `npm fund` for details 21 vulnerabilities (1 low, 8 moderate, 10 high, 2 critical) To address issues that do not require attention, run: npm audit fix To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. --- end --- $ /usr/bin/npm test --- stdout --- > change-propagation@0.13.0 test > export MOCK_SERVICES=true && npm run lint && mocha --recursive > change-propagation@0.13.0 lint > eslint --cache --ext .js . /src/repo/lib/base_executor.js 267:14 warning Expected no linebreak before this expression implicit-arrow-linebreak 335:1 warning This line has a length of 108. Maximum allowed is 100 max-len /src/repo/lib/rule.js 69:1 warning This line has a length of 109. Maximum allowed is 100 max-len 272:1 warning This line has a length of 107. Maximum allowed is 100 max-len 286:1 warning This line has a length of 102. Maximum allowed is 100 max-len /src/repo/lib/rule_subscriber.js 69:1 warning This line has a length of 111. Maximum allowed is 100 max-len 70:1 warning This line has a length of 109. Maximum allowed is 100 max-len /src/repo/sys/deduplicator.js 9:28 warning ES2023 'Array.prototype.with' method is forbidden es-x/no-array-prototype-with /src/repo/sys/dep_updates.js 69:1 warning This line has a length of 105. Maximum allowed is 100 max-len /src/repo/sys/kafka.js 41:1 warning This line has a length of 113. Maximum allowed is 100 max-len /src/repo/sys/rate_limiter.js 9:27 warning ES2023 'Array.prototype.with' method is forbidden es-x/no-array-prototype-with ✖ 11 problems (0 errors, 11 warnings) JobQueue rules ✓ Should propagate updateBetaFeaturesUserCounts job (504ms) ✓ Should propagate cdnPurge job (3504ms) ✓ Should support partitioned refreshLinks (502ms) ✓ Should deduplicate based on ID (2004ms) ✓ Should deduplicate based on SHA1 (4003ms) ✓ Should deduplicate based on SHA1 and root job combination (4003ms) ✓ Should deduplicate base on root job (4003ms) ✓ Should support delayed jobs with re-enqueue (13011ms) Rule ✓ topic required ✓ no-op rule ✓ simple rule - one request ✓ simple rule - multiple requests Matching ✓ all ✓ simple value match ✓ simple value mismatch ✓ regex match ✓ regex match with undefined ✓ regex mismatch ✓ array match ✓ malformed match ✓ match_not ✓ match_not array ✓ matches match and match_not ✓ matches match but not match_not ✓ matches match_not but not match ✓ matches match but is canary event and should_discard_canary_events is true ✓ matches match and is canary event and should_discard_canary_events is false ✓ expansion ✓ expansion with named groups ✓ checks for named and unnamed groups mixing Sampler ✓ Should accept the correct number of values (84ms) Basic rule management ✓ Should call simple executor (502ms) ✓ Should retry simple executor (502ms) ✓ Should retry simple executor no more than limit (2002ms) ✓ Should emit valid retry message (2627ms) ✓ Should not retry if retry_on not matched (2002ms) ✓ Should not follow redirects (2001ms) ✓ Should not crash with unparsable JSON (501ms) ✓ Should support producing to topics on exec (502ms) ✓ Should emit valid messages to error topic (161ms) ✓ Sampling should only propagate a stable subset (2002ms) ✓ Should support array topics (502ms) ✓ Should support exclude_topics stanza (2001ms) update rules ✓ Should update summary endpoint (503ms) ✓ Should update summary endpoint, transcludes topic (502ms) ✓ Should update summary endpoint on page images change (503ms) ✓ Should not update summary for a blacklisted title (2002ms) ✓ Should update definition endpoint (503ms) ✓ Should not react to revision change event from restbase for definition endpoint (2002ms) ✓ Should update mobile apps endpoint (502ms) ✓ Should not update definition endpoint for non-main namespace (2002ms) ✓ Should update RESTBase on resource_change from MW (502ms) ✓ Should update RESTBase on revision create (503ms) ✓ Should not update RESTBase on revision create for a blacklisted title (2003ms) ✓ Should not update RESTBase on revision create for wikidata (2003ms) ✓ Should update RESTBase on page delete (502ms) ✓ Should update RESTBase on page undelete (502ms) ✓ Should update RESTBase on page move (503ms) ✓ Should update RESTBase on revision visibility change (502ms) ✓ Should update ORES on revision-create (697ms) ✓ Should update ORES on revision-create, error (501ms) ✓ Should update RESTBase summary and mobile-sections on wikidata description change (5003ms) ✓ Should update RESTBase summary and mobile-sections on wikidata description revert (5003ms) ✓ Should update RESTBase summary and mobile-sections on wikidata undelete (5002ms) ✓ Should not ask Wikidata for info for non-main namespace titles (7003ms) ✓ Should not crash if wikidata description can not be found (5003ms) ✓ Should rerender image usages on file update (507ms) ✓ Should rerender transclusions on page update (506ms) ✓ Should process backlinks, on create (509ms) ✓ Should process backlinks, on delete (506ms) ✓ Should process backlinks, on undelete (505ms) ✓ Should purge caches on resource_change coming from RESTBase ✓ Should purge caches on resource_change coming from Tilerator (98ms) 73 passing (2m) --- end --- {"1096792": {"source": 1096792, "name": "debug", "dependency": "debug", "title": "Regular Expression Denial of Service in debug", "url": "https://github.com/advisories/GHSA-gxpj-cx7g-858c", "severity": "low", "cwe": ["CWE-400"], "cvss": {"score": 3.7, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"}, "range": ">=4.0.0 <4.3.1"}} {"1093224": {"source": 1093224, "name": "ini", "dependency": "ini", "title": "ini before 1.3.6 vulnerable to Prototype Pollution via ini.parse", "url": "https://github.com/advisories/GHSA-qqgx-2p2h-9c37", "severity": "high", "cwe": ["CWE-1321"], "cvss": {"score": 7.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"}, "range": "<1.3.6"}} {"1094419": {"source": 1094419, "name": "ms", "dependency": "ms", "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability", "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f", "severity": "moderate", "cwe": ["CWE-1333"], "cvss": {"score": 5.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"}, "range": "<2.0.0"}} {"1096465": {"source": 1096465, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": ["CWE-1321"], "cvss": {"score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"}, "range": ">=1.0.0 <1.2.3"}, "1096466": {"source": 1096466, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": ["CWE-1321"], "cvss": {"score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"}, "range": "<0.2.1"}, "1097677": {"source": 1097677, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": ["CWE-1321"], "cvss": {"score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}, "range": "<0.2.4"}, "1097678": {"source": 1097678, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": ["CWE-1321"], "cvss": {"score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}, "range": ">=1.0.0 <1.2.6"}} {"1096465": {"source": 1096465, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": ["CWE-1321"], "cvss": {"score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"}, "range": ">=1.0.0 <1.2.3"}, "1096466": {"source": 1096466, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-vh95-rmgr-6w4m", "severity": "moderate", "cwe": ["CWE-1321"], "cvss": {"score": 5.6, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"}, "range": "<0.2.1"}, "1097677": {"source": 1097677, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": ["CWE-1321"], "cvss": {"score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}, "range": "<0.2.4"}, "1097678": {"source": 1097678, "name": "minimist", "dependency": "minimist", "title": "Prototype Pollution in minimist", "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h", "severity": "critical", "cwe": ["CWE-1321"], "cvss": {"score": 9.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}, "range": ">=1.0.0 <1.2.6"}} {"1094419": {"source": 1094419, "name": "ms", "dependency": "ms", "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability", "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f", "severity": "moderate", "cwe": ["CWE-1333"], "cvss": {"score": 5.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"}, "range": "<2.0.0"}} {"1101089": {"source": 1101089, "name": "semver", "dependency": "semver", "title": "semver vulnerable to Regular Expression Denial of Service", "url": "https://github.com/advisories/GHSA-c2qf-rxjj-qqgw", "severity": "high", "cwe": ["CWE-1333"], "cvss": {"score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}, "range": "<5.7.2"}} {"1089684": {"source": 1089684, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization", "url": "https://github.com/advisories/GHSA-3jfq-g458-7qm9", "severity": "high", "cwe": ["CWE-22"], "cvss": {"score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"}, "range": ">=4.0.0 <4.4.14"}, "1095117": {"source": 1095117, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization", "url": "https://github.com/advisories/GHSA-5955-9wpr-37jh", "severity": "high", "cwe": ["CWE-22"], "cvss": {"score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"}, "range": "<4.4.18"}, "1096309": {"source": 1096309, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning", "url": "https://github.com/advisories/GHSA-r628-mhmh-qjhw", "severity": "high", "cwe": ["CWE-22", "CWE-23", "CWE-59"], "cvss": {"score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"}, "range": ">=4.0.0 <4.4.15"}, "1096376": {"source": 1096376, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links", "url": "https://github.com/advisories/GHSA-9r2w-394v-53qc", "severity": "high", "cwe": ["CWE-22", "CWE-59"], "cvss": {"score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"}, "range": ">=3.0.0 <4.4.16"}, "1096411": {"source": 1096411, "name": "tar", "dependency": "tar", "title": "Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links", "url": "https://github.com/advisories/GHSA-qq89-hq3f-393p", "severity": "high", "cwe": ["CWE-22", "CWE-59"], "cvss": {"score": 8.2, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"}, "range": ">=3.0.0 <4.4.18"}, "1097493": {"source": 1097493, "name": "tar", "dependency": "tar", "title": "Denial of service while parsing a tar file due to lack of folders count validation", "url": "https://github.com/advisories/GHSA-f5x3-32g6-xq36", "severity": "moderate", "cwe": ["CWE-400"], "cvss": {"score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"}, "range": "<6.2.1"}} {"1094419": {"source": 1094419, "name": "ms", "dependency": "ms", "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability", "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f", "severity": "moderate", "cwe": ["CWE-1333"], "cvss": {"score": 5.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"}, "range": "<2.0.0"}} $ package-lock-lint package-lock.json --- stdout --- Checking package-lock.json --- end --- build: Updating eslint-config-wikimedia to 0.29.1 $ git add . --- stdout --- --- end --- $ git commit -F /tmp/tmprojnvfhj --- stdout --- [master c091e3f] build: Updating eslint-config-wikimedia to 0.29.1 2 files changed, 12 insertions(+), 9 deletions(-) --- end --- $ git format-patch HEAD~1 --stdout --- stdout --- From c091e3f230a36d9b2aada2fe5558ebe7a10fda1a Mon Sep 17 00:00:00 2001 From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org> Date: Sat, 29 Mar 2025 04:56:27 +0000 Subject: [PATCH] build: Updating eslint-config-wikimedia to 0.29.1 Change-Id: I876e2b37f3e319300e3fe50359c271d9280adf03 --- package-lock.json | 19 +++++++++++-------- package.json | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9d0bad..1667911 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "@wikimedia/jsonschema-tools": "^0.7.5", "ajv": "^6.12.2", "coveralls": "^3.1.0", - "eslint-config-wikimedia": "0.28.2", + "eslint-config-wikimedia": "0.29.1", "js-yaml": "^3.14.0", "kafka-test-tools": "^0.1.13", "mocha": "^8.0.1", @@ -1851,9 +1851,9 @@ } }, "node_modules/eslint-config-wikimedia": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz", - "integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==", + "version": "0.29.1", + "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.29.1.tgz", + "integrity": "sha512-4dbL5o3hKGSvreyrGZWLPoTDLFubZ575IQOPhUaTcpbTsi0u05TBEMsOyYkthTaK21vsFQqhSYtxp/xU93BSdA==", "dev": true, "dependencies": { "browserslist-config-wikimedia": "^0.7.0", @@ -1866,13 +1866,16 @@ "eslint-plugin-mediawiki": "^0.7.0", "eslint-plugin-mocha": "^10.4.3", "eslint-plugin-n": "^17.7.0", - "eslint-plugin-no-jquery": "^3.0.1", + "eslint-plugin-no-jquery": "^3.1.1", "eslint-plugin-qunit": "^8.1.1", "eslint-plugin-security": "^1.7.1", "eslint-plugin-unicorn": "^53.0.0", "eslint-plugin-vue": "^9.26.0", "eslint-plugin-wdio": "^8.24.12", "eslint-plugin-yml": "^1.14.0" + }, + "engines": { + "node": ">=18 <23" } }, "node_modules/eslint-plugin-compat": { @@ -2151,9 +2154,9 @@ } }, "node_modules/eslint-plugin-no-jquery": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.1.tgz", - "integrity": "sha512-GrzdjIxox/3x8hpSwpxiMuEQFipiJHTGiVsp0T1TI6GH+KVSbXa4z/56xTV1WiIe66u3iRgvCIipu9CRthecpQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.1.1.tgz", + "integrity": "sha512-LTLO3jH/Tjr1pmxCEqtV6qmt+OChv8La4fwgG470JRpgxyFF4NOzoC9CRy92GIWD3Yjl0qLEgPmD2FLQWcNEjg==", "dev": true, "peerDependencies": { "eslint": ">=8.0.0" diff --git a/package.json b/package.json index 37596dd..661ae1b 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@wikimedia/jsonschema-tools": "^0.7.5", "ajv": "^6.12.2", "coveralls": "^3.1.0", - "eslint-config-wikimedia": "0.28.2", + "eslint-config-wikimedia": "0.29.1", "js-yaml": "^3.14.0", "kafka-test-tools": "^0.1.13", "mocha": "^8.0.1", -- 2.39.2 --- end ---