From f725e7b153ecdca76cbeda340ea060fcdf975393 Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sat, 30 Aug 2025 07:15:58 +0100 Subject: [PATCH 01/28] Initial linting pass --- .editorconfig | 14 + .gitignore | 8 + README.md | 8 +- eslint.config.mjs | 88 ++ package-lock.json | 3512 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 16 +- src/main.ts | 190 +-- src/nuke.ts | 340 ++--- tsconfig.json | 6 +- 9 files changed, 3910 insertions(+), 272 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 eslint.config.mjs create mode 100644 package-lock.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6970989 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..22db79c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +node_modules +.yarn +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.DS_Store diff --git a/README.md b/README.md index 20a1ab5..6cef68d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -A moderation tool used for deleting and locking an entire comment tree, starting with a single comment. This app demonstrates how to: +A moderation tool used for deleting and locking an entire comment tree, starting with a single comment, or at an entire post level. -- Use the Reddit API to perform large-scale operations. +## Credits -- Use menu actions as an entrypoint for apps. +This app was originally written by /u/FlyingLaserTurtle, with contributions from /u/ni5arga. + +## Change History diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..0c65ac4 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,88 @@ +import eslint from "@eslint/js"; +import tseslint from "typescript-eslint"; +import stylistic from '@stylistic/eslint-plugin' +import vitest from "@vitest/eslint-plugin" + +export default tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.strictTypeChecked, + ...tseslint.configs.stylisticTypeChecked, + stylistic.configs.customize({ + indent: 4, + quotes: "double", + semi: true, + quoteProps: "consistent-as-needed", + braceStyle: "1tbs", + }), + { + files: ["**/*.test.ts"], + plugins: { + vitest + }, + rules: { + ...vitest.configs.recommended.rules, + 'vitest/valid-title': 'warn', + 'vitest/no-commented-out-tests': 'warn' + } + }, + { + files: ["**/*.ts", "**/*.tsx"], + + languageOptions: { + parserOptions: { + project: "./tsconfig.json", + tsconfigRootDir: import.meta.dirname, + }, + }, + + rules: { + // Extra rules + "eqeqeq": ["error", "always", { + null: "ignore", + }], + "no-self-compare": "error", + "no-template-curly-in-string": "error", + "no-useless-assignment": "error", + "no-nested-ternary": "error", + "no-return-assign": "error", + "no-sequences": "error", + "no-var": "error", + "arrow-body-style": ["error", "as-needed"], + "func-style": ["error", "declaration", { + allowArrowFunctions: true, + }], + "curly": ["error", "all"], + "object-shorthand": ["error", "always"], + "operator-assignment": ["error", "always"], + "camelcase": ["error", { + properties: "always", + }], + + // Rules I don't want + "@typescript-eslint/restrict-template-expressions": "off", + + // Extra code styling rules + "@stylistic/array-bracket-newline": ["error", "consistent"], + "@stylistic/array-element-newline": ["error", "consistent"], + "@/func-call-spacing": ["error", "never"], + "@stylistic/function-paren-newline": ["error", "multiline"], + "@stylistic/implicit-arrow-linebreak": ["error", "beside"], + + "@stylistic/object-curly-newline": ["error", { + multiline: true, + consistent: true, + }], + + "@stylistic/object-property-newline": ["error", { + allowAllPropertiesOnSameLine: true, + }], + + "@stylistic/operator-linebreak": ["off"], + "@stylistic/semi-style": ["error", "last"], + "@stylistic/space-before-function-paren": ["error", "always"], + }, + }, + { + ignores: ["**/node_modules", "**/dist", "eslint.config.mjs", "**/difflib"], + }, +); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..40d3fbd --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3512 @@ +{ + "name": "comment-nuke", + "version": "0.11.19", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "comment-nuke", + "version": "0.11.19", + "license": "BSD-3-Clause", + "dependencies": { + "@devvit/public-api": "0.12.0" + }, + "devDependencies": { + "@eslint/js": "^9.10.0", + "@stylistic/eslint-plugin": "^5.1.0", + "@vitest/eslint-plugin": "^1.1.0", + "eslint": "^9.14.0", + "typescript": "5.8.3", + "typescript-eslint": "^8.4.0", + "vitest": "^3.0.5" + } + }, + "node_modules/@devvit/metrics": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@devvit/metrics/-/metrics-0.12.0.tgz", + "integrity": "sha512-W6dMhK0TfuO76Zv+h8NF0TuKzrOrMUsQDHrEJARQ7Kxh/xXLv0otEjeB9/yc59GVnBEcQ+pPYmiV9Yh/dm7zmg==", + "license": "BSD-3-Clause", + "dependencies": { + "@devvit/protos": "0.12.0" + } + }, + "node_modules/@devvit/protos": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@devvit/protos/-/protos-0.12.0.tgz", + "integrity": "sha512-khMAV6R8qZgYBKRCtRDmk+QTtn23HiIx6WjXnCG+roxk1+UZCgrFgE0oyUXxCSOhdJYAYhj8ALSZ2LCOtxGJyg==", + "license": "BSD-3-Clause", + "dependencies": { + "protobufjs": "7.3.2", + "rxjs": "7.8.1" + }, + "peerDependencies": { + "twirp-ts": "^2.5.0" + }, + "peerDependenciesMeta": { + "twirp-ts": { + "optional": true + } + } + }, + "node_modules/@devvit/public-api": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@devvit/public-api/-/public-api-0.12.0.tgz", + "integrity": "sha512-Nvn7dB3HyZjKJH7Odx6KJLrPIZtagsnx7N251VCQTR4iegD+pCJoFoXDjqpahs+J+zm7X2kqhKZnZh/wAZCeqg==", + "license": "BSD-3-Clause", + "dependencies": { + "@devvit/metrics": "0.12.0", + "@devvit/protos": "0.12.0", + "@devvit/shared": "0.12.0", + "@devvit/shared-types": "0.12.0", + "base64-js": "1.5.1", + "clone-deep": "4.0.1", + "moderndash": "4.0.0" + } + }, + "node_modules/@devvit/shared": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@devvit/shared/-/shared-0.12.0.tgz", + "integrity": "sha512-Gvlwj313LRrJ3E5MDfm8B73mbu0AgoqlXb2YMVXL2EAGmKMZC55ozTSVm5EOfDVrkNtVLJsFCuYTUXNPDPkKag==", + "license": "BSD-3-Clause", + "dependencies": { + "@devvit/protos": "0.12.0", + "@devvit/shared-types": "0.12.0" + } + }, + "node_modules/@devvit/shared-types": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@devvit/shared-types/-/shared-types-0.12.0.tgz", + "integrity": "sha512-OugXIlBUU6PAoIfpqpIOY4RDwVNkEFuolrFdRucDqXsteqyEn8I+nDQZgI0LzJjb/zIdc/dpzzZCrubZeuKI8A==", + "license": "BSD-3-Clause", + "dependencies": { + "@devvit/protos": "0.12.0", + "jsonschema": "1.4.1", + "uuid": "9.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", + "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "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" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "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" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "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" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "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" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.34.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.34.0.tgz", + "integrity": "sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "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" + } + }, + "node_modules/@humanfs/node": { + "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", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "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" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "license": "BSD-3-Clause" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.49.0.tgz", + "integrity": "sha512-rlKIeL854Ed0e09QGYFlmDNbka6I3EQFw7iZuugQjMb11KMpJCLPFL4ZPbMfaEhLADEL1yx0oujGkBQ7+qW3eA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.49.0.tgz", + "integrity": "sha512-cqPpZdKUSQYRtLLr6R4X3sD4jCBO1zUmeo3qrWBCqYIeH8Q3KRL4F3V7XJ2Rm8/RJOQBZuqzQGWPjjvFUcYa/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.49.0.tgz", + "integrity": "sha512-99kMMSMQT7got6iYX3yyIiJfFndpojBmkHfTc1rIje8VbjhmqBXE+nb7ZZP3A5skLyujvT0eIUCUsxAe6NjWbw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.49.0.tgz", + "integrity": "sha512-y8cXoD3wdWUDpjOLMKLx6l+NFz3NlkWKcBCBfttUn+VGSfgsQ5o/yDUGtzE9HvsodkP0+16N0P4Ty1VuhtRUGg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.49.0.tgz", + "integrity": "sha512-3mY5Pr7qv4GS4ZvWoSP8zha8YoiqrU+e0ViPvB549jvliBbdNLrg2ywPGkgLC3cmvN8ya3za+Q2xVyT6z+vZqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.49.0.tgz", + "integrity": "sha512-C9KzzOAQU5gU4kG8DTk+tjdKjpWhVWd5uVkinCwwFub2m7cDYLOdtXoMrExfeBmeRy9kBQMkiyJ+HULyF1yj9w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.49.0.tgz", + "integrity": "sha512-OVSQgEZDVLnTbMq5NBs6xkmz3AADByCWI4RdKSFNlDsYXdFtlxS59J+w+LippJe8KcmeSSM3ba+GlsM9+WwC1w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.49.0.tgz", + "integrity": "sha512-ZnfSFA7fDUHNa4P3VwAcfaBLakCbYaxCk0jUnS3dTou9P95kwoOLAMlT3WmEJDBCSrOEFFV0Y1HXiwfLYJuLlA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.49.0.tgz", + "integrity": "sha512-Z81u+gfrobVK2iV7GqZCBfEB1y6+I61AH466lNK+xy1jfqFLiQ9Qv716WUM5fxFrYxwC7ziVdZRU9qvGHkYIJg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.49.0.tgz", + "integrity": "sha512-zoAwS0KCXSnTp9NH/h9aamBAIve0DXeYpll85shf9NJ0URjSTzzS+Z9evmolN+ICfD3v8skKUPyk2PO0uGdFqg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.49.0.tgz", + "integrity": "sha512-2QyUyQQ1ZtwZGiq0nvODL+vLJBtciItC3/5cYN8ncDQcv5avrt2MbKt1XU/vFAJlLta5KujqyHdYtdag4YEjYQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.49.0.tgz", + "integrity": "sha512-k9aEmOWt+mrMuD3skjVJSSxHckJp+SiFzFG+v8JLXbc/xi9hv2icSkR3U7uQzqy+/QbbYY7iNB9eDTwrELo14g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.49.0.tgz", + "integrity": "sha512-rDKRFFIWJ/zJn6uk2IdYLc09Z7zkE5IFIOWqpuU0o6ZpHcdniAyWkwSUWE/Z25N/wNDmFHHMzin84qW7Wzkjsw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.49.0.tgz", + "integrity": "sha512-FkkhIY/hYFVnOzz1WeV3S9Bd1h0hda/gRqvZCMpHWDHdiIHn6pqsY3b5eSbvGccWHMQ1uUzgZTKS4oGpykf8Tw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.49.0.tgz", + "integrity": "sha512-gRf5c+A7QiOG3UwLyOOtyJMD31JJhMjBvpfhAitPAoqZFcOeK3Kc1Veg1z/trmt+2P6F/biT02fU19GGTS529A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.49.0.tgz", + "integrity": "sha512-BR7+blScdLW1h/2hB/2oXM+dhTmpW3rQt1DeSiCP9mc2NMMkqVgjIN3DDsNpKmezffGC9R8XKVOLmBkRUcK/sA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.49.0.tgz", + "integrity": "sha512-hDMOAe+6nX3V5ei1I7Au3wcr9h3ktKzDvF2ne5ovX8RZiAHEtX1A5SNNk4zt1Qt77CmnbqT+upb/umzoPMWiPg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.49.0.tgz", + "integrity": "sha512-wkNRzfiIGaElC9kXUT+HLx17z7D0jl+9tGYRKwd8r7cUqTL7GYAvgUY++U2hK6Ar7z5Z6IRRoWC8kQxpmM7TDA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.49.0.tgz", + "integrity": "sha512-gq5aW/SyNpjp71AAzroH37DtINDcX1Qw2iv9Chyz49ZgdOP3NV8QCyKZUrGsYX9Yyggj5soFiRCgsL3HwD8TdA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.49.0.tgz", + "integrity": "sha512-gEtqFbzmZLFk2xKh7g0Rlo8xzho8KrEFEkzvHbfUGkrgXOpZ4XagQ6n+wIZFNh1nTb8UD16J4nFSFKXYgnbdBg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@stylistic/eslint-plugin": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.2.3.tgz", + "integrity": "sha512-oY7GVkJGVMI5benlBDCaRrSC1qPasafyv5dOBLLv5MTilMGnErKhO6ziEfodDDIZbo5QxPUNW360VudJOFODMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/types": "^8.38.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=9.0.0" + } + }, + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "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/node": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz", + "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.41.0.tgz", + "integrity": "sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/type-utils": "8.41.0", + "@typescript-eslint/utils": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.41.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.41.0.tgz", + "integrity": "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.41.0.tgz", + "integrity": "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.41.0", + "@typescript-eslint/types": "^8.41.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.41.0.tgz", + "integrity": "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.41.0.tgz", + "integrity": "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.41.0.tgz", + "integrity": "sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/utils": "8.41.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz", + "integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.41.0.tgz", + "integrity": "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.41.0", + "@typescript-eslint/tsconfig-utils": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.41.0.tgz", + "integrity": "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz", + "integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vitest/eslint-plugin": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@vitest/eslint-plugin/-/eslint-plugin-1.3.4.tgz", + "integrity": "sha512-EOg8d0jn3BAiKnR55WkFxmxfWA3nmzrbIIuOXyTe6A72duryNgyU+bdBEauA97Aab3ho9kLmAwgPX63Ckj4QEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "^8.24.1" + }, + "peerDependencies": { + "eslint": ">= 8.57.0", + "typescript": ">= 5.0.0", + "vitest": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "vitest": { + "optional": true + } + } + }, + "node_modules/@vitest/expect": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.4", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^4.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "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" + } + }, + "node_modules/ajv": { + "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", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-styles": { + "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" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "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/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "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" + } + }, + "node_modules/chai": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", + "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "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", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "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/cross-spawn": { + "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", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-is": { + "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/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.34.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.34.0.tgz", + "integrity": "sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.34.0", + "@eslint/plugin-kit": "^0.3.5", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "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" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "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" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "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" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "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" + } + }, + "node_modules/expect-type": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", + "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "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": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "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" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "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", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "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" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "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" + } + }, + "node_modules/hotscript": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/hotscript/-/hotscript-1.0.13.tgz", + "integrity": "sha512-C++tTF1GqkGYecL+2S1wJTfoH6APGAsbb7PAWQ3iVIwgG/EFseAfEVOKFgAFq4yK3+6j1EjUD4UQ9dRJHX/sSQ==", + "license": "ISC" + }, + "node_modules/ignore": { + "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" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "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" + } + }, + "node_modules/is-extglob": { + "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" + } + }, + "node_modules/is-glob": { + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "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/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "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" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "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/jsonschema": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", + "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/keyv": { + "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/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.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" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, + "node_modules/loupe": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", + "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "0.30.18", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.18.tgz", + "integrity": "sha512-yi8swmWbO17qHhwIBNeeZxTceJMeBvWJaId6dyvTSOwTipqeHhMhOrz6513r1sOKnpvQ7zkhlG8tPrpilwTxHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/moderndash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/moderndash/-/moderndash-4.0.0.tgz", + "integrity": "sha512-77kEJCsBo3YzqIrO4ZWHo1h7q8f8ZIRxQ0DE0fEvj3rZWsfTMLeRzctBjkz2zKM1BAIQsOqB79jm3dZ4RDFmqw==", + "license": "MIT", + "dependencies": { + "hotscript": "1.0.13", + "type-fest": "4.27.0" + }, + "engines": { + "node": ">=20", + "npm": ">=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/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "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/optionator": { + "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", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "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" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "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" + }, + "engines": { + "node": ">=6" + } + }, + "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" + } + }, + "node_modules/path-key": { + "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" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "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" + } + }, + "node_modules/protobufjs": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.2.tgz", + "integrity": "sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/punycode": { + "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/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.49.0.tgz", + "integrity": "sha512-3IVq0cGJ6H7fKXXEdVt+RcYvRCt8beYY9K1760wGQwSAHZcS9eot1zDG5axUbcp/kWRi5zKIIDX8MoKv/TzvZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.49.0", + "@rollup/rollup-android-arm64": "4.49.0", + "@rollup/rollup-darwin-arm64": "4.49.0", + "@rollup/rollup-darwin-x64": "4.49.0", + "@rollup/rollup-freebsd-arm64": "4.49.0", + "@rollup/rollup-freebsd-x64": "4.49.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.49.0", + "@rollup/rollup-linux-arm-musleabihf": "4.49.0", + "@rollup/rollup-linux-arm64-gnu": "4.49.0", + "@rollup/rollup-linux-arm64-musl": "4.49.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.49.0", + "@rollup/rollup-linux-ppc64-gnu": "4.49.0", + "@rollup/rollup-linux-riscv64-gnu": "4.49.0", + "@rollup/rollup-linux-riscv64-musl": "4.49.0", + "@rollup/rollup-linux-s390x-gnu": "4.49.0", + "@rollup/rollup-linux-x64-gnu": "4.49.0", + "@rollup/rollup-linux-x64-musl": "4.49.0", + "@rollup/rollup-win32-arm64-msvc": "4.49.0", + "@rollup/rollup-win32-ia32-msvc": "4.49.0", + "@rollup/rollup-win32-x64-msvc": "4.49.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "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" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "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", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "dev": true, + "license": "MIT" + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "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" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.27.0.tgz", + "integrity": "sha512-3IMSWgP7C5KSQqmo1wjhKrwsvXAtF33jO3QY+Uy++ia7hqvgSK6iXbbg5PbDBc1P2ZbNEDgejOrN4YooXvhwCw==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.41.0.tgz", + "integrity": "sha512-n66rzs5OBXW3SFSnZHr2T685q1i4ODm2nulFJhMZBotaTavsS8TrI3d7bDlRSs9yWo7HmyWrN9qDu14Qv7Y0Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.41.0", + "@typescript-eslint/parser": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/utils": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "license": "MIT" + }, + "node_modules/uri-js": { + "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" + } + }, + "node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/vite": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.3.tgz", + "integrity": "sha512-OOUi5zjkDxYrKhTV3V7iKsoS37VUM7v40+HuwEmcrsf11Cdx9y3DIr2Px6liIcZFwt3XSRpQvFpL3WVy7ApkGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.14" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", + "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/which": { + "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" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/word-wrap": { + "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" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json index 9465b4b..1e0aead 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,20 @@ "version": "0.11.19", "license": "BSD-3-Clause", "type": "module", + "scripts": { + "test": "npm run test:unit", + "test:unit": "vitest --run" + }, "dependencies": { - "@devvit/public-api": "0.11.19" + "@devvit/public-api": "0.12.0" }, "devDependencies": { - "typescript": "5.8.3" + "@eslint/js": "^9.10.0", + "@stylistic/eslint-plugin": "^5.1.0", + "@vitest/eslint-plugin": "^1.1.0", + "eslint": "^9.14.0", + "typescript": "5.8.3", + "typescript-eslint": "^8.4.0", + "vitest": "^3.0.5" } -} +} \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 6d3a30c..c9dde5f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,119 +1,119 @@ -import { Devvit, type FormField } from '@devvit/public-api'; +import { Devvit, type FormField } from "@devvit/public-api"; -import { handleNuke, handleNukePost } from './nuke.js'; +import { handleNuke, handleNukePost } from "./nuke.js"; Devvit.configure({ - redditAPI: true, - modLog: true, + redditAPI: true, + modLog: true, }); const nukeFields: FormField[] = [ - { - name: 'remove', - label: 'Remove comments', - type: 'boolean', - defaultValue: true, - }, - { - name: 'lock', - label: 'Lock comments', - type: 'boolean', - defaultValue: false, - }, - { - name: 'skipDistinguished', - label: 'Skip distinguished comments', - type: 'boolean', - defaultValue: false, - }, + { + name: "remove", + label: "Remove comments", + type: "boolean", + defaultValue: true, + }, + { + name: "lock", + label: "Lock comments", + type: "boolean", + defaultValue: false, + }, + { + name: "skipDistinguished", + label: "Skip distinguished comments", + type: "boolean", + defaultValue: false, + }, ] as const; const nukeForm = Devvit.createForm( - () => { - return { - fields: nukeFields, - title: 'Mop Comments', - acceptLabel: 'Mop', - cancelLabel: 'Cancel', - }; - }, - async ({ values }, context) => { - if (!values.lock && !values.remove) { - context.ui.showToast('You must select either lock or remove.'); - return; - } + () => { + return { + fields: nukeFields, + title: "Mop Comments", + acceptLabel: "Mop", + cancelLabel: "Cancel", + }; + }, + async ({ values }, context) => { + if (!values.lock && !values.remove) { + context.ui.showToast("You must select either lock or remove."); + return; + } - if (context.commentId) { - const result = await handleNuke( - { - remove: values.remove, - lock: values.lock, - skipDistinguished: values.skipDistinguished, - commentId: context.commentId, - subredditId: context.subredditId, - }, - context - ); - console.log(`Mop result - ${result.success ? 'success' : 'fail'} - ${result.message}`); - context.ui.showToast(`${result.success ? 'Success' : 'Failed'} : ${result.message}`); - } else { - context.ui.showToast(`Mop failed! Please try again later.`); - } - } + if (context.commentId) { + const result = await handleNuke( + { + remove: values.remove, + lock: values.lock, + skipDistinguished: values.skipDistinguished, + commentId: context.commentId, + subredditId: context.subredditId, + }, + context, + ); + console.log(`Mop result - ${result.success ? "success" : "fail"} - ${result.message}`); + context.ui.showToast(`${result.success ? "Success" : "Failed"} : ${result.message}`); + } else { + context.ui.showToast(`Mop failed! Please try again later.`); + } + }, ); Devvit.addMenuItem({ - label: 'Mop comments', - description: 'Remove this comment and all child comments. This might take a few seconds to run.', - location: 'comment', - forUserType: 'moderator', - onPress: (_, context) => { - context.ui.showForm(nukeForm); - }, + label: "Mop comments", + description: "Remove this comment and all child comments. This might take a few seconds to run.", + location: "comment", + forUserType: "moderator", + onPress: (_, context) => { + context.ui.showForm(nukeForm); + }, }); const nukePostForm = Devvit.createForm( - () => { - return { - fields: nukeFields, - title: 'Mop Post Comments', - acceptLabel: 'Mop', - cancelLabel: 'Cancel', - }; - }, - async ({ values }, context) => { - if (!values.lock && !values.remove) { - context.ui.showToast('You must select either lock or remove.'); - return; - } + () => { + return { + fields: nukeFields, + title: "Mop Post Comments", + acceptLabel: "Mop", + cancelLabel: "Cancel", + }; + }, + async ({ values }, context) => { + if (!values.lock && !values.remove) { + context.ui.showToast("You must select either lock or remove."); + return; + } - if (!context.postId) { - throw new Error('No post ID'); - } + if (!context.postId) { + throw new Error("No post ID"); + } - const result = await handleNukePost( - { - remove: values.remove, - lock: values.lock, - skipDistinguished: values.skipDistinguished, - postId: context.postId, - subredditId: context.subredditId, - }, - context - ); - console.log(`Mop result - ${result.success ? 'success' : 'fail'} - ${result.message}`); - context.ui.showToast(`${result.success ? 'Success' : 'Failed'} : ${result.message}`); - } + const result = await handleNukePost( + { + remove: values.remove, + lock: values.lock, + skipDistinguished: values.skipDistinguished, + postId: context.postId, + subredditId: context.subredditId, + }, + context, + ); + console.log(`Mop result - ${result.success ? "success" : "fail"} - ${result.message}`); + context.ui.showToast(`${result.success ? "Success" : "Failed"} : ${result.message}`); + }, ); Devvit.addMenuItem({ - label: 'Mop post comments', - description: 'Remove all comments of this post. This might take a few seconds to run.', - location: 'post', - forUserType: 'moderator', - onPress: (_, context) => { - context.ui.showForm(nukePostForm); - }, + label: "Mop post comments", + description: "Remove all comments of this post. This might take a few seconds to run.", + location: "post", + forUserType: "moderator", + onPress: (_, context) => { + context.ui.showForm(nukePostForm); + }, }); export default Devvit; diff --git a/src/nuke.ts b/src/nuke.ts index 15a591e..aac08e0 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -1,204 +1,204 @@ -import { Comment, Devvit, Post } from '@devvit/public-api'; +import { Comment, Devvit, Post } from "@devvit/public-api"; export type NukeProps = { - remove: boolean; - lock: boolean; - skipDistinguished: boolean; // When true, distinguished comments and their children are not processed - commentId: string; - subredditId: string; + remove: boolean; + lock: boolean; + skipDistinguished: boolean; // When true, distinguished comments and their children are not processed + commentId: string; + subredditId: string; }; export type NukePostProps = { - remove: boolean; - lock: boolean; - skipDistinguished: boolean; // When true, distinguished comments and their children are not processed - postId: string; - subredditId: string; + remove: boolean; + lock: boolean; + skipDistinguished: boolean; // When true, distinguished comments and their children are not processed + postId: string; + subredditId: string; }; // Depth-first traversal to get all comments in a thread -async function* getAllCommentsInThread( - comment: Comment, - skipDistinguished: boolean +async function* getAllCommentsInThread ( + comment: Comment, + skipDistinguished: boolean, ): AsyncGenerator { - if (!skipDistinguished || !comment.isDistinguished()) { - yield comment; - } - - const replies = await comment.replies.all(); - for (const reply of replies) { - yield* getAllCommentsInThread(reply, skipDistinguished); - } + if (!skipDistinguished || !comment.isDistinguished()) { + yield comment; + } + + const replies = await comment.replies.all(); + for (const reply of replies) { + yield* getAllCommentsInThread(reply, skipDistinguished); + } } // Depth-first traversal to get all comments in a post -async function* getAllCommentsInPost( - post: Post, - skipDistinguished: boolean +async function* getAllCommentsInPost ( + post: Post, + skipDistinguished: boolean, ): AsyncGenerator { - const comments = await post.comments.all(); - for (const comment of comments) { - yield* getAllCommentsInThread(comment, skipDistinguished); - } + const comments = await post.comments.all(); + for (const comment of comments) { + yield* getAllCommentsInThread(comment, skipDistinguished); + } } -export async function handleNukePost(props: NukePostProps, context: Devvit.Context) { - const startTime = Date.now(); - let success = true; - let message: string; +export async function handleNukePost (props: NukePostProps, context: Devvit.Context) { + const startTime = Date.now(); + let success = true; + let message: string; - const shouldLock = props.lock; - const shouldRemove = props.remove; - const skipDistinguished = props.skipDistinguished; + const shouldLock = props.lock; + const shouldRemove = props.remove; + const skipDistinguished = props.skipDistinguished; - try { - const [user, post] = await Promise.all([ - context.reddit.getCurrentUser(), - context.reddit.getPostById(props.postId), - ]); + try { + const [user, post] = await Promise.all([ + context.reddit.getCurrentUser(), + context.reddit.getPostById(props.postId), + ]); - if (!user) { - return { success: false, message: "Can't get user" }; - } + if (!user) { + return { success: false, message: "Can't get user" }; + } - const modPermissions = await user.getModPermissionsForSubreddit(post.subredditName); - const canManagePosts = modPermissions.includes('all') || modPermissions.includes('posts'); - - console.log( - `Mod Info: r/${post.subredditName} u/${user.username} permissions:${modPermissions}: ${ - canManagePosts ? 'Can mod' : 'Cannot mod' - }` - ); - - if (!canManagePosts) { - console.info( - 'A user without the correct mod permissions tried to nuke all comments of a post.' - ); - return { - message: 'You do not have the correct mod permissions to do this.', - success: false, - }; - } + const modPermissions = await user.getModPermissionsForSubreddit(post.subredditName); + const canManagePosts = modPermissions.includes("all") || modPermissions.includes("posts"); - const comments: Comment[] = []; - for await (const eachComment of getAllCommentsInPost(post, skipDistinguished)) { - comments.push(eachComment); - } - - if (shouldLock) { - await Promise.all(comments.map((comment) => comment.locked || comment.lock())); - } - - if (shouldRemove) { - await Promise.all(comments.map((comment) => comment.removed || comment.remove())); - } + console.log( + `Mod Info: r/${post.subredditName} u/${user.username} permissions:${modPermissions}: ${ + canManagePosts ? "Can mod" : "Cannot mod" + }`, + ); - const verbage = - shouldLock && shouldRemove ? 'removed and locked' : shouldLock ? 'locked' : 'removed'; - - if (shouldRemove) { - try { - await context.modLog.add({ - action: 'removecomment', - target: props.postId, - details: 'comment-mop app', - description: `u/${user.username} used comment-mop to ${verbage} all comments of this post.`, - }); - } catch (e: unknown) { - console.error(`Failed to add modlog for post: ${props.postId}.`, (e as Error).message); - } + if (!canManagePosts) { + console.info( + "A user without the correct mod permissions tried to nuke all comments of a post.", + ); + return { + message: "You do not have the correct mod permissions to do this.", + success: false, + }; + } + + const comments: Comment[] = []; + for await (const eachComment of getAllCommentsInPost(post, skipDistinguished)) { + comments.push(eachComment); + } + + if (shouldLock) { + await Promise.all(comments.map(comment => comment.locked || comment.lock())); + } + + if (shouldRemove) { + await Promise.all(comments.map(comment => comment.removed || comment.remove())); + } + + const verbage = + shouldLock && shouldRemove ? "removed and locked" : shouldLock ? "locked" : "removed"; + + if (shouldRemove) { + try { + await context.modLog.add({ + action: "removecomment", + target: props.postId, + details: "comment-mop app", + description: `u/${user.username} used comment-mop to ${verbage} all comments of this post.`, + }); + } catch (e: unknown) { + console.error(`Failed to add modlog for post: ${props.postId}.`, (e as Error).message); + } + } + + success = true; + message = `Comments ${verbage}! Refresh the page to see the cleanup.`; + const finishTime = Date.now(); + const timeElapsed = (finishTime - startTime) / 1000; + console.info(`${comments.length} comment(s) handled in ${timeElapsed} seconds.`); + } catch (err: unknown) { + success = false; + message = "Mop failed! Please try again later."; + console.error(err); } - success = true; - message = `Comments ${verbage}! Refresh the page to see the cleanup.`; - const finishTime = Date.now(); - const timeElapsed = (finishTime - startTime) / 1000; - console.info(`${comments.length} comment(s) handled in ${timeElapsed} seconds.`); - } catch (err: unknown) { - success = false; - message = 'Mop failed! Please try again later.'; - console.error(err); - } - - return { success, message }; + return { success, message }; } -export async function handleNuke(props: NukeProps, context: Devvit.Context) { - const startTime = Date.now(); - let success = true; - let message: string; - - const shouldLock = props.lock; - const shouldRemove = props.remove; - const skipDistinguished = props.skipDistinguished; - - try { - const comment = await context.reddit.getCommentById(props.commentId); - const user = await context.reddit.getCurrentUser(); - - if (!user) { - return { success: false, message: "Can't get user" }; - } +export async function handleNuke (props: NukeProps, context: Devvit.Context) { + const startTime = Date.now(); + let success = true; + let message: string; - const modPermissions = await user.getModPermissionsForSubreddit(comment.subredditName); - const canManagePosts = modPermissions.includes('all') || modPermissions.includes('posts'); - - console.log( - `Mod Info: r/${comment.subredditName} u/${user.username} permissions:${modPermissions}: ${ - canManagePosts ? 'Can mod' : 'Cannot mod' - }` - ); - - if (!canManagePosts) { - console.info('A user without the correct mod permissions tried to comment mop.'); - return { - message: 'You do not have the correct mod permissions to do this.', - success: false, - }; - } + const shouldLock = props.lock; + const shouldRemove = props.remove; + const skipDistinguished = props.skipDistinguished; - const comments: Comment[] = []; - for await (const eachComment of getAllCommentsInThread(comment, skipDistinguished)) { - comments.push(eachComment); - } + try { + const comment = await context.reddit.getCommentById(props.commentId); + const user = await context.reddit.getCurrentUser(); - if (shouldLock) { - await Promise.all(comments.map((comment) => comment.locked || comment.lock())); - } + if (!user) { + return { success: false, message: "Can't get user" }; + } - if (shouldRemove) { - await Promise.all(comments.map((comment) => comment.removed || comment.remove())); - } + const modPermissions = await user.getModPermissionsForSubreddit(comment.subredditName); + const canManagePosts = modPermissions.includes("all") || modPermissions.includes("posts"); - const verbage = - shouldLock && shouldRemove ? 'removed and locked' : shouldLock ? 'locked' : 'removed'; - - if (shouldRemove) { - try { - await context.modLog.add({ - action: 'removecomment', - target: props.commentId, - details: 'comment-mop app', - description: `u/${user.username} used comment-mop to ${verbage} this comment and all child comments.`, - }); - } catch (e: unknown) { - console.error( - `Failed to add modlog for comment: ${props.commentId}.`, - (e as Error).message + console.log( + `Mod Info: r/${comment.subredditName} u/${user.username} permissions:${modPermissions}: ${ + canManagePosts ? "Can mod" : "Cannot mod" + }`, ); - } + + if (!canManagePosts) { + console.info("A user without the correct mod permissions tried to comment mop."); + return { + message: "You do not have the correct mod permissions to do this.", + success: false, + }; + } + + const comments: Comment[] = []; + for await (const eachComment of getAllCommentsInThread(comment, skipDistinguished)) { + comments.push(eachComment); + } + + if (shouldLock) { + await Promise.all(comments.map(comment => comment.locked || comment.lock())); + } + + if (shouldRemove) { + await Promise.all(comments.map(comment => comment.removed || comment.remove())); + } + + const verbage = + shouldLock && shouldRemove ? "removed and locked" : shouldLock ? "locked" : "removed"; + + if (shouldRemove) { + try { + await context.modLog.add({ + action: "removecomment", + target: props.commentId, + details: "comment-mop app", + description: `u/${user.username} used comment-mop to ${verbage} this comment and all child comments.`, + }); + } catch (e: unknown) { + console.error( + `Failed to add modlog for comment: ${props.commentId}.`, + (e as Error).message, + ); + } + } + + success = true; + message = `Comments ${verbage}! Refresh the page to see the cleanup.`; + const finishTime = Date.now(); + const timeElapsed = (finishTime - startTime) / 1000; + console.info(`${comments.length} comment(s) handled in ${timeElapsed} seconds.`); + } catch (err: unknown) { + success = false; + message = "Mop failed! Please try again later."; + console.error(err); } - success = true; - message = `Comments ${verbage}! Refresh the page to see the cleanup.`; - const finishTime = Date.now(); - const timeElapsed = (finishTime - startTime) / 1000; - console.info(`${comments.length} comment(s) handled in ${timeElapsed} seconds.`); - } catch (err: unknown) { - success = false; - message = 'Mop failed! Please try again later.'; - console.error(err); - } - - return { success, message }; + return { success, message }; } diff --git a/tsconfig.json b/tsconfig.json index c4a0677..cd4c8a5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,7 @@ { - "extends": "@devvit/tsconfig/base.json", + "extends": "@devvit/public-api/devvit.tsconfig.json", + "compilerOptions": { + "allowJs": false, + "checkJs": false + } } From 5a6e294bb02e0d67c87c46ae72c40f508841edaf Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sat, 30 Aug 2025 07:34:59 +0100 Subject: [PATCH 02/28] Fix remaining linting issues --- src/main.ts | 40 ++++++++++++++++++---------------------- src/nuke.ts | 44 +++++++++++++++++++++----------------------- 2 files changed, 39 insertions(+), 45 deletions(-) diff --git a/src/main.ts b/src/main.ts index c9dde5f..0a25911 100644 --- a/src/main.ts +++ b/src/main.ts @@ -29,14 +29,12 @@ const nukeFields: FormField[] = [ ] as const; const nukeForm = Devvit.createForm( - () => { - return { - fields: nukeFields, - title: "Mop Comments", - acceptLabel: "Mop", - cancelLabel: "Cancel", - }; - }, + () => ({ + fields: nukeFields, + title: "Mop Comments", + acceptLabel: "Mop", + cancelLabel: "Cancel", + }), async ({ values }, context) => { if (!values.lock && !values.remove) { context.ui.showToast("You must select either lock or remove."); @@ -46,9 +44,9 @@ const nukeForm = Devvit.createForm( if (context.commentId) { const result = await handleNuke( { - remove: values.remove, - lock: values.lock, - skipDistinguished: values.skipDistinguished, + remove: values.remove as boolean, + lock: values.lock as boolean, + skipDistinguished: values.skipDistinguished as boolean, commentId: context.commentId, subredditId: context.subredditId, }, @@ -73,14 +71,12 @@ Devvit.addMenuItem({ }); const nukePostForm = Devvit.createForm( - () => { - return { - fields: nukeFields, - title: "Mop Post Comments", - acceptLabel: "Mop", - cancelLabel: "Cancel", - }; - }, + () => ({ + fields: nukeFields, + title: "Mop Post Comments", + acceptLabel: "Mop", + cancelLabel: "Cancel", + }), async ({ values }, context) => { if (!values.lock && !values.remove) { context.ui.showToast("You must select either lock or remove."); @@ -93,9 +89,9 @@ const nukePostForm = Devvit.createForm( const result = await handleNukePost( { - remove: values.remove, - lock: values.lock, - skipDistinguished: values.skipDistinguished, + remove: values.remove as boolean, + lock: values.lock as boolean, + skipDistinguished: values.skipDistinguished as boolean, postId: context.postId, subredditId: context.subredditId, }, diff --git a/src/nuke.ts b/src/nuke.ts index aac08e0..6267993 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -1,20 +1,20 @@ import { Comment, Devvit, Post } from "@devvit/public-api"; -export type NukeProps = { +export interface NukeProps { remove: boolean; lock: boolean; skipDistinguished: boolean; // When true, distinguished comments and their children are not processed commentId: string; subredditId: string; -}; +} -export type NukePostProps = { +export interface NukePostProps { remove: boolean; lock: boolean; skipDistinguished: boolean; // When true, distinguished comments and their children are not processed postId: string; subredditId: string; -}; +} // Depth-first traversal to get all comments in a thread async function* getAllCommentsInThread ( @@ -44,7 +44,7 @@ async function* getAllCommentsInPost ( export async function handleNukePost (props: NukePostProps, context: Devvit.Context) { const startTime = Date.now(); - let success = true; + let success: boolean; let message: string; const shouldLock = props.lock; @@ -64,16 +64,10 @@ export async function handleNukePost (props: NukePostProps, context: Devvit.Cont const modPermissions = await user.getModPermissionsForSubreddit(post.subredditName); const canManagePosts = modPermissions.includes("all") || modPermissions.includes("posts"); - console.log( - `Mod Info: r/${post.subredditName} u/${user.username} permissions:${modPermissions}: ${ - canManagePosts ? "Can mod" : "Cannot mod" - }`, - ); + console.log(`Mod Info: r/${post.subredditName} u/${user.username} permissions:${modPermissions}: ${canManagePosts ? "Can mod" : "Cannot mod"}`); if (!canManagePosts) { - console.info( - "A user without the correct mod permissions tried to nuke all comments of a post.", - ); + console.info("A user without the correct mod permissions tried to nuke all comments of a post."); return { message: "You do not have the correct mod permissions to do this.", success: false, @@ -93,8 +87,12 @@ export async function handleNukePost (props: NukePostProps, context: Devvit.Cont await Promise.all(comments.map(comment => comment.removed || comment.remove())); } - const verbage = - shouldLock && shouldRemove ? "removed and locked" : shouldLock ? "locked" : "removed"; + let verbage: string; + if (shouldLock && shouldRemove) { + verbage = "removed and locked"; + } else { + verbage = shouldLock ? "locked" : "removed"; + } if (shouldRemove) { try { @@ -125,7 +123,7 @@ export async function handleNukePost (props: NukePostProps, context: Devvit.Cont export async function handleNuke (props: NukeProps, context: Devvit.Context) { const startTime = Date.now(); - let success = true; + let success: boolean; let message: string; const shouldLock = props.lock; @@ -143,11 +141,7 @@ export async function handleNuke (props: NukeProps, context: Devvit.Context) { const modPermissions = await user.getModPermissionsForSubreddit(comment.subredditName); const canManagePosts = modPermissions.includes("all") || modPermissions.includes("posts"); - console.log( - `Mod Info: r/${comment.subredditName} u/${user.username} permissions:${modPermissions}: ${ - canManagePosts ? "Can mod" : "Cannot mod" - }`, - ); + console.log(`Mod Info: r/${comment.subredditName} u/${user.username} permissions:${modPermissions}: ${canManagePosts ? "Can mod" : "Cannot mod"}`); if (!canManagePosts) { console.info("A user without the correct mod permissions tried to comment mop."); @@ -170,8 +164,12 @@ export async function handleNuke (props: NukeProps, context: Devvit.Context) { await Promise.all(comments.map(comment => comment.removed || comment.remove())); } - const verbage = - shouldLock && shouldRemove ? "removed and locked" : shouldLock ? "locked" : "removed"; + let verbage: string; + if (shouldLock && shouldRemove) { + verbage = "removed and locked"; + } else { + verbage = shouldLock ? "locked" : "removed"; + } if (shouldRemove) { try { From 2b803408376c3cb3bdb81faeeed2eced764cbaf1 Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sat, 30 Aug 2025 16:50:55 +0100 Subject: [PATCH 03/28] Major refactoring and add ability to define default mop parameters --- devvit.yaml | 2 +- package-lock.json | 22 +++- package.json | 9 +- src/main.ts | 133 +++++++++-------------- src/nuke.ts | 239 +++++++++++++++++++---------------------- src/settings.ts | 36 +++++++ src/userPermissions.ts | 53 +++++++++ 7 files changed, 274 insertions(+), 220 deletions(-) create mode 100644 src/settings.ts create mode 100644 src/userPermissions.ts diff --git a/devvit.yaml b/devvit.yaml index 2b835ad..adc1f52 100644 --- a/devvit.yaml +++ b/devvit.yaml @@ -1 +1 @@ -name: comment-mop +name: comment-nuke diff --git a/package-lock.json b/package-lock.json index 40d3fbd..c559c2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,10 @@ "version": "0.11.19", "license": "BSD-3-Clause", "dependencies": { - "@devvit/public-api": "0.12.0" + "@devvit/protos": "0.12.0", + "@devvit/public-api": "0.12.0", + "@types/pluralize": "^0.0.33", + "pluralize": "^8.0.0" }, "devDependencies": { "@eslint/js": "^9.10.0", @@ -18,7 +21,7 @@ "eslint": "^9.14.0", "typescript": "5.8.3", "typescript-eslint": "^8.4.0", - "vitest": "^3.0.5" + "vitest": "^3.2.4" } }, "node_modules/@devvit/metrics": { @@ -1231,6 +1234,12 @@ "undici-types": "~7.10.0" } }, + "node_modules/@types/pluralize": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/pluralize/-/pluralize-0.0.33.tgz", + "integrity": "sha512-JOqsl+ZoCpP4e8TDke9W79FDcSgPAR0l6pixx2JHkhnRjvShyYiAYw2LVsnA7K08Y6DeOnaU6ujmENO4os/cYg==", + "license": "MIT" + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.41.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.41.0.tgz", @@ -2794,6 +2803,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/postcss": { "version": "8.5.6", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", diff --git a/package.json b/package.json index 1e0aead..f2cf061 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,10 @@ "test:unit": "vitest --run" }, "dependencies": { - "@devvit/public-api": "0.12.0" + "@devvit/protos": "0.12.0", + "@devvit/public-api": "0.12.0", + "@types/pluralize": "^0.0.33", + "pluralize": "^8.0.0" }, "devDependencies": { "@eslint/js": "^9.10.0", @@ -18,6 +21,6 @@ "eslint": "^9.14.0", "typescript": "5.8.3", "typescript-eslint": "^8.4.0", - "vitest": "^3.0.5" + "vitest": "^3.2.4" } -} \ No newline at end of file +} diff --git a/src/main.ts b/src/main.ts index 0a25911..81a9e5e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,114 +1,77 @@ -import { Devvit, type FormField } from "@devvit/public-api"; +import { Devvit } from "@devvit/public-api"; +import { handleNukeCommentForm, handleNukePostForm, nukeFormDefinition } from "./nuke.js"; +import { appSettings, getNukeDefaults } from "./settings.js"; +import { canCurrentUserManagePostsAndComments, handleModAction } from "./userPermissions.js"; -import { handleNuke, handleNukePost } from "./nuke.js"; +Devvit.addSettings(appSettings); Devvit.configure({ redditAPI: true, modLog: true, }); -const nukeFields: FormField[] = [ - { - name: "remove", - label: "Remove comments", - type: "boolean", - defaultValue: true, - }, - { - name: "lock", - label: "Lock comments", - type: "boolean", - defaultValue: false, - }, - { - name: "skipDistinguished", - label: "Skip distinguished comments", - type: "boolean", - defaultValue: false, - }, -] as const; - -const nukeForm = Devvit.createForm( - () => ({ - fields: nukeFields, - title: "Mop Comments", - acceptLabel: "Mop", - cancelLabel: "Cancel", - }), - async ({ values }, context) => { - if (!values.lock && !values.remove) { - context.ui.showToast("You must select either lock or remove."); - return; - } +Devvit.addTrigger({ + event: "ModAction", + onEvent: handleModAction, +}); - if (context.commentId) { - const result = await handleNuke( - { - remove: values.remove as boolean, - lock: values.lock as boolean, - skipDistinguished: values.skipDistinguished as boolean, - commentId: context.commentId, - subredditId: context.subredditId, - }, - context, - ); - console.log(`Mop result - ${result.success ? "success" : "fail"} - ${result.message}`); - context.ui.showToast(`${result.success ? "Success" : "Failed"} : ${result.message}`); - } else { - context.ui.showToast(`Mop failed! Please try again later.`); - } - }, -); +const nukeForm = Devvit.createForm(nukeFormDefinition, handleNukeCommentForm); Devvit.addMenuItem({ label: "Mop comments", description: "Remove this comment and all child comments. This might take a few seconds to run.", location: "comment", forUserType: "moderator", - onPress: (_, context) => { - context.ui.showForm(nukeForm); - }, -}); - -const nukePostForm = Devvit.createForm( - () => ({ - fields: nukeFields, - title: "Mop Post Comments", - acceptLabel: "Mop", - cancelLabel: "Cancel", - }), - async ({ values }, context) => { - if (!values.lock && !values.remove) { - context.ui.showToast("You must select either lock or remove."); + onPress: async (_, context) => { + const canManagePostsAndComments = await canCurrentUserManagePostsAndComments(context); + if (canManagePostsAndComments === undefined) { + context.ui.showToast("Could not determine your mod permissions. Please try again later."); return; } - if (!context.postId) { - throw new Error("No post ID"); + if (!canManagePostsAndComments) { + context.ui.showToast("You do not have the correct mod permissions to do this."); + return; } - const result = await handleNukePost( - { - remove: values.remove as boolean, - lock: values.lock as boolean, - skipDistinguished: values.skipDistinguished as boolean, - postId: context.postId, - subredditId: context.subredditId, - }, - context, - ); - console.log(`Mop result - ${result.success ? "success" : "fail"} - ${result.message}`); - context.ui.showToast(`${result.success ? "Success" : "Failed"} : ${result.message}`); + const nukeDefaults = await getNukeDefaults(context); + const nukeData = { + title: "Mop comments", + remove: nukeDefaults.remove, + lock: nukeDefaults.lock, + skipDistinguished: nukeDefaults.skipDistinguished, + }; + context.ui.showForm(nukeForm, nukeData); }, -); +}); + +const nukePostForm = Devvit.createForm(nukeFormDefinition, handleNukePostForm); Devvit.addMenuItem({ label: "Mop post comments", description: "Remove all comments of this post. This might take a few seconds to run.", location: "post", forUserType: "moderator", - onPress: (_, context) => { - context.ui.showForm(nukePostForm); + onPress: async (_, context) => { + const canManagePostsAndComments = await canCurrentUserManagePostsAndComments(context); + if (canManagePostsAndComments === undefined) { + context.ui.showToast("Could not determine your mod permissions. Please try again later."); + return; + } + + if (!canManagePostsAndComments) { + context.ui.showToast("You do not have the correct mod permissions to do this."); + return; + } + + const nukeDefaults = await getNukeDefaults(context); + const nukeData = { + title: "Mop post comments", + remove: nukeDefaults.remove, + lock: nukeDefaults.lock, + skipDistinguished: nukeDefaults.skipDistinguished, + }; + context.ui.showForm(nukePostForm, nukeData); }, }); diff --git a/src/nuke.ts b/src/nuke.ts index 6267993..740a379 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -1,19 +1,43 @@ -import { Comment, Devvit, Post } from "@devvit/public-api"; +import { Comment, Context, FormFunction, FormOnSubmitEvent, JSONObject, Post } from "@devvit/public-api"; +import pluralize from "pluralize"; -export interface NukeProps { - remove: boolean; - lock: boolean; - skipDistinguished: boolean; // When true, distinguished comments and their children are not processed - commentId: string; - subredditId: string; +export enum NukeFormField { + Remove = "remove", + Lock = "lock", + SkipDistinguished = "skipDistinguished", } -export interface NukePostProps { +export const nukeFormDefinition: FormFunction = data => ({ + title: data.title as string, + fields: [ + { + name: NukeFormField.Remove, + label: "Remove Comments", + type: "boolean", + defaultValue: data.remove as boolean, + }, + { + name: NukeFormField.Lock, + label: "Lock Comments", + type: "boolean", + defaultValue: data.lock as boolean, + }, + { + name: NukeFormField.SkipDistinguished, + label: "Skip Distinguished Comments", + type: "boolean", + defaultValue: data.skipDistinguished as boolean, + }, + ], + acceptLabel: "Mop", + cancelLabel: "Cancel", +}); + +export interface NukeProps { remove: boolean; lock: boolean; skipDistinguished: boolean; // When true, distinguished comments and their children are not processed - postId: string; - subredditId: string; + target: Post | Comment; } // Depth-first traversal to get all comments in a thread @@ -42,161 +66,118 @@ async function* getAllCommentsInPost ( } } -export async function handleNukePost (props: NukePostProps, context: Devvit.Context) { - const startTime = Date.now(); - let success: boolean; - let message: string; - - const shouldLock = props.lock; - const shouldRemove = props.remove; - const skipDistinguished = props.skipDistinguished; - +async function nukeComments (comments: Comment[], shouldLock: boolean, shouldRemove: boolean): Promise { try { - const [user, post] = await Promise.all([ - context.reddit.getCurrentUser(), - context.reddit.getPostById(props.postId), - ]); + const promises: Promise[] = []; - if (!user) { - return { success: false, message: "Can't get user" }; + if (shouldRemove) { + promises.push(...comments.map(comment => comment.remove())); } - const modPermissions = await user.getModPermissionsForSubreddit(post.subredditName); - const canManagePosts = modPermissions.includes("all") || modPermissions.includes("posts"); - - console.log(`Mod Info: r/${post.subredditName} u/${user.username} permissions:${modPermissions}: ${canManagePosts ? "Can mod" : "Cannot mod"}`); - - if (!canManagePosts) { - console.info("A user without the correct mod permissions tried to nuke all comments of a post."); - return { - message: "You do not have the correct mod permissions to do this.", - success: false, - }; + if (shouldLock) { + promises.push(...comments.map(comment => comment.lock())); } - const comments: Comment[] = []; - for await (const eachComment of getAllCommentsInPost(post, skipDistinguished)) { - comments.push(eachComment); - } + await Promise.all(promises); + return true; + } catch (error) { + console.error("Failed to nuke comments:", error); + return false; + } +} - if (shouldLock) { - await Promise.all(comments.map(comment => comment.locked || comment.lock())); - } +export async function handleNukePostForm (event: FormOnSubmitEvent, context: Context) { + const { values } = event; - if (shouldRemove) { - await Promise.all(comments.map(comment => comment.removed || comment.remove())); - } + if (!context.postId) { + console.error("No post ID"); + throw new Error("No post ID"); + } - let verbage: string; - if (shouldLock && shouldRemove) { - verbage = "removed and locked"; - } else { - verbage = shouldLock ? "locked" : "removed"; - } + const target = await context.reddit.getPostById(context.postId); - if (shouldRemove) { - try { - await context.modLog.add({ - action: "removecomment", - target: props.postId, - details: "comment-mop app", - description: `u/${user.username} used comment-mop to ${verbage} all comments of this post.`, - }); - } catch (e: unknown) { - console.error(`Failed to add modlog for post: ${props.postId}.`, (e as Error).message); - } - } + const nukeProps: NukeProps = { + remove: values.remove as boolean, + lock: values.lock as boolean, + skipDistinguished: values.skipDistinguished as boolean, + target, + }; - success = true; - message = `Comments ${verbage}! Refresh the page to see the cleanup.`; - const finishTime = Date.now(); - const timeElapsed = (finishTime - startTime) / 1000; - console.info(`${comments.length} comment(s) handled in ${timeElapsed} seconds.`); - } catch (err: unknown) { - success = false; - message = "Mop failed! Please try again later."; - console.error(err); + if (!nukeProps.lock && !nukeProps.remove) { + context.ui.showToast("You must select either lock or remove."); + return; } - return { success, message }; + await handleNuke(nukeProps, context); } -export async function handleNuke (props: NukeProps, context: Devvit.Context) { - const startTime = Date.now(); - let success: boolean; - let message: string; - - const shouldLock = props.lock; - const shouldRemove = props.remove; - const skipDistinguished = props.skipDistinguished; - - try { - const comment = await context.reddit.getCommentById(props.commentId); - const user = await context.reddit.getCurrentUser(); +export async function handleNukeCommentForm (event: FormOnSubmitEvent, context: Context) { + const { values } = event; - if (!user) { - return { success: false, message: "Can't get user" }; - } + if (!context.commentId) { + console.error("No comment ID"); + throw new Error("No comment ID"); + } - const modPermissions = await user.getModPermissionsForSubreddit(comment.subredditName); - const canManagePosts = modPermissions.includes("all") || modPermissions.includes("posts"); + const target = await context.reddit.getCommentById(context.commentId); - console.log(`Mod Info: r/${comment.subredditName} u/${user.username} permissions:${modPermissions}: ${canManagePosts ? "Can mod" : "Cannot mod"}`); + const nukeProps: NukeProps = { + remove: values.remove as boolean, + lock: values.lock as boolean, + skipDistinguished: values.skipDistinguished as boolean, + target, + }; - if (!canManagePosts) { - console.info("A user without the correct mod permissions tried to comment mop."); - return { - message: "You do not have the correct mod permissions to do this.", - success: false, - }; - } + await handleNuke(nukeProps, context); +} +async function handleNuke (nukeProps: NukeProps, context: Context): Promise { + try { const comments: Comment[] = []; - for await (const eachComment of getAllCommentsInThread(comment, skipDistinguished)) { - comments.push(eachComment); - } - if (shouldLock) { - await Promise.all(comments.map(comment => comment.locked || comment.lock())); + if (nukeProps.target instanceof Comment) { + for await (const eachComment of getAllCommentsInThread(nukeProps.target, nukeProps.skipDistinguished)) { + comments.push(eachComment); + } + } else { + for await (const eachComment of getAllCommentsInPost(nukeProps.target, nukeProps.skipDistinguished)) { + comments.push(eachComment); + } } - if (shouldRemove) { - await Promise.all(comments.map(comment => comment.removed || comment.remove())); + const nukeResult = await nukeComments(comments, nukeProps.lock, nukeProps.remove); + if (!nukeResult) { + context.ui.showToast("Mop failed! Please try again later."); + return; } - let verbage: string; - if (shouldLock && shouldRemove) { - verbage = "removed and locked"; + let toastVerbage: string; + let logVerbage: string; + if (nukeProps.lock && nukeProps.remove) { + toastVerbage = "removed and locked"; + logVerbage = "remove and lock"; } else { - verbage = shouldLock ? "locked" : "removed"; + toastVerbage = nukeProps.lock ? "locked" : "removed"; + logVerbage = nukeProps.lock ? "lock" : "remove"; } - if (shouldRemove) { + console.log(`Successfully ${toastVerbage} ${comments.length} ${pluralize("comment", comments.length)} removed on ${nukeProps.target.id}.`); + + if (nukeProps.remove) { try { await context.modLog.add({ - action: "removecomment", - target: props.commentId, + action: nukeProps.target instanceof Comment ? "removecomment" : "removelink", + target: nukeProps.target.id, details: "comment-mop app", - description: `u/${user.username} used comment-mop to ${verbage} this comment and all child comments.`, + description: `${await context.reddit.getCurrentUsername()} used comment-mop to ${logVerbage} all comments of this post.`, }); } catch (e: unknown) { - console.error( - `Failed to add modlog for comment: ${props.commentId}.`, - (e as Error).message, - ); + console.error(`Failed to add modlog for ${nukeProps.target.id}.`, (e as Error).message); } } - success = true; - message = `Comments ${verbage}! Refresh the page to see the cleanup.`; - const finishTime = Date.now(); - const timeElapsed = (finishTime - startTime) / 1000; - console.info(`${comments.length} comment(s) handled in ${timeElapsed} seconds.`); - } catch (err: unknown) { - success = false; - message = "Mop failed! Please try again later."; - console.error(err); + context.ui.showToast(`Successfully ${toastVerbage} ${comments.length} ${pluralize("comment", comments.length)}.`); + } catch (e) { + console.error("Failed to nuke comments:", e); } - - return { success, message }; } diff --git a/src/settings.ts b/src/settings.ts new file mode 100644 index 0000000..182d4f6 --- /dev/null +++ b/src/settings.ts @@ -0,0 +1,36 @@ +import { Context, SettingsFormField } from "@devvit/public-api"; +import { NukeFormField } from "./nuke.js"; + +export const appSettings: SettingsFormField = { + type: "group", + label: "Comment Mop Defaults", + fields: [ + { + name: NukeFormField.Remove, + type: "boolean", + label: "Remove Comments", + defaultValue: true, + }, + { + name: NukeFormField.Lock, + type: "boolean", + label: "Lock Comments", + defaultValue: false, + }, + { + name: NukeFormField.SkipDistinguished, + type: "boolean", + label: "Skip Distinguished comments", + defaultValue: false, + }, + ], +}; + +export async function getNukeDefaults (context: Context) { + const settings = await context.settings.getAll(); + return { + remove: settings[NukeFormField.Remove] as boolean | undefined ?? true, + lock: settings[NukeFormField.Lock] as boolean | undefined ?? false, + skipDistinguished: settings[NukeFormField.SkipDistinguished] as boolean | undefined ?? false, + }; +} diff --git a/src/userPermissions.ts b/src/userPermissions.ts new file mode 100644 index 0000000..737455b --- /dev/null +++ b/src/userPermissions.ts @@ -0,0 +1,53 @@ +import { ModAction } from "@devvit/protos"; +import { Context, TriggerContext } from "@devvit/public-api"; + +function getPermissionsCacheKey (userId: string) { + return `permissionsCache:${userId}`; +} + +export async function canCurrentUserManagePostsAndComments (context: Context): Promise { + if (!context.userId) { + console.error("No user ID found"); + return; + } + + const cachedValue = await context.redis.get(getPermissionsCacheKey(context.userId)); + if (cachedValue) { + console.log(`Cache hit for user ${context.userId}, can nuke: ${cachedValue}`); + return JSON.parse(cachedValue) as boolean; + } + + const currentUser = await context.reddit.getCurrentUser(); + if (!currentUser) { + console.error("No current user found"); + return; + } + + const modPermissions = await currentUser.getModPermissionsForSubreddit(context.subredditName ?? await context.reddit.getCurrentSubredditName()); + const canManagePosts = modPermissions.includes("all") || modPermissions.includes("posts"); + + const keyExpiry = Date.now() + 1000 * 28 * 24 * 60 * 60; // 28 days + await context.redis.set(getPermissionsCacheKey(currentUser.id), JSON.stringify(canManagePosts), { expiration: new Date(keyExpiry) }); + + console.log(`Cache miss for user ${currentUser.id}, can nuke: ${canManagePosts}`); + return canManagePosts; +} + +export async function handleModAction (event: ModAction, context: TriggerContext) { + if (!event.action || !event.targetUser?.id) { + return; + } + + const relevantModActions = [ + "addmoderator", + "invitemoderator", + "permissions", + "removemoderator", + ]; + + if (!relevantModActions.includes(event.action)) { + return; + } + + await context.redis.del(getPermissionsCacheKey(event.targetUser.id)); +} From 6692bfae35a10ba1d32cc8be391ec1e2e495f1c8 Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sat, 30 Aug 2025 17:16:28 +0100 Subject: [PATCH 04/28] Update README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6cef68d..ea9f632 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ A moderation tool used for deleting and locking an entire comment tree, starting with a single comment, or at an entire post level. +Run Comment Mop using the three-dot menu (desktop) or mod shield menu (mobile) and chose the "Mop" option. + ## Credits This app was originally written by /u/FlyingLaserTurtle, with contributions from /u/ni5arga. ## Change History + +Coming soon in the next version: The ability to set defaults for the Comment Mop form. From 2954926bfa30127f7ea29cd97fc042a3437ed39c Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sat, 30 Aug 2025 17:17:31 +0100 Subject: [PATCH 05/28] Update success toast to be green if mop works correctly --- src/nuke.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nuke.ts b/src/nuke.ts index 740a379..a01ad4b 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -176,7 +176,10 @@ async function handleNuke (nukeProps: NukeProps, context: Context): Promise Date: Sat, 30 Aug 2025 18:20:23 +0100 Subject: [PATCH 06/28] Improve console output --- src/nuke.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nuke.ts b/src/nuke.ts index a01ad4b..3d00b20 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -161,7 +161,7 @@ async function handleNuke (nukeProps: NukeProps, context: Context): Promise Date: Sat, 30 Aug 2025 18:20:44 +0100 Subject: [PATCH 07/28] Use alternate method of identifying mod permissiosn --- README.md | 5 ++++- src/userPermissions.ts | 11 ++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ea9f632..ef89575 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,7 @@ This app was originally written by /u/FlyingLaserTurtle, with contributions from ## Change History -Coming soon in the next version: The ability to set defaults for the Comment Mop form. +Coming soon in the next version: + +* Fix error that causes Comment Mop to fail consistently for certain users +* The ability to set defaults for the Comment Mop form. diff --git a/src/userPermissions.ts b/src/userPermissions.ts index 737455b..0d050ca 100644 --- a/src/userPermissions.ts +++ b/src/userPermissions.ts @@ -17,10 +17,15 @@ export async function canCurrentUserManagePostsAndComments (context: Context): P return JSON.parse(cachedValue) as boolean; } - const currentUser = await context.reddit.getCurrentUser(); + const moderators = await context.reddit.getModerators({ + subredditName: context.subredditName ?? await context.reddit.getCurrentSubredditName(), + username: await context.reddit.getCurrentUsername(), + }).all(); + + const currentUser = moderators.find(moderator => moderator.id === context.userId); if (!currentUser) { - console.error("No current user found"); - return; + console.error("Current user is not a moderator"); + return false; } const modPermissions = await currentUser.getModPermissionsForSubreddit(context.subredditName ?? await context.reddit.getCurrentSubredditName()); From b44b3570e9b9b50e75e99dc6ea6e1d609d0d9d2f Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sat, 30 Aug 2025 18:21:33 +0100 Subject: [PATCH 08/28] Add toast notification for empty comments in nuke function --- src/nuke.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nuke.ts b/src/nuke.ts index 3d00b20..ccb6034 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -145,6 +145,11 @@ async function handleNuke (nukeProps: NukeProps, context: Context): Promise Date: Sun, 31 Aug 2025 09:21:35 +0100 Subject: [PATCH 09/28] Refactor permission checks and improve user feedback in nuke functionality --- README.md | 6 ++++-- src/main.ts | 24 +++++++--------------- src/nuke.ts | 1 + src/userPermissions.ts | 45 ++++++++++++++++++++++++++++++++++-------- 4 files changed, 49 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index ef89575..88d8966 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ A moderation tool used for deleting and locking an entire comment tree, starting with a single comment, or at an entire post level. -Run Comment Mop using the three-dot menu (desktop) or mod shield menu (mobile) and chose the "Mop" option. +Run Comment Mop using the three-dot menu or mod shield menu (depending on platform) and chose the "Mop" option. + +From version 9.2, you can configure the default options for the Mop form in your app settings, which you can find via the [Developer Platform app portal(https://developers.reddit.com/my/communities)]. ## Credits @@ -8,7 +10,7 @@ This app was originally written by /u/FlyingLaserTurtle, with contributions from ## Change History -Coming soon in the next version: +Coming soon in the next version: * Fix error that causes Comment Mop to fail consistently for certain users * The ability to set defaults for the Comment Mop form. diff --git a/src/main.ts b/src/main.ts index 81a9e5e..b2a4f10 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ import { Devvit } from "@devvit/public-api"; import { handleNukeCommentForm, handleNukePostForm, nukeFormDefinition } from "./nuke.js"; import { appSettings, getNukeDefaults } from "./settings.js"; -import { canCurrentUserManagePostsAndComments, handleModAction } from "./userPermissions.js"; +import { handleModAction, preCheckNukePermissions } from "./userPermissions.js"; Devvit.addSettings(appSettings); @@ -23,14 +23,7 @@ Devvit.addMenuItem({ location: "comment", forUserType: "moderator", onPress: async (_, context) => { - const canManagePostsAndComments = await canCurrentUserManagePostsAndComments(context); - if (canManagePostsAndComments === undefined) { - context.ui.showToast("Could not determine your mod permissions. Please try again later."); - return; - } - - if (!canManagePostsAndComments) { - context.ui.showToast("You do not have the correct mod permissions to do this."); + if (!await preCheckNukePermissions(context)) { return; } @@ -41,6 +34,8 @@ Devvit.addMenuItem({ lock: nukeDefaults.lock, skipDistinguished: nukeDefaults.skipDistinguished, }; + + console.log(`Showing nuke comment form for user ${context.userId}`); context.ui.showForm(nukeForm, nukeData); }, }); @@ -53,14 +48,7 @@ Devvit.addMenuItem({ location: "post", forUserType: "moderator", onPress: async (_, context) => { - const canManagePostsAndComments = await canCurrentUserManagePostsAndComments(context); - if (canManagePostsAndComments === undefined) { - context.ui.showToast("Could not determine your mod permissions. Please try again later."); - return; - } - - if (!canManagePostsAndComments) { - context.ui.showToast("You do not have the correct mod permissions to do this."); + if (!await preCheckNukePermissions(context)) { return; } @@ -71,6 +59,8 @@ Devvit.addMenuItem({ lock: nukeDefaults.lock, skipDistinguished: nukeDefaults.skipDistinguished, }; + + console.log(`Showing nuke post form for user ${context.userId}`); context.ui.showForm(nukePostForm, nukeData); }, }); diff --git a/src/nuke.ts b/src/nuke.ts index ccb6034..7575b9e 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -146,6 +146,7 @@ async function handleNuke (nukeProps: NukeProps, context: Context): Promise { + // First, attempt to get user by conventional means. + try { + const user = await context.reddit.getCurrentUser(); + return user; + } catch (error) { + console.error("Error fetching current user using getCurrentUser():", error); + } + + // Fall back to getting the user from the moderators list. + const moderators = await context.reddit.getModerators({ + subredditName: context.subredditName ?? await context.reddit.getCurrentSubredditName(), + username: await context.reddit.getCurrentUsername(), + }).all(); + + return moderators.find(moderator => moderator.id === context.userId); +} + export async function canCurrentUserManagePostsAndComments (context: Context): Promise { if (!context.userId) { console.error("No user ID found"); @@ -17,14 +35,9 @@ export async function canCurrentUserManagePostsAndComments (context: Context): P return JSON.parse(cachedValue) as boolean; } - const moderators = await context.reddit.getModerators({ - subredditName: context.subredditName ?? await context.reddit.getCurrentSubredditName(), - username: await context.reddit.getCurrentUsername(), - }).all(); - - const currentUser = moderators.find(moderator => moderator.id === context.userId); + const currentUser = await getCurrentUser(context); if (!currentUser) { - console.error("Current user is not a moderator"); + console.error("Current user could not be retrieved or is not a mod."); return false; } @@ -38,6 +51,21 @@ export async function canCurrentUserManagePostsAndComments (context: Context): P return canManagePosts; } +export async function preCheckNukePermissions (context: Context): Promise { + const canManagePostsAndComments = await canCurrentUserManagePostsAndComments(context); + if (canManagePostsAndComments === undefined) { + context.ui.showToast("Could not determine your mod permissions. Please try again later."); + return false; + } + + if (!canManagePostsAndComments) { + context.ui.showToast("You do not have the correct mod permissions to do this."); + return false; + } + + return true; +} + export async function handleModAction (event: ModAction, context: TriggerContext) { if (!event.action || !event.targetUser?.id) { return; @@ -55,4 +83,5 @@ export async function handleModAction (event: ModAction, context: TriggerContext } await context.redis.del(getPermissionsCacheKey(event.targetUser.id)); + console.log(`Cleared permissions cache for user ${event.targetUser.id} due to mod action ${event.action}`); } From 70ddffe1e8f74c064e7829a6d17907146447cdfc Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sun, 31 Aug 2025 09:22:37 +0100 Subject: [PATCH 10/28] Update README to clarify moderation tool functionality and enhance instructions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 88d8966..a77805e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -A moderation tool used for deleting and locking an entire comment tree, starting with a single comment, or at an entire post level. +A moderation tool used for removing and locking an entire comment tree, starting with a single comment, or at an entire post level. -Run Comment Mop using the three-dot menu or mod shield menu (depending on platform) and chose the "Mop" option. +Run Comment Mop using the three-dot menu or mod shield menu (depending on platform) and chose the "Mop" option. You can opt to remove and/or lock, and skip mod-distinguished comments if desired. From version 9.2, you can configure the default options for the Mop form in your app settings, which you can find via the [Developer Platform app portal(https://developers.reddit.com/my/communities)]. From 07182a829bd42b56fe69fc4afc937a9261e848c8 Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sun, 31 Aug 2025 09:24:40 +0100 Subject: [PATCH 11/28] Add source code and license section to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a77805e..3abee7a 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ From version 9.2, you can configure the default options for the Mop form in your This app was originally written by /u/FlyingLaserTurtle, with contributions from /u/ni5arga. +## Source code and license + +Comment Mop is open source and licensed under the BSD Three Clause license. The source code is available on GitHub [here](https://github.com/fsvreddit/comment-nuke). + ## Change History Coming soon in the next version: From 28ff5d0a7dbaeedf49d561217f943e4913eb8a67 Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sun, 31 Aug 2025 09:25:12 +0100 Subject: [PATCH 12/28] Add GitHub Actions --- .github/workflows/test.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e06f9fd --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,15 @@ +name: build-test-lint +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout repo + uses: actions/checkout@v4 + - name: use node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - run: npm install + - run: npx tsc --build --clean + - run: npx eslint From 225f27023c81cde4c23566770dd1c7133939fecc Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sun, 31 Aug 2025 09:28:35 +0100 Subject: [PATCH 13/28] Remove @vitest/eslint-plugin from devDependencies and update other dependencies --- package-lock.json | 205 ++++++++++++++++++++++------------------------ package.json | 1 - 2 files changed, 98 insertions(+), 108 deletions(-) diff --git a/package-lock.json b/package-lock.json index c559c2b..41c4977 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,6 @@ "devDependencies": { "@eslint/js": "^9.10.0", "@stylistic/eslint-plugin": "^5.1.0", - "@vitest/eslint-plugin": "^1.1.0", "eslint": "^9.14.0", "typescript": "5.8.3", "typescript-eslint": "^8.4.0", @@ -894,9 +893,9 @@ "license": "BSD-3-Clause" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.49.0.tgz", - "integrity": "sha512-rlKIeL854Ed0e09QGYFlmDNbka6I3EQFw7iZuugQjMb11KMpJCLPFL4ZPbMfaEhLADEL1yx0oujGkBQ7+qW3eA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.50.0.tgz", + "integrity": "sha512-lVgpeQyy4fWN5QYebtW4buT/4kn4p4IJ+kDNB4uYNT5b8c8DLJDg6titg20NIg7E8RWwdWZORW6vUFfrLyG3KQ==", "cpu": [ "arm" ], @@ -908,9 +907,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.49.0.tgz", - "integrity": "sha512-cqPpZdKUSQYRtLLr6R4X3sD4jCBO1zUmeo3qrWBCqYIeH8Q3KRL4F3V7XJ2Rm8/RJOQBZuqzQGWPjjvFUcYa/w==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.50.0.tgz", + "integrity": "sha512-2O73dR4Dc9bp+wSYhviP6sDziurB5/HCym7xILKifWdE9UsOe2FtNcM+I4xZjKrfLJnq5UR8k9riB87gauiQtw==", "cpu": [ "arm64" ], @@ -922,9 +921,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.49.0.tgz", - "integrity": "sha512-99kMMSMQT7got6iYX3yyIiJfFndpojBmkHfTc1rIje8VbjhmqBXE+nb7ZZP3A5skLyujvT0eIUCUsxAe6NjWbw==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.50.0.tgz", + "integrity": "sha512-vwSXQN8T4sKf1RHr1F0s98Pf8UPz7pS6P3LG9NSmuw0TVh7EmaE+5Ny7hJOZ0M2yuTctEsHHRTMi2wuHkdS6Hg==", "cpu": [ "arm64" ], @@ -936,9 +935,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.49.0.tgz", - "integrity": "sha512-y8cXoD3wdWUDpjOLMKLx6l+NFz3NlkWKcBCBfttUn+VGSfgsQ5o/yDUGtzE9HvsodkP0+16N0P4Ty1VuhtRUGg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.50.0.tgz", + "integrity": "sha512-cQp/WG8HE7BCGyFVuzUg0FNmupxC+EPZEwWu2FCGGw5WDT1o2/YlENbm5e9SMvfDFR6FRhVCBePLqj0o8MN7Vw==", "cpu": [ "x64" ], @@ -950,9 +949,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.49.0.tgz", - "integrity": "sha512-3mY5Pr7qv4GS4ZvWoSP8zha8YoiqrU+e0ViPvB549jvliBbdNLrg2ywPGkgLC3cmvN8ya3za+Q2xVyT6z+vZqA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.50.0.tgz", + "integrity": "sha512-UR1uTJFU/p801DvvBbtDD7z9mQL8J80xB0bR7DqW7UGQHRm/OaKzp4is7sQSdbt2pjjSS72eAtRh43hNduTnnQ==", "cpu": [ "arm64" ], @@ -964,9 +963,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.49.0.tgz", - "integrity": "sha512-C9KzzOAQU5gU4kG8DTk+tjdKjpWhVWd5uVkinCwwFub2m7cDYLOdtXoMrExfeBmeRy9kBQMkiyJ+HULyF1yj9w==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.50.0.tgz", + "integrity": "sha512-G/DKyS6PK0dD0+VEzH/6n/hWDNPDZSMBmqsElWnCRGrYOb2jC0VSupp7UAHHQ4+QILwkxSMaYIbQ72dktp8pKA==", "cpu": [ "x64" ], @@ -978,9 +977,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.49.0.tgz", - "integrity": "sha512-OVSQgEZDVLnTbMq5NBs6xkmz3AADByCWI4RdKSFNlDsYXdFtlxS59J+w+LippJe8KcmeSSM3ba+GlsM9+WwC1w==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.50.0.tgz", + "integrity": "sha512-u72Mzc6jyJwKjJbZZcIYmd9bumJu7KNmHYdue43vT1rXPm2rITwmPWF0mmPzLm9/vJWxIRbao/jrQmxTO0Sm9w==", "cpu": [ "arm" ], @@ -992,9 +991,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.49.0.tgz", - "integrity": "sha512-ZnfSFA7fDUHNa4P3VwAcfaBLakCbYaxCk0jUnS3dTou9P95kwoOLAMlT3WmEJDBCSrOEFFV0Y1HXiwfLYJuLlA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.50.0.tgz", + "integrity": "sha512-S4UefYdV0tnynDJV1mdkNawp0E5Qm2MtSs330IyHgaccOFrwqsvgigUD29uT+B/70PDY1eQ3t40+xf6wIvXJyg==", "cpu": [ "arm" ], @@ -1006,9 +1005,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.49.0.tgz", - "integrity": "sha512-Z81u+gfrobVK2iV7GqZCBfEB1y6+I61AH466lNK+xy1jfqFLiQ9Qv716WUM5fxFrYxwC7ziVdZRU9qvGHkYIJg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.50.0.tgz", + "integrity": "sha512-1EhkSvUQXJsIhk4msxP5nNAUWoB4MFDHhtc4gAYvnqoHlaL9V3F37pNHabndawsfy/Tp7BPiy/aSa6XBYbaD1g==", "cpu": [ "arm64" ], @@ -1020,9 +1019,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.49.0.tgz", - "integrity": "sha512-zoAwS0KCXSnTp9NH/h9aamBAIve0DXeYpll85shf9NJ0URjSTzzS+Z9evmolN+ICfD3v8skKUPyk2PO0uGdFqg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.50.0.tgz", + "integrity": "sha512-EtBDIZuDtVg75xIPIK1l5vCXNNCIRM0OBPUG+tbApDuJAy9mKago6QxX+tfMzbCI6tXEhMuZuN1+CU8iDW+0UQ==", "cpu": [ "arm64" ], @@ -1034,9 +1033,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.49.0.tgz", - "integrity": "sha512-2QyUyQQ1ZtwZGiq0nvODL+vLJBtciItC3/5cYN8ncDQcv5avrt2MbKt1XU/vFAJlLta5KujqyHdYtdag4YEjYQ==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.50.0.tgz", + "integrity": "sha512-BGYSwJdMP0hT5CCmljuSNx7+k+0upweM2M4YGfFBjnFSZMHOLYR0gEEj/dxyYJ6Zc6AiSeaBY8dWOa11GF/ppQ==", "cpu": [ "loong64" ], @@ -1048,9 +1047,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.49.0.tgz", - "integrity": "sha512-k9aEmOWt+mrMuD3skjVJSSxHckJp+SiFzFG+v8JLXbc/xi9hv2icSkR3U7uQzqy+/QbbYY7iNB9eDTwrELo14g==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.50.0.tgz", + "integrity": "sha512-I1gSMzkVe1KzAxKAroCJL30hA4DqSi+wGc5gviD0y3IL/VkvcnAqwBf4RHXHyvH66YVHxpKO8ojrgc4SrWAnLg==", "cpu": [ "ppc64" ], @@ -1062,9 +1061,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.49.0.tgz", - "integrity": "sha512-rDKRFFIWJ/zJn6uk2IdYLc09Z7zkE5IFIOWqpuU0o6ZpHcdniAyWkwSUWE/Z25N/wNDmFHHMzin84qW7Wzkjsw==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.50.0.tgz", + "integrity": "sha512-bSbWlY3jZo7molh4tc5dKfeSxkqnf48UsLqYbUhnkdnfgZjgufLS/NTA8PcP/dnvct5CCdNkABJ56CbclMRYCA==", "cpu": [ "riscv64" ], @@ -1076,9 +1075,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.49.0.tgz", - "integrity": "sha512-FkkhIY/hYFVnOzz1WeV3S9Bd1h0hda/gRqvZCMpHWDHdiIHn6pqsY3b5eSbvGccWHMQ1uUzgZTKS4oGpykf8Tw==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.50.0.tgz", + "integrity": "sha512-LSXSGumSURzEQLT2e4sFqFOv3LWZsEF8FK7AAv9zHZNDdMnUPYH3t8ZlaeYYZyTXnsob3htwTKeWtBIkPV27iQ==", "cpu": [ "riscv64" ], @@ -1090,9 +1089,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.49.0.tgz", - "integrity": "sha512-gRf5c+A7QiOG3UwLyOOtyJMD31JJhMjBvpfhAitPAoqZFcOeK3Kc1Veg1z/trmt+2P6F/biT02fU19GGTS529A==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.50.0.tgz", + "integrity": "sha512-CxRKyakfDrsLXiCyucVfVWVoaPA4oFSpPpDwlMcDFQvrv3XY6KEzMtMZrA+e/goC8xxp2WSOxHQubP8fPmmjOQ==", "cpu": [ "s390x" ], @@ -1104,9 +1103,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.49.0.tgz", - "integrity": "sha512-BR7+blScdLW1h/2hB/2oXM+dhTmpW3rQt1DeSiCP9mc2NMMkqVgjIN3DDsNpKmezffGC9R8XKVOLmBkRUcK/sA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.50.0.tgz", + "integrity": "sha512-8PrJJA7/VU8ToHVEPu14FzuSAqVKyo5gg/J8xUerMbyNkWkO9j2ExBho/68RnJsMGNJq4zH114iAttgm7BZVkA==", "cpu": [ "x64" ], @@ -1118,9 +1117,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.49.0.tgz", - "integrity": "sha512-hDMOAe+6nX3V5ei1I7Au3wcr9h3ktKzDvF2ne5ovX8RZiAHEtX1A5SNNk4zt1Qt77CmnbqT+upb/umzoPMWiPg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.50.0.tgz", + "integrity": "sha512-SkE6YQp+CzpyOrbw7Oc4MgXFvTw2UIBElvAvLCo230pyxOLmYwRPwZ/L5lBe/VW/qT1ZgND9wJfOsdy0XptRvw==", "cpu": [ "x64" ], @@ -1131,10 +1130,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.50.0.tgz", + "integrity": "sha512-PZkNLPfvXeIOgJWA804zjSFH7fARBBCpCXxgkGDRjjAhRLOR8o0IGS01ykh5GYfod4c2yiiREuDM8iZ+pVsT+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.49.0.tgz", - "integrity": "sha512-wkNRzfiIGaElC9kXUT+HLx17z7D0jl+9tGYRKwd8r7cUqTL7GYAvgUY++U2hK6Ar7z5Z6IRRoWC8kQxpmM7TDA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.50.0.tgz", + "integrity": "sha512-q7cIIdFvWQoaCbLDUyUc8YfR3Jh2xx3unO8Dn6/TTogKjfwrax9SyfmGGK6cQhKtjePI7jRfd7iRYcxYs93esg==", "cpu": [ "arm64" ], @@ -1146,9 +1159,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.49.0.tgz", - "integrity": "sha512-gq5aW/SyNpjp71AAzroH37DtINDcX1Qw2iv9Chyz49ZgdOP3NV8QCyKZUrGsYX9Yyggj5soFiRCgsL3HwD8TdA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.50.0.tgz", + "integrity": "sha512-XzNOVg/YnDOmFdDKcxxK410PrcbcqZkBmz+0FicpW5jtjKQxcW1BZJEQOF0NJa6JO7CZhett8GEtRN/wYLYJuw==", "cpu": [ "ia32" ], @@ -1160,9 +1173,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.49.0.tgz", - "integrity": "sha512-gEtqFbzmZLFk2xKh7g0Rlo8xzho8KrEFEkzvHbfUGkrgXOpZ4XagQ6n+wIZFNh1nTb8UD16J4nFSFKXYgnbdBg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.50.0.tgz", + "integrity": "sha512-xMmiWRR8sp72Zqwjgtf3QbZfF1wdh8X2ABu3EaozvZcyHJeU0r+XAnXdKgs4cCAp6ORoYoCygipYP1mjmbjrsg==", "cpu": [ "x64" ], @@ -1472,29 +1485,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@vitest/eslint-plugin": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@vitest/eslint-plugin/-/eslint-plugin-1.3.4.tgz", - "integrity": "sha512-EOg8d0jn3BAiKnR55WkFxmxfWA3nmzrbIIuOXyTe6A72duryNgyU+bdBEauA97Aab3ho9kLmAwgPX63Ckj4QEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/utils": "^8.24.1" - }, - "peerDependencies": { - "eslint": ">= 8.57.0", - "typescript": ">= 5.0.0", - "vitest": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - }, - "vitest": { - "optional": true - } - } - }, "node_modules/@vitest/expect": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", @@ -2928,9 +2918,9 @@ } }, "node_modules/rollup": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.49.0.tgz", - "integrity": "sha512-3IVq0cGJ6H7fKXXEdVt+RcYvRCt8beYY9K1760wGQwSAHZcS9eot1zDG5axUbcp/kWRi5zKIIDX8MoKv/TzvZA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.0.tgz", + "integrity": "sha512-/Zl4D8zPifNmyGzJS+3kVoyXeDeT/GrsJM94sACNg9RtUE0hrHa1bNPtRSrfHTMH5HjRzce6K7rlTh3Khiw+pw==", "dev": true, "license": "MIT", "dependencies": { @@ -2944,26 +2934,27 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.49.0", - "@rollup/rollup-android-arm64": "4.49.0", - "@rollup/rollup-darwin-arm64": "4.49.0", - "@rollup/rollup-darwin-x64": "4.49.0", - "@rollup/rollup-freebsd-arm64": "4.49.0", - "@rollup/rollup-freebsd-x64": "4.49.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.49.0", - "@rollup/rollup-linux-arm-musleabihf": "4.49.0", - "@rollup/rollup-linux-arm64-gnu": "4.49.0", - "@rollup/rollup-linux-arm64-musl": "4.49.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.49.0", - "@rollup/rollup-linux-ppc64-gnu": "4.49.0", - "@rollup/rollup-linux-riscv64-gnu": "4.49.0", - "@rollup/rollup-linux-riscv64-musl": "4.49.0", - "@rollup/rollup-linux-s390x-gnu": "4.49.0", - "@rollup/rollup-linux-x64-gnu": "4.49.0", - "@rollup/rollup-linux-x64-musl": "4.49.0", - "@rollup/rollup-win32-arm64-msvc": "4.49.0", - "@rollup/rollup-win32-ia32-msvc": "4.49.0", - "@rollup/rollup-win32-x64-msvc": "4.49.0", + "@rollup/rollup-android-arm-eabi": "4.50.0", + "@rollup/rollup-android-arm64": "4.50.0", + "@rollup/rollup-darwin-arm64": "4.50.0", + "@rollup/rollup-darwin-x64": "4.50.0", + "@rollup/rollup-freebsd-arm64": "4.50.0", + "@rollup/rollup-freebsd-x64": "4.50.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.50.0", + "@rollup/rollup-linux-arm-musleabihf": "4.50.0", + "@rollup/rollup-linux-arm64-gnu": "4.50.0", + "@rollup/rollup-linux-arm64-musl": "4.50.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.50.0", + "@rollup/rollup-linux-ppc64-gnu": "4.50.0", + "@rollup/rollup-linux-riscv64-gnu": "4.50.0", + "@rollup/rollup-linux-riscv64-musl": "4.50.0", + "@rollup/rollup-linux-s390x-gnu": "4.50.0", + "@rollup/rollup-linux-x64-gnu": "4.50.0", + "@rollup/rollup-linux-x64-musl": "4.50.0", + "@rollup/rollup-openharmony-arm64": "4.50.0", + "@rollup/rollup-win32-arm64-msvc": "4.50.0", + "@rollup/rollup-win32-ia32-msvc": "4.50.0", + "@rollup/rollup-win32-x64-msvc": "4.50.0", "fsevents": "~2.3.2" } }, diff --git a/package.json b/package.json index f2cf061..557fc8e 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "devDependencies": { "@eslint/js": "^9.10.0", "@stylistic/eslint-plugin": "^5.1.0", - "@vitest/eslint-plugin": "^1.1.0", "eslint": "^9.14.0", "typescript": "5.8.3", "typescript-eslint": "^8.4.0", From b5ff8618b91894a47dfbb95911f39c42eede3a05 Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sun, 31 Aug 2025 09:30:27 +0100 Subject: [PATCH 14/28] Remove vitest plugin from ESLint configuration --- eslint.config.mjs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 0c65ac4..fc85d5a 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,6 @@ import eslint from "@eslint/js"; import tseslint from "typescript-eslint"; import stylistic from '@stylistic/eslint-plugin' -import vitest from "@vitest/eslint-plugin" export default tseslint.config( eslint.configs.recommended, @@ -14,17 +13,6 @@ export default tseslint.config( quoteProps: "consistent-as-needed", braceStyle: "1tbs", }), - { - files: ["**/*.test.ts"], - plugins: { - vitest - }, - rules: { - ...vitest.configs.recommended.rules, - 'vitest/valid-title': 'warn', - 'vitest/no-commented-out-tests': 'warn' - } - }, { files: ["**/*.ts", "**/*.tsx"], From b221070afcd48fd04420309511bca686b4010c4b Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sun, 31 Aug 2025 09:34:40 +0100 Subject: [PATCH 15/28] Update label casing and add help text for Comment Mop settings --- src/settings.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/settings.ts b/src/settings.ts index 182d4f6..3bae330 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -3,7 +3,8 @@ import { NukeFormField } from "./nuke.js"; export const appSettings: SettingsFormField = { type: "group", - label: "Comment Mop Defaults", + label: "Comment Mop defaults", + helpText: "This allows you to set the default values for the 'Mop Comments' form, if the standard defaults don't suit your workflow.", fields: [ { name: NukeFormField.Remove, From d9a044319226f69de5765a51131985f06b433737 Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Sun, 31 Aug 2025 13:30:09 +0100 Subject: [PATCH 16/28] Add performance logging for comment nuke operations and permissions cache --- README.md | 1 + src/nuke.ts | 10 ++++++++-- src/userPermissions.ts | 6 ++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3abee7a..cb1ea60 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,4 @@ Coming soon in the next version: * Fix error that causes Comment Mop to fail consistently for certain users * The ability to set defaults for the Comment Mop form. +* Update to latest Dev Platform version diff --git a/src/nuke.ts b/src/nuke.ts index 7575b9e..3d9aa83 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -132,6 +132,7 @@ export async function handleNukeCommentForm (event: FormOnSubmitEvent { + const start = Date.now(); try { const comments: Comment[] = []; @@ -145,6 +146,9 @@ async function handleNuke (nukeProps: NukeProps, context: Context): Promise Date: Sun, 31 Aug 2025 18:02:42 +0100 Subject: [PATCH 17/28] Update readme --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cb1ea60..8bbe21e 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,23 @@ -A moderation tool used for removing and locking an entire comment tree, starting with a single comment, or at an entire post level. +A moderation tool used for removing and locking an entire comment tree, starting either with a single comment or at an entire post level. Run Comment Mop using the three-dot menu or mod shield menu (depending on platform) and chose the "Mop" option. You can opt to remove and/or lock, and skip mod-distinguished comments if desired. -From version 9.2, you can configure the default options for the Mop form in your app settings, which you can find via the [Developer Platform app portal(https://developers.reddit.com/my/communities)]. +From version 9.2, you can configure the default options for the Mop form in your app settings, which you can find via the [Developer Platform app portal](https://developers.reddit.com/my/communities). ## Credits This app was originally written by /u/FlyingLaserTurtle, with contributions from /u/ni5arga. +For support for Comment Mop, please contact /u/fsv (the current maintainer) rather than either of the above users. + ## Source code and license Comment Mop is open source and licensed under the BSD Three Clause license. The source code is available on GitHub [here](https://github.com/fsvreddit/comment-nuke). ## Change History -Coming soon in the next version: +### v9.2.0 (coming soon!) -* Fix error that causes Comment Mop to fail consistently for certain users -* The ability to set defaults for the Comment Mop form. +* Fix an error that causes Comment Mop to fail consistently for certain users +* The ability to set defaults for the Comment Mop form if the default values don't suit your sub's workflow * Update to latest Dev Platform version From 0672c96cb66dfb0f7821b8fef7dfad1b1d3a865e Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Mon, 1 Sep 2025 08:30:55 +0100 Subject: [PATCH 18/28] Refactor comment gather code for efficiency --- src/nuke.ts | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/src/nuke.ts b/src/nuke.ts index 3d9aa83..047f48d 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -40,30 +40,30 @@ export interface NukeProps { target: Post | Comment; } -// Depth-first traversal to get all comments in a thread -async function* getAllCommentsInThread ( - comment: Comment, - skipDistinguished: boolean, -): AsyncGenerator { +async function getAllCommentsInThread (comment: Comment, skipDistinguished: boolean): Promise { + const comments: Comment[] = []; + if (!skipDistinguished || !comment.isDistinguished()) { - yield comment; + comments.push(comment); } const replies = await comment.replies.all(); - for (const reply of replies) { - yield* getAllCommentsInThread(reply, skipDistinguished); - } + const replyResults = await Promise.all(replies.map(reply => getAllCommentsInThread(reply, skipDistinguished))); + + comments.push(...replyResults.flat()); + + return comments; } -// Depth-first traversal to get all comments in a post -async function* getAllCommentsInPost ( - post: Post, - skipDistinguished: boolean, -): AsyncGenerator { - const comments = await post.comments.all(); - for (const comment of comments) { - yield* getAllCommentsInThread(comment, skipDistinguished); - } +async function getAllCommentsInPost (post: Post, skipDistinguished: boolean): Promise { + const comments: Comment[] = []; + + const replies = await post.comments.all(); + const replyResults = await Promise.all(replies.map(reply => getAllCommentsInThread(reply, skipDistinguished))); + + comments.push(...replyResults.flat()); + + return comments; } async function nukeComments (comments: Comment[], shouldLock: boolean, shouldRemove: boolean): Promise { @@ -134,16 +134,12 @@ export async function handleNukeCommentForm (event: FormOnSubmitEvent { const start = Date.now(); try { - const comments: Comment[] = []; + let comments: Comment[]; if (nukeProps.target instanceof Comment) { - for await (const eachComment of getAllCommentsInThread(nukeProps.target, nukeProps.skipDistinguished)) { - comments.push(eachComment); - } + comments = await getAllCommentsInThread(nukeProps.target, nukeProps.skipDistinguished); } else { - for await (const eachComment of getAllCommentsInPost(nukeProps.target, nukeProps.skipDistinguished)) { - comments.push(eachComment); - } + comments = await getAllCommentsInPost(nukeProps.target, nukeProps.skipDistinguished); } const commentGatherEnd = Date.now(); From 905bd4fd8ca2e2973372cb3f8960a984ebd53958 Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Mon, 1 Sep 2025 11:31:25 +0100 Subject: [PATCH 19/28] Add lodash for chunking comments and improve logging in nuke function --- package-lock.json | 14 ++++++++++++++ package.json | 2 ++ src/nuke.ts | 23 ++++++++++++++--------- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 41c4977..eeb13b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,9 @@ "dependencies": { "@devvit/protos": "0.12.0", "@devvit/public-api": "0.12.0", + "@types/lodash": "^4.17.20", "@types/pluralize": "^0.0.33", + "lodash": "^4.17.21", "pluralize": "^8.0.0" }, "devDependencies": { @@ -1238,6 +1240,12 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==", + "license": "MIT" + }, "node_modules/@types/node": { "version": "24.3.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz", @@ -2543,6 +2551,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", diff --git a/package.json b/package.json index 557fc8e..27014cb 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,9 @@ "dependencies": { "@devvit/protos": "0.12.0", "@devvit/public-api": "0.12.0", + "@types/lodash": "^4.17.20", "@types/pluralize": "^0.0.33", + "lodash": "^4.17.21", "pluralize": "^8.0.0" }, "devDependencies": { diff --git a/src/nuke.ts b/src/nuke.ts index 047f48d..5aed686 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -1,4 +1,5 @@ import { Comment, Context, FormFunction, FormOnSubmitEvent, JSONObject, Post } from "@devvit/public-api"; +import _ from "lodash"; import pluralize from "pluralize"; export enum NukeFormField { @@ -68,17 +69,19 @@ async function getAllCommentsInPost (post: Post, skipDistinguished: boolean): Pr async function nukeComments (comments: Comment[], shouldLock: boolean, shouldRemove: boolean): Promise { try { - const promises: Promise[] = []; + // Chunk comments into 30 items at a a time to reduce the risk of failure. + const commentChunks = _.chunk(comments, 30); - if (shouldRemove) { - promises.push(...comments.map(comment => comment.remove())); - } + for (const chunk of commentChunks) { + if (shouldRemove) { + await Promise.all(chunk.map(comment => comment.remove())); + } - if (shouldLock) { - promises.push(...comments.map(comment => comment.lock())); + if (shouldLock) { + await Promise.all(chunk.map(comment => comment.lock())); + } } - await Promise.all(promises); return true; } catch (error) { console.error("Failed to nuke comments:", error); @@ -159,6 +162,8 @@ async function handleNuke (nukeProps: NukeProps, context: Context): Promise Date: Mon, 1 Sep 2025 11:31:37 +0100 Subject: [PATCH 20/28] Update README and userPermissions for performance improvements and logging enhancements --- README.md | 1 + src/userPermissions.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bbe21e..8dec468 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,5 @@ Comment Mop is open source and licensed under the BSD Three Clause license. The * Fix an error that causes Comment Mop to fail consistently for certain users * The ability to set defaults for the Comment Mop form if the default values don't suit your sub's workflow +* Performance and reliability improvements * Update to latest Dev Platform version diff --git a/src/userPermissions.ts b/src/userPermissions.ts index 574d0d0..dba3e30 100644 --- a/src/userPermissions.ts +++ b/src/userPermissions.ts @@ -49,7 +49,7 @@ export async function canCurrentUserManagePostsAndComments (context: Context): P const keyExpiry = Date.now() + 1000 * 28 * 24 * 60 * 60; // 28 days await context.redis.set(getPermissionsCacheKey(currentUser.id), JSON.stringify(canManagePosts), { expiration: new Date(keyExpiry) }); - console.log(`Cache miss for user ${currentUser.id}, can nuke: ${canManagePosts}. Lookup took ${Date.now() - start}ms`); + console.log(`Cache miss for user ${currentUser.username}, can nuke: ${canManagePosts}. Lookup took ${Date.now() - start}ms`); return canManagePosts; } From f5a7ef6a2d37b1f1d353d80164a83ded23c82a8c Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Mon, 1 Sep 2025 11:51:03 +0100 Subject: [PATCH 21/28] Add option to skip already actioned comments in nuke functionality --- README.md | 1 + src/main.ts | 2 ++ src/nuke.ts | 38 +++++++++++++++++++++++++++++--------- src/settings.ts | 15 ++++++++++++--- 4 files changed, 44 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 8dec468..53d3d73 100644 --- a/README.md +++ b/README.md @@ -20,5 +20,6 @@ Comment Mop is open source and licensed under the BSD Three Clause license. The * Fix an error that causes Comment Mop to fail consistently for certain users * The ability to set defaults for the Comment Mop form if the default values don't suit your sub's workflow +* Add new option to skip comments that have already been removed/locked * Performance and reliability improvements * Update to latest Dev Platform version diff --git a/src/main.ts b/src/main.ts index b2a4f10..3eca1d8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -33,6 +33,7 @@ Devvit.addMenuItem({ remove: nukeDefaults.remove, lock: nukeDefaults.lock, skipDistinguished: nukeDefaults.skipDistinguished, + skipAlreadyActioned: nukeDefaults.skipAlreadyActioned, }; console.log(`Showing nuke comment form for user ${context.userId}`); @@ -58,6 +59,7 @@ Devvit.addMenuItem({ remove: nukeDefaults.remove, lock: nukeDefaults.lock, skipDistinguished: nukeDefaults.skipDistinguished, + skipAlreadyActioned: nukeDefaults.skipAlreadyActioned, }; console.log(`Showing nuke post form for user ${context.userId}`); diff --git a/src/nuke.ts b/src/nuke.ts index 5aed686..3fc48cd 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -6,6 +6,7 @@ export enum NukeFormField { Remove = "remove", Lock = "lock", SkipDistinguished = "skipDistinguished", + SkipAlreadyActioned = "skipAlreadyActioned", } export const nukeFormDefinition: FormFunction = data => ({ @@ -13,22 +14,30 @@ export const nukeFormDefinition: FormFunction = data => ({ fields: [ { name: NukeFormField.Remove, - label: "Remove Comments", + label: "Remove comments", type: "boolean", defaultValue: data.remove as boolean, }, { name: NukeFormField.Lock, - label: "Lock Comments", + label: "Lock comments", type: "boolean", defaultValue: data.lock as boolean, }, { name: NukeFormField.SkipDistinguished, - label: "Skip Distinguished Comments", + label: "Skip distinguished comments", + helpText: "If set, the app will not remove/lock comments with the Mod badge", type: "boolean", defaultValue: data.skipDistinguished as boolean, }, + { + name: NukeFormField.SkipAlreadyActioned, + label: "Skip already actioned comments", + helpText: "If set, the app will not remove/lock comments that have already been removed/locked", + type: "boolean", + defaultValue: data.skipAlreadyActioned as boolean, + }, ], acceptLabel: "Mop", cancelLabel: "Cancel", @@ -37,7 +46,8 @@ export const nukeFormDefinition: FormFunction = data => ({ export interface NukeProps { remove: boolean; lock: boolean; - skipDistinguished: boolean; // When true, distinguished comments and their children are not processed + skipDistinguished: boolean; + skipAlreadyActioned: boolean; target: Post | Comment; } @@ -67,18 +77,26 @@ async function getAllCommentsInPost (post: Post, skipDistinguished: boolean): Pr return comments; } -async function nukeComments (comments: Comment[], shouldLock: boolean, shouldRemove: boolean): Promise { +async function nukeComments (comments: Comment[], shouldLock: boolean, shouldRemove: boolean, skipAlreadyActioned: boolean): Promise { try { // Chunk comments into 30 items at a a time to reduce the risk of failure. const commentChunks = _.chunk(comments, 30); for (const chunk of commentChunks) { if (shouldRemove) { - await Promise.all(chunk.map(comment => comment.remove())); + if (skipAlreadyActioned) { + await Promise.all(chunk.filter(comment => !comment.removed).map(comment => comment.remove())); + } else { + await Promise.all(chunk.map(comment => comment.remove())); + } } if (shouldLock) { - await Promise.all(chunk.map(comment => comment.lock())); + if (skipAlreadyActioned) { + await Promise.all(chunk.filter(comment => !comment.locked).map(comment => comment.lock())); + } else { + await Promise.all(chunk.map(comment => comment.lock())); + } } } @@ -103,6 +121,7 @@ export async function handleNukePostForm (event: FormOnSubmitEvent, remove: values.remove as boolean, lock: values.lock as boolean, skipDistinguished: values.skipDistinguished as boolean, + skipAlreadyActioned: values.skipAlreadyActioned as boolean, target, }; @@ -128,6 +147,7 @@ export async function handleNukeCommentForm (event: FormOnSubmitEvent Date: Mon, 1 Sep 2025 11:59:55 +0100 Subject: [PATCH 22/28] Add tests for nuke form fields in settings and configure Vitest --- .github/workflows/test.yml | 1 + src/settings.test.ts | 13 +++++++++++++ vitest.config.ts | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 src/settings.test.ts create mode 100644 vitest.config.ts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e06f9fd..12294c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,3 +13,4 @@ jobs: - run: npm install - run: npx tsc --build --clean - run: npx eslint + - run: npm run test diff --git a/src/settings.test.ts b/src/settings.test.ts new file mode 100644 index 0000000..c0521c1 --- /dev/null +++ b/src/settings.test.ts @@ -0,0 +1,13 @@ +import { SettingsFormFieldGroup } from "@devvit/public-api"; +import { NukeFormField } from "./nuke.js"; +import { appSettings } from "./settings.js"; + +test("All nuke form fields are also available in settings", () => { + const nukeFields = Object.values(NukeFormField); + const settingsFields = (appSettings as SettingsFormFieldGroup).fields; + const settingsFieldNames = Object.values(settingsFields).filter(field => "name" in field).map(field => field.name); + + const nukeFieldsWithoutSetting = nukeFields.filter(field => !settingsFieldNames.includes(field)); + + expect(nukeFieldsWithoutSetting).toEqual([]); +}); diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..1bdcfeb --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,3 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ test: { globals: true } }); From 2da2766ca1ac51d3c9c86d8670f752e91502a9bd Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Mon, 1 Sep 2025 14:39:06 +0100 Subject: [PATCH 23/28] Improve logging for comment gathering by pluralizing comment count --- src/nuke.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nuke.ts b/src/nuke.ts index 3fc48cd..99df455 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -166,7 +166,7 @@ async function handleNuke (nukeProps: NukeProps, context: Context): Promise Date: Mon, 1 Sep 2025 14:53:28 +0100 Subject: [PATCH 24/28] Enhance logging in nuke functionality by including target IDs in console messages --- src/main.ts | 4 ++-- src/nuke.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.ts b/src/main.ts index 3eca1d8..ae9e104 100644 --- a/src/main.ts +++ b/src/main.ts @@ -36,7 +36,7 @@ Devvit.addMenuItem({ skipAlreadyActioned: nukeDefaults.skipAlreadyActioned, }; - console.log(`Showing nuke comment form for user ${context.userId}`); + console.log(`${context.commentId}: Showing nuke comment form for user ${context.userId}`); context.ui.showForm(nukeForm, nukeData); }, }); @@ -62,7 +62,7 @@ Devvit.addMenuItem({ skipAlreadyActioned: nukeDefaults.skipAlreadyActioned, }; - console.log(`Showing nuke post form for user ${context.userId}`); + console.log(`${context.postId}: Showing nuke post form for user ${context.userId}`); context.ui.showForm(nukePostForm, nukeData); }, }); diff --git a/src/nuke.ts b/src/nuke.ts index 99df455..f2afb84 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -169,7 +169,7 @@ async function handleNuke (nukeProps: NukeProps, context: Context): Promise Date: Mon, 1 Sep 2025 16:36:25 +0100 Subject: [PATCH 25/28] Import only one function needed from lodash --- src/nuke.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nuke.ts b/src/nuke.ts index f2afb84..e0b1ecd 100644 --- a/src/nuke.ts +++ b/src/nuke.ts @@ -1,5 +1,5 @@ import { Comment, Context, FormFunction, FormOnSubmitEvent, JSONObject, Post } from "@devvit/public-api"; -import _ from "lodash"; +import { chunk } from "lodash"; import pluralize from "pluralize"; export enum NukeFormField { @@ -80,7 +80,7 @@ async function getAllCommentsInPost (post: Post, skipDistinguished: boolean): Pr async function nukeComments (comments: Comment[], shouldLock: boolean, shouldRemove: boolean, skipAlreadyActioned: boolean): Promise { try { // Chunk comments into 30 items at a a time to reduce the risk of failure. - const commentChunks = _.chunk(comments, 30); + const commentChunks = chunk(comments, 30); for (const chunk of commentChunks) { if (shouldRemove) { From a152dcb6bba419baff0764909d766e19047d61b2 Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Mon, 1 Sep 2025 16:36:36 +0100 Subject: [PATCH 26/28] Simplify nukeData object creation --- src/main.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main.ts b/src/main.ts index ae9e104..a55ce21 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,13 +27,9 @@ Devvit.addMenuItem({ return; } - const nukeDefaults = await getNukeDefaults(context); const nukeData = { title: "Mop comments", - remove: nukeDefaults.remove, - lock: nukeDefaults.lock, - skipDistinguished: nukeDefaults.skipDistinguished, - skipAlreadyActioned: nukeDefaults.skipAlreadyActioned, + ...await getNukeDefaults(context), }; console.log(`${context.commentId}: Showing nuke comment form for user ${context.userId}`); @@ -53,13 +49,9 @@ Devvit.addMenuItem({ return; } - const nukeDefaults = await getNukeDefaults(context); const nukeData = { title: "Mop post comments", - remove: nukeDefaults.remove, - lock: nukeDefaults.lock, - skipDistinguished: nukeDefaults.skipDistinguished, - skipAlreadyActioned: nukeDefaults.skipAlreadyActioned, + ...await getNukeDefaults(context), }; console.log(`${context.postId}: Showing nuke post form for user ${context.userId}`); From b673c9a5ddafa79b29fbda3107c5d709bdf3277c Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Mon, 1 Sep 2025 17:14:31 +0100 Subject: [PATCH 27/28] Fix type in getCurrentUser function context parameter --- src/userPermissions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/userPermissions.ts b/src/userPermissions.ts index dba3e30..87fffbd 100644 --- a/src/userPermissions.ts +++ b/src/userPermissions.ts @@ -5,7 +5,7 @@ function getPermissionsCacheKey (userId: string) { return `permissionsCache:${userId}`; } -async function getCurrentUser (context: TriggerContext): Promise { +async function getCurrentUser (context: Context): Promise { // First, attempt to get user by conventional means. try { const user = await context.reddit.getCurrentUser(); From 0c81eee773997cb9fbc851be3e8848d05c1011c9 Mon Sep 17 00:00:00 2001 From: fsvreddit <97185438+fsvreddit@users.noreply.github.com> Date: Mon, 1 Sep 2025 17:49:34 +0100 Subject: [PATCH 28/28] Update readme and packages --- README.md | 2 +- package-lock.json | 134 +++++++++++++++------------------------------- 2 files changed, 44 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index 53d3d73..e966323 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Comment Mop is open source and licensed under the BSD Three Clause license. The ## Change History -### v9.2.0 (coming soon!) +### v9.2.0 * Fix an error that causes Comment Mop to fail consistently for certain users * The ability to set defaults for the Comment Mop form if the default values don't suit your sub's workflow diff --git a/package-lock.json b/package-lock.json index eeb13b0..e179d8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -587,30 +587,6 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "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" - }, - "engines": { - "node": "*" - } - }, "node_modules/@eslint/config-helpers": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", @@ -658,30 +634,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "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" - }, - "engines": { - "node": "*" - } - }, "node_modules/@eslint/js": { "version": "9.34.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.34.0.tgz", @@ -1189,14 +1141,14 @@ ] }, "node_modules/@stylistic/eslint-plugin": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.2.3.tgz", - "integrity": "sha512-oY7GVkJGVMI5benlBDCaRrSC1qPasafyv5dOBLLv5MTilMGnErKhO6ziEfodDDIZbo5QxPUNW360VudJOFODMw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.3.1.tgz", + "integrity": "sha512-Ykums1VYonM0TgkD0VteVq9mrlO2FhF48MDJnPyv3MktIB2ydtuhlO0AfWm7xnW1kyf5bjOqA6xc7JjviuVTxg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/types": "^8.38.0", + "@typescript-eslint/types": "^8.41.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "estraverse": "^5.3.0", @@ -1451,6 +1403,32 @@ "typescript": ">=4.8.4 <6.0.0" } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typescript-eslint/utils": { "version": "8.41.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.41.0.tgz", @@ -1709,13 +1687,14 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "node_modules/braces": { @@ -2039,30 +2018,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "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" - }, - "engines": { - "node": "*" - } - }, "node_modules/espree": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", @@ -2625,19 +2580,16 @@ } }, "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "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": "^2.0.1" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "*" } }, "node_modules/moderndash": { @@ -3305,9 +3257,9 @@ } }, "node_modules/vite": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.3.tgz", - "integrity": "sha512-OOUi5zjkDxYrKhTV3V7iKsoS37VUM7v40+HuwEmcrsf11Cdx9y3DIr2Px6liIcZFwt3XSRpQvFpL3WVy7ApkGw==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.4.tgz", + "integrity": "sha512-X5QFK4SGynAeeIt+A7ZWnApdUyHYm+pzv/8/A57LqSGcI88U6R6ipOs3uCesdc6yl7nl+zNO0t8LmqAdXcQihw==", "dev": true, "license": "MIT", "dependencies": {