Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Add more eslint checks and refactoring (#541)

Leendert de Borste5641108eac1
diff --git a/browser-extensions/chrome/eslint.config.js b/browser-extensions/chrome/eslint.config.js
index 982b40fa0..6c40c0e59 100644
--- a/browser-extensions/chrome/eslint.config.js
+++ b/browser-extensions/chrome/eslint.config.js
@@ -4,6 +4,7 @@ import tsPlugin from "@typescript-eslint/eslint-plugin";
import reactPlugin from "eslint-plugin-react";
import reactHooksPlugin from "eslint-plugin-react-hooks";
import importPlugin from "eslint-plugin-import";
+import jsdocPlugin from "eslint-plugin-jsdoc";
import globals from 'globals';
export default [
@@ -29,6 +30,7 @@ export default [
"react": reactPlugin,
"react-hooks": reactHooksPlugin,
"import": importPlugin,
+ "jsdoc": jsdocPlugin,
},
rules: {
...tsPlugin.configs.recommended.rules,
@@ -36,6 +38,33 @@ export default [
...reactHooksPlugin.configs.recommended.rules,
"react/react-in-jsx-scope": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
+ "no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1, "maxBOF": 0 }],
+ "jsdoc/require-jsdoc": ["error", {
+ "require": {
+ "FunctionDeclaration": true,
+ "MethodDefinition": true,
+ "ClassDeclaration": true,
+ "ArrowFunctionExpression": true,
+ "FunctionExpression": true
+ }
+ }],
+ "spaced-comment": ["error", "always"],
+ "multiline-comment-style": ["error", "starred-block"],
+ "@typescript-eslint/explicit-member-accessibility": ["error"],
+ "@typescript-eslint/explicit-function-return-type": ["error"],
+ "@typescript-eslint/typedef": ["error"],
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": "interface",
+ "format": ["PascalCase"],
+ "prefix": ["I"]
+ },
+ {
+ "selector": "class",
+ "format": ["PascalCase"]
+ }
+ ]
},
settings: {
react: {
diff --git a/browser-extensions/chrome/package-lock.json b/browser-extensions/chrome/package-lock.json
index 8490d9c08..02feadc9c 100644
--- a/browser-extensions/chrome/package-lock.json
+++ b/browser-extensions/chrome/package-lock.json
@@ -11,7 +11,9 @@
"dependencies": {
"argon2-browser": "^1.18.0",
"buffer": "^6.0.3",
+ "eslint-plugin-jsdoc": "^50.6.3",
"globals": "^15.14.0",
+ "jsdoc": "^4.0.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"secure-remote-password": "github:LinusU/secure-remote-password#73e5f732b6ca0cdbdc19da1a0c5f48cdbad2cbf0",
@@ -200,7 +202,6 @@
"version": "7.25.9",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
"integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=6.9.0"
@@ -210,7 +211,6 @@
"version": "7.25.9",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
"integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=6.9.0"
@@ -244,7 +244,6 @@
"version": "7.26.5",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.5.tgz",
"integrity": "sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"@babel/types": "^7.26.5"
@@ -336,7 +335,6 @@
"version": "7.26.5",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.5.tgz",
"integrity": "sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg==",
- "dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
@@ -346,6 +344,20 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@es-joy/jsdoccomment": {
+ "version": "0.49.0",
+ "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.49.0.tgz",
+ "integrity": "sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==",
+ "license": "MIT",
+ "dependencies": {
+ "comment-parser": "1.4.1",
+ "esquery": "^1.6.0",
+ "jsdoc-type-pratt-parser": "~4.1.0"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
"node_modules/@esbuild/aix-ppc64": {
"version": "0.24.2",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz",
@@ -775,7 +787,6 @@
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz",
"integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"eslint-visitor-keys": "^3.4.3"
@@ -794,7 +805,6 @@
"version": "4.12.1",
"resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz",
"integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==",
- "dev": true,
"license": "MIT",
"engines": {
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
@@ -804,7 +814,6 @@
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz",
"integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==",
- "dev": true,
"license": "Apache-2.0",
"dependencies": {
"@eslint/object-schema": "^2.1.5",
@@ -819,7 +828,6 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0",
@@ -830,7 +838,6 @@
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
"license": "ISC",
"dependencies": {
"brace-expansion": "^1.1.7"
@@ -843,7 +850,6 @@
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.10.0.tgz",
"integrity": "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==",
- "dev": true,
"license": "Apache-2.0",
"dependencies": {
"@types/json-schema": "^7.0.15"
@@ -856,7 +862,6 @@
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz",
"integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==",
- "dev": true,
"license": "MIT",
"dependencies": {
"ajv": "^6.12.4",
@@ -880,7 +885,6 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0",
@@ -891,7 +895,6 @@
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=18"
@@ -904,7 +907,6 @@
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
"license": "ISC",
"dependencies": {
"brace-expansion": "^1.1.7"
@@ -917,7 +919,6 @@
"version": "9.19.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.19.0.tgz",
"integrity": "sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==",
- "dev": true,
"license": "MIT",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -927,7 +928,6 @@
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz",
"integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==",
- "dev": true,
"license": "Apache-2.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -937,7 +937,6 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz",
"integrity": "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==",
- "dev": true,
"license": "Apache-2.0",
"dependencies": {
"@eslint/core": "^0.10.0",
@@ -951,7 +950,6 @@
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
"integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==",
- "dev": true,
"license": "Apache-2.0",
"engines": {
"node": ">=18.18.0"
@@ -961,7 +959,6 @@
"version": "0.16.6",
"resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz",
"integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==",
- "dev": true,
"license": "Apache-2.0",
"dependencies": {
"@humanfs/core": "^0.19.1",
@@ -975,7 +972,6 @@
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz",
"integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==",
- "dev": true,
"license": "Apache-2.0",
"engines": {
"node": ">=18.18"
@@ -989,7 +985,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
"integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
- "dev": true,
"license": "Apache-2.0",
"engines": {
"node": ">=12.22"
@@ -1003,7 +998,6 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz",
"integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==",
- "dev": true,
"license": "Apache-2.0",
"engines": {
"node": ">=18.18"
@@ -1084,6 +1078,18 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@jsdoc/salty": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.9.tgz",
+ "integrity": "sha512-yYxMVH7Dqw6nO0d5NIV8OQWnitU8k6vXH8NtgqAfIa/IUqRMxRv/NUJJ08VEKbAakwxlgBl5PJdrU0dMPStsnw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "lodash": "^4.17.21"
+ },
+ "engines": {
+ "node": ">=v12.0.0"
+ }
+ },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -1133,6 +1139,18 @@
"node": ">=14"
}
},
+ "node_modules/@pkgr/core": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
+ "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unts"
+ }
+ },
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.31.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.31.0.tgz",
@@ -1462,14 +1480,12 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
- "dev": true,
"license": "MIT"
},
"node_modules/@types/json-schema": {
"version": "7.0.15",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
- "dev": true,
"license": "MIT"
},
"node_modules/@types/json5": {
@@ -1479,6 +1495,28 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/linkify-it": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz",
+ "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==",
+ "license": "MIT"
+ },
+ "node_modules/@types/markdown-it": {
+ "version": "14.1.2",
+ "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz",
+ "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/linkify-it": "^5",
+ "@types/mdurl": "^2"
+ }
+ },
+ "node_modules/@types/mdurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz",
+ "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==",
+ "license": "MIT"
+ },
"node_modules/@types/node": {
"version": "22.10.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.10.tgz",
@@ -1750,7 +1788,6 @@
"version": "8.14.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
- "dev": true,
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
@@ -1763,7 +1800,6 @@
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
- "dev": true,
"license": "MIT",
"peerDependencies": {
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
@@ -1773,7 +1809,6 @@
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
- "dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.1",
@@ -1833,6 +1868,15 @@
"node": ">= 8"
}
},
+ "node_modules/are-docs-informative": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz",
+ "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ }
+ },
"node_modules/arg": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
@@ -1850,7 +1894,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true,
"license": "Python-2.0"
},
"node_modules/array-buffer-byte-length": {
@@ -2084,7 +2127,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true,
"license": "MIT"
},
"node_modules/base64-js": {
@@ -2120,6 +2162,12 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/bluebird": {
+ "version": "3.7.2",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
+ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
+ "license": "MIT"
+ },
"node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
@@ -2254,7 +2302,6 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -2291,11 +2338,22 @@
],
"license": "CC-BY-4.0"
},
+ "node_modules/catharsis": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz",
+ "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==",
+ "license": "MIT",
+ "dependencies": {
+ "lodash": "^4.17.15"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
"node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
@@ -2312,7 +2370,6 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
"license": "MIT",
"dependencies": {
"color-convert": "^2.0.1"
@@ -2460,7 +2517,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"color-name": "~1.1.4"
@@ -2473,7 +2529,6 @@
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true,
"license": "MIT"
},
"node_modules/commander": {
@@ -2486,11 +2541,19 @@
"node": ">= 6"
}
},
+ "node_modules/comment-parser": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz",
+ "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12.0.0"
+ }
+ },
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true,
"license": "MIT"
},
"node_modules/concurrently": {
@@ -2546,7 +2609,6 @@
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
@@ -2650,7 +2712,6 @@
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
@@ -2668,7 +2729,6 @@
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
- "dev": true,
"license": "MIT"
},
"node_modules/define-data-property": {
@@ -2776,6 +2836,18 @@
"integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==",
"license": "MIT"
},
+ "node_modules/entities": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
"node_modules/es-abstract": {
"version": "1.23.9",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz",
@@ -2890,6 +2962,12 @@
"node": ">= 0.4"
}
},
+ "node_modules/es-module-lexer": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz",
+ "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==",
+ "license": "MIT"
+ },
"node_modules/es-object-atoms": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
@@ -3002,7 +3080,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=10"
@@ -3015,7 +3092,6 @@
"version": "9.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.19.0.tgz",
"integrity": "sha512-ug92j0LepKlbbEv6hD911THhoRHmbdXt2gX+VDABAW/Ir7D3nqKdv5Pf5vtlyY6HQMTEP2skXY43ueqTCWssEA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
@@ -3189,6 +3265,43 @@
"node": "*"
}
},
+ "node_modules/eslint-plugin-jsdoc": {
+ "version": "50.6.3",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.6.3.tgz",
+ "integrity": "sha512-NxbJyt1M5zffPcYZ8Nb53/8nnbIScmiLAMdoe0/FAszwb7lcSiX3iYBTsuF7RV84dZZJC8r3NghomrUXsmWvxQ==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@es-joy/jsdoccomment": "~0.49.0",
+ "are-docs-informative": "^0.0.2",
+ "comment-parser": "1.4.1",
+ "debug": "^4.3.6",
+ "escape-string-regexp": "^4.0.0",
+ "espree": "^10.1.0",
+ "esquery": "^1.6.0",
+ "parse-imports": "^2.1.1",
+ "semver": "^7.6.3",
+ "spdx-expression-parse": "^4.0.0",
+ "synckit": "^0.9.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0"
+ }
+ },
+ "node_modules/eslint-plugin-jsdoc/node_modules/semver": {
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/eslint-plugin-react": {
"version": "7.37.4",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.4.tgz",
@@ -3281,7 +3394,6 @@
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz",
"integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==",
- "dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"esrecurse": "^4.3.0",
@@ -3298,7 +3410,6 @@
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
"integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
- "dev": true,
"license": "Apache-2.0",
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -3311,7 +3422,6 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0",
@@ -3322,7 +3432,6 @@
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz",
"integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==",
- "dev": true,
"license": "Apache-2.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3335,7 +3444,6 @@
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
"license": "ISC",
"dependencies": {
"brace-expansion": "^1.1.7"
@@ -3348,7 +3456,6 @@
"version": "10.3.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz",
"integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==",
- "dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"acorn": "^8.14.0",
@@ -3366,7 +3473,6 @@
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz",
"integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==",
- "dev": true,
"license": "Apache-2.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3379,7 +3485,6 @@
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
"integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==",
- "dev": true,
"license": "BSD-3-Clause",
"dependencies": {
"estraverse": "^5.1.0"
@@ -3392,7 +3497,6 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
"integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
- "dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"estraverse": "^5.2.0"
@@ -3405,7 +3509,6 @@
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
- "dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=4.0"
@@ -3415,7 +3518,6 @@
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
- "dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.10.0"
@@ -3425,7 +3527,6 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true,
"license": "MIT"
},
"node_modules/fast-glob": {
@@ -3462,14 +3563,12 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
- "dev": true,
"license": "MIT"
},
"node_modules/fast-levenshtein": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
- "dev": true,
"license": "MIT"
},
"node_modules/fastq": {
@@ -3486,7 +3585,6 @@
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
"integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"flat-cache": "^4.0.0"
@@ -3512,7 +3610,6 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
- "dev": true,
"license": "MIT",
"dependencies": {
"locate-path": "^6.0.0",
@@ -3529,7 +3626,6 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",
"integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"flatted": "^3.2.9",
@@ -3543,7 +3639,6 @@
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz",
"integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==",
- "dev": true,
"license": "ISC"
},
"node_modules/for-each": {
@@ -3766,7 +3861,6 @@
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
"integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
- "dev": true,
"license": "ISC",
"dependencies": {
"is-glob": "^4.0.3"
@@ -3821,7 +3915,6 @@
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
- "dev": true,
"license": "ISC"
},
"node_modules/graphemer": {
@@ -3848,7 +3941,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
@@ -3955,7 +4047,6 @@
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
"integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">= 4"
@@ -3965,7 +4056,6 @@
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
"integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"parent-module": "^1.0.0",
@@ -3982,7 +4072,6 @@
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
"integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=0.8.19"
@@ -4155,7 +4244,6 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -4210,7 +4298,6 @@
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "dev": true,
"license": "MIT",
"dependencies": {
"is-extglob": "^2.1.1"
@@ -4415,7 +4502,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
- "dev": true,
"license": "ISC"
},
"node_modules/iterator.prototype": {
@@ -4456,7 +4542,7 @@
"version": "1.21.7",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz",
"integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
- "dev": true,
+ "devOptional": true,
"license": "MIT",
"bin": {
"jiti": "bin/jiti.js"
@@ -4473,7 +4559,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
@@ -4482,12 +4567,68 @@
"js-yaml": "bin/js-yaml.js"
}
},
+ "node_modules/js2xmlparser": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz",
+ "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "xmlcreate": "^2.0.4"
+ }
+ },
"node_modules/jsbn": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz",
"integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==",
"license": "MIT"
},
+ "node_modules/jsdoc": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.4.tgz",
+ "integrity": "sha512-zeFezwyXeG4syyYHbvh1A967IAqq/67yXtXvuL5wnqCkFZe8I0vKfm+EO+YEvLguo6w9CDUbrAXVtJSHh2E8rw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@babel/parser": "^7.20.15",
+ "@jsdoc/salty": "^0.2.1",
+ "@types/markdown-it": "^14.1.1",
+ "bluebird": "^3.7.2",
+ "catharsis": "^0.9.0",
+ "escape-string-regexp": "^2.0.0",
+ "js2xmlparser": "^4.0.2",
+ "klaw": "^3.0.0",
+ "markdown-it": "^14.1.0",
+ "markdown-it-anchor": "^8.6.7",
+ "marked": "^4.0.10",
+ "mkdirp": "^1.0.4",
+ "requizzle": "^0.2.3",
+ "strip-json-comments": "^3.1.0",
+ "underscore": "~1.13.2"
+ },
+ "bin": {
+ "jsdoc": "jsdoc.js"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/jsdoc-type-pratt-parser": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz",
+ "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/jsdoc/node_modules/escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/jsesc": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
@@ -4505,21 +4646,18 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
"integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
- "dev": true,
"license": "MIT"
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
- "dev": true,
"license": "MIT"
},
"node_modules/json-stable-stringify-without-jsonify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
"integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
- "dev": true,
"license": "MIT"
},
"node_modules/json5": {
@@ -4568,17 +4706,24 @@
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
"integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"json-buffer": "3.0.1"
}
},
+ "node_modules/klaw": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
+ "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==",
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.1.9"
+ }
+ },
"node_modules/levn": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
"integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"prelude-ls": "^1.2.1",
@@ -4608,11 +4753,19 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/linkify-it": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz",
+ "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==",
+ "license": "MIT",
+ "dependencies": {
+ "uc.micro": "^2.0.0"
+ }
+ },
"node_modules/locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"p-locate": "^5.0.0"
@@ -4628,14 +4781,12 @@
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
- "dev": true,
"license": "MIT"
},
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
- "dev": true,
"license": "MIT"
},
"node_modules/loose-envify": {
@@ -4661,6 +4812,45 @@
"yallist": "^3.0.2"
}
},
+ "node_modules/markdown-it": {
+ "version": "14.1.0",
+ "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz",
+ "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==",
+ "license": "MIT",
+ "dependencies": {
+ "argparse": "^2.0.1",
+ "entities": "^4.4.0",
+ "linkify-it": "^5.0.0",
+ "mdurl": "^2.0.0",
+ "punycode.js": "^2.3.1",
+ "uc.micro": "^2.1.0"
+ },
+ "bin": {
+ "markdown-it": "bin/markdown-it.mjs"
+ }
+ },
+ "node_modules/markdown-it-anchor": {
+ "version": "8.6.7",
+ "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz",
+ "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==",
+ "license": "Unlicense",
+ "peerDependencies": {
+ "@types/markdown-it": "*",
+ "markdown-it": "*"
+ }
+ },
+ "node_modules/marked": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
+ "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
+ "license": "MIT",
+ "bin": {
+ "marked": "bin/marked.js"
+ },
+ "engines": {
+ "node": ">= 12"
+ }
+ },
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
@@ -4671,6 +4861,12 @@
"node": ">= 0.4"
}
},
+ "node_modules/mdurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz",
+ "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==",
+ "license": "MIT"
+ },
"node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -4731,11 +4927,22 @@
"node": ">=16 || 14 >=14.17"
}
},
+ "node_modules/mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "license": "MIT",
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "dev": true,
"license": "MIT"
},
"node_modules/mz": {
@@ -4773,7 +4980,6 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
- "dev": true,
"license": "MIT"
},
"node_modules/node-releases": {
@@ -4939,7 +5145,6 @@
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
"integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
- "dev": true,
"license": "MIT",
"dependencies": {
"deep-is": "^0.1.3",
@@ -4975,7 +5180,6 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"yocto-queue": "^0.1.0"
@@ -4991,7 +5195,6 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"p-limit": "^3.0.2"
@@ -5020,7 +5223,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
- "dev": true,
"license": "MIT",
"dependencies": {
"callsites": "^3.0.0"
@@ -5029,11 +5231,23 @@
"node": ">=6"
}
},
+ "node_modules/parse-imports": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/parse-imports/-/parse-imports-2.2.1.tgz",
+ "integrity": "sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ==",
+ "license": "Apache-2.0 AND MIT",
+ "dependencies": {
+ "es-module-lexer": "^1.5.3",
+ "slashes": "^3.0.12"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
@@ -5043,7 +5257,6 @@
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
@@ -5284,7 +5497,6 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.8.0"
@@ -5306,7 +5518,15 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
- "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/punycode.js": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz",
+ "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==",
"license": "MIT",
"engines": {
"node": ">=6"
@@ -5448,6 +5668,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/requizzle": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz",
+ "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==",
+ "license": "MIT",
+ "dependencies": {
+ "lodash": "^4.17.21"
+ }
+ },
"node_modules/resolve": {
"version": "1.22.10",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
@@ -5473,7 +5702,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=4"
@@ -5702,7 +5930,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"shebang-regex": "^3.0.0"
@@ -5715,7 +5942,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
@@ -5823,6 +6049,12 @@
"url": "https://github.com/sponsors/isaacs"
}
},
+ "node_modules/slashes": {
+ "version": "3.0.12",
+ "resolved": "https://registry.npmjs.org/slashes/-/slashes-3.0.12.tgz",
+ "integrity": "sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==",
+ "license": "ISC"
+ },
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
@@ -5833,6 +6065,28 @@
"node": ">=0.10.0"
}
},
+ "node_modules/spdx-exceptions": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
+ "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==",
+ "license": "CC-BY-3.0"
+ },
+ "node_modules/spdx-expression-parse": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz",
+ "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==",
+ "license": "MIT",
+ "dependencies": {
+ "spdx-exceptions": "^2.1.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "node_modules/spdx-license-ids": {
+ "version": "3.0.21",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz",
+ "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==",
+ "license": "CC0-1.0"
+ },
"node_modules/sql.js": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.12.0.tgz",
@@ -6055,7 +6309,6 @@
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
@@ -6091,7 +6344,6 @@
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
@@ -6113,6 +6365,22 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/synckit": {
+ "version": "0.9.2",
+ "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz",
+ "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==",
+ "license": "MIT",
+ "dependencies": {
+ "@pkgr/core": "^0.1.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unts"
+ }
+ },
"node_modules/tailwindcss": {
"version": "3.4.17",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz",
@@ -6247,14 +6515,12 @@
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
- "dev": true,
"license": "0BSD"
},
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
"integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
- "dev": true,
"license": "MIT",
"dependencies": {
"prelude-ls": "^1.2.1"
@@ -6355,6 +6621,12 @@
"node": ">=14.17"
}
},
+ "node_modules/uc.micro": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz",
+ "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==",
+ "license": "MIT"
+ },
"node_modules/unbox-primitive": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz",
@@ -6374,6 +6646,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/underscore": {
+ "version": "1.13.7",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz",
+ "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==",
+ "license": "MIT"
+ },
"node_modules/undici-types": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
@@ -6426,7 +6704,6 @@
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
- "dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"punycode": "^2.1.0"
@@ -6534,7 +6811,6 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
@@ -6638,7 +6914,6 @@
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
"integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -6742,6 +7017,12 @@
"node": ">=8"
}
},
+ "node_modules/xmlcreate": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz",
+ "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==",
+ "license": "Apache-2.0"
+ },
"node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
@@ -6850,7 +7131,6 @@
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=10"
diff --git a/browser-extensions/chrome/package.json b/browser-extensions/chrome/package.json
index 9475ffd32..fed5e340d 100644
--- a/browser-extensions/chrome/package.json
+++ b/browser-extensions/chrome/package.json
@@ -19,7 +19,9 @@
"dependencies": {
"argon2-browser": "^1.18.0",
"buffer": "^6.0.3",
+ "eslint-plugin-jsdoc": "^50.6.3",
"globals": "^15.14.0",
+ "jsdoc": "^4.0.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"secure-remote-password": "github:LinusU/secure-remote-password#73e5f732b6ca0cdbdc19da1a0c5f48cdbad2cbf0",
diff --git a/browser-extensions/chrome/src/App.tsx b/browser-extensions/chrome/src/App.tsx
index ee0b3ff5e..caabb70b3 100644
--- a/browser-extensions/chrome/src/App.tsx
+++ b/browser-extensions/chrome/src/App.tsx
@@ -1,4 +1,3 @@
-/// <reference lib="dom" />
import React, { useState, useEffect } from 'react';
import { useAuth } from './context/AuthContext';
import { useDb } from './context/DbContext';
@@ -8,8 +7,10 @@ import Settings from './pages/Settings';
import CredentialsList from './pages/CredentialsList';
import './styles/app.css';
-// Add base64Encode function
-// TODO: this is used in contentScript.ts too.
+/**
+ * Base64 encode
+ * TODO: check other usages and make it generic.
+ */
function base64Encode(buffer: Uint8Array): string | null {
if (!buffer || typeof buffer !== 'object') {
console.log('Empty or invalid buffer received');
@@ -31,12 +32,18 @@ function base64Encode(buffer: Uint8Array): string | null {
}
}
+/**
+ * Main application component
+ */
const App: React.FC = () => {
const { isLoggedIn, username, logout } = useAuth();
const dbContext = useDb();
const [needsUnlock, setNeedsUnlock] = useState(false);
const [showSettings, setShowSettings] = useState(false);
+ /**
+ * Check if the user needs to unlock the vault
+ */
useEffect(() => {
if (isLoggedIn) {
if (!dbContext.isInitialized) {
@@ -47,11 +54,17 @@ const App: React.FC = () => {
}
}, [isLoggedIn, dbContext.isInitialized]);
- const handleLogout = () => {
+ /**
+ * Handle logout
+ */
+ const handleLogout = () : void => {
logout();
};
- const toggleSettings = () => {
+ /**
+ * Toggle settings
+ */
+ const toggleSettings = () : void => {
setShowSettings(!showSettings);
};
diff --git a/browser-extensions/chrome/src/background.ts b/browser-extensions/chrome/src/background.ts
index 2a144ec6f..e66e65a17 100644
--- a/browser-extensions/chrome/src/background.ts
+++ b/browser-extensions/chrome/src/background.ts
@@ -21,7 +21,7 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
vaultState.sessionKey = Buffer.from(sessionKey).toString('base64');
// Re-encrypt vault with session key
- (async () => {
+ (async () : Promise<void> => {
try {
const encryptedVault = await EncryptionUtility.symmetricEncrypt(
message.vault,
@@ -130,19 +130,20 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
console.log('credentials:', credentials);
// Filter credentials that match the current domain
- /*const matchingCredentials = credentials.filter(cred => {
- // TODO: Implement proper URL matching
- return true;
- try {
- const credentialUrl = new URL(cred.ServiceUrl);
- return credentialUrl.hostname === url.hostname;
- } catch {
- return false;
- }
- });
-
- console.log('matchingCredentials:', matchingCredentials);
- */
+ /*
+ * const matchingCredentials = credentials.filter(cred => {
+ * // TODO: Implement proper URL matching
+ * return true;
+ * try {
+ * const credentialUrl = new URL(cred.ServiceUrl);
+ * return credentialUrl.hostname === url.hostname;
+ * } catch {
+ * return false;
+ * }
+ * });
+ *
+ * console.log('matchingCredentials:', matchingCredentials);
+ */
sendResponse({ credentials: credentials });
} catch (error) {
diff --git a/browser-extensions/chrome/src/components/Button.tsx b/browser-extensions/chrome/src/components/Button.tsx
index 5c1d523b9..7c30dd6a7 100644
--- a/browser-extensions/chrome/src/components/Button.tsx
+++ b/browser-extensions/chrome/src/components/Button.tsx
@@ -1,11 +1,14 @@
import React from 'react';
-interface ButtonProps {
+type ButtonProps = {
onClick: () => void;
children: React.ReactNode;
type?: 'button' | 'submit' | 'reset';
-}
+};
+/**
+ * Button component
+ */
const Button: React.FC<ButtonProps> = ({ onClick, children, type = 'button' }) => {
return (
<button
diff --git a/browser-extensions/chrome/src/contentScript.ts b/browser-extensions/chrome/src/contentScript.ts
index c58dfd9f6..88b1d38d4 100644
--- a/browser-extensions/chrome/src/contentScript.ts
+++ b/browser-extensions/chrome/src/contentScript.ts
@@ -13,8 +13,10 @@ document.addEventListener('focusin', (e) => {
}
});
-// Create and manage credential popup
-function showCredentialPopup(input: HTMLInputElement) {
+/**
+ * Show credential popup
+ */
+function showCredentialPopup(input: HTMLInputElement) : void {
console.log('showCredentialPopup called');
const forms = detectForms();
if (!forms.length) return;
@@ -29,7 +31,10 @@ function showCredentialPopup(input: HTMLInputElement) {
});
}
-function createPopup(input: HTMLInputElement, credentials: Credential[]) {
+/**
+ * Create auto-fill popup
+ */
+function createPopup(input: HTMLInputElement, credentials: Credential[]) : void {
// Remove existing popup if any
removeExistingPopup();
@@ -101,14 +106,20 @@ function createPopup(input: HTMLInputElement, credentials: Credential[]) {
document.body.appendChild(popup);
}
-function removeExistingPopup() {
+/**
+ * Remove existing popup
+ */
+function removeExistingPopup() : void {
const existing = document.getElementById('aliasvault-credential-popup');
if (existing) {
existing.remove();
}
}
-function fillCredential(credential: Credential) {
+/**
+ * Fill credential
+ */
+function fillCredential(credential: Credential) : void {
const forms = detectForms();
if (!forms.length) return;
@@ -123,12 +134,18 @@ function fillCredential(credential: Credential) {
}
}
-function triggerInputEvents(element: HTMLInputElement) {
+/**
+ * Trigger input events
+ */
+function triggerInputEvents(element: HTMLInputElement) : void {
element.dispatchEvent(new Event('input', { bubbles: true }));
element.dispatchEvent(new Event('change', { bubbles: true }));
}
-// Remove the Buffer import and replace with a base64 encoding function
+/**
+ * Base64 encode
+ * TODO: make this a generic function if still needed? Check all other usages.
+ */
function base64Encode(buffer: Uint8Array): string | null {
if (!buffer || typeof buffer !== 'object') {
console.log('Empty or invalid buffer received');
diff --git a/browser-extensions/chrome/src/context/AuthContext.tsx b/browser-extensions/chrome/src/context/AuthContext.tsx
index 7d8de7776..405a447de 100644
--- a/browser-extensions/chrome/src/context/AuthContext.tsx
+++ b/browser-extensions/chrome/src/context/AuthContext.tsx
@@ -1,6 +1,6 @@
import React, { createContext, useContext, useState, useEffect, useRef } from 'react';
-interface AuthContextType {
+type AuthContextType = {
isLoggedIn: boolean;
username: string | null;
login: (username: string, accessToken: string, refreshToken: string) => Promise<void>;
@@ -12,6 +12,9 @@ interface AuthContextType {
const AuthContext = createContext<AuthContextType | undefined>(undefined);
+/**
+ * AuthProvider
+ */
export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
const [isLoggedIn, setIsLoggedIn] = useState(false);
const [username, setUsername] = useState<string | null>(null);
@@ -19,7 +22,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
const [, setRefreshToken] = useState<string | null>(null);
const accessTokenRef = useRef<string | null>(null);
const refreshTokenRef = useRef<string | null>(null);
- useEffect(() => {
+ useEffect(() : void => {
// Check for tokens in localStorage on initial load
const storedAccessToken = localStorage.getItem('accessToken');
const storedRefreshToken = localStorage.getItem('refreshToken');
@@ -32,7 +35,10 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
}
}, []);
- const login = async (username: string, accessToken: string, refreshToken: string) => {
+ /**
+ * Login
+ */
+ const login = async (username: string, accessToken: string, refreshToken: string) : Promise<void> => {
accessTokenRef.current = accessToken; // Immediate update
refreshTokenRef.current = refreshToken; // Immediate update
await Promise.all([
@@ -47,7 +53,10 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
setIsLoggedIn(true);
};
- const updateTokens = async (accessToken: string, refreshToken: string) => {
+ /**
+ * Update tokens
+ */
+ const updateTokens = async (accessToken: string, refreshToken: string) : Promise<void> => {
accessTokenRef.current = accessToken; // Immediate update
refreshTokenRef.current = refreshToken; // Immediate update
await Promise.all([
@@ -59,7 +68,10 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
setRefreshToken(refreshToken);
};
- const logout = async () => {
+ /**
+ * Logout
+ */
+ const logout = async () : Promise<void> => {
await Promise.all([
localStorage.removeItem('username'),
localStorage.removeItem('accessToken'),
@@ -74,10 +86,15 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
]);
};
- // Make sure to use the ref for accessToken and refreshToken to ensure
- // that the latest values are used.
- const getAccessToken = () => accessTokenRef.current || localStorage.getItem('accessToken');
- const getRefreshToken = () => refreshTokenRef.current || localStorage.getItem('refreshToken');
+ /**
+ * Get access token
+ */
+ const getAccessToken = () : string | null => accessTokenRef.current || localStorage.getItem('accessToken');
+
+ /**
+ * Get refresh token
+ */
+ const getRefreshToken = () : string | null => refreshTokenRef.current || localStorage.getItem('refreshToken');
return (
<AuthContext.Provider value={{ isLoggedIn, username, login, updateTokens, logout, getAccessToken, getRefreshToken }}>
@@ -86,7 +103,10 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
);
};
-export const useAuth = () => {
+/**
+ * Hook to use the AuthContext
+ */
+export const useAuth = () : AuthContextType => {
const context = useContext(AuthContext);
if (context === undefined) {
throw new Error('useAuth must be used within an AuthProvider');
diff --git a/browser-extensions/chrome/src/context/DbContext.tsx b/browser-extensions/chrome/src/context/DbContext.tsx
index 5fef142c7..4c13462b2 100644
--- a/browser-extensions/chrome/src/context/DbContext.tsx
+++ b/browser-extensions/chrome/src/context/DbContext.tsx
@@ -1,7 +1,7 @@
import React, { createContext, useContext, useState, useEffect, useCallback } from 'react';
import SqliteClient from '../utils/SqliteClient';
-interface DbContextType {
+type DbContextType = {
sqliteClient: SqliteClient | null;
isInitialized: boolean;
initializeDatabase: (blob: string) => Promise<void>;
@@ -10,6 +10,9 @@ interface DbContextType {
const DbContext = createContext<DbContextType | undefined>(undefined);
+/**
+ * DbProvider
+ */
export const DbProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
const [sqliteClient, setSqliteClient] = useState<SqliteClient | null>(null);
const [isInitialized, setIsInitialized] = useState(false);
@@ -47,7 +50,7 @@ export const DbProvider: React.FC<{ children: React.ReactNode }> = ({ children }
}
}, []);
- useEffect(() => {
+ useEffect(() : void => {
// Check if database is initialized and try to retrieve vault from background
if (!isInitialized) {
checkStoredVault();
@@ -55,20 +58,27 @@ export const DbProvider: React.FC<{ children: React.ReactNode }> = ({ children }
}, [isInitialized, checkStoredVault]);
// Add a listener for when the popup becomes visible
- useEffect(() => {
- const handleVisibilityChange = () => {
+ useEffect(() : void => {
+ /**
+ * Handles visibility state changes of the document.
+ * Checks and retrieves stored vault data when document becomes visible and database is not initialized.
+ */
+ const handleVisibilityChange = () : void => {
if (document.visibilityState === 'visible' && !isInitialized) {
checkStoredVault();
}
};
document.addEventListener('visibilitychange', handleVisibilityChange);
- return () => {
+ return () : void => {
document.removeEventListener('visibilitychange', handleVisibilityChange);
};
}, [isInitialized, checkStoredVault]);
- const clearDatabase = () => {
+ /**
+ * Clear database
+ */
+ const clearDatabase = () : void => {
setSqliteClient(null);
setIsInitialized(false);
chrome.runtime.sendMessage({ type: 'CLEAR_VAULT' });
@@ -81,7 +91,10 @@ export const DbProvider: React.FC<{ children: React.ReactNode }> = ({ children }
);
};
-export const useDb = () => {
+/**
+ * Hook to use the DbContext
+ */
+export const useDb = () : DbContextType => {
const context = useContext(DbContext);
if (context === undefined) {
throw new Error('useDb must be used within a DbProvider');
diff --git a/browser-extensions/chrome/src/context/WebApiContext.tsx b/browser-extensions/chrome/src/context/WebApiContext.tsx
index 99fe58837..210bd801a 100644
--- a/browser-extensions/chrome/src/context/WebApiContext.tsx
+++ b/browser-extensions/chrome/src/context/WebApiContext.tsx
@@ -4,11 +4,14 @@ import { useAuth } from './AuthContext';
const WebApiContext = createContext<WebApiService | null>(null);
+/**
+ * WebApiProvider
+ */
export const WebApiProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
const { getAccessToken, getRefreshToken, updateTokens, logout } = useAuth();
const [webApiService, setWebApiService] = useState<WebApiService | null>(null);
- useEffect(() => {
+ useEffect(() : void => {
const service = new WebApiService(
() => getAccessToken(),
() => getRefreshToken(),
@@ -19,15 +22,19 @@ export const WebApiProvider: React.FC<{ children: React.ReactNode }> = ({ childr
);
setWebApiService(service);
- // Listen for changes to the API URL in storage
- const handleStorageChange = (changes: { [key: string]: chrome.storage.StorageChange }) => {
+ /**
+ * Handles changes to the API URL in storage.
+ * Initializes the base URL when the API URL changes.
+ */
+ const handleStorageChange = (changes: { [key: string]: chrome.storage.StorageChange }) : void => {
if (changes.apiUrl) {
service.initializeBaseUrl();
}
};
chrome.storage.onChanged.addListener(handleStorageChange);
- return () => {
+
+ return () : void => {
chrome.storage.onChanged.removeListener(handleStorageChange);
};
}, [getAccessToken, getRefreshToken, updateTokens, logout]);
@@ -43,7 +50,10 @@ export const WebApiProvider: React.FC<{ children: React.ReactNode }> = ({ childr
);
};
-export const useWebApi = () => {
+/**
+ * Hook to use the WebApiService
+ */
+export const useWebApi = () : WebApiService => {
const context = useContext(WebApiContext);
if (!context) {
throw new Error('useWebApi must be used within a WebApiProvider');
diff --git a/browser-extensions/chrome/src/pages/CredentialsList.tsx b/browser-extensions/chrome/src/pages/CredentialsList.tsx
index 830b42ad5..f7048efc5 100644
--- a/browser-extensions/chrome/src/pages/CredentialsList.tsx
+++ b/browser-extensions/chrome/src/pages/CredentialsList.tsx
@@ -1,17 +1,20 @@
import React, { useState, useEffect } from 'react';
import { useDb } from '../context/DbContext';
-interface Credential {
+type Credential = {
Id: string;
ServiceName: string;
Username: string;
Logo?: Uint8Array;
}
-interface CredentialsListProps {
+type CredentialsListProps = {
base64Encode: (buffer: Uint8Array) => string | null;
}
+/**
+ * Credentials list page
+ */
const CredentialsList: React.FC<CredentialsListProps> = ({ base64Encode }) => {
const dbContext = useDb();
const [credentials, setCredentials] = useState<Credential[]>([]);
diff --git a/browser-extensions/chrome/src/pages/Login.tsx b/browser-extensions/chrome/src/pages/Login.tsx
index 7b6067946..8c618581c 100644
--- a/browser-extensions/chrome/src/pages/Login.tsx
+++ b/browser-extensions/chrome/src/pages/Login.tsx
@@ -8,6 +8,9 @@ import EncryptionUtility from '../utils/EncryptionUtility';
import SrpUtility from '../utils/SrpUtility';
import { VaultResponse } from '../types/webapi/VaultResponse';
+/**
+ * Login page
+ */
const Login: React.FC = () => {
const { login } = useAuth();
const [credentials, setCredentials] = useState({
@@ -21,7 +24,10 @@ const Login: React.FC = () => {
// Create SrpUtility instance with webApi
const srpUtil = new SrpUtility(webApi);
- const handleSubmit = async (e: React.FormEvent) => {
+ /**
+ * Handle submit
+ */
+ const handleSubmit = async (e: React.FormEvent) : Promise<void> => {
e.preventDefault();
setError(null);
@@ -78,14 +84,18 @@ const Login: React.FC = () => {
await dbContext.initializeDatabase(decryptedBlob);
// 3. Handle 2FA if required
- /*if (validationResponse.requiresTwoFactor) {
- // TODO: Implement 2FA flow
- console.log('2FA required');
- return;
- }
+ /*
+ * if (validationResponse.requiresTwoFactor) {
+ * // TODO: Implement 2FA flow
+ * console.log('2FA required');
+ * return;
+ * }
+ */
// 5. Redirect to home page
- window.location.href = '/';*/
+ /*
+ * window.location.href = '/';
+ */
} catch (err) {
setError('Login failed. Please check your credentials and try again.');
@@ -93,7 +103,10 @@ const Login: React.FC = () => {
}
};
- const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+ /**
+ * Handle change
+ */
+ const handleChange = (e: React.ChangeEvent<HTMLInputElement>) : void => {
const { name, value } = e.target;
setCredentials(prev => ({
...prev,
diff --git a/browser-extensions/chrome/src/pages/Settings.tsx b/browser-extensions/chrome/src/pages/Settings.tsx
index 9984ba4f7..2df2d45bf 100644
--- a/browser-extensions/chrome/src/pages/Settings.tsx
+++ b/browser-extensions/chrome/src/pages/Settings.tsx
@@ -11,6 +11,9 @@ const DEFAULT_OPTIONS: ApiOption[] = [
{ label: 'Self-hosted', value: 'custom' }
];
+/**
+ * Settings page
+ */
const Settings: React.FC = () => {
const [selectedOption, setSelectedOption] = useState<string>('');
const [customUrl, setCustomUrl] = useState<string>('');
@@ -31,7 +34,10 @@ const Settings: React.FC = () => {
});
}, []);
- const handleOptionChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
+ /**
+ * Handle option change
+ */
+ const handleOptionChange = (e: React.ChangeEvent<HTMLSelectElement>) : void => {
const value = e.target.value;
setSelectedOption(value);
if (value !== 'custom') {
@@ -39,7 +45,10 @@ const Settings: React.FC = () => {
}
};
- const handleCustomUrlChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+ /**
+ * Handle custom URL change
+ */
+ const handleCustomUrlChange = (e: React.ChangeEvent<HTMLInputElement>) : void => {
const value = e.target.value;
setCustomUrl(value);
if (selectedOption === 'custom') {
diff --git a/browser-extensions/chrome/src/pages/Unlock.tsx b/browser-extensions/chrome/src/pages/Unlock.tsx
index f8d270455..815e15b2d 100644
--- a/browser-extensions/chrome/src/pages/Unlock.tsx
+++ b/browser-extensions/chrome/src/pages/Unlock.tsx
@@ -8,6 +8,9 @@ import EncryptionUtility from '../utils/EncryptionUtility';
import SrpUtility from '../utils/SrpUtility';
import { VaultResponse } from '../types/webapi/VaultResponse';
+/**
+ * Unlock page
+ */
const Unlock: React.FC = () => {
const { username, logout } = useAuth();
const webApi = useWebApi();
@@ -18,14 +21,19 @@ const Unlock: React.FC = () => {
const [error, setError] = useState<string | null>(null);
const dbContext = useDb();
- const handleSubmit = async (e: React.FormEvent) => {
+ /**
+ * Handle submit
+ */
+ const handleSubmit = async (e: React.FormEvent) : Promise<void> => {
e.preventDefault();
setError(null);
try {
// 1. Initiate login to get salt and server ephemeral
- // TODO: adding encryption settings to vault response would save a call to the server.
- // Check how WASM client does this? Should we store the settings in localstorage instead?
+ /*
+ * TODO: adding encryption settings to vault response would save a call to the server.
+ * Check how WASM client does this? Should we store the settings in localstorage instead?
+ */
const loginResponse = await srpUtil.initiateLogin(username!);
// Derive key from password using user's encryption settings
@@ -54,7 +62,10 @@ const Unlock: React.FC = () => {
}
};
- const handleLogout = async () => {
+ /**
+ * Handle logout
+ */
+ const handleLogout = async () : Promise<void> => {
logout();
};
diff --git a/browser-extensions/chrome/src/types/Credential.ts b/browser-extensions/chrome/src/types/Credential.ts
index 0b6e2c818..2f0d816dc 100644
--- a/browser-extensions/chrome/src/types/Credential.ts
+++ b/browser-extensions/chrome/src/types/Credential.ts
@@ -1,6 +1,8 @@
-// TODO: move query logic to shared dbcontext and reference this type from there
-// so we don't have multiple copies or versions of this type with different fields.
-export interface Credential {
+/*
+ * TODO: move query logic to shared dbcontext and reference this type from there
+ * so we don't have multiple copies or versions of this type with different fields.
+ */
+export type Credential = {
Id: string;
Username: string;
ServiceId: string;
diff --git a/browser-extensions/chrome/src/types/webapi/Login.ts b/browser-extensions/chrome/src/types/webapi/Login.ts
index a11481e22..bb48c3cd7 100644
--- a/browser-extensions/chrome/src/types/webapi/Login.ts
+++ b/browser-extensions/chrome/src/types/webapi/Login.ts
@@ -1,8 +1,8 @@
-export interface LoginRequest {
+export type LoginRequest = {
username: string;
}
-export interface LoginResponse {
+export type LoginResponse = {
salt: string;
serverEphemeral: string;
encryptionType: string;
diff --git a/browser-extensions/chrome/src/types/webapi/ValidateLogin.ts b/browser-extensions/chrome/src/types/webapi/ValidateLogin.ts
index e4d9bb3d4..4b9910cb4 100644
--- a/browser-extensions/chrome/src/types/webapi/ValidateLogin.ts
+++ b/browser-extensions/chrome/src/types/webapi/ValidateLogin.ts
@@ -1,11 +1,11 @@
-export interface ValidateLoginRequest {
+export type ValidateLoginRequest = {
username: string;
rememberMe: boolean;
clientPublicEphemeral: string;
clientSessionProof: string;
}
-export interface ValidateLoginResponse {
+export type ValidateLoginResponse = {
requiresTwoFactor: boolean;
token?: {
token: string;
diff --git a/browser-extensions/chrome/src/types/webapi/VaultResponse.ts b/browser-extensions/chrome/src/types/webapi/VaultResponse.ts
index 106dfedcc..b89a36415 100644
--- a/browser-extensions/chrome/src/types/webapi/VaultResponse.ts
+++ b/browser-extensions/chrome/src/types/webapi/VaultResponse.ts
@@ -1,4 +1,4 @@
-export interface Vault {
+export type Vault = {
blob: string;
createdAt: string;
credentialsCount: number;
@@ -10,7 +10,7 @@ export interface Vault {
version: string;
}
- export interface VaultResponse {
+export type VaultResponse = {
status: number;
vault: Vault;
}
\ No newline at end of file
diff --git a/browser-extensions/chrome/src/utils/FormDetector.ts b/browser-extensions/chrome/src/utils/FormDetector.ts
index 9a26c884d..8232b335d 100644
--- a/browser-extensions/chrome/src/utils/FormDetector.ts
+++ b/browser-extensions/chrome/src/utils/FormDetector.ts
@@ -1,9 +1,12 @@
-interface LoginForm {
+type LoginForm = {
form: HTMLFormElement | null;
usernameField: HTMLInputElement | null;
passwordField: HTMLInputElement | null;
}
+/**
+ * Detect login forms on the page.
+ */
export function detectForms(): LoginForm[] {
const forms: LoginForm[] = [];
@@ -24,6 +27,9 @@ export function detectForms(): LoginForm[] {
return forms;
}
+/**
+ * Find the username field in the form containing the password field.
+ */
function findUsernameField(passwordField: HTMLInputElement): HTMLInputElement | null {
const form = passwordField.closest('form');
const candidates = form ? form.querySelectorAll<HTMLInputElement>('input') : document.querySelectorAll<HTMLInputElement>('input');
diff --git a/browser-extensions/chrome/src/utils/SqliteClient.tsx b/browser-extensions/chrome/src/utils/SqliteClient.tsx
index e65ca2165..410f1c6fb 100644
--- a/browser-extensions/chrome/src/utils/SqliteClient.tsx
+++ b/browser-extensions/chrome/src/utils/SqliteClient.tsx
@@ -1,5 +1,8 @@
import initSqlJs, { Database } from 'sql.js';
+/**
+ * Client for interacting with the SQLite database.
+ */
class SqliteClient {
private db: Database | null = null;
@@ -15,9 +18,17 @@ class SqliteClient {
bytes[i] = binaryString.charCodeAt(i);
}
- // Initialize SQL.js
+ /**
+ * Initialize SQL.js
+ * TODO: is this needed, can we not load it from the local file system?
+ */
const SQL = await initSqlJs({
- locateFile: file => `https://sql.js.org/dist/${file}`
+ /**
+ * Locates SQL.js files from the CDN
+ * @param file - The name of the file to locate
+ * @returns The complete URL path to the file
+ */
+ locateFile: (file: string) => `https://sql.js.org/dist/${file}`
});
// Create database from the binary data
diff --git a/browser-extensions/chrome/src/utils/SrpUtility.tsx b/browser-extensions/chrome/src/utils/SrpUtility.tsx
index edbf535e7..de79613f2 100644
--- a/browser-extensions/chrome/src/utils/SrpUtility.tsx
+++ b/browser-extensions/chrome/src/utils/SrpUtility.tsx
@@ -3,7 +3,7 @@ import { WebApiService } from './WebApiService';
import { LoginRequest, LoginResponse } from '../types/webapi/Login';
import { ValidateLoginRequest } from '../types/webapi/ValidateLogin';
-interface ValidateLoginResponse {
+type ValidateLoginResponse = {
requiresTwoFactor: boolean;
token?: {
token: string;
@@ -18,16 +18,27 @@ interface ValidateLoginResponse {
class SrpUtility {
private webApiService: WebApiService;
- constructor(webApiService: WebApiService) {
+ /**
+ * Constructor for the SrpUtility class.
+ *
+ * @param {WebApiService} webApiService - The WebApiService instance.
+ */
+ public constructor(webApiService: WebApiService) {
this.webApiService = webApiService;
}
+ /**
+ * Initiate login with server.
+ */
public async initiateLogin(username: string): Promise<LoginResponse> {
return this.webApiService.post<LoginRequest, LoginResponse>('Auth/login', {
username: username.toLowerCase().trim()
});
}
+ /**
+ * Validate login with server using locally generated ephemeral and session proof.
+ */
public async validateLogin(
username: string,
passwordHashString: string,
diff --git a/browser-extensions/chrome/src/utils/WebApiService.ts b/browser-extensions/chrome/src/utils/WebApiService.ts
index fc0e06fb2..0b56214bf 100644
--- a/browser-extensions/chrome/src/utils/WebApiService.ts
+++ b/browser-extensions/chrome/src/utils/WebApiService.ts
@@ -1,14 +1,28 @@
type RequestInit = globalThis.RequestInit;
-interface TokenResponse {
+/**
+ * Interface for the token response from the API.
+ */
+interface ITokenResponse {
token: string;
refreshToken: string;
}
+/**
+ * Service class for interacting with the web API.
+ */
export class WebApiService {
private baseUrl: string = '';
- constructor(
+ /**
+ * Constructor for the WebApiService class.
+ *
+ * @param {Function} getAccessToken - Function to get the access token.
+ * @param {Function} getRefreshToken - Function to get the refresh token.
+ * @param {Function} updateTokens - Function to update the access and refresh tokens.
+ * @param {Function} handleLogout - Function to handle logout.
+ */
+ public constructor(
private getAccessToken: () => string | null,
private getRefreshToken: () => string | null,
private updateTokens: (accessToken: string, refreshToken: string) => void,
@@ -18,12 +32,18 @@ export class WebApiService {
this.initializeBaseUrl();
}
- private async initializeBaseUrl() {
+ /**
+ * Initialize the base URL for the API from settings.
+ */
+ private async initializeBaseUrl() : Promise<void> {
const result = await chrome.storage.local.get(['apiUrl']);
// Trim trailing slash if present
this.baseUrl = (result.apiUrl || 'https://app.aliasvault.net/api').replace(/\/$/, '') + '/v1/';
}
+ /**
+ * Fetch data from the API
+ */
public async fetch<T>(
endpoint: string,
options: RequestInit = {}
@@ -76,6 +96,9 @@ export class WebApiService {
}
}
+ /**
+ * Refresh the access token
+ */
private async refreshAccessToken(): Promise<string | null> {
const refreshToken = this.getRefreshToken();
if (!refreshToken) {
@@ -99,7 +122,7 @@ export class WebApiService {
throw new Error('Failed to refresh token');
}
- const tokenResponse: TokenResponse = await response.json();
+ const tokenResponse: ITokenResponse = await response.json();
this.updateTokens(tokenResponse.token, tokenResponse.refreshToken);
return tokenResponse.token;
} catch {
@@ -108,11 +131,16 @@ export class WebApiService {
}
}
- // Helper methods for common operations
+ /**
+ * Get a resource
+ */
public async get<T>(endpoint: string): Promise<T> {
return this.fetch<T>(endpoint, { method: 'GET' });
}
+ /**
+ * Create a resource
+ */
public async post<TRequest, TResponse>(endpoint: string, data: TRequest): Promise<TResponse> {
return this.fetch<TResponse>(endpoint, {
method: 'POST',
@@ -123,6 +151,9 @@ export class WebApiService {
});
}
+ /**
+ * Update a resource
+ */
public async put<TRequest, TResponse>(endpoint: string, data: TRequest): Promise<TResponse> {
return this.fetch<TResponse>(endpoint, {
method: 'PUT',
@@ -133,6 +164,9 @@ export class WebApiService {
});
}
+ /**
+ * Delete a resource
+ */
public async delete<T>(endpoint: string): Promise<T> {
return this.fetch<T>(endpoint, { method: 'DELETE' });
}