From 23a33091520533ed1af4d97a6662dc07999c81e8 Mon Sep 17 00:00:00 2001 From: Peter Kaufman Date: Fri, 15 Mar 2024 16:02:22 -0400 Subject: [PATCH 01/10] chore: update versions to be latest and exclude test vault fromt test search --- jest.config.ts | 1 + package-lock.json | 2089 +++++++++++++++++++++++++-------------------- package.json | 34 +- 3 files changed, 1191 insertions(+), 933 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index d0ec1e8c..c6b42571 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -13,6 +13,7 @@ const config: Config.InitialOptions = { '**/?(*.)+(spec|test).[jt]s?(x)', '!**/__tests__/common.ts', '!**/__integration__/*.[jt]s?(x)', + '!**/test-vault/**/*.[jt]s?(x)', ], }; export default config; diff --git a/package-lock.json b/package-lock.json index 5fb0a411..718da933 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,10 +12,10 @@ "@babel/plugin-transform-private-methods": "^7.23.3", "@popperjs/core": "^2.11.6", "@types/js-yaml": "^4.0.5", - "async-lock": "^1.4.0", + "async-lock": "^1.4.1", "diff-match-patch": "^1.0.5", "js-yaml": "^4.1.0", - "loglevel": "^1.8.1", + "loglevel": "^1.9.1", "mdast-util-from-markdown": "^2.0.0", "mdast-util-gfm-footnote": "^2.0.0", "mdast-util-gfm-task-list-item": "^2.0.0", @@ -30,35 +30,35 @@ "unist-util-visit": "^5.0.0" }, "devDependencies": { - "@babel/core": "^7.20.2", - "@babel/plugin-proposal-decorators": "^7.20.2", + "@babel/core": "^7.24.0", + "@babel/plugin-proposal-decorators": "^7.24.0", "@babel/plugin-transform-class-properties": "^7.23.3", - "@babel/preset-env": "^7.20.2", + "@babel/preset-env": "^7.24.0", "@babel/preset-typescript": "^7.18.6", "@jest/types": "^29.5.0", "@types/async-lock": "^1.4.2", - "@types/diff": "^5.0.2", + "@types/diff": "^5.0.9", "@types/diff-match-patch": "^1.0.32", - "@types/jest": "^29.2.3", - "@types/node": "^20.9.0", - "@typescript-eslint/eslint-plugin": "^6.10.0", - "@typescript-eslint/parser": "^6.10.0", + "@types/jest": "^29.5.12", + "@types/node": "^20.11.28", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "@typescript-eslint/parser": "^7.2.0", "babel-jest": "^29.3.1", "babel-plugin-import-glob": "^2.0.0", "builtin-modules": "^3.3.0", - "esbuild": "^0.19.5", + "esbuild": "^0.20.2", "esbuild-plugin-import-glob": "^0.1.1", "esbuild-plugin-replace": "^1.3.0", - "eslint": "^8.28.0", + "eslint": "^8.57.0", "eslint-config-google": "^0.14.0", - "eslint-plugin-jest": "^27.1.5", - "eslint-plugin-unicorn": "^49.0.0", + "eslint-plugin-jest": "^27.9.0", + "eslint-plugin-unicorn": "^51.0.1", "jest": "^29.3.1", - "moment": "^2.29.4", + "moment": "^2.30.1", "obsidian": "^1.5.7-1", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "tslib": "^2.4.1", - "typescript": "^5.0.4", + "typescript": "^5.4.2", "unified-lint-rule": "^2.1.1" } }, @@ -84,11 +84,11 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dependencies": { - "@babel/highlight": "^7.22.13", + "@babel/highlight": "^7.23.4", "chalk": "^2.4.2" }, "engines": { @@ -96,28 +96,28 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.3.tgz", - "integrity": "sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz", - "integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz", + "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.2", - "@babel/parser": "^7.23.3", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.3", - "@babel/types": "^7.23.3", + "@babel/helpers": "^7.24.0", + "@babel/parser": "^7.24.0", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -133,11 +133,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", - "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", "dependencies": { - "@babel/types": "^7.23.3", + "@babel/types": "^7.23.6", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -170,13 +170,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -185,16 +185,16 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz", - "integrity": "sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.0.tgz", + "integrity": "sha512-QAH+vfvts51BCsNZ2PhY6HAggnlS6omLLFTsIpeqZk/MmJ6cW7tgz5yRv0fMJThcr6FmbMrENh1RgrWPTYA76g==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-member-expression-to-functions": "^7.23.0", "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-replace-supers": "^7.22.20", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", "semver": "^6.3.1" @@ -224,9 +224,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz", - "integrity": "sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.1.tgz", + "integrity": "sha512-o7SDgTJuvx5vLKD6SFvkydkSMBvahDKGiNJzG22IZYXhiqoe9efY7zocICBgzHV4IRg5wdgl2nEL/tulKIEIbA==", "dev": true, "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", @@ -322,9 +322,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "engines": { "node": ">=6.9.0" } @@ -396,9 +396,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "engines": { "node": ">=6.9.0" } @@ -412,9 +412,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "engines": { "node": ">=6.9.0" } @@ -434,22 +434,22 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", - "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", + "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", @@ -460,9 +460,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", - "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", + "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", "bin": { "parser": "bin/babel-parser.js" }, @@ -503,9 +503,9 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.3.tgz", - "integrity": "sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.7.tgz", + "integrity": "sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", @@ -519,16 +519,14 @@ } }, "node_modules/@babel/plugin-proposal-decorators": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.3.tgz", - "integrity": "sha512-u8SwzOcP0DYSsa++nHd/9exlHb0NAlHCb890qtZZbSwPX2bFv8LBEztxwN7Xg/dS8oAFFidhrI9PBcLBJSkGRQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.24.0.tgz", + "integrity": "sha512-LiT1RqZWeij7X+wGxCoYh3/3b8nVOX6/7BZ9wiQgAIyjoeQWdROaodJCgT+dwtbjHaz0r7bEbHJzjSbVfcOyjQ==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/plugin-syntax-decorators": "^7.23.3" + "@babel/helper-create-class-features-plugin": "^7.24.0", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-decorators": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -601,12 +599,12 @@ } }, "node_modules/@babel/plugin-syntax-decorators": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.23.3.tgz", - "integrity": "sha512-cf7Niq4/+/juY67E0PbgH0TDhLQ5J7zS8C/Q5FFx+DWyrRa9sUQdTXkjqKu8zGvuqr7vw1muKiukseihU+PJDA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.24.0.tgz", + "integrity": "sha512-MXW3pQCu9gUiVGzqkGqsgiINDVYXoAnrY8FYF/rmb+OfufNF0zHMpHPN4ulRrinxYT8Vk/aZJxYqOKsDECjKAw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -857,9 +855,9 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.3.tgz", - "integrity": "sha512-59GsVNavGxAXCDDbakWSMJhajASb4kBCqDjqJsv+p5nKdbz7istmZ3HrX3L2LuiI80+zsOADCvooqQH3qGCucQ==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.9.tgz", + "integrity": "sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", @@ -907,9 +905,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.3.tgz", - "integrity": "sha512-QPZxHrThbQia7UdvfpaRRlq/J9ciz1J4go0k+lPBXbgaNeY7IQrBj/9ceWjvMMI07/ZBzHl/F0R/2K0qH7jCVw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz", + "integrity": "sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" @@ -938,9 +936,9 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.3.tgz", - "integrity": "sha512-PENDVxdr7ZxKPyi5Ffc0LjXdnJyrJxyqF5T5YjlVg4a0VFfQHW0r8iAtRiDXkfHlu1wwcvdtnndGYIeJLSuRMQ==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz", + "integrity": "sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ==", "dev": true, "dependencies": { "@babel/helper-create-class-features-plugin": "^7.22.15", @@ -955,16 +953,15 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.3.tgz", - "integrity": "sha512-FGEQmugvAEu2QtgtU0uTASXevfLMFfBeVCIIdcQhn/uBQsMTjBajdnAtanQlOcuihWh10PZ7+HWvc7NtBwP74w==", + "version": "7.23.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.8.tgz", + "integrity": "sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5", "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-replace-supers": "^7.22.20", "@babel/helper-split-export-declaration": "^7.22.6", @@ -1040,9 +1037,9 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.3.tgz", - "integrity": "sha512-vTG+cTGxPFou12Rj7ll+eD5yWeNl5/8xvQvF08y5Gv3v4mZQoyFf8/n9zg4q5vvCWt5jmgymfzMAldO7orBn7A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz", + "integrity": "sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1072,9 +1069,9 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.3.tgz", - "integrity": "sha512-yCLhW34wpJWRdTxxWtFZASJisihrfyMOTOQexhVzA78jlU+dH7Dw+zQgcPepQ5F3C6bAIiblZZ+qBggJdHiBAg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz", + "integrity": "sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1088,12 +1085,13 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.3.tgz", - "integrity": "sha512-X8jSm8X1CMwxmK878qsUGJRmbysKNbdpTv/O1/v0LuY/ZkZrng5WYiekYSdg9m09OTmDDUWeEDsTE+17WYbAZw==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz", + "integrity": "sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1120,9 +1118,9 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.3.tgz", - "integrity": "sha512-H9Ej2OiISIZowZHaBwF0tsJOih1PftXJtE8EWqlEIwpc7LMTGq0rPOrywKLQ4nefzx8/HMR0D3JGXoMHYvhi0A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz", + "integrity": "sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1151,9 +1149,9 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.3.tgz", - "integrity": "sha512-+pD5ZbxofyOygEp+zZAfujY2ShNCXRpDRIPOiBmTO693hhyOEteZgl876Xs9SAHPQpcV0vz8LvA/T+w8AzyX8A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz", + "integrity": "sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1215,9 +1213,9 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz", - "integrity": "sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.9.tgz", + "integrity": "sha512-KDlPRM6sLo4o1FkiSlXoAa8edLXFsKKIda779fbLrvmeuc3itnjCtaO6RrtoaANsIJANj+Vk1zqbZIMhkCAHVw==", "dev": true, "dependencies": { "@babel/helper-hoist-variables": "^7.22.5", @@ -1280,9 +1278,9 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.3.tgz", - "integrity": "sha512-xzg24Lnld4DYIdysyf07zJ1P+iIfJpxtVFOzX4g+bsJ3Ng5Le7rXx9KwqKzuyaUeRnt+I1EICwQITqc0E2PmpA==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz", + "integrity": "sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1296,9 +1294,9 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.3.tgz", - "integrity": "sha512-s9GO7fIBi/BLsZ0v3Rftr6Oe4t0ctJ8h4CCXfPoEJwmvAPMyNrfkOOJzm6b9PX9YXcCJWWQd/sBF/N26eBiMVw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz", + "integrity": "sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1312,14 +1310,14 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.3.tgz", - "integrity": "sha512-VxHt0ANkDmu8TANdE9Kc0rndo/ccsmfe2Cx2y5sI4hu3AukHQ5wAu4cM7j3ba8B9548ijVyclBU+nuDQftZsog==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.0.tgz", + "integrity": "sha512-y/yKMm7buHpFFXfxVFS4Vk1ToRJDilIa6fKRioB9Vjichv58TDGXTvqV0dN7plobAmTW5eSEGXDngE+Mm+uO+w==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/compat-data": "^7.23.5", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-transform-parameters": "^7.23.3" }, @@ -1347,9 +1345,9 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.3.tgz", - "integrity": "sha512-LxYSb0iLjUamfm7f1D7GpiS4j0UAC8AOiehnsGAP8BEsIX8EOi3qV6bbctw8M7ZvLtcoZfZX5Z7rN9PlWk0m5A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz", + "integrity": "sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1363,9 +1361,9 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.3.tgz", - "integrity": "sha512-zvL8vIfIUgMccIAK1lxjvNv572JHFJIKb4MWBz5OGdBQA0fB0Xluix5rmOby48exiJc987neOmP/m9Fnpkz3Tg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz", + "integrity": "sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1410,9 +1408,9 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.3.tgz", - "integrity": "sha512-a5m2oLNFyje2e/rGKjVfAELTVI5mbA0FeZpBnkOWWV7eSmKQ+T/XW0Vf+29ScLzSxX+rnsarvU0oie/4m6hkxA==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz", + "integrity": "sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", @@ -1631,18 +1629,18 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.3.tgz", - "integrity": "sha512-ovzGc2uuyNfNAs/jyjIGxS8arOHS5FENZaNn4rtE7UdKMMkqHCvboHfcuhWLZNX5cB44QfcGNWjaevxMzzMf+Q==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.0.tgz", + "integrity": "sha512-ZxPEzV9IgvGn73iK0E6VB9/95Nd7aMFpbE0l8KQFDG70cOV9IxRP7Y2FUPmlK0v6ImlLqYX50iuZ3ZTVhOF2lA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", + "@babel/compat-data": "^7.23.5", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-validator-option": "^7.23.5", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.3", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.7", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", @@ -1663,41 +1661,41 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.23.3", - "@babel/plugin-transform-async-generator-functions": "^7.23.3", + "@babel/plugin-transform-async-generator-functions": "^7.23.9", "@babel/plugin-transform-async-to-generator": "^7.23.3", "@babel/plugin-transform-block-scoped-functions": "^7.23.3", - "@babel/plugin-transform-block-scoping": "^7.23.3", + "@babel/plugin-transform-block-scoping": "^7.23.4", "@babel/plugin-transform-class-properties": "^7.23.3", - "@babel/plugin-transform-class-static-block": "^7.23.3", - "@babel/plugin-transform-classes": "^7.23.3", + "@babel/plugin-transform-class-static-block": "^7.23.4", + "@babel/plugin-transform-classes": "^7.23.8", "@babel/plugin-transform-computed-properties": "^7.23.3", "@babel/plugin-transform-destructuring": "^7.23.3", "@babel/plugin-transform-dotall-regex": "^7.23.3", "@babel/plugin-transform-duplicate-keys": "^7.23.3", - "@babel/plugin-transform-dynamic-import": "^7.23.3", + "@babel/plugin-transform-dynamic-import": "^7.23.4", "@babel/plugin-transform-exponentiation-operator": "^7.23.3", - "@babel/plugin-transform-export-namespace-from": "^7.23.3", - "@babel/plugin-transform-for-of": "^7.23.3", + "@babel/plugin-transform-export-namespace-from": "^7.23.4", + "@babel/plugin-transform-for-of": "^7.23.6", "@babel/plugin-transform-function-name": "^7.23.3", - "@babel/plugin-transform-json-strings": "^7.23.3", + "@babel/plugin-transform-json-strings": "^7.23.4", "@babel/plugin-transform-literals": "^7.23.3", - "@babel/plugin-transform-logical-assignment-operators": "^7.23.3", + "@babel/plugin-transform-logical-assignment-operators": "^7.23.4", "@babel/plugin-transform-member-expression-literals": "^7.23.3", "@babel/plugin-transform-modules-amd": "^7.23.3", "@babel/plugin-transform-modules-commonjs": "^7.23.3", - "@babel/plugin-transform-modules-systemjs": "^7.23.3", + "@babel/plugin-transform-modules-systemjs": "^7.23.9", "@babel/plugin-transform-modules-umd": "^7.23.3", "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", "@babel/plugin-transform-new-target": "^7.23.3", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.3", - "@babel/plugin-transform-numeric-separator": "^7.23.3", - "@babel/plugin-transform-object-rest-spread": "^7.23.3", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4", + "@babel/plugin-transform-numeric-separator": "^7.23.4", + "@babel/plugin-transform-object-rest-spread": "^7.24.0", "@babel/plugin-transform-object-super": "^7.23.3", - "@babel/plugin-transform-optional-catch-binding": "^7.23.3", - "@babel/plugin-transform-optional-chaining": "^7.23.3", + "@babel/plugin-transform-optional-catch-binding": "^7.23.4", + "@babel/plugin-transform-optional-chaining": "^7.23.4", "@babel/plugin-transform-parameters": "^7.23.3", "@babel/plugin-transform-private-methods": "^7.23.3", - "@babel/plugin-transform-private-property-in-object": "^7.23.3", + "@babel/plugin-transform-private-property-in-object": "^7.23.4", "@babel/plugin-transform-property-literals": "^7.23.3", "@babel/plugin-transform-regenerator": "^7.23.3", "@babel/plugin-transform-reserved-words": "^7.23.3", @@ -1711,9 +1709,9 @@ "@babel/plugin-transform-unicode-regex": "^7.23.3", "@babel/plugin-transform-unicode-sets-regex": "^7.23.3", "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.6", - "babel-plugin-polyfill-corejs3": "^0.8.5", - "babel-plugin-polyfill-regenerator": "^0.5.3", + "babel-plugin-polyfill-corejs2": "^0.4.8", + "babel-plugin-polyfill-corejs3": "^0.9.0", + "babel-plugin-polyfill-regenerator": "^0.5.5", "core-js-compat": "^3.31.0", "semver": "^6.3.1" }, @@ -1782,32 +1780,32 @@ "dev": true }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", - "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", + "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.3", - "@babel/types": "^7.23.3", - "debug": "^4.1.0", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -1815,11 +1813,11 @@ } }, "node_modules/@babel/types": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", - "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, @@ -1874,10 +1872,26 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/android-arm": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", - "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "cpu": [ "arm" ], @@ -1891,9 +1905,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", - "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "cpu": [ "arm64" ], @@ -1907,9 +1921,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", - "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "cpu": [ "x64" ], @@ -1923,9 +1937,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", - "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "cpu": [ "arm64" ], @@ -1939,9 +1953,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", - "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "cpu": [ "x64" ], @@ -1955,9 +1969,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", - "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "cpu": [ "arm64" ], @@ -1971,9 +1985,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", - "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "cpu": [ "x64" ], @@ -1987,9 +2001,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", - "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "cpu": [ "arm" ], @@ -2003,9 +2017,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", - "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "cpu": [ "arm64" ], @@ -2019,9 +2033,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", - "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "cpu": [ "ia32" ], @@ -2035,9 +2049,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", - "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "cpu": [ "loong64" ], @@ -2051,9 +2065,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", - "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "cpu": [ "mips64el" ], @@ -2067,9 +2081,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", - "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "cpu": [ "ppc64" ], @@ -2083,9 +2097,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", - "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "cpu": [ "riscv64" ], @@ -2099,9 +2113,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", - "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "cpu": [ "s390x" ], @@ -2115,9 +2129,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", - "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "cpu": [ "x64" ], @@ -2131,9 +2145,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", - "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "cpu": [ "x64" ], @@ -2147,9 +2161,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", - "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "cpu": [ "x64" ], @@ -2163,9 +2177,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", - "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "cpu": [ "x64" ], @@ -2179,9 +2193,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", - "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "cpu": [ "arm64" ], @@ -2195,9 +2209,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", - "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "cpu": [ "ia32" ], @@ -2211,9 +2225,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", - "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "cpu": [ "x64" ], @@ -2251,9 +2265,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -2274,9 +2288,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2301,22 +2315,22 @@ } }, "node_modules/@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -2337,9 +2351,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "node_modules/@istanbuljs/load-nyc-config": { @@ -3266,9 +3280,9 @@ } }, "node_modules/@types/diff": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.0.8.tgz", - "integrity": "sha512-kR0gRf0wMwpxQq6ME5s+tWk9zVCfJUl98eRkD05HWWRbhPB/eu4V1IbyZAsvzC1Gn4znBJ0HN01M4DGXdBEV8Q==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.0.9.tgz", + "integrity": "sha512-RWVEhh/zGXpAVF/ZChwNnv7r4rvqzJ7lYNSmZSVTxjV0PBLf6Qu7RNg+SUtkpzxmiNkjCx0Xn2tPp7FIkshJwQ==", "dev": true }, "node_modules/@types/diff-match-patch": { @@ -3325,9 +3339,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.8", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.8.tgz", - "integrity": "sha512-fXEFTxMV2Co8ZF5aYFJv+YeA08RTYJfhtN5c9JSv/mFEMe+xxjufCb+PHL+bJcMs/ebPUsBu+UNTEz+ydXrR6g==", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -3364,9 +3378,9 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", + "version": "20.11.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", + "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -3420,16 +3434,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.10.0.tgz", - "integrity": "sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.2.0.tgz", + "integrity": "sha512-mdekAHOqS9UjlmyF/LSs6AIEvfceV749GFxoBAjwAv0nkevfKHWQFDMcBZWUiIC5ft6ePWivXoS36aKQ0Cy3sw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/type-utils": "6.10.0", - "@typescript-eslint/utils": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/type-utils": "7.2.0", + "@typescript-eslint/utils": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -3445,8 +3459,8 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -3455,13 +3469,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3472,9 +3486,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3485,16 +3499,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -3512,17 +3527,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.2.0.tgz", + "integrity": "sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", "semver": "^7.5.4" }, "engines": { @@ -3533,16 +3548,16 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "7.2.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -3553,6 +3568,15 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -3565,10 +3589,25 @@ "node": ">=10" } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -3587,15 +3626,15 @@ "dev": true }, "node_modules/@typescript-eslint/parser": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.10.0.tgz", - "integrity": "sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz", + "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4" }, "engines": { @@ -3606,7 +3645,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -3615,13 +3654,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3632,9 +3671,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3645,16 +3684,17 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -3672,12 +3712,12 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "7.2.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -3688,6 +3728,15 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/parser/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/@typescript-eslint/parser/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -3700,10 +3749,25 @@ "node": ">=10" } }, + "node_modules/@typescript-eslint/parser/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typescript-eslint/parser/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -3739,13 +3803,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.10.0.tgz", - "integrity": "sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.2.0.tgz", + "integrity": "sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.10.0", - "@typescript-eslint/utils": "6.10.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/utils": "7.2.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -3757,7 +3821,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -3766,13 +3830,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3783,9 +3847,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3796,16 +3860,17 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -3823,17 +3888,17 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.2.0.tgz", + "integrity": "sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", "semver": "^7.5.4" }, "engines": { @@ -3844,16 +3909,16 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "7.2.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -3864,6 +3929,15 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/@typescript-eslint/type-utils/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -3876,10 +3950,25 @@ "node": ">=10" } }, + "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typescript-eslint/type-utils/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -4167,9 +4256,9 @@ } }, "node_modules/async-lock": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.0.tgz", - "integrity": "sha512-coglx5yIWuetakm3/1dsX9hxCNox22h7+V80RQOu2XUUMidtArxKoZoOtHUPuR84SycKTXzgGzAUR5hJxujyJQ==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==" }, "node_modules/babel-jest": { "version": "29.7.0", @@ -4308,13 +4397,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz", - "integrity": "sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==", + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.10.tgz", + "integrity": "sha512-rpIuu//y5OX6jVU+a5BCn1R5RSZYWAl2Nar76iwaOdycqb6JPxediskWFMMl7stfwNJR4b7eiQvh5fB5TEQJTQ==", "dev": true, "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.4.3", + "@babel/helper-define-polyfill-provider": "^0.6.1", "semver": "^6.3.1" }, "peerDependencies": { @@ -4322,25 +4411,57 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.8.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.6.tgz", - "integrity": "sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.9.0.tgz", + "integrity": "sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.5.0", + "core-js-compat": "^3.34.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs3/node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", + "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.3", - "core-js-compat": "^3.33.1" + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz", - "integrity": "sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz", + "integrity": "sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.3" + "@babel/helper-define-polyfill-provider": "^0.5.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator/node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", + "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -4434,9 +4555,9 @@ } }, "node_modules/browserslist": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", - "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "funding": [ { "type": "opencollective", @@ -4452,9 +4573,9 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001541", - "electron-to-chromium": "^1.4.535", - "node-releases": "^2.0.13", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, "bin": { @@ -4510,9 +4631,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001561", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001561.tgz", - "integrity": "sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==", + "version": "1.0.30001597", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz", + "integrity": "sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==", "funding": [ { "type": "opencollective", @@ -4663,12 +4784,12 @@ "hasInstallScript": true }, "node_modules/core-js-compat": { - "version": "3.33.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.2.tgz", - "integrity": "sha512-axfo+wxFVxnqf8RvxTzoAlzW4gRoacrHeoFlc9n0x50+7BEyZL/Rt3hicaED1/CEd7I6tPCPVUYcJwCMO5XUYw==", + "version": "3.36.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.36.0.tgz", + "integrity": "sha512-iV9Pd/PsgjNWBXeq8XRtWVSgz2tKAfhfvBs7qxYty+RlRd+OCksaWmOnc4JKrTc1cToXL1N0s3l/vwlxPtdElw==", "dev": true, "dependencies": { - "browserslist": "^4.22.1" + "browserslist": "^4.22.3" }, "funding": { "type": "opencollective", @@ -4920,9 +5041,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.581", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.581.tgz", - "integrity": "sha512-6uhqWBIapTJUxgPTCHH9sqdbxIMPt7oXl0VcAL1kOtlU6aECdcMncCrX5Z7sHQ/invtrC9jUQUef7+HhO8vVFw==" + "version": "1.4.708", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.708.tgz", + "integrity": "sha512-iWgEEvREL4GTXXHKohhh33+6Y8XkPI5eHihDmm8zUk5Zo7HICEW+wI/j5kJ2tbuNUCXJ/sNXa03ajW635DiJXA==" }, "node_modules/emittery": { "version": "0.13.1", @@ -4952,9 +5073,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", - "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, "hasInstallScript": true, "bin": { @@ -4964,28 +5085,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.19.5", - "@esbuild/android-arm64": "0.19.5", - "@esbuild/android-x64": "0.19.5", - "@esbuild/darwin-arm64": "0.19.5", - "@esbuild/darwin-x64": "0.19.5", - "@esbuild/freebsd-arm64": "0.19.5", - "@esbuild/freebsd-x64": "0.19.5", - "@esbuild/linux-arm": "0.19.5", - "@esbuild/linux-arm64": "0.19.5", - "@esbuild/linux-ia32": "0.19.5", - "@esbuild/linux-loong64": "0.19.5", - "@esbuild/linux-mips64el": "0.19.5", - "@esbuild/linux-ppc64": "0.19.5", - "@esbuild/linux-riscv64": "0.19.5", - "@esbuild/linux-s390x": "0.19.5", - "@esbuild/linux-x64": "0.19.5", - "@esbuild/netbsd-x64": "0.19.5", - "@esbuild/openbsd-x64": "0.19.5", - "@esbuild/sunos-x64": "0.19.5", - "@esbuild/win32-arm64": "0.19.5", - "@esbuild/win32-ia32": "0.19.5", - "@esbuild/win32-x64": "0.19.5" + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, "node_modules/esbuild-plugin-import-glob": { @@ -5023,16 +5145,16 @@ } }, "node_modules/eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -5090,9 +5212,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "27.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.0.tgz", - "integrity": "sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng==", + "version": "27.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", + "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.10.0" @@ -5101,7 +5223,7 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0", + "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", "eslint": "^7.0.0 || ^8.0.0", "jest": "*" }, @@ -5115,15 +5237,17 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "49.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-49.0.0.tgz", - "integrity": "sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==", + "version": "51.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", + "integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "@eslint-community/eslint-utils": "^4.4.0", - "ci-info": "^3.8.0", + "@eslint/eslintrc": "^2.1.4", + "ci-info": "^4.0.0", "clean-regexp": "^1.0.0", + "core-js-compat": "^3.34.0", "esquery": "^1.5.0", "indent-string": "^4.0.0", "is-builtin-module": "^3.2.1", @@ -5142,7 +5266,22 @@ "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" }, "peerDependencies": { - "eslint": ">=8.52.0" + "eslint": ">=8.56.0" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/ci-info": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", + "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" } }, "node_modules/eslint-plugin-unicorn/node_modules/jsesc": { @@ -7899,9 +8038,9 @@ "dev": true }, "node_modules/loglevel": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", - "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", "engines": { "node": ">= 0.6.0" }, @@ -8679,9 +8818,9 @@ } }, "node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", "dev": true, "engines": { "node": "*" @@ -8710,9 +8849,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, "node_modules/normalize-package-data": { "version": "2.5.0", @@ -8770,6 +8909,15 @@ "@codemirror/view": "^6.0.0" } }, + "node_modules/obsidian/node_modules/moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -9628,12 +9776,12 @@ } }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" @@ -9648,9 +9796,9 @@ } }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -9751,9 +9899,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -10216,34 +10364,34 @@ } }, "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "requires": { - "@babel/highlight": "^7.22.13", + "@babel/highlight": "^7.23.4", "chalk": "^2.4.2" } }, "@babel/compat-data": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.3.tgz", - "integrity": "sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==" + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==" }, "@babel/core": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz", - "integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz", + "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==", "requires": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.2", - "@babel/parser": "^7.23.3", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.3", - "@babel/types": "^7.23.3", + "@babel/helpers": "^7.24.0", + "@babel/parser": "^7.24.0", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -10252,11 +10400,11 @@ } }, "@babel/generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", - "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", "requires": { - "@babel/types": "^7.23.3", + "@babel/types": "^7.23.6", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -10280,28 +10428,28 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "requires": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz", - "integrity": "sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.0.tgz", + "integrity": "sha512-QAH+vfvts51BCsNZ2PhY6HAggnlS6omLLFTsIpeqZk/MmJ6cW7tgz5yRv0fMJThcr6FmbMrENh1RgrWPTYA76g==", "requires": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-member-expression-to-functions": "^7.23.0", "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-replace-supers": "^7.22.20", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", "semver": "^6.3.1" @@ -10319,9 +10467,9 @@ } }, "@babel/helper-define-polyfill-provider": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz", - "integrity": "sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.1.tgz", + "integrity": "sha512-o7SDgTJuvx5vLKD6SFvkydkSMBvahDKGiNJzG22IZYXhiqoe9efY7zocICBgzHV4IRg5wdgl2nEL/tulKIEIbA==", "dev": true, "requires": { "@babel/helper-compilation-targets": "^7.22.6", @@ -10390,9 +10538,9 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==" + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==" }, "@babel/helper-remap-async-to-generator": { "version": "7.22.20", @@ -10440,9 +10588,9 @@ } }, "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==" + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==" }, "@babel/helper-validator-identifier": { "version": "7.22.20", @@ -10450,9 +10598,9 @@ "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==" }, "@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==" + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==" }, "@babel/helper-wrap-function": { "version": "7.22.20", @@ -10466,19 +10614,19 @@ } }, "@babel/helpers": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", - "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", + "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", "requires": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0" } }, "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "requires": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", @@ -10486,9 +10634,9 @@ } }, "@babel/parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", - "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==" + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", + "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.23.3", @@ -10511,9 +10659,9 @@ } }, "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.3.tgz", - "integrity": "sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.7.tgz", + "integrity": "sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw==", "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.22.20", @@ -10521,16 +10669,14 @@ } }, "@babel/plugin-proposal-decorators": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.3.tgz", - "integrity": "sha512-u8SwzOcP0DYSsa++nHd/9exlHb0NAlHCb890qtZZbSwPX2bFv8LBEztxwN7Xg/dS8oAFFidhrI9PBcLBJSkGRQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.24.0.tgz", + "integrity": "sha512-LiT1RqZWeij7X+wGxCoYh3/3b8nVOX6/7BZ9wiQgAIyjoeQWdROaodJCgT+dwtbjHaz0r7bEbHJzjSbVfcOyjQ==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/plugin-syntax-decorators": "^7.23.3" + "@babel/helper-create-class-features-plugin": "^7.24.0", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-decorators": "^7.24.0" } }, "@babel/plugin-proposal-private-property-in-object": { @@ -10577,12 +10723,12 @@ } }, "@babel/plugin-syntax-decorators": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.23.3.tgz", - "integrity": "sha512-cf7Niq4/+/juY67E0PbgH0TDhLQ5J7zS8C/Q5FFx+DWyrRa9sUQdTXkjqKu8zGvuqr7vw1muKiukseihU+PJDA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.24.0.tgz", + "integrity": "sha512-MXW3pQCu9gUiVGzqkGqsgiINDVYXoAnrY8FYF/rmb+OfufNF0zHMpHPN4ulRrinxYT8Vk/aZJxYqOKsDECjKAw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" } }, "@babel/plugin-syntax-dynamic-import": { @@ -10749,9 +10895,9 @@ } }, "@babel/plugin-transform-async-generator-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.3.tgz", - "integrity": "sha512-59GsVNavGxAXCDDbakWSMJhajASb4kBCqDjqJsv+p5nKdbz7istmZ3HrX3L2LuiI80+zsOADCvooqQH3qGCucQ==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.9.tgz", + "integrity": "sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ==", "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.22.20", @@ -10781,9 +10927,9 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.3.tgz", - "integrity": "sha512-QPZxHrThbQia7UdvfpaRRlq/J9ciz1J4go0k+lPBXbgaNeY7IQrBj/9ceWjvMMI07/ZBzHl/F0R/2K0qH7jCVw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz", + "integrity": "sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5" @@ -10800,9 +10946,9 @@ } }, "@babel/plugin-transform-class-static-block": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.3.tgz", - "integrity": "sha512-PENDVxdr7ZxKPyi5Ffc0LjXdnJyrJxyqF5T5YjlVg4a0VFfQHW0r8iAtRiDXkfHlu1wwcvdtnndGYIeJLSuRMQ==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz", + "integrity": "sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ==", "dev": true, "requires": { "@babel/helper-create-class-features-plugin": "^7.22.15", @@ -10811,16 +10957,15 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.3.tgz", - "integrity": "sha512-FGEQmugvAEu2QtgtU0uTASXevfLMFfBeVCIIdcQhn/uBQsMTjBajdnAtanQlOcuihWh10PZ7+HWvc7NtBwP74w==", + "version": "7.23.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.8.tgz", + "integrity": "sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5", "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-replace-supers": "^7.22.20", "@babel/helper-split-export-declaration": "^7.22.6", @@ -10866,9 +11011,9 @@ } }, "@babel/plugin-transform-dynamic-import": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.3.tgz", - "integrity": "sha512-vTG+cTGxPFou12Rj7ll+eD5yWeNl5/8xvQvF08y5Gv3v4mZQoyFf8/n9zg4q5vvCWt5jmgymfzMAldO7orBn7A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz", + "integrity": "sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10886,9 +11031,9 @@ } }, "@babel/plugin-transform-export-namespace-from": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.3.tgz", - "integrity": "sha512-yCLhW34wpJWRdTxxWtFZASJisihrfyMOTOQexhVzA78jlU+dH7Dw+zQgcPepQ5F3C6bAIiblZZ+qBggJdHiBAg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz", + "integrity": "sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10896,12 +11041,13 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.3.tgz", - "integrity": "sha512-X8jSm8X1CMwxmK878qsUGJRmbysKNbdpTv/O1/v0LuY/ZkZrng5WYiekYSdg9m09OTmDDUWeEDsTE+17WYbAZw==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz", + "integrity": "sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" } }, "@babel/plugin-transform-function-name": { @@ -10916,9 +11062,9 @@ } }, "@babel/plugin-transform-json-strings": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.3.tgz", - "integrity": "sha512-H9Ej2OiISIZowZHaBwF0tsJOih1PftXJtE8EWqlEIwpc7LMTGq0rPOrywKLQ4nefzx8/HMR0D3JGXoMHYvhi0A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz", + "integrity": "sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10935,9 +11081,9 @@ } }, "@babel/plugin-transform-logical-assignment-operators": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.3.tgz", - "integrity": "sha512-+pD5ZbxofyOygEp+zZAfujY2ShNCXRpDRIPOiBmTO693hhyOEteZgl876Xs9SAHPQpcV0vz8LvA/T+w8AzyX8A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz", + "integrity": "sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10975,9 +11121,9 @@ } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz", - "integrity": "sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.9.tgz", + "integrity": "sha512-KDlPRM6sLo4o1FkiSlXoAa8edLXFsKKIda779fbLrvmeuc3itnjCtaO6RrtoaANsIJANj+Vk1zqbZIMhkCAHVw==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.22.5", @@ -11016,9 +11162,9 @@ } }, "@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.3.tgz", - "integrity": "sha512-xzg24Lnld4DYIdysyf07zJ1P+iIfJpxtVFOzX4g+bsJ3Ng5Le7rXx9KwqKzuyaUeRnt+I1EICwQITqc0E2PmpA==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz", + "integrity": "sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -11026,9 +11172,9 @@ } }, "@babel/plugin-transform-numeric-separator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.3.tgz", - "integrity": "sha512-s9GO7fIBi/BLsZ0v3Rftr6Oe4t0ctJ8h4CCXfPoEJwmvAPMyNrfkOOJzm6b9PX9YXcCJWWQd/sBF/N26eBiMVw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz", + "integrity": "sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -11036,14 +11182,14 @@ } }, "@babel/plugin-transform-object-rest-spread": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.3.tgz", - "integrity": "sha512-VxHt0ANkDmu8TANdE9Kc0rndo/ccsmfe2Cx2y5sI4hu3AukHQ5wAu4cM7j3ba8B9548ijVyclBU+nuDQftZsog==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.0.tgz", + "integrity": "sha512-y/yKMm7buHpFFXfxVFS4Vk1ToRJDilIa6fKRioB9Vjichv58TDGXTvqV0dN7plobAmTW5eSEGXDngE+Mm+uO+w==", "dev": true, "requires": { - "@babel/compat-data": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/compat-data": "^7.23.5", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-transform-parameters": "^7.23.3" } @@ -11059,9 +11205,9 @@ } }, "@babel/plugin-transform-optional-catch-binding": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.3.tgz", - "integrity": "sha512-LxYSb0iLjUamfm7f1D7GpiS4j0UAC8AOiehnsGAP8BEsIX8EOi3qV6bbctw8M7ZvLtcoZfZX5Z7rN9PlWk0m5A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz", + "integrity": "sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -11069,9 +11215,9 @@ } }, "@babel/plugin-transform-optional-chaining": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.3.tgz", - "integrity": "sha512-zvL8vIfIUgMccIAK1lxjvNv572JHFJIKb4MWBz5OGdBQA0fB0Xluix5rmOby48exiJc987neOmP/m9Fnpkz3Tg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz", + "integrity": "sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -11098,9 +11244,9 @@ } }, "@babel/plugin-transform-private-property-in-object": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.3.tgz", - "integrity": "sha512-a5m2oLNFyje2e/rGKjVfAELTVI5mbA0FeZpBnkOWWV7eSmKQ+T/XW0Vf+29ScLzSxX+rnsarvU0oie/4m6hkxA==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz", + "integrity": "sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.22.5", @@ -11235,18 +11381,18 @@ } }, "@babel/preset-env": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.3.tgz", - "integrity": "sha512-ovzGc2uuyNfNAs/jyjIGxS8arOHS5FENZaNn4rtE7UdKMMkqHCvboHfcuhWLZNX5cB44QfcGNWjaevxMzzMf+Q==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.0.tgz", + "integrity": "sha512-ZxPEzV9IgvGn73iK0E6VB9/95Nd7aMFpbE0l8KQFDG70cOV9IxRP7Y2FUPmlK0v6ImlLqYX50iuZ3ZTVhOF2lA==", "dev": true, "requires": { - "@babel/compat-data": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", + "@babel/compat-data": "^7.23.5", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-validator-option": "^7.23.5", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.3", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.7", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", @@ -11267,41 +11413,41 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.23.3", - "@babel/plugin-transform-async-generator-functions": "^7.23.3", + "@babel/plugin-transform-async-generator-functions": "^7.23.9", "@babel/plugin-transform-async-to-generator": "^7.23.3", "@babel/plugin-transform-block-scoped-functions": "^7.23.3", - "@babel/plugin-transform-block-scoping": "^7.23.3", + "@babel/plugin-transform-block-scoping": "^7.23.4", "@babel/plugin-transform-class-properties": "^7.23.3", - "@babel/plugin-transform-class-static-block": "^7.23.3", - "@babel/plugin-transform-classes": "^7.23.3", + "@babel/plugin-transform-class-static-block": "^7.23.4", + "@babel/plugin-transform-classes": "^7.23.8", "@babel/plugin-transform-computed-properties": "^7.23.3", "@babel/plugin-transform-destructuring": "^7.23.3", "@babel/plugin-transform-dotall-regex": "^7.23.3", "@babel/plugin-transform-duplicate-keys": "^7.23.3", - "@babel/plugin-transform-dynamic-import": "^7.23.3", + "@babel/plugin-transform-dynamic-import": "^7.23.4", "@babel/plugin-transform-exponentiation-operator": "^7.23.3", - "@babel/plugin-transform-export-namespace-from": "^7.23.3", - "@babel/plugin-transform-for-of": "^7.23.3", + "@babel/plugin-transform-export-namespace-from": "^7.23.4", + "@babel/plugin-transform-for-of": "^7.23.6", "@babel/plugin-transform-function-name": "^7.23.3", - "@babel/plugin-transform-json-strings": "^7.23.3", + "@babel/plugin-transform-json-strings": "^7.23.4", "@babel/plugin-transform-literals": "^7.23.3", - "@babel/plugin-transform-logical-assignment-operators": "^7.23.3", + "@babel/plugin-transform-logical-assignment-operators": "^7.23.4", "@babel/plugin-transform-member-expression-literals": "^7.23.3", "@babel/plugin-transform-modules-amd": "^7.23.3", "@babel/plugin-transform-modules-commonjs": "^7.23.3", - "@babel/plugin-transform-modules-systemjs": "^7.23.3", + "@babel/plugin-transform-modules-systemjs": "^7.23.9", "@babel/plugin-transform-modules-umd": "^7.23.3", "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", "@babel/plugin-transform-new-target": "^7.23.3", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.3", - "@babel/plugin-transform-numeric-separator": "^7.23.3", - "@babel/plugin-transform-object-rest-spread": "^7.23.3", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4", + "@babel/plugin-transform-numeric-separator": "^7.23.4", + "@babel/plugin-transform-object-rest-spread": "^7.24.0", "@babel/plugin-transform-object-super": "^7.23.3", - "@babel/plugin-transform-optional-catch-binding": "^7.23.3", - "@babel/plugin-transform-optional-chaining": "^7.23.3", + "@babel/plugin-transform-optional-catch-binding": "^7.23.4", + "@babel/plugin-transform-optional-chaining": "^7.23.4", "@babel/plugin-transform-parameters": "^7.23.3", "@babel/plugin-transform-private-methods": "^7.23.3", - "@babel/plugin-transform-private-property-in-object": "^7.23.3", + "@babel/plugin-transform-private-property-in-object": "^7.23.4", "@babel/plugin-transform-property-literals": "^7.23.3", "@babel/plugin-transform-regenerator": "^7.23.3", "@babel/plugin-transform-reserved-words": "^7.23.3", @@ -11315,9 +11461,9 @@ "@babel/plugin-transform-unicode-regex": "^7.23.3", "@babel/plugin-transform-unicode-sets-regex": "^7.23.3", "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.6", - "babel-plugin-polyfill-corejs3": "^0.8.5", - "babel-plugin-polyfill-regenerator": "^0.5.3", + "babel-plugin-polyfill-corejs2": "^0.4.8", + "babel-plugin-polyfill-corejs3": "^0.9.0", + "babel-plugin-polyfill-regenerator": "^0.5.5", "core-js-compat": "^3.31.0", "semver": "^6.3.1" } @@ -11370,38 +11516,38 @@ } }, "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" } }, "@babel/traverse": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", - "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", + "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.3", - "@babel/types": "^7.23.3", - "debug": "^4.1.0", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", - "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "requires": { - "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } @@ -11452,157 +11598,164 @@ } } }, + "@esbuild/aix-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "dev": true, + "optional": true + }, "@esbuild/android-arm": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", - "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", - "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", - "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", - "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", - "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", - "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", - "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", - "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", - "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", - "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", - "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", - "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", - "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", - "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", - "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", - "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", - "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", - "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", - "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", - "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", - "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", - "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "dev": true, "optional": true }, @@ -11622,9 +11775,9 @@ "dev": true }, "@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -11639,9 +11792,9 @@ }, "dependencies": { "globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -11656,19 +11809,19 @@ } }, "@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true }, "@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" } }, @@ -11679,9 +11832,9 @@ "dev": true }, "@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "@istanbuljs/load-nyc-config": { @@ -12414,9 +12567,9 @@ } }, "@types/diff": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.0.8.tgz", - "integrity": "sha512-kR0gRf0wMwpxQq6ME5s+tWk9zVCfJUl98eRkD05HWWRbhPB/eu4V1IbyZAsvzC1Gn4znBJ0HN01M4DGXdBEV8Q==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.0.9.tgz", + "integrity": "sha512-RWVEhh/zGXpAVF/ZChwNnv7r4rvqzJ7lYNSmZSVTxjV0PBLf6Qu7RNg+SUtkpzxmiNkjCx0Xn2tPp7FIkshJwQ==", "dev": true }, "@types/diff-match-patch": { @@ -12473,9 +12626,9 @@ } }, "@types/jest": { - "version": "29.5.8", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.8.tgz", - "integrity": "sha512-fXEFTxMV2Co8ZF5aYFJv+YeA08RTYJfhtN5c9JSv/mFEMe+xxjufCb+PHL+bJcMs/ebPUsBu+UNTEz+ydXrR6g==", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "requires": { "expect": "^29.0.0", @@ -12512,9 +12665,9 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", + "version": "20.11.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", + "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", "dev": true, "requires": { "undici-types": "~5.26.4" @@ -12568,16 +12721,16 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.10.0.tgz", - "integrity": "sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.2.0.tgz", + "integrity": "sha512-mdekAHOqS9UjlmyF/LSs6AIEvfceV749GFxoBAjwAv0nkevfKHWQFDMcBZWUiIC5ft6ePWivXoS36aKQ0Cy3sw==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/type-utils": "6.10.0", - "@typescript-eslint/utils": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/type-utils": "7.2.0", + "@typescript-eslint/utils": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -12587,61 +12740,71 @@ }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", "dev": true, "requires": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" } }, "@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", "dev": true, "requires": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.2.0.tgz", + "integrity": "sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", "semver": "^7.5.4" } }, "@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", "dev": true, "requires": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "7.2.0", "eslint-visitor-keys": "^3.4.1" } }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -12651,10 +12814,19 @@ "yallist": "^4.0.0" } }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -12669,59 +12841,69 @@ } }, "@typescript-eslint/parser": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.10.0.tgz", - "integrity": "sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz", + "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", "dev": true, "requires": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" } }, "@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", "dev": true, "requires": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", "dev": true, "requires": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "7.2.0", "eslint-visitor-keys": "^3.4.1" } }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -12731,10 +12913,19 @@ "yallist": "^4.0.0" } }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -12759,73 +12950,83 @@ } }, "@typescript-eslint/type-utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.10.0.tgz", - "integrity": "sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.2.0.tgz", + "integrity": "sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "6.10.0", - "@typescript-eslint/utils": "6.10.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/utils": "7.2.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", "dev": true, "requires": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" } }, "@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", "dev": true, "requires": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.2.0.tgz", + "integrity": "sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", "semver": "^7.5.4" } }, "@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", "dev": true, "requires": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "7.2.0", "eslint-visitor-keys": "^3.4.1" } }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -12835,10 +13036,19 @@ "yallist": "^4.0.0" } }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -13039,9 +13249,9 @@ "dev": true }, "async-lock": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.0.tgz", - "integrity": "sha512-coglx5yIWuetakm3/1dsX9hxCNox22h7+V80RQOu2XUUMidtArxKoZoOtHUPuR84SycKTXzgGzAUR5hJxujyJQ==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==" }, "babel-jest": { "version": "29.7.0", @@ -13146,33 +13356,63 @@ } }, "babel-plugin-polyfill-corejs2": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz", - "integrity": "sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==", + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.10.tgz", + "integrity": "sha512-rpIuu//y5OX6jVU+a5BCn1R5RSZYWAl2Nar76iwaOdycqb6JPxediskWFMMl7stfwNJR4b7eiQvh5fB5TEQJTQ==", "dev": true, "requires": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.4.3", + "@babel/helper-define-polyfill-provider": "^0.6.1", "semver": "^6.3.1" } }, "babel-plugin-polyfill-corejs3": { - "version": "0.8.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.6.tgz", - "integrity": "sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.9.0.tgz", + "integrity": "sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.4.3", - "core-js-compat": "^3.33.1" + "@babel/helper-define-polyfill-provider": "^0.5.0", + "core-js-compat": "^3.34.0" + }, + "dependencies": { + "@babel/helper-define-polyfill-provider": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", + "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" + } + } } }, "babel-plugin-polyfill-regenerator": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz", - "integrity": "sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz", + "integrity": "sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.4.3" + "@babel/helper-define-polyfill-provider": "^0.5.0" + }, + "dependencies": { + "@babel/helper-define-polyfill-provider": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", + "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" + } + } } }, "babel-preset-current-node-syntax": { @@ -13247,13 +13487,13 @@ } }, "browserslist": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", - "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "requires": { - "caniuse-lite": "^1.0.30001541", - "electron-to-chromium": "^1.4.535", - "node-releases": "^2.0.13", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" } }, @@ -13291,9 +13531,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001561", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001561.tgz", - "integrity": "sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==" + "version": "1.0.30001597", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz", + "integrity": "sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==" }, "chalk": { "version": "2.4.2", @@ -13396,12 +13636,12 @@ "dev": true }, "core-js-compat": { - "version": "3.33.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.2.tgz", - "integrity": "sha512-axfo+wxFVxnqf8RvxTzoAlzW4gRoacrHeoFlc9n0x50+7BEyZL/Rt3hicaED1/CEd7I6tPCPVUYcJwCMO5XUYw==", + "version": "3.36.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.36.0.tgz", + "integrity": "sha512-iV9Pd/PsgjNWBXeq8XRtWVSgz2tKAfhfvBs7qxYty+RlRd+OCksaWmOnc4JKrTc1cToXL1N0s3l/vwlxPtdElw==", "dev": true, "requires": { - "browserslist": "^4.22.1" + "browserslist": "^4.22.3" } }, "create-jest": { @@ -13577,9 +13817,9 @@ } }, "electron-to-chromium": { - "version": "1.4.581", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.581.tgz", - "integrity": "sha512-6uhqWBIapTJUxgPTCHH9sqdbxIMPt7oXl0VcAL1kOtlU6aECdcMncCrX5Z7sHQ/invtrC9jUQUef7+HhO8vVFw==" + "version": "1.4.708", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.708.tgz", + "integrity": "sha512-iWgEEvREL4GTXXHKohhh33+6Y8XkPI5eHihDmm8zUk5Zo7HICEW+wI/j5kJ2tbuNUCXJ/sNXa03ajW635DiJXA==" }, "emittery": { "version": "0.13.1", @@ -13603,33 +13843,34 @@ } }, "esbuild": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", - "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.19.5", - "@esbuild/android-arm64": "0.19.5", - "@esbuild/android-x64": "0.19.5", - "@esbuild/darwin-arm64": "0.19.5", - "@esbuild/darwin-x64": "0.19.5", - "@esbuild/freebsd-arm64": "0.19.5", - "@esbuild/freebsd-x64": "0.19.5", - "@esbuild/linux-arm": "0.19.5", - "@esbuild/linux-arm64": "0.19.5", - "@esbuild/linux-ia32": "0.19.5", - "@esbuild/linux-loong64": "0.19.5", - "@esbuild/linux-mips64el": "0.19.5", - "@esbuild/linux-ppc64": "0.19.5", - "@esbuild/linux-riscv64": "0.19.5", - "@esbuild/linux-s390x": "0.19.5", - "@esbuild/linux-x64": "0.19.5", - "@esbuild/netbsd-x64": "0.19.5", - "@esbuild/openbsd-x64": "0.19.5", - "@esbuild/sunos-x64": "0.19.5", - "@esbuild/win32-arm64": "0.19.5", - "@esbuild/win32-ia32": "0.19.5", - "@esbuild/win32-x64": "0.19.5" + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, "esbuild-plugin-import-glob": { @@ -13661,16 +13902,16 @@ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" }, "eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -13830,24 +14071,26 @@ "requires": {} }, "eslint-plugin-jest": { - "version": "27.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.0.tgz", - "integrity": "sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng==", + "version": "27.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", + "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", "dev": true, "requires": { "@typescript-eslint/utils": "^5.10.0" } }, "eslint-plugin-unicorn": { - "version": "49.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-49.0.0.tgz", - "integrity": "sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==", + "version": "51.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", + "integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.22.20", "@eslint-community/eslint-utils": "^4.4.0", - "ci-info": "^3.8.0", + "@eslint/eslintrc": "^2.1.4", + "ci-info": "^4.0.0", "clean-regexp": "^1.0.0", + "core-js-compat": "^3.34.0", "esquery": "^1.5.0", "indent-string": "^4.0.0", "is-builtin-module": "^3.2.1", @@ -13860,6 +14103,12 @@ "strip-indent": "^3.0.0" }, "dependencies": { + "ci-info": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", + "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "dev": true + }, "jsesc": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", @@ -15765,9 +16014,9 @@ "dev": true }, "loglevel": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", - "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==" }, "longest-streak": { "version": "3.1.0", @@ -16256,9 +16505,9 @@ } }, "moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", "dev": true }, "moment-parseformat": { @@ -16284,9 +16533,9 @@ "dev": true }, "node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, "normalize-package-data": { "version": "2.5.0", @@ -16331,6 +16580,14 @@ "requires": { "@types/codemirror": "5.60.8", "moment": "2.29.4" + }, + "dependencies": { + "moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "dev": true + } } }, "once": { @@ -16952,9 +17209,9 @@ "dev": true }, "ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, "requires": {} }, @@ -16964,9 +17221,9 @@ "integrity": "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==" }, "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", @@ -17029,9 +17286,9 @@ "dev": true }, "typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true }, "undici-types": { diff --git a/package.json b/package.json index f6cf2046..2ab719df 100644 --- a/package.json +++ b/package.json @@ -18,45 +18,45 @@ "author": "", "license": "MIT", "devDependencies": { - "@babel/core": "^7.20.2", - "@babel/plugin-proposal-decorators": "^7.20.2", + "@babel/core": "^7.24.0", + "@babel/plugin-proposal-decorators": "^7.24.0", "@babel/plugin-transform-class-properties": "^7.23.3", - "@babel/preset-env": "^7.20.2", + "@babel/preset-env": "^7.24.0", "@babel/preset-typescript": "^7.18.6", "@jest/types": "^29.5.0", "@types/async-lock": "^1.4.2", - "@types/diff": "^5.0.2", + "@types/diff": "^5.0.9", "@types/diff-match-patch": "^1.0.32", - "@types/jest": "^29.2.3", - "@types/node": "^20.9.0", - "@typescript-eslint/eslint-plugin": "^6.10.0", - "@typescript-eslint/parser": "^6.10.0", + "@types/jest": "^29.5.12", + "@types/node": "^20.11.28", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "@typescript-eslint/parser": "^7.2.0", "babel-jest": "^29.3.1", "babel-plugin-import-glob": "^2.0.0", "builtin-modules": "^3.3.0", - "esbuild": "^0.19.5", + "esbuild": "^0.20.2", "esbuild-plugin-import-glob": "^0.1.1", "esbuild-plugin-replace": "^1.3.0", - "eslint": "^8.28.0", + "eslint": "^8.57.0", "eslint-config-google": "^0.14.0", - "eslint-plugin-jest": "^27.1.5", - "eslint-plugin-unicorn": "^49.0.0", + "eslint-plugin-jest": "^27.9.0", + "eslint-plugin-unicorn": "^51.0.1", "jest": "^29.3.1", - "moment": "^2.29.4", + "moment": "^2.30.1", "obsidian": "^1.5.7-1", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "tslib": "^2.4.1", - "typescript": "^5.0.4", + "typescript": "^5.4.2", "unified-lint-rule": "^2.1.1" }, "dependencies": { "@babel/plugin-transform-private-methods": "^7.23.3", "@popperjs/core": "^2.11.6", "@types/js-yaml": "^4.0.5", - "async-lock": "^1.4.0", + "async-lock": "^1.4.1", "diff-match-patch": "^1.0.5", "js-yaml": "^4.1.0", - "loglevel": "^1.8.1", + "loglevel": "^1.9.1", "mdast-util-from-markdown": "^2.0.0", "mdast-util-gfm-footnote": "^2.0.0", "mdast-util-gfm-task-list-item": "^2.0.0", From 7e5e22f51a7d79088341f34afc095cd67a7acac0 Mon Sep 17 00:00:00 2001 From: Peter Kaufman Date: Tue, 5 Dec 2023 16:49:44 -0500 Subject: [PATCH 02/10] got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed) --- esbuild.config.mjs | 2 + package-lock.json | 271 ++++++++++++++++++++++++---- package.json | 1 + src/main.ts | 9 + src/rules-runner/myworker.worker.ts | 10 + 5 files changed, 255 insertions(+), 38 deletions(-) create mode 100644 src/rules-runner/myworker.worker.ts diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 87228e54..4e24345b 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -2,6 +2,7 @@ import esbuild from 'esbuild'; import process from 'process'; import builtins from 'builtin-modules'; import importGlobPlugin from 'esbuild-plugin-import-glob'; +import inlineWorkerPlugin from 'esbuild-plugin-inline-worker'; import {replace} from 'esbuild-plugin-replace'; const banner = @@ -40,6 +41,7 @@ const createEsbuildArgs = function(banner, entryPoint, outfile, extraPlugins) { entryPoints: [entryPoint], plugins: [ importGlobPlugin.default(), + inlineWorkerPlugin(), ...extraPlugins, ], bundle: true, diff --git a/package-lock.json b/package-lock.json index 718da933..83efff6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,20 @@ { "name": "obsidian-linter", +<<<<<<< HEAD "version": "1.23.2", +======= + "version": "1.21.0", +>>>>>>> abb5b04 (got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed)) "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "obsidian-linter", +<<<<<<< HEAD "version": "1.23.2", +======= + "version": "1.21.0", +>>>>>>> abb5b04 (got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed)) "license": "MIT", "dependencies": { "@babel/plugin-transform-private-methods": "^7.23.3", @@ -14,6 +22,7 @@ "@types/js-yaml": "^4.0.5", "async-lock": "^1.4.1", "diff-match-patch": "^1.0.5", + "esbuild-plugin-inline-worker": "^0.1.1", "js-yaml": "^4.1.0", "loglevel": "^1.9.1", "mdast-util-from-markdown": "^2.0.0", @@ -1895,7 +1904,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "android" @@ -1911,7 +1919,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "android" @@ -1927,7 +1934,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "android" @@ -1943,7 +1949,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -1959,7 +1964,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -1975,7 +1979,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -1991,7 +1994,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -2007,7 +2009,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2023,7 +2024,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2039,7 +2039,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2055,7 +2054,6 @@ "cpu": [ "loong64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2071,7 +2069,6 @@ "cpu": [ "mips64el" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2087,7 +2084,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2103,7 +2099,6 @@ "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2119,7 +2114,6 @@ "cpu": [ "s390x" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2135,7 +2129,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2151,7 +2144,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "netbsd" @@ -2167,7 +2159,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "openbsd" @@ -2183,7 +2174,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "sunos" @@ -2199,7 +2189,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -2215,7 +2204,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -2231,7 +2219,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -4764,6 +4751,11 @@ "node": ">= 12" } }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -5073,10 +5065,16 @@ } }, "node_modules/esbuild": { +<<<<<<< HEAD "version": "0.20.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, +======= + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", + "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", +>>>>>>> abb5b04 (got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed)) "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -5119,6 +5117,15 @@ "fast-glob": "^3.2.5" } }, + "node_modules/esbuild-plugin-inline-worker": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/esbuild-plugin-inline-worker/-/esbuild-plugin-inline-worker-0.1.1.tgz", + "integrity": "sha512-VmFqsQKxUlbM51C1y5bRiMeyc1x2yTdMXhKB6S//++g9aCBg8TfGsbKxl5ZDkCGquqLY+RmEk93TBNd0i35dPA==", + "dependencies": { + "esbuild": "latest", + "find-cache-dir": "^3.3.1" + } + }, "node_modules/esbuild-plugin-replace": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/esbuild-plugin-replace/-/esbuild-plugin-replace-1.4.0.tgz", @@ -5787,11 +5794,40 @@ "node": ">=8" } }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-cache-dir/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -8017,7 +8053,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -8978,7 +9013,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -8990,7 +9024,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, "dependencies": { "p-try": "^2.0.0" }, @@ -9005,7 +9038,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, "engines": { "node": ">=6" } @@ -9044,7 +9076,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, "engines": { "node": ">=8" } @@ -9112,7 +9143,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, "dependencies": { "find-up": "^4.0.0" }, @@ -11606,6 +11636,7 @@ "optional": true }, "@esbuild/android-arm": { +<<<<<<< HEAD "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", @@ -11757,6 +11788,137 @@ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "dev": true, +======= + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", + "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", + "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", + "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", + "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", + "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", + "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", + "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", + "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", + "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", + "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", + "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", + "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", + "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", + "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", + "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", + "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", + "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", + "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", + "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", + "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", + "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", + "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", +>>>>>>> abb5b04 (got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed)) "optional": true }, "@eslint-community/eslint-utils": { @@ -13618,6 +13780,11 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==" }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -13843,10 +14010,16 @@ } }, "esbuild": { +<<<<<<< HEAD "version": "0.20.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, +======= + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", + "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", +>>>>>>> abb5b04 (got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed)) "requires": { "@esbuild/aix-ppc64": "0.20.2", "@esbuild/android-arm": "0.20.2", @@ -13882,6 +14055,15 @@ "fast-glob": "^3.2.5" } }, + "esbuild-plugin-inline-worker": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/esbuild-plugin-inline-worker/-/esbuild-plugin-inline-worker-0.1.1.tgz", + "integrity": "sha512-VmFqsQKxUlbM51C1y5bRiMeyc1x2yTdMXhKB6S//++g9aCBg8TfGsbKxl5ZDkCGquqLY+RmEk93TBNd0i35dPA==", + "requires": { + "esbuild": "latest", + "find-cache-dir": "^3.3.1" + } + }, "esbuild-plugin-replace": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/esbuild-plugin-replace/-/esbuild-plugin-replace-1.4.0.tgz", @@ -14357,11 +14539,30 @@ "to-regex-range": "^5.0.1" } }, + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "dependencies": { + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "requires": { + "semver": "^6.0.0" + } + } + } + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, "requires": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -15996,7 +16197,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, "requires": { "p-locate": "^4.1.0" } @@ -16635,7 +16835,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, "requires": { "p-limit": "^2.2.0" }, @@ -16644,7 +16843,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, "requires": { "p-try": "^2.0.0" } @@ -16654,8 +16852,7 @@ "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "parent-module": { "version": "1.0.1", @@ -16681,8 +16878,7 @@ "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 + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, "path-is-absolute": { "version": "1.0.1", @@ -16729,7 +16925,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, "requires": { "find-up": "^4.0.0" } diff --git a/package.json b/package.json index 2ab719df..89692833 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "@types/js-yaml": "^4.0.5", "async-lock": "^1.4.1", "diff-match-patch": "^1.0.5", + "esbuild-plugin-inline-worker": "^0.1.1", "js-yaml": "^4.1.0", "loglevel": "^1.9.1", "mdast-util-from-markdown": "^2.0.0", diff --git a/src/main.ts b/src/main.ts index 1ced57f6..009d9335 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,6 +17,7 @@ import {RuleAliasSuggest} from './cm6/rule-alias-suggester'; import {DEFAULT_SETTINGS, LinterSettings} from './settings-data'; import AsyncLock from 'async-lock'; import {warn} from 'loglevel'; +import MyWorker from './rules-runner/myworker.worker'; // https://github.com/liamcain/obsidian-calendar-ui/blob/03ceecbf6d88ef260dadf223ee5e483d98d24ffc/src/localization.ts#L20-L43 const langToMomentLocale = { @@ -76,6 +77,14 @@ export default class LinterPlugin extends Plugin { addIcon(svg.id, svg.source); } + const worker = new MyWorker(); + + worker.postMessage(`Hello`); + worker.onmessage = (event: any) => { + console.log(`Main thread received message: ${event.data}`); + }; + + await this.loadSettings(); this.addCommands(); diff --git a/src/rules-runner/myworker.worker.ts b/src/rules-runner/myworker.worker.ts new file mode 100644 index 00000000..7cf7d81b --- /dev/null +++ b/src/rules-runner/myworker.worker.ts @@ -0,0 +1,10 @@ +// here is a worker to sent data back and forth + +// export default () => { + +// } + +onmessage = (event) => { + console.log(`Worker received message: ${event.data}`); + postMessage('Hello from worker!'); +}; From de320c2b540c28987ac246bca63e8de370d38d1b Mon Sep 17 00:00:00 2001 From: Peter Kaufman Date: Wed, 6 Dec 2023 07:47:11 -0500 Subject: [PATCH 03/10] got esbuild building, but it fails to run --- esbuild.config.mjs | 12 ++++++++---- src/rules-runner/myworker.worker.ts | 4 +++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 4e24345b..413f8db0 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -33,6 +33,10 @@ const mockedPlugins = [replace({ delimiters: ['', ''], })]; +const externalPackages = [ + 'obsidian', + ...builtins]; + const createEsbuildArgs = function(banner, entryPoint, outfile, extraPlugins) { return { banner: { @@ -41,13 +45,13 @@ const createEsbuildArgs = function(banner, entryPoint, outfile, extraPlugins) { entryPoints: [entryPoint], plugins: [ importGlobPlugin.default(), - inlineWorkerPlugin(), + inlineWorkerPlugin({ + external: externalPackages, + }), ...extraPlugins, ], bundle: true, - external: [ - 'obsidian', - ...builtins], + external: externalPackages, format: 'cjs', target: 'es2020', sourcemap: prod ? false : 'inline', diff --git a/src/rules-runner/myworker.worker.ts b/src/rules-runner/myworker.worker.ts index 7cf7d81b..eda51112 100644 --- a/src/rules-runner/myworker.worker.ts +++ b/src/rules-runner/myworker.worker.ts @@ -1,10 +1,12 @@ // here is a worker to sent data back and forth +import {moment} from 'obsidian'; + // export default () => { // } onmessage = (event) => { - console.log(`Worker received message: ${event.data}`); + console.log(`${moment().format('MM/DD/YYYY')}Worker received message: ${event.data}`); postMessage('Hello from worker!'); }; From a26f92d600862d2c942ed68a8a5cb11c6a4b1ed9 Mon Sep 17 00:00:00 2001 From: Peter Kaufman Date: Wed, 6 Dec 2023 22:43:59 -0500 Subject: [PATCH 04/10] got things building, but need to work in other logic around managing the linting of file content --- esbuild.config.mjs | 1 + src/main.ts | 22 ++++++--- src/rules-runner/myworker.worker.ts | 12 ----- src/rules-runner/rules-runner.worker.ts | 8 ++++ src/typings/worker.ts | 59 +++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 18 deletions(-) delete mode 100644 src/rules-runner/myworker.worker.ts create mode 100644 src/rules-runner/rules-runner.worker.ts create mode 100644 src/typings/worker.ts diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 413f8db0..a2933b82 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -47,6 +47,7 @@ const createEsbuildArgs = function(banner, entryPoint, outfile, extraPlugins) { importGlobPlugin.default(), inlineWorkerPlugin({ external: externalPackages, + format: 'cjs', }), ...extraPlugins, ], diff --git a/src/main.ts b/src/main.ts index 009d9335..28efc22f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,7 +17,9 @@ import {RuleAliasSuggest} from './cm6/rule-alias-suggester'; import {DEFAULT_SETTINGS, LinterSettings} from './settings-data'; import AsyncLock from 'async-lock'; import {warn} from 'loglevel'; -import MyWorker from './rules-runner/myworker.worker'; +// @ts-ignore because it does not have the expected default export, but it does not need one +import MyWorker from './rules-runner/rules-runner.worker'; +import {LinterWorker, WorkerArgs, WorkerResponseMessage} from './typings/worker'; // https://github.com/liamcain/obsidian-calendar-ui/blob/03ceecbf6d88ef260dadf223ee5e483d98d24ffc/src/localization.ts#L20-L43 const langToMomentLocale = { @@ -77,16 +79,24 @@ export default class LinterPlugin extends Plugin { addIcon(svg.id, svg.source); } - const worker = new MyWorker(); + await this.loadSettings(); + + const worker = new MyWorker() as LinterWorker; - worker.postMessage(`Hello`); - worker.onmessage = (event: any) => { + worker.postMessage({ + oldText: 'text', + fileInfo: { + name: 'file name', + createdAtFormatted: 'created', + modifiedAtFormatted: 'updated', + }, + settings: this.settings, + }); + worker.onmessage = (event: WorkerResponseMessage) => { console.log(`Main thread received message: ${event.data}`); }; - await this.loadSettings(); - this.addCommands(); this.registerEventsAndSaveCallback(); diff --git a/src/rules-runner/myworker.worker.ts b/src/rules-runner/myworker.worker.ts deleted file mode 100644 index eda51112..00000000 --- a/src/rules-runner/myworker.worker.ts +++ /dev/null @@ -1,12 +0,0 @@ -// here is a worker to sent data back and forth - -import {moment} from 'obsidian'; - -// export default () => { - -// } - -onmessage = (event) => { - console.log(`${moment().format('MM/DD/YYYY')}Worker received message: ${event.data}`); - postMessage('Hello from worker!'); -}; diff --git a/src/rules-runner/rules-runner.worker.ts b/src/rules-runner/rules-runner.worker.ts new file mode 100644 index 00000000..bd02cd1f --- /dev/null +++ b/src/rules-runner/rules-runner.worker.ts @@ -0,0 +1,8 @@ +// here is a worker to sent data back and forth + +import {WorkerMessage as WorkerStartMessage} from '../typings/worker'; + +onmessage = (event: WorkerStartMessage) => { + console.log(`Worker received message: ${event.data.oldText}`); + postMessage('Hello from worker!'); +}; diff --git a/src/typings/worker.ts b/src/typings/worker.ts new file mode 100644 index 00000000..0f8cc222 --- /dev/null +++ b/src/typings/worker.ts @@ -0,0 +1,59 @@ +import {LinterSettings} from 'src/settings-data'; + +export interface TFile { + /** + * @public + */ + stat: { + /** + * Time of creation, represented as a unix timestamp, in milliseconds. + * @public + */ + ctime: number; + /** + * Time of last modification, represented as a unix timestamp, in milliseconds. + * @public + */ + mtime: number; + /** + * Size on disk, as bytes. + * @public + */ + size: number; + }; + /** + * @public + */ + basename: string; + /** + * @public + */ + extension: string; +} + +export type WorkerArgs = { + oldText: string, + fileInfo: { + name: string, + createdAtFormatted: string, + modifiedAtFormatted: string, + }, + settings: LinterSettings, +} + +export type WorkerMessage = { + data: WorkerArgs; +} + +export type WorkerResponse = { + newText: string, +} + +export type WorkerResponseMessage = { + data: WorkerResponse +} + +export interface LinterWorker { + postMessage: (data: WorkerArgs) => void; + onmessage: (data: WorkerResponseMessage) => void; +} From ddad16d2005ad83480221c75a61ba071eeafcc70 Mon Sep 17 00:00:00 2001 From: Peter Kaufman Date: Thu, 7 Dec 2023 08:02:03 -0500 Subject: [PATCH 05/10] got the worker to build and run in Obsidian --- esbuild.config.mjs | 12 + src/main.ts | 37 ++-- src/rule-runner copy/file-lint-manager.ts | 128 +++++++++++ src/rule-runner copy/rule-runner.worker.ts | 13 ++ src/rule-runner copy/rules-runner.ts | 185 ++++++++++++++++ src/rules-runner/file-lint-manager.ts | 129 +++++++++++ src/rules-runner/rules-runner.ts | 243 +++++++++++++++++++++ src/rules-runner/rules-runner.worker.ts | 23 +- src/typings/worker.ts | 16 ++ 9 files changed, 766 insertions(+), 20 deletions(-) create mode 100644 src/rule-runner copy/file-lint-manager.ts create mode 100644 src/rule-runner copy/rule-runner.worker.ts create mode 100644 src/rule-runner copy/rules-runner.ts create mode 100644 src/rules-runner/file-lint-manager.ts create mode 100644 src/rules-runner/rules-runner.ts diff --git a/esbuild.config.mjs b/esbuild.config.mjs index a2933b82..44b1a2f5 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -32,6 +32,17 @@ const mockedPlugins = [replace({ }, delimiters: ['', ''], })]; +const webWorkerIgnores = [replace({ + values: { + // update usage of moment from obsidian to the node implementation of moment we have + 'import {moment} from \'obsidian\';': '', + // remove the use of obsidian in the options to allow for docs.js to run + 'import {Setting} from \'obsidian\';': '', + // remove the use of obsidian in settings helper to allow for docs.js to run + 'import {Component, MarkdownRenderer} from \'obsidian\';': '', + }, + delimiters: ['', ''], +})]; const externalPackages = [ 'obsidian', @@ -48,6 +59,7 @@ const createEsbuildArgs = function(banner, entryPoint, outfile, extraPlugins) { inlineWorkerPlugin({ external: externalPackages, format: 'cjs', + plugins: [...webWorkerIgnores], }), ...extraPlugins, ], diff --git a/src/main.ts b/src/main.ts index 28efc22f..f0dc2e32 100644 --- a/src/main.ts +++ b/src/main.ts @@ -18,8 +18,9 @@ import {DEFAULT_SETTINGS, LinterSettings} from './settings-data'; import AsyncLock from 'async-lock'; import {warn} from 'loglevel'; // @ts-ignore because it does not have the expected default export, but it does not need one -import MyWorker from './rules-runner/rules-runner.worker'; -import {LinterWorker, WorkerArgs, WorkerResponseMessage} from './typings/worker'; +// import MyWorker from './rules-runner/rules-runner.worker'; +// import {LinterWorker, WorkerArgs, WorkerResponseMessage} from './typings/worker'; +import {FileLintManager} from './rules-runner/file-lint-manager'; // https://github.com/liamcain/obsidian-calendar-ui/blob/03ceecbf6d88ef260dadf223ee5e483d98d24ffc/src/localization.ts#L20-L43 const langToMomentLocale = { @@ -67,6 +68,7 @@ export default class LinterPlugin extends Plugin { private fileLintFiles: Set = new Set(); private customCommandsCallback: (file: TFile) => Promise = null; private currentlyOpeningSidebar: boolean = false; + private lintFileManager: FileLintManager = undefined; async onload() { setLanguage(window.localStorage.getItem('language')); @@ -81,20 +83,22 @@ export default class LinterPlugin extends Plugin { await this.loadSettings(); - const worker = new MyWorker() as LinterWorker; + this.lintFileManager = new FileLintManager(1, this.momentLocale, this.settings, this.app.vault); - worker.postMessage({ - oldText: 'text', - fileInfo: { - name: 'file name', - createdAtFormatted: 'created', - modifiedAtFormatted: 'updated', - }, - settings: this.settings, - }); - worker.onmessage = (event: WorkerResponseMessage) => { - console.log(`Main thread received message: ${event.data}`); - }; + // const worker = new MyWorker() as LinterWorker; + + // worker.postMessage({ + // oldText: 'text', + // fileInfo: { + // name: 'file name', + // createdAtFormatted: 'created', + // modifiedAtFormatted: 'updated', + // }, + // settings: this.settings, + // }); + // worker.onmessage = (event: WorkerResponseMessage) => { + // console.log(`Main thread received message: ${event.data}`); + // }; this.addCommands(); @@ -453,7 +457,8 @@ export default class LinterPlugin extends Plugin { const oldText = editor.getValue(); let newText: string; try { - newText = this.rulesRunner.lintText(createRunLinterRulesOptions(oldText, file, this.momentLocale, this.settings)); + this.lintFileManager.lintFile(file); + // newText = this.rulesRunner.lintText(createRunLinterRulesOptions(oldText, file, this.momentLocale, this.settings)); } catch (error) { this.handleLintError(file, error, getTextInLanguage('commands.lint-file.error-message') + ' \'{FILE_PATH}\'', false); return; diff --git a/src/rule-runner copy/file-lint-manager.ts b/src/rule-runner copy/file-lint-manager.ts new file mode 100644 index 00000000..46bb2c00 --- /dev/null +++ b/src/rule-runner copy/file-lint-manager.ts @@ -0,0 +1,128 @@ +/** Makes sure that files are linted and that they are handled appropriately in an asynchronous manner. */ + +// @ts-ignore because this is a web worker and it does not play well with Typescript checking +import Worker from './rule-runner.worker'; +import {TFile, Vault} from 'obsidian'; +import {createRunLinterRulesOptions} from '../rules-runner'; +import {LinterSettings} from 'src/rules'; + +/** Callback when a file is resolved. */ +// type FileCallback = (p: any) => void; + +/** Multi-threaded file linter which debounces rapid file requests automatically. */ +export class FileLintManager { + /* Background workers which do the actual file parsing. */ + workers: Worker[]; + /** Tracks which workers are actively parsing a file, to make sure we properly delegate results. */ + busy: boolean[]; + + /** List of files which have been queued for to be linted */ + lintQueue: TFile[]; + /** Fast-access set which holds the list of files queued to be linted; used for debouncing. */ + reloadSet: Set; + /** Paths -> promises for file reloads which have not yet been queued. */ + // callbacks: Map; + + public constructor(public numWorkers: number, public momentLocale: string, private settings: LinterSettings, private vault: Vault) { + this.workers = []; + this.busy = []; + + this.lintQueue = []; + this.reloadSet = new Set(); + // this.callbacks = new Map(); + + for (let index = 0; index < numWorkers; index++) { + // eslint-disable-next-line new-cap + const worker = Worker(); + worker.onmessage = (data: string) => { + console.log(data); + this.busy[index] = false; + }; + // worker.postMessage('first message'); + this.workers.push(worker); + // this.register(() => worker.terminate()); + this.busy.push(false); + } + } + + public lintFile(file: TFile): void { + // const promise: Promise = new Promise((resolve, reject) => { + // if (this.callbacks.has(file.path)) this.callbacks.get(file.path)?.push([resolve, reject]); + // else this.callbacks.set(file.path, [[resolve, reject]]); + // }); + + // Immediately run this task if there are available workers; otherwise, add it to the queue. + const workerId = this.nextAvailableWorker(); + if (workerId !== undefined) { + this.send(file, workerId); + } else { + this.lintQueue.push(file); + } + + // return promise; + } + + /** + * Queue the given file for reloading. Multiple reload requests for the same file in a short time period will be de-bounced + * and all be resolved by a single actual file reload. + */ + // public reload(file: TFile): Promise { + // const promise: Promise = new Promise((resolve, reject) => { + // if (this.callbacks.has(file.path)) this.callbacks.get(file.path)?.push([resolve, reject]); + // else this.callbacks.set(file.path, [[resolve, reject]]); + // }); + + // // De-bounce repeated requests for the same file. + // if (this.reloadSet.has(file.path)) return promise; + // this.reloadSet.add(file.path); + + // // Immediately run this task if there are available workers; otherwise, add it to the queue. + // const workerId = this.nextAvailableWorker(); + // if (workerId !== undefined) { + // this.send(file, workerId); + // } else { + // this.reloadQueue.push(file); + // } + + // return promise; + // } + + /** Finish the parsing of a file, potentially queueing a new file. */ + // private finish(path: string, data: any, index: number) { + // // Cache the callbacks before we do book-keeping. + // const calls = ([] as [FileCallback, FileCallback][]).concat(this.callbacks.get(path) ?? []); + + // // Book-keeping to clear metadata & allow the file to be re-loaded again. + // this.reloadSet.delete(path); + // this.callbacks.delete(path); + + // // Notify the queue this file is available for new work. + // this.busy[index] = false; + + // // Queue a new job onto this worker. + // const job = this.reloadQueue.shift(); + // if (job !== undefined) this.send(job, index); + + // // Resolve promises to let users know this file has finished. + // if ('$error' in data) { + // for (const [_, reject] of calls) reject(data['$error']); + // } else { + // for (const [callback, _] of calls) callback(data); + // } + // } + + // /** Send a new task to the given worker ID. */ + private send(file: TFile, workerId: number) { + this.busy[workerId] = true; + this.vault.cachedRead(file).then((oldText: string) => { + const lintRunnerSettings = createRunLinterRulesOptions(oldText, file, this.momentLocale, this.settings); + this.workers[workerId].postMessage(lintRunnerSettings); + }); + } + + // /** Find the next available, non-busy worker; return undefined if all workers are busy. */ + private nextAvailableWorker(): number | undefined { + const index = this.busy.indexOf(false); + return index == -1 ? undefined : index; + } +} diff --git a/src/rule-runner copy/rule-runner.worker.ts b/src/rule-runner copy/rule-runner.worker.ts new file mode 100644 index 00000000..eacf55b9 --- /dev/null +++ b/src/rule-runner copy/rule-runner.worker.ts @@ -0,0 +1,13 @@ +import {RulesRunner} from './rules-runner'; + +const ruleRunner = new RulesRunner(); + +onmessage = (e) => { + const originalText = e.data.oldText; + const newText = ruleRunner.lintText(e.data); + postMessage({ + originalText: originalText, + newText: newText, + ruleSettings: e.data, + }); +}; diff --git a/src/rule-runner copy/rules-runner.ts b/src/rule-runner copy/rules-runner.ts new file mode 100644 index 00000000..cfbcb3af --- /dev/null +++ b/src/rule-runner copy/rules-runner.ts @@ -0,0 +1,185 @@ +// import {TFile, moment} from 'obsidian'; +import {logDebug, logWarn} from '../logger'; +import {getDisabledRules, LinterSettings, rules, wrapLintError, LintCommand, RuleType} from '../rules'; +import BlockquotifyOnPaste from '../rules/blockquotify-on-paste'; +import EscapeYamlSpecialCharacters from '../rules/escape-yaml-special-characters'; +import ForceYamlEscape from '../rules/force-yaml-escape'; +import FormatTagsInYaml from '../rules/format-tags-in-yaml'; +import PreventDoubleChecklistIndicatorOnPaste from '../rules/prevent-double-checklist-indicator-on-paste'; +import PreventDoubleListItemIndicatorOnPaste from '../rules/prevent-double-list-item-indicator-on-paste'; +import ProperEllipsisOnPaste from '../rules/proper-ellipsis-on-paste'; +import RemoveHyphensOnPaste from '../rules/remove-hyphens-on-paste'; +import RemoveLeadingOrTrailingWhitespaceOnPaste from '../rules/remove-leading-or-trailing-whitespace-on-paste'; +import RemoveLeftoverFootnotesFromQuoteOnPaste from '../rules/remove-leftover-footnotes-from-quote-on-paste'; +import RemoveMultipleBlankLinesOnPaste from '../rules/remove-multiple-blank-lines-on-paste'; +import {RuleBuilderBase} from '../rules/rule-builder'; +// import YamlKeySort from '../rules/yaml-key-sort'; +// import YamlTimestamp from '../rules/yaml-timestamp'; +import {ObsidianCommandInterface} from '../typings/obsidian-ex'; + +export type RunLinterRulesOptions = { + oldText: string, + fileInfo: FileInfo, + settings: LinterSettings, + momentLocale: string, + // getCurrentTime: () => moment.Moment +} + +type FileInfo = { + name: string, + createdAtFormatted: string, + modifiedAtFormatted: string, +} + +export class RulesRunner { + private disabledRules: string[] = []; + + lintText(runOptions: RunLinterRulesOptions): string { + const originalText = runOptions.oldText; + this.disabledRules = getDisabledRules(originalText); + + let newText = this.runBeforeRegularRules(runOptions); + + for (const rule of rules) { + // if you are run prior to or after the regular rules or are a disabled rule, skip running the rule + if (this.disabledRules.includes(rule.alias())) { + logDebug(rule.alias() + ' is disabled'); + continue; + } else if (rule.hasSpecialExecutionOrder || rule.type === RuleType.PASTE) { + continue; + } + + [newText] = RuleBuilderBase.applyIfEnabledBase(rule, newText, runOptions.settings, { + fileCreatedTime: runOptions.fileInfo.createdAtFormatted, + fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, + fileName: runOptions.fileInfo.name, + locale: runOptions.momentLocale, + minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, + aliasArrayStyle: runOptions.settings.commonStyles.aliasArrayStyle, + tagArrayStyle: runOptions.settings.commonStyles.tagArrayStyle, + defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, + }); + } + + runOptions.oldText = newText; + + return this.runAfterRegularRules(originalText, runOptions); + } + + private runBeforeRegularRules(runOptions: RunLinterRulesOptions): string { + let newText = runOptions.oldText; + // remove hashtags from tags before parsing yaml + [newText] = FormatTagsInYaml.applyIfEnabled(newText, runOptions.settings, this.disabledRules); + + // escape YAML where possible before parsing yaml + [newText] = EscapeYamlSpecialCharacters.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, + }); + + return newText; + } + + private runAfterRegularRules(originalText: string, runOptions: RunLinterRulesOptions): string { + let newText = runOptions.oldText; + + [newText] = ForceYamlEscape.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, + }); + + return newText; + } + + // runRulesThatCannotRunInWebWorker(originalText: string, runOptions: RunLinterRulesOptions, getCurrentTime: () => moment.Moment): string { + // let newText = runOptions.oldText; + // let currentTime = getCurrentTime(); + // // run yaml timestamp at the end to help determine if something has changed + // let isYamlTimestampEnabled; + // [newText, isYamlTimestampEnabled] = YamlTimestamp.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + // fileCreatedTime: runOptions.fileInfo.createdAtFormatted, + // fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, + // currentTime: currentTime, + // alreadyModified: originalText != newText, + // locale: runOptions.momentLocale, + // }); + + // const yamlTimestampOptions = YamlTimestamp.getRuleOptions(runOptions.settings); + + // currentTime = getCurrentTime(); + // [newText] = YamlKeySort.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + // currentTimeFormatted: currentTime.format(yamlTimestampOptions.format), + // yamlTimestampDateModifiedEnabled: isYamlTimestampEnabled && yamlTimestampOptions.dateModified, + // dateModifiedKey: yamlTimestampOptions.dateModifiedKey, + // }); + + // return newText; + // } + + runCustomCommands(lintCommands: LintCommand[], commands: ObsidianCommandInterface) { + // execute custom commands after regular rules, but before the timestamp rules + logDebug(`Running Custom Lint Commands`); + const commandsRun = new Set(); + for (const commandInfo of lintCommands) { + if (!commandInfo.id) { + continue; + } else if (commandsRun.has(commandInfo.id)) { + logWarn(`You cannot run the same command ("${commandInfo.name}") as a custom lint rule twice.`); + continue; + } + + try { + commandsRun.add(commandInfo.id); + commands.executeCommandById(commandInfo.id); + } catch (error) { + wrapLintError(error, `Custom Lint Command ${commandInfo.id}`); + } + } + } + + runPasteLint(currentLine: string, runOptions: RunLinterRulesOptions): string { + let newText = runOptions.oldText; + + [newText] = RemoveHyphensOnPaste.applyIfEnabled(newText, runOptions.settings, []); + + [newText] = RemoveMultipleBlankLinesOnPaste.applyIfEnabled(newText, runOptions.settings, []); + + [newText] = RemoveLeftoverFootnotesFromQuoteOnPaste.applyIfEnabled(newText, runOptions.settings, []); + + [newText] = ProperEllipsisOnPaste.applyIfEnabled(newText, runOptions.settings, []); + + [newText] = RemoveLeadingOrTrailingWhitespaceOnPaste.applyIfEnabled(newText, runOptions.settings, []); + + [newText] = PreventDoubleChecklistIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine}); + + [newText] = PreventDoubleListItemIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine}); + + [newText] = BlockquotifyOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine}); + + return newText; + } +} + +// export function createRunLinterRulesOptions(text: string, file: TFile = null, momentLocale: string, settings: LinterSettings): RunLinterRulesOptions { +// const createdAt = file ? moment(file.stat.ctime): moment(); +// createdAt.locale(momentLocale); +// const modifiedAt = file ? moment(file.stat.mtime): moment(); +// modifiedAt.locale(momentLocale); +// const modifiedAtTime = modifiedAt.format(); +// const createdAtTime = createdAt.format(); + +// // const currentTime = moment(); +// // currentTime.locale(momentLocale); + +// return { +// oldText: text, +// fileInfo: { +// name: file ? file.basename: '', +// createdAtFormatted: createdAtTime, +// modifiedAtFormatted: modifiedAtTime, +// }, +// settings: settings, +// momentLocale: momentLocale, +// // getCurrentTime: () => { +// // return undefined; +// // }, +// }; +// } diff --git a/src/rules-runner/file-lint-manager.ts b/src/rules-runner/file-lint-manager.ts new file mode 100644 index 00000000..81d4062e --- /dev/null +++ b/src/rules-runner/file-lint-manager.ts @@ -0,0 +1,129 @@ +/** Makes sure that files are linted and that they are handled appropriately in an asynchronous manner. */ + +// @ts-ignore because this is a web worker and it does not play well with Typescript checking +import Worker from './rules-runner.worker'; +import {TFile, Vault} from 'obsidian'; +import {createRunLinterRulesOptions} from './rules-runner'; +import {LinterSettings} from '../settings-data'; +import {LinterWorker} from 'src/typings/worker'; + +/** Callback when a file is resolved. */ +// type FileCallback = (p: any) => void; + +/** Multi-threaded file linter which debounces rapid file requests automatically. */ +export class FileLintManager { + /* Background workers which do the actual file parsing. */ + workers: LinterWorker[]; + /** Tracks which workers are actively parsing a file, to make sure we properly delegate results. */ + busy: boolean[]; + + /** List of files which have been queued for to be linted */ + lintQueue: TFile[]; + /** Fast-access set which holds the list of files queued to be linted; used for debouncing. */ + reloadSet: Set; + /** Paths -> promises for file reloads which have not yet been queued. */ + // callbacks: Map; + + public constructor(public numWorkers: number, public momentLocale: string, private settings: LinterSettings, private vault: Vault) { + this.workers = []; + this.busy = []; + + this.lintQueue = []; + this.reloadSet = new Set(); + // this.callbacks = new Map(); + + for (let index = 0; index < numWorkers; index++) { + // eslint-disable-next-line new-cap + const worker = Worker(); + worker.onmessage = (data: string) => { + console.log(data); + this.busy[index] = false; + }; + // worker.postMessage('first message'); + this.workers.push(worker); + // this.register(() => worker.terminate()); + this.busy.push(false); + } + } + + public lintFile(file: TFile): void { + // const promise: Promise = new Promise((resolve, reject) => { + // if (this.callbacks.has(file.path)) this.callbacks.get(file.path)?.push([resolve, reject]); + // else this.callbacks.set(file.path, [[resolve, reject]]); + // }); + + // Immediately run this task if there are available workers; otherwise, add it to the queue. + const workerId = this.nextAvailableWorker(); + if (workerId !== undefined) { + this.send(file, workerId); + } else { + this.lintQueue.push(file); + } + + // return promise; + } + + /** + * Queue the given file for reloading. Multiple reload requests for the same file in a short time period will be de-bounced + * and all be resolved by a single actual file reload. + */ + // public reload(file: TFile): Promise { + // const promise: Promise = new Promise((resolve, reject) => { + // if (this.callbacks.has(file.path)) this.callbacks.get(file.path)?.push([resolve, reject]); + // else this.callbacks.set(file.path, [[resolve, reject]]); + // }); + + // // De-bounce repeated requests for the same file. + // if (this.reloadSet.has(file.path)) return promise; + // this.reloadSet.add(file.path); + + // // Immediately run this task if there are available workers; otherwise, add it to the queue. + // const workerId = this.nextAvailableWorker(); + // if (workerId !== undefined) { + // this.send(file, workerId); + // } else { + // this.reloadQueue.push(file); + // } + + // return promise; + // } + + /** Finish the parsing of a file, potentially queueing a new file. */ + // private finish(path: string, data: any, index: number) { + // // Cache the callbacks before we do book-keeping. + // const calls = ([] as [FileCallback, FileCallback][]).concat(this.callbacks.get(path) ?? []); + + // // Book-keeping to clear metadata & allow the file to be re-loaded again. + // this.reloadSet.delete(path); + // this.callbacks.delete(path); + + // // Notify the queue this file is available for new work. + // this.busy[index] = false; + + // // Queue a new job onto this worker. + // const job = this.reloadQueue.shift(); + // if (job !== undefined) this.send(job, index); + + // // Resolve promises to let users know this file has finished. + // if ('$error' in data) { + // for (const [_, reject] of calls) reject(data['$error']); + // } else { + // for (const [callback, _] of calls) callback(data); + // } + // } + + // /** Send a new task to the given worker ID. */ + private send(file: TFile, workerId: number) { + this.busy[workerId] = true; + this.vault.cachedRead(file).then((oldText: string) => { + const lintRunnerSettings = createRunLinterRulesOptions(oldText, file, this.momentLocale, this.settings); + this.workers[workerId].postMessage(lintRunnerSettings); + }); + } + + // /** Find the next available, non-busy worker; return undefined if all workers are busy. */ + private nextAvailableWorker(): number | undefined { + const index = this.busy.indexOf(false); + return index == -1 ? undefined : index; + } +} diff --git a/src/rules-runner/rules-runner.ts b/src/rules-runner/rules-runner.ts new file mode 100644 index 00000000..4edfd0fc --- /dev/null +++ b/src/rules-runner/rules-runner.ts @@ -0,0 +1,243 @@ +// import {TFile, moment} from 'obsidian'; +import {logDebug, logWarn, timingBegin, timingEnd} from '../utils/logger'; +import {getDisabledRules, rules, wrapLintError, RuleType} from '../rules'; +import BlockquotifyOnPaste from '../rules/blockquotify-on-paste'; +import EscapeYamlSpecialCharacters from '../rules/escape-yaml-special-characters'; +// import ForceYamlEscape from '../rules/force-yaml-escape'; +import FormatTagsInYaml from '../rules/format-tags-in-yaml'; +import PreventDoubleChecklistIndicatorOnPaste from '../rules/prevent-double-checklist-indicator-on-paste'; +import PreventDoubleListItemIndicatorOnPaste from '../rules/prevent-double-list-item-indicator-on-paste'; +import ProperEllipsisOnPaste from '../rules/proper-ellipsis-on-paste'; +import RemoveHyphensOnPaste from '../rules/remove-hyphens-on-paste'; +import RemoveLeadingOrTrailingWhitespaceOnPaste from '../rules/remove-leading-or-trailing-whitespace-on-paste'; +import RemoveLeftoverFootnotesFromQuoteOnPaste from '../rules/remove-leftover-footnotes-from-quote-on-paste'; +import RemoveMultipleBlankLinesOnPaste from '../rules/remove-multiple-blank-lines-on-paste'; +import {RuleBuilderBase} from '../rules/rule-builder'; +// import YamlKeySort from '../rules/yaml-key-sort'; +// import YamlTimestamp from '../rules/yaml-timestamp'; +import {ObsidianCommandInterface} from '../typings/obsidian-ex'; +import {CustomReplace} from '../ui/linter-components/custom-replace-option'; +import {LintCommand} from '../ui/linter-components/custom-command-option'; +import {convertStringVersionOfEscapeCharactersToEscapeCharacters} from '../utils/strings'; +import {getTextInLanguage} from '../lang/helpers'; +// import CapitalizeHeadings from '../rules/capitalize-headings'; +// import BlockquoteStyle from '../rules/blockquote-style'; +import {IgnoreTypes, ignoreListOfTypes} from '../utils/ignore-types'; +import MoveMathBlockIndicatorsToOwnLine from '../rules/move-math-block-indicators-to-own-line'; +import {LinterSettings} from '../settings-data'; +import {TFile} from '../typings/worker'; +// import TrailingSpaces from '../rules/trailing-spaces'; + +export type RunLinterRulesOptions = { + oldText: string, + fileInfo: FileInfo, + settings: LinterSettings, +} + +type FileInfo = { + name: string, + createdAtFormatted: string, + modifiedAtFormatted: string, +} + +export class RulesRunner { + private disabledRules: string[] = []; + skipFile: boolean; + + lintText(runOptions: RunLinterRulesOptions): string { + this.skipFile = false; + const originalText = runOptions.oldText; + [this.disabledRules, this.skipFile] = getDisabledRules(originalText); + if (this.skipFile) { + return originalText; + } + + timingBegin(getTextInLanguage('logs.rule-running')); + + const preRuleText = getTextInLanguage('logs.pre-rules'); + timingBegin(preRuleText); + let newText = this.runBeforeRegularRules(runOptions); + timingEnd(preRuleText); + + const disabledRuleText = getTextInLanguage('logs.disabled-text'); + for (const rule of rules) { + // if you are run prior to or after the regular rules or are a disabled rule, skip running the rule + if (this.disabledRules.includes(rule.alias)) { + logDebug(rule.alias + ' ' + disabledRuleText); + continue; + } else if (rule.hasSpecialExecutionOrder || rule.type === RuleType.PASTE) { + continue; + } + + [newText] = RuleBuilderBase.applyIfEnabledBase(rule, newText, runOptions.settings, { + fileCreatedTime: runOptions.fileInfo.createdAtFormatted, + fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, + fileName: runOptions.fileInfo.name, + // locale: runOptions.momentLocale, + minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, + aliasArrayStyle: runOptions.settings.commonStyles.aliasArrayStyle, + tagArrayStyle: runOptions.settings.commonStyles.tagArrayStyle, + defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, + removeUnnecessaryEscapeCharsForMultiLineArrays: runOptions.settings.commonStyles.removeUnnecessaryEscapeCharsForMultiLineArrays, + }); + } + + const customRegexLogText = getTextInLanguage('logs.custom-regex'); + timingBegin(customRegexLogText); + newText = this.runCustomRegexReplacement(runOptions.settings.customRegexes, newText); + timingEnd(customRegexLogText); + + runOptions.oldText = newText; + + return newText; + // return this.runAfterRegularRules(originalText, runOptions); + } + + private runBeforeRegularRules(runOptions: RunLinterRulesOptions): string { + let newText = runOptions.oldText; + // remove hashtags from tags before parsing yaml + [newText] = FormatTagsInYaml.applyIfEnabled(newText, runOptions.settings, this.disabledRules); + + // escape YAML where possible before parsing yaml + [newText] = EscapeYamlSpecialCharacters.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, + }); + + [newText] = MoveMathBlockIndicatorsToOwnLine.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, + }); + + return newText; + } + + // private runAfterRegularRules(originalText: string, runOptions: RunLinterRulesOptions): string { + // let newText = runOptions.oldText; + // const postRuleLogText = getTextInLanguage('logs.post-rules'); + // timingBegin(postRuleLogText); + // [newText] = CapitalizeHeadings.applyIfEnabled(newText, runOptions.settings, this.disabledRules); + + // [newText] = BlockquoteStyle.applyIfEnabled(newText, runOptions.settings, this.disabledRules); + + // [newText] = ForceYamlEscape.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + // defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, + // }); + + // [newText] = TrailingSpaces.applyIfEnabled(newText, runOptions.settings, this.disabledRules); + + // let currentTime = runOptions.getCurrentTime(); + // // run YAML timestamp at the end to help determine if something has changed + // let isYamlTimestampEnabled; + // [newText, isYamlTimestampEnabled] = YamlTimestamp.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + // fileCreatedTime: runOptions.fileInfo.createdAtFormatted, + // fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, + // currentTime: currentTime, + // alreadyModified: originalText != newText, + // locale: runOptions.momentLocale, + // }); + + // const yamlTimestampOptions = YamlTimestamp.getRuleOptions(runOptions.settings); + + // currentTime = runOptions.getCurrentTime(); + // [newText] = YamlKeySort.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + // currentTimeFormatted: currentTime.format(yamlTimestampOptions.format.trimEnd()), + // yamlTimestampDateModifiedEnabled: isYamlTimestampEnabled && yamlTimestampOptions.dateModified, + // dateModifiedKey: yamlTimestampOptions.dateModifiedKey, + // }); + // timingEnd(postRuleLogText); + // timingEnd(getTextInLanguage('logs.rule-running')); + // return newText; + // } + + runCustomCommands(lintCommands: LintCommand[], commands: ObsidianCommandInterface) { + if (this.skipFile) { + return; + } + + logDebug(getTextInLanguage('logs.running-custom-lint-command')); + const commandsRun = new Set(); + for (const commandInfo of lintCommands) { + if (!commandInfo.id) { + continue; + } else if (commandsRun.has(commandInfo.id)) { + logWarn(getTextInLanguage('logs.custom-lint-duplicate-warning').replace('{COMMAND_NAME}', commandInfo.name)); + continue; + } + + try { + commandsRun.add(commandInfo.id); + commands.executeCommandById(commandInfo.id); + } catch (error) { + wrapLintError(error, `${getTextInLanguage('logs.custom-lint-error-message')} ${commandInfo.id}`); + } + } + } + + runCustomRegexReplacement(customRegexes: CustomReplace[], oldText: string): string { + return ignoreListOfTypes([IgnoreTypes.customIgnore], oldText, (text: string) => { + logDebug(getTextInLanguage('logs.running-custom-regex')); + + let newText = text; + for (const eachRegex of customRegexes) { + const findIsEmpty = eachRegex.find === undefined || eachRegex.find == '' || eachRegex.find === null; + const replaceIsEmpty = eachRegex.replace === undefined || eachRegex.replace === null; + if (findIsEmpty || replaceIsEmpty) { + continue; + } + + const regex = new RegExp(`${eachRegex.find}`, eachRegex.flags); + // make sure that characters are not string escaped unescape in the replace value to make sure things like \n and \t are correctly inserted + newText = newText.replace(regex, convertStringVersionOfEscapeCharactersToEscapeCharacters(eachRegex.replace)); + } + + return newText; + }); + } + + runPasteLint(currentLine: string, selectedText: string, runOptions: RunLinterRulesOptions): string { + let newText = runOptions.oldText; + + [newText] = RemoveHyphensOnPaste.applyIfEnabled(newText, runOptions.settings, []); + + [newText] = RemoveMultipleBlankLinesOnPaste.applyIfEnabled(newText, runOptions.settings, []); + + [newText] = RemoveLeftoverFootnotesFromQuoteOnPaste.applyIfEnabled(newText, runOptions.settings, []); + + [newText] = ProperEllipsisOnPaste.applyIfEnabled(newText, runOptions.settings, []); + + [newText] = RemoveLeadingOrTrailingWhitespaceOnPaste.applyIfEnabled(newText, runOptions.settings, []); + + [newText] = PreventDoubleChecklistIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine, selectedText: selectedText}); + + [newText] = PreventDoubleListItemIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine, selectedText: selectedText}); + + [newText] = BlockquotifyOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine}); + + return newText; + } +} + +export function createRunLinterRulesOptions(text: string, file: TFile = null, momentLocale: string, settings: LinterSettings): RunLinterRulesOptions { + // const createdAt = file ? moment(file.stat.ctime): moment(); + // createdAt.locale(momentLocale); + // const modifiedAt = file ? moment(file.stat.mtime): moment(); + // modifiedAt.locale(momentLocale); + // const modifiedAtTime = modifiedAt.format(); + // const createdAtTime = createdAt.format(); + + // const currentTime = moment(); + // currentTime.locale(momentLocale); + + return { + oldText: text, + fileInfo: { + name: file ? file.basename: '', + createdAtFormatted: 'created', + modifiedAtFormatted: 'modified', + }, + settings: settings, + // momentLocale: momentLocale, + // getCurrentTime: () => { + // return undefined; + // }, + }; +} diff --git a/src/rules-runner/rules-runner.worker.ts b/src/rules-runner/rules-runner.worker.ts index bd02cd1f..ee1b8cfe 100644 --- a/src/rules-runner/rules-runner.worker.ts +++ b/src/rules-runner/rules-runner.worker.ts @@ -1,8 +1,23 @@ // here is a worker to sent data back and forth -import {WorkerMessage as WorkerStartMessage} from '../typings/worker'; +import {RulesRunner, WorkerMessage} from '../typings/worker'; -onmessage = (event: WorkerStartMessage) => { - console.log(`Worker received message: ${event.data.oldText}`); - postMessage('Hello from worker!'); + +let rulesRunner: RulesRunner = null; +import('./rules-runner').then((mod: any) => { + rulesRunner = new mod.RulesRunner(); +}); + +// import {RulesRunner} from './rules-runner'; + + +self.document = { + createElement: () => {}, +}; + +onmessage = (event: WorkerMessage) => { + console.log(event.data.oldText); + const newText = rulesRunner.lintText(event.data); + console.log(newText); + postMessage(newText); }; diff --git a/src/typings/worker.ts b/src/typings/worker.ts index 0f8cc222..2cdfbf8b 100644 --- a/src/typings/worker.ts +++ b/src/typings/worker.ts @@ -57,3 +57,19 @@ export interface LinterWorker { postMessage: (data: WorkerArgs) => void; onmessage: (data: WorkerResponseMessage) => void; } + +export type RunLinterRulesOptions = { + oldText: string, + fileInfo: FileInfo, + settings: LinterSettings, +} + +type FileInfo = { + name: string, + createdAtFormatted: string, + modifiedAtFormatted: string, +} + +export interface RulesRunner { + lintText(runOptions: RunLinterRulesOptions): string +} From 4d2044f5593481023f9cfaee6d3e7ce9a566d31b Mon Sep 17 00:00:00 2001 From: Peter Kaufman Date: Fri, 15 Mar 2024 18:05:55 -0400 Subject: [PATCH 06/10] made some changes and got a preliminary version of linting a single file working. Note that the logging is not working properly. --- package-lock.json | 178 ------------------------ src/main.ts | 120 ++++++++-------- src/rules-runner/file-lint-manager.ts | 108 ++++++++++---- src/rules-runner/rules-runner.ts | 139 +++++++++--------- src/rules-runner/rules-runner.worker.ts | 6 +- src/typings/worker.ts | 26 +++- 6 files changed, 231 insertions(+), 346 deletions(-) diff --git a/package-lock.json b/package-lock.json index 83efff6f..cfaba90d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,12 @@ { "name": "obsidian-linter", -<<<<<<< HEAD "version": "1.23.2", -======= - "version": "1.21.0", ->>>>>>> abb5b04 (got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed)) "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "obsidian-linter", -<<<<<<< HEAD "version": "1.23.2", -======= - "version": "1.21.0", ->>>>>>> abb5b04 (got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed)) "license": "MIT", "dependencies": { "@babel/plugin-transform-private-methods": "^7.23.3", @@ -1888,7 +1880,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "aix" @@ -5065,16 +5056,9 @@ } }, "node_modules/esbuild": { -<<<<<<< HEAD "version": "0.20.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", - "dev": true, -======= - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", - "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", ->>>>>>> abb5b04 (got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed)) "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -11632,293 +11616,138 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", - "dev": true, "optional": true }, "@esbuild/android-arm": { -<<<<<<< HEAD "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", - "dev": true, "optional": true }, "@esbuild/android-arm64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", - "dev": true, "optional": true }, "@esbuild/android-x64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", - "dev": true, "optional": true }, "@esbuild/darwin-arm64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", - "dev": true, "optional": true }, "@esbuild/darwin-x64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", - "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", - "dev": true, "optional": true }, "@esbuild/freebsd-x64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", - "dev": true, "optional": true }, "@esbuild/linux-arm": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", - "dev": true, "optional": true }, "@esbuild/linux-arm64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", - "dev": true, "optional": true }, "@esbuild/linux-ia32": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", - "dev": true, "optional": true }, "@esbuild/linux-loong64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", - "dev": true, "optional": true }, "@esbuild/linux-mips64el": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", - "dev": true, "optional": true }, "@esbuild/linux-ppc64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", - "dev": true, "optional": true }, "@esbuild/linux-riscv64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", - "dev": true, "optional": true }, "@esbuild/linux-s390x": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", - "dev": true, "optional": true }, "@esbuild/linux-x64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", - "dev": true, "optional": true }, "@esbuild/netbsd-x64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", - "dev": true, "optional": true }, "@esbuild/openbsd-x64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", - "dev": true, "optional": true }, "@esbuild/sunos-x64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", - "dev": true, "optional": true }, "@esbuild/win32-arm64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", - "dev": true, "optional": true }, "@esbuild/win32-ia32": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", - "dev": true, "optional": true }, "@esbuild/win32-x64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", - "dev": true, -======= - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", - "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", - "optional": true - }, - "@esbuild/android-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", - "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", - "optional": true - }, - "@esbuild/android-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", - "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", - "optional": true - }, - "@esbuild/darwin-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", - "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", - "optional": true - }, - "@esbuild/darwin-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", - "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", - "optional": true - }, - "@esbuild/freebsd-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", - "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", - "optional": true - }, - "@esbuild/freebsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", - "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", - "optional": true - }, - "@esbuild/linux-arm": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", - "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", - "optional": true - }, - "@esbuild/linux-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", - "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", - "optional": true - }, - "@esbuild/linux-ia32": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", - "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", - "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", - "optional": true - }, - "@esbuild/linux-mips64el": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", - "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", - "optional": true - }, - "@esbuild/linux-ppc64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", - "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", - "optional": true - }, - "@esbuild/linux-riscv64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", - "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", - "optional": true - }, - "@esbuild/linux-s390x": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", - "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", - "optional": true - }, - "@esbuild/linux-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", - "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", - "optional": true - }, - "@esbuild/netbsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", - "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", - "optional": true - }, - "@esbuild/openbsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", - "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", - "optional": true - }, - "@esbuild/sunos-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", - "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", - "optional": true - }, - "@esbuild/win32-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", - "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", - "optional": true - }, - "@esbuild/win32-ia32": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", - "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", - "optional": true - }, - "@esbuild/win32-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", - "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", ->>>>>>> abb5b04 (got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed)) "optional": true }, "@eslint-community/eslint-utils": { @@ -14010,16 +13839,9 @@ } }, "esbuild": { -<<<<<<< HEAD "version": "0.20.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", - "dev": true, -======= - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", - "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", ->>>>>>> abb5b04 (got a really basic worker functional so I can work on this down the road (if it stops working as I add things it needs to be addressed)) "requires": { "@esbuild/aix-ppc64": "0.20.2", "@esbuild/android-arm": "0.20.2", diff --git a/src/main.ts b/src/main.ts index f0dc2e32..ae17dd76 100644 --- a/src/main.ts +++ b/src/main.ts @@ -454,74 +454,74 @@ export default class LinterPlugin extends Plugin { logInfo(getTextInLanguage('logs.linter-run')); const file = this.app.workspace.getActiveFile(); - const oldText = editor.getValue(); - let newText: string; + // const oldText = editor.getValue(); + // let newText: string; try { - this.lintFileManager.lintFile(file); - // newText = this.rulesRunner.lintText(createRunLinterRulesOptions(oldText, file, this.momentLocale, this.settings)); - } catch (error) { - this.handleLintError(file, error, getTextInLanguage('commands.lint-file.error-message') + ' \'{FILE_PATH}\'', false); - return; - } + this.lintFileManager.lintFile(file, (oldText: string, newText: string) => { + const mode = this.getCurrentMode(); + + // Replace changed lines + const dmp = new DiffMatchPatch.diff_match_patch(); // eslint-disable-line new-cap + const changes = dmp.diff_main(oldText, newText); + let curText = ''; + let startingIndex = 0; + // in Live Preview mode, there is some wonkiness around how the frontmatter values are replaced. + // So if the frontmatter needs updating at all, we are treating it as the whole frontmatter needing + // to be replaced. Hopefully this will fix issues with the frontmatter getting mangled. + if (mode === 'preview') { + const oldTextFrontmatterInfo = getFrontMatterInfo(oldText); + const newTextFrontmatterInfo = getFrontMatterInfo(newText); + + if (oldTextFrontmatterInfo.exists != newTextFrontmatterInfo.exists || + oldTextFrontmatterInfo.from != newTextFrontmatterInfo.from || + oldTextFrontmatterInfo.to != newTextFrontmatterInfo.to || + oldTextFrontmatterInfo.frontmatter != newTextFrontmatterInfo.frontmatter) { + editor.replaceRange(newTextFrontmatterInfo.frontmatter, editor.offsetToPos(oldTextFrontmatterInfo.from), editor.offsetToPos(oldTextFrontmatterInfo.to)); + startingIndex = newTextFrontmatterInfo.to; + } + } - const mode = this.getCurrentMode(); - - // Replace changed lines - const dmp = new DiffMatchPatch.diff_match_patch(); // eslint-disable-line new-cap - const changes = dmp.diff_main(oldText, newText); - let curText = ''; - let startingIndex = 0; - // in Live Preview mode, there is some wonkiness around how the frontmatter values are replaced. - // So if the frontmatter needs updating at all, we are treating it as the whole frontmatter needing - // to be replaced. Hopefully this will fix issues with the frontmatter getting mangled. - if (mode === 'preview') { - const oldTextFrontmatterInfo = getFrontMatterInfo(oldText); - const newTextFrontmatterInfo = getFrontMatterInfo(newText); - - if (oldTextFrontmatterInfo.exists != newTextFrontmatterInfo.exists || - oldTextFrontmatterInfo.from != newTextFrontmatterInfo.from || - oldTextFrontmatterInfo.to != newTextFrontmatterInfo.to || - oldTextFrontmatterInfo.frontmatter != newTextFrontmatterInfo.frontmatter) { - editor.replaceRange(newTextFrontmatterInfo.frontmatter, editor.offsetToPos(oldTextFrontmatterInfo.from), editor.offsetToPos(oldTextFrontmatterInfo.to)); - startingIndex = newTextFrontmatterInfo.to; - } - } + let isBeforeStartIndex = false; + changes.forEach((change) => { + isBeforeStartIndex = curText.length < startingIndex; + + const [type, value] = change; + + // handle updates + if (!isBeforeStartIndex) { + if (type == DiffMatchPatch.DIFF_INSERT) { + editor.replaceRange(value, this.endOfDocument(curText)); + } else if (type == DiffMatchPatch.DIFF_DELETE) { + const start = this.endOfDocument(curText); + let tempText = curText; + tempText += value; + const end = this.endOfDocument(tempText); + editor.replaceRange('', start, end); + } + } - let isBeforeStartIndex = false; - changes.forEach((change) => { - isBeforeStartIndex = curText.length < startingIndex; + // update current text + if (type != DiffMatchPatch.DIFF_DELETE) { + curText += value; + } + }); - const [type, value] = change; + const charsAdded = changes.map((change) => change[0] == DiffMatchPatch.DIFF_INSERT ? change[1].length : 0).reduce((a, b) => a + b, 0); + const charsRemoved = changes.map((change) => change[0] == DiffMatchPatch.DIFF_DELETE ? change[1].length : 0).reduce((a, b) => a + b, 0); + this.displayChangedMessage(charsAdded, charsRemoved); - // handle updates - if (!isBeforeStartIndex) { - if (type == DiffMatchPatch.DIFF_INSERT) { - editor.replaceRange(value, this.endOfDocument(curText)); - } else if (type == DiffMatchPatch.DIFF_DELETE) { - const start = this.endOfDocument(curText); - let tempText = curText; - tempText += value; - const end = this.endOfDocument(tempText); - editor.replaceRange('', start, end); + // run custom commands now since no change was made + if (!charsAdded && !charsRemoved) { + this.runCustomCommands(file); } - } - - // update current text - if (type != DiffMatchPatch.DIFF_DELETE) { - curText += value; - } - }); - - const charsAdded = changes.map((change) => change[0] == DiffMatchPatch.DIFF_INSERT ? change[1].length : 0).reduce((a, b) => a + b, 0); - const charsRemoved = changes.map((change) => change[0] == DiffMatchPatch.DIFF_DELETE ? change[1].length : 0).reduce((a, b) => a + b, 0); - this.displayChangedMessage(charsAdded, charsRemoved); - // run custom commands now since no change was made - if (!charsAdded && !charsRemoved) { - this.runCustomCommands(file); + setCollectLogs(false); + }); + // newText = this.rulesRunner.lintText(createRunLinterRulesOptions(oldText, file, this.momentLocale, this.settings)); + } catch (error) { + this.handleLintError(file, error, getTextInLanguage('commands.lint-file.error-message') + ' \'{FILE_PATH}\'', false); + return; } - - setCollectLogs(false); } // based on https://github.com/liamcain/obsidian-calendar-ui/blob/03ceecbf6d88ef260dadf223ee5e483d98d24ffc/src/localization.ts#L85-L109 diff --git a/src/rules-runner/file-lint-manager.ts b/src/rules-runner/file-lint-manager.ts index 81d4062e..626f5b7c 100644 --- a/src/rules-runner/file-lint-manager.ts +++ b/src/rules-runner/file-lint-manager.ts @@ -1,14 +1,17 @@ +// based on https://github.com/blacksmithgu/obsidian-dataview/blob/75b564bcfd23876f12fa3faf7f86184cdfcd91f1/src/data-import/web-worker/import-manager.ts /** Makes sure that files are linted and that they are handled appropriately in an asynchronous manner. */ // @ts-ignore because this is a web worker and it does not play well with Typescript checking import Worker from './rules-runner.worker'; -import {TFile, Vault} from 'obsidian'; +import {TFile, Vault, moment} from 'obsidian'; import {createRunLinterRulesOptions} from './rules-runner'; import {LinterSettings} from '../settings-data'; -import {LinterWorker} from 'src/typings/worker'; +import {LinterWorker, RunLinterRulesOptions} from '../typings/worker'; +import YamlTimestamp from '../rules/yaml-timestamp'; +import YamlKeySort from '../rules/yaml-key-sort'; /** Callback when a file is resolved. */ -// type FileCallback = (p: any) => void; +type FileCallback = (oldText: string, newText: string) => void; /** Multi-threaded file linter which debounces rapid file requests automatically. */ export class FileLintManager { @@ -21,6 +24,11 @@ export class FileLintManager { lintQueue: TFile[]; /** Fast-access set which holds the list of files queued to be linted; used for debouncing. */ reloadSet: Set; + /** Paths -> callback function to run once file linting has finished running rules. + * Note: this does not mean that the logic for running custom commands has run. + */ + callbacks: Map; + /** Paths -> promises for file reloads which have not yet been queued. */ // callbacks: Map; @@ -30,14 +38,16 @@ export class FileLintManager { this.lintQueue = []; this.reloadSet = new Set(); - // this.callbacks = new Map(); + this.callbacks = new Map(); for (let index = 0; index < numWorkers; index++) { // eslint-disable-next-line new-cap const worker = Worker(); - worker.onmessage = (data: string) => { - console.log(data); - this.busy[index] = false; + // worker.onmessage = evt => this.finish(evt.data.path, Transferable.value(evt.data.result), index); + worker.onmessage = (resp: any) => { + // console.log(data); + // this.busy[index] = false; + this.finish(resp.data as RunLinterRulesOptions, index); }; // worker.postMessage('first message'); this.workers.push(worker); @@ -46,10 +56,16 @@ export class FileLintManager { } } - public lintFile(file: TFile): void { + public lintFile(file: TFile, callback: FileCallback): void { + if (this.callbacks.has(file.path)) { + this.callbacks.get(file.path)?.push(callback); + } else { + this.callbacks.set(file.path, [callback]); + } + // const promise: Promise = new Promise((resolve, reject) => { - // if (this.callbacks.has(file.path)) this.callbacks.get(file.path)?.push([resolve, reject]); - // else this.callbacks.set(file.path, [[resolve, reject]]); + // if (this.callbacks.has(file.path)) this.callbacks.get(file.path)?.push([resolve, reject]); + // else this.callbacks.set(file.path, [[resolve, reject]]); // }); // Immediately run this task if there are available workers; otherwise, add it to the queue. @@ -89,28 +105,64 @@ export class FileLintManager { // } /** Finish the parsing of a file, potentially queueing a new file. */ - // private finish(path: string, data: any, index: number) { - // // Cache the callbacks before we do book-keeping. - // const calls = ([] as [FileCallback, FileCallback][]).concat(this.callbacks.get(path) ?? []); + private finish(data: RunLinterRulesOptions, index: number) { + // Cache the callbacks before we do book-keeping. + // const calls = ([] as [FileCallback, FileCallback][]).concat(this.callbacks.get(path) ?? []); - // // Book-keeping to clear metadata & allow the file to be re-loaded again. - // this.reloadSet.delete(path); - // this.callbacks.delete(path); + // Book-keeping to clear metadata & allow the file to be re-loaded again. + // this.reloadSet.delete(path); + // this.callbacks.delete(path); - // // Notify the queue this file is available for new work. - // this.busy[index] = false; + // Notify the queue this file is available for new work. + this.busy[index] = false; - // // Queue a new job onto this worker. - // const job = this.reloadQueue.shift(); - // if (job !== undefined) this.send(job, index); + // Queue a new job onto this worker. + const job = this.lintQueue.shift(); + if (job !== undefined) { + this.send(job, index); + } - // // Resolve promises to let users know this file has finished. - // if ('$error' in data) { - // for (const [_, reject] of calls) reject(data['$error']); - // } else { - // for (const [callback, _] of calls) callback(data); - // } - // } + // run lint actions related to moment and other areas that cannot be run in the worker + let currentTime = moment(); + currentTime.locale(data.momentLocale); + // let currentTime = runOptions.getCurrentTime(); + // run YAML timestamp at the end to help determine if something has changed + let isYamlTimestampEnabled: boolean; + let newText: string; + [newText, isYamlTimestampEnabled] = YamlTimestamp.applyIfEnabled(data.newText, data.settings, data.disabledRules, { + fileCreatedTime: data.fileInfo.createdAtFormatted, + fileModifiedTime: data.fileInfo.modifiedAtFormatted, + currentTime: currentTime, + alreadyModified: data.oldText != newText, + locale: data.momentLocale, + }); + + const yamlTimestampOptions = YamlTimestamp.getRuleOptions(data.settings); + + currentTime = moment(); + currentTime.locale(data.momentLocale); + [newText] = YamlKeySort.applyIfEnabled(newText, data.settings, data.disabledRules, { + currentTimeFormatted: currentTime.format(yamlTimestampOptions.format.trimEnd()), + yamlTimestampDateModifiedEnabled: isYamlTimestampEnabled && yamlTimestampOptions.dateModified, + dateModifiedKey: yamlTimestampOptions.dateModifiedKey, + }); + + // TODO: add the callback resolution here... + if (this.callbacks.has(data.fileInfo.path)) { + const callbacks = this.callbacks.get(data.fileInfo.path); + this.callbacks.delete(data.fileInfo.path); + for (const callback of callbacks) { + callback(data.oldText, newText); + } + } + + // Resolve promises to let users know this file has finished. + // if ('$error' in data) { + // for (const [_, reject] of calls) reject(data['$error']); + // } else { + // for (const [callback, _] of calls) callback(data); + // } + } // /** Send a new task to the given worker ID. */ private send(file: TFile, workerId: number) { diff --git a/src/rules-runner/rules-runner.ts b/src/rules-runner/rules-runner.ts index 4edfd0fc..21e89278 100644 --- a/src/rules-runner/rules-runner.ts +++ b/src/rules-runner/rules-runner.ts @@ -1,9 +1,9 @@ -// import {TFile, moment} from 'obsidian'; +import {moment} from 'obsidian'; import {logDebug, logWarn, timingBegin, timingEnd} from '../utils/logger'; import {getDisabledRules, rules, wrapLintError, RuleType} from '../rules'; import BlockquotifyOnPaste from '../rules/blockquotify-on-paste'; import EscapeYamlSpecialCharacters from '../rules/escape-yaml-special-characters'; -// import ForceYamlEscape from '../rules/force-yaml-escape'; +import ForceYamlEscape from '../rules/force-yaml-escape'; import FormatTagsInYaml from '../rules/format-tags-in-yaml'; import PreventDoubleChecklistIndicatorOnPaste from '../rules/prevent-double-checklist-indicator-on-paste'; import PreventDoubleListItemIndicatorOnPaste from '../rules/prevent-double-list-item-indicator-on-paste'; @@ -20,25 +20,25 @@ import {CustomReplace} from '../ui/linter-components/custom-replace-option'; import {LintCommand} from '../ui/linter-components/custom-command-option'; import {convertStringVersionOfEscapeCharactersToEscapeCharacters} from '../utils/strings'; import {getTextInLanguage} from '../lang/helpers'; -// import CapitalizeHeadings from '../rules/capitalize-headings'; -// import BlockquoteStyle from '../rules/blockquote-style'; +import CapitalizeHeadings from '../rules/capitalize-headings'; +import BlockquoteStyle from '../rules/blockquote-style'; import {IgnoreTypes, ignoreListOfTypes} from '../utils/ignore-types'; import MoveMathBlockIndicatorsToOwnLine from '../rules/move-math-block-indicators-to-own-line'; import {LinterSettings} from '../settings-data'; -import {TFile} from '../typings/worker'; -// import TrailingSpaces from '../rules/trailing-spaces'; +import {RunLinterRulesOptions, TFile} from '../typings/worker'; +import TrailingSpaces from '../rules/trailing-spaces'; -export type RunLinterRulesOptions = { - oldText: string, - fileInfo: FileInfo, - settings: LinterSettings, -} +// export type RunLinterRulesOptions = { +// oldText: string, +// fileInfo: FileInfo, +// settings: LinterSettings, +// } -type FileInfo = { - name: string, - createdAtFormatted: string, - modifiedAtFormatted: string, -} +// type FileInfo = { +// name: string, +// createdAtFormatted: string, +// modifiedAtFormatted: string, +// } export class RulesRunner { private disabledRules: string[] = []; @@ -48,6 +48,8 @@ export class RulesRunner { this.skipFile = false; const originalText = runOptions.oldText; [this.disabledRules, this.skipFile] = getDisabledRules(originalText); + runOptions.skipFile = this.skipFile; + runOptions.disabledRules = this.disabledRules; if (this.skipFile) { return originalText; } @@ -89,8 +91,7 @@ export class RulesRunner { runOptions.oldText = newText; - return newText; - // return this.runAfterRegularRules(originalText, runOptions); + return this.runAfterRegularRules(originalText, runOptions); } private runBeforeRegularRules(runOptions: RunLinterRulesOptions): string { @@ -110,43 +111,43 @@ export class RulesRunner { return newText; } - // private runAfterRegularRules(originalText: string, runOptions: RunLinterRulesOptions): string { - // let newText = runOptions.oldText; - // const postRuleLogText = getTextInLanguage('logs.post-rules'); - // timingBegin(postRuleLogText); - // [newText] = CapitalizeHeadings.applyIfEnabled(newText, runOptions.settings, this.disabledRules); - - // [newText] = BlockquoteStyle.applyIfEnabled(newText, runOptions.settings, this.disabledRules); - - // [newText] = ForceYamlEscape.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - // defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, - // }); - - // [newText] = TrailingSpaces.applyIfEnabled(newText, runOptions.settings, this.disabledRules); - - // let currentTime = runOptions.getCurrentTime(); - // // run YAML timestamp at the end to help determine if something has changed - // let isYamlTimestampEnabled; - // [newText, isYamlTimestampEnabled] = YamlTimestamp.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - // fileCreatedTime: runOptions.fileInfo.createdAtFormatted, - // fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, - // currentTime: currentTime, - // alreadyModified: originalText != newText, - // locale: runOptions.momentLocale, - // }); - - // const yamlTimestampOptions = YamlTimestamp.getRuleOptions(runOptions.settings); - - // currentTime = runOptions.getCurrentTime(); - // [newText] = YamlKeySort.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - // currentTimeFormatted: currentTime.format(yamlTimestampOptions.format.trimEnd()), - // yamlTimestampDateModifiedEnabled: isYamlTimestampEnabled && yamlTimestampOptions.dateModified, - // dateModifiedKey: yamlTimestampOptions.dateModifiedKey, - // }); - // timingEnd(postRuleLogText); - // timingEnd(getTextInLanguage('logs.rule-running')); - // return newText; - // } + private runAfterRegularRules(originalText: string, runOptions: RunLinterRulesOptions): string { + let newText = runOptions.oldText; + const postRuleLogText = getTextInLanguage('logs.post-rules'); + timingBegin(postRuleLogText); + [newText] = CapitalizeHeadings.applyIfEnabled(newText, runOptions.settings, this.disabledRules); + + [newText] = BlockquoteStyle.applyIfEnabled(newText, runOptions.settings, this.disabledRules); + + [newText] = ForceYamlEscape.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, + }); + + [newText] = TrailingSpaces.applyIfEnabled(newText, runOptions.settings, this.disabledRules); + + // let currentTime = runOptions.getCurrentTime(); + // // run YAML timestamp at the end to help determine if something has changed + // let isYamlTimestampEnabled; + // [newText, isYamlTimestampEnabled] = YamlTimestamp.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + // fileCreatedTime: runOptions.fileInfo.createdAtFormatted, + // fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, + // currentTime: currentTime, + // alreadyModified: originalText != newText, + // locale: runOptions.momentLocale, + // }); + + // const yamlTimestampOptions = YamlTimestamp.getRuleOptions(runOptions.settings); + + // currentTime = runOptions.getCurrentTime(); + // [newText] = YamlKeySort.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { + // currentTimeFormatted: currentTime.format(yamlTimestampOptions.format.trimEnd()), + // yamlTimestampDateModifiedEnabled: isYamlTimestampEnabled && yamlTimestampOptions.dateModified, + // dateModifiedKey: yamlTimestampOptions.dateModifiedKey, + // }); + timingEnd(postRuleLogText); + timingEnd(getTextInLanguage('logs.rule-running')); + return newText; + } runCustomCommands(lintCommands: LintCommand[], commands: ObsidianCommandInterface) { if (this.skipFile) { @@ -217,27 +218,25 @@ export class RulesRunner { } export function createRunLinterRulesOptions(text: string, file: TFile = null, momentLocale: string, settings: LinterSettings): RunLinterRulesOptions { - // const createdAt = file ? moment(file.stat.ctime): moment(); - // createdAt.locale(momentLocale); - // const modifiedAt = file ? moment(file.stat.mtime): moment(); - // modifiedAt.locale(momentLocale); - // const modifiedAtTime = modifiedAt.format(); - // const createdAtTime = createdAt.format(); - - // const currentTime = moment(); - // currentTime.locale(momentLocale); + const createdAt = file ? moment(file.stat.ctime): moment(); + createdAt.locale(momentLocale); + const modifiedAt = file ? moment(file.stat.mtime): moment(); + modifiedAt.locale(momentLocale); + const modifiedAtTime = modifiedAt.format(); + const createdAtTime = createdAt.format(); return { oldText: text, + newText: '', + momentLocale: momentLocale, fileInfo: { + path: file ? file.path: '', name: file ? file.basename: '', - createdAtFormatted: 'created', - modifiedAtFormatted: 'modified', + createdAtFormatted: createdAtTime, + modifiedAtFormatted: modifiedAtTime, }, settings: settings, - // momentLocale: momentLocale, - // getCurrentTime: () => { - // return undefined; - // }, + skipFile: false, + disabledRules: [], }; } diff --git a/src/rules-runner/rules-runner.worker.ts b/src/rules-runner/rules-runner.worker.ts index ee1b8cfe..54e7b91f 100644 --- a/src/rules-runner/rules-runner.worker.ts +++ b/src/rules-runner/rules-runner.worker.ts @@ -12,12 +12,12 @@ import('./rules-runner').then((mod: any) => { self.document = { + // @ts-ignore this is meant for preventing an error on run, but it is not really needed beyond that createElement: () => {}, }; onmessage = (event: WorkerMessage) => { console.log(event.data.oldText); - const newText = rulesRunner.lintText(event.data); - console.log(newText); - postMessage(newText); + event.data.newText = rulesRunner.lintText(event.data); + postMessage(event.data); }; diff --git a/src/typings/worker.ts b/src/typings/worker.ts index 2cdfbf8b..d9341964 100644 --- a/src/typings/worker.ts +++ b/src/typings/worker.ts @@ -29,28 +29,35 @@ export interface TFile { * @public */ extension: string; + /** + * @public + */ + path: string; } export type WorkerArgs = { oldText: string, - fileInfo: { - name: string, - createdAtFormatted: string, - modifiedAtFormatted: string, - }, + fileInfo: FileInfo, settings: LinterSettings, + skipFile: boolean, + disabledRules: string[], } export type WorkerMessage = { - data: WorkerArgs; + data: RunLinterRulesOptions, } export type WorkerResponse = { + oldText: string, newText: string, + fileInfo: FileInfo, + settings: LinterSettings, + skipFile: boolean, + disabledRules: string[], } export type WorkerResponseMessage = { - data: WorkerResponse + data: RunLinterRulesOptions, } export interface LinterWorker { @@ -60,11 +67,16 @@ export interface LinterWorker { export type RunLinterRulesOptions = { oldText: string, + newText: string, + momentLocale: string, fileInfo: FileInfo, settings: LinterSettings, + skipFile: boolean, + disabledRules: string[], } type FileInfo = { + path: string, name: string, createdAtFormatted: string, modifiedAtFormatted: string, From 23544eba4f2ee391f8e30fa9c566ee62c7b71286 Mon Sep 17 00:00:00 2001 From: Peter Kaufman Date: Fri, 15 Mar 2024 18:53:20 -0400 Subject: [PATCH 07/10] cleaned up the logic so that the logs get recorded and properly passed from the worker to the main thread --- src/rules-runner/file-lint-manager.ts | 7 ++++- src/rules-runner/rules-runner.ts | 39 ++----------------------- src/rules-runner/rules-runner.worker.ts | 14 ++++++++- src/typings/worker.ts | 1 + src/utils/logger.ts | 4 +++ 5 files changed, 27 insertions(+), 38 deletions(-) diff --git a/src/rules-runner/file-lint-manager.ts b/src/rules-runner/file-lint-manager.ts index 626f5b7c..46bc2dba 100644 --- a/src/rules-runner/file-lint-manager.ts +++ b/src/rules-runner/file-lint-manager.ts @@ -9,6 +9,7 @@ import {LinterSettings} from '../settings-data'; import {LinterWorker, RunLinterRulesOptions} from '../typings/worker'; import YamlTimestamp from '../rules/yaml-timestamp'; import YamlKeySort from '../rules/yaml-key-sort'; +import {setLogs} from '../utils/logger'; /** Callback when a file is resolved. */ type FileCallback = (oldText: string, newText: string) => void; @@ -104,7 +105,7 @@ export class FileLintManager { // return promise; // } - /** Finish the parsing of a file, potentially queueing a new file. */ + // Finish the parsing of a file, potentially queueing a new file. private finish(data: RunLinterRulesOptions, index: number) { // Cache the callbacks before we do book-keeping. // const calls = ([] as [FileCallback, FileCallback][]).concat(this.callbacks.get(path) ?? []); @@ -122,6 +123,10 @@ export class FileLintManager { this.send(job, index); } + if (data.settings.recordLintOnSaveLogs) { + setLogs(data.logsFromRun); + } + // run lint actions related to moment and other areas that cannot be run in the worker let currentTime = moment(); currentTime.locale(data.momentLocale); diff --git a/src/rules-runner/rules-runner.ts b/src/rules-runner/rules-runner.ts index 21e89278..5acdb4c3 100644 --- a/src/rules-runner/rules-runner.ts +++ b/src/rules-runner/rules-runner.ts @@ -13,8 +13,6 @@ import RemoveLeadingOrTrailingWhitespaceOnPaste from '../rules/remove-leading-or import RemoveLeftoverFootnotesFromQuoteOnPaste from '../rules/remove-leftover-footnotes-from-quote-on-paste'; import RemoveMultipleBlankLinesOnPaste from '../rules/remove-multiple-blank-lines-on-paste'; import {RuleBuilderBase} from '../rules/rule-builder'; -// import YamlKeySort from '../rules/yaml-key-sort'; -// import YamlTimestamp from '../rules/yaml-timestamp'; import {ObsidianCommandInterface} from '../typings/obsidian-ex'; import {CustomReplace} from '../ui/linter-components/custom-replace-option'; import {LintCommand} from '../ui/linter-components/custom-command-option'; @@ -28,18 +26,6 @@ import {LinterSettings} from '../settings-data'; import {RunLinterRulesOptions, TFile} from '../typings/worker'; import TrailingSpaces from '../rules/trailing-spaces'; -// export type RunLinterRulesOptions = { -// oldText: string, -// fileInfo: FileInfo, -// settings: LinterSettings, -// } - -// type FileInfo = { -// name: string, -// createdAtFormatted: string, -// modifiedAtFormatted: string, -// } - export class RulesRunner { private disabledRules: string[] = []; skipFile: boolean; @@ -75,7 +61,6 @@ export class RulesRunner { fileCreatedTime: runOptions.fileInfo.createdAtFormatted, fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, fileName: runOptions.fileInfo.name, - // locale: runOptions.momentLocale, minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, aliasArrayStyle: runOptions.settings.commonStyles.aliasArrayStyle, tagArrayStyle: runOptions.settings.commonStyles.tagArrayStyle, @@ -91,7 +76,7 @@ export class RulesRunner { runOptions.oldText = newText; - return this.runAfterRegularRules(originalText, runOptions); + return this.runAfterRegularRules(runOptions); } private runBeforeRegularRules(runOptions: RunLinterRulesOptions): string { @@ -111,7 +96,7 @@ export class RulesRunner { return newText; } - private runAfterRegularRules(originalText: string, runOptions: RunLinterRulesOptions): string { + private runAfterRegularRules(runOptions: RunLinterRulesOptions): string { let newText = runOptions.oldText; const postRuleLogText = getTextInLanguage('logs.post-rules'); timingBegin(postRuleLogText); @@ -125,25 +110,6 @@ export class RulesRunner { [newText] = TrailingSpaces.applyIfEnabled(newText, runOptions.settings, this.disabledRules); - // let currentTime = runOptions.getCurrentTime(); - // // run YAML timestamp at the end to help determine if something has changed - // let isYamlTimestampEnabled; - // [newText, isYamlTimestampEnabled] = YamlTimestamp.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - // fileCreatedTime: runOptions.fileInfo.createdAtFormatted, - // fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, - // currentTime: currentTime, - // alreadyModified: originalText != newText, - // locale: runOptions.momentLocale, - // }); - - // const yamlTimestampOptions = YamlTimestamp.getRuleOptions(runOptions.settings); - - // currentTime = runOptions.getCurrentTime(); - // [newText] = YamlKeySort.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - // currentTimeFormatted: currentTime.format(yamlTimestampOptions.format.trimEnd()), - // yamlTimestampDateModifiedEnabled: isYamlTimestampEnabled && yamlTimestampOptions.dateModified, - // dateModifiedKey: yamlTimestampOptions.dateModifiedKey, - // }); timingEnd(postRuleLogText); timingEnd(getTextInLanguage('logs.rule-running')); return newText; @@ -238,5 +204,6 @@ export function createRunLinterRulesOptions(text: string, file: TFile = null, mo settings: settings, skipFile: false, disabledRules: [], + logsFromRun: [], }; } diff --git a/src/rules-runner/rules-runner.worker.ts b/src/rules-runner/rules-runner.worker.ts index 54e7b91f..2a731613 100644 --- a/src/rules-runner/rules-runner.worker.ts +++ b/src/rules-runner/rules-runner.worker.ts @@ -1,5 +1,6 @@ // here is a worker to sent data back and forth +import {clearLogs, logsFromLastRun, setCollectLogs, setLogLevel} from '../utils/logger'; import {RulesRunner, WorkerMessage} from '../typings/worker'; @@ -17,7 +18,18 @@ self.document = { }; onmessage = (event: WorkerMessage) => { - console.log(event.data.oldText); + const oldText = event.data.oldText; + + setLogLevel(event.data.settings.logLevel); + setCollectLogs(event.data.settings.recordLintOnSaveLogs); + clearLogs(); + event.data.newText = rulesRunner.lintText(event.data); + event.data.oldText = oldText; + + if (event.data.settings.recordLintOnSaveLogs) { + event.data.logsFromRun = logsFromLastRun; + } + postMessage(event.data); }; diff --git a/src/typings/worker.ts b/src/typings/worker.ts index d9341964..fb50023a 100644 --- a/src/typings/worker.ts +++ b/src/typings/worker.ts @@ -73,6 +73,7 @@ export type RunLinterRulesOptions = { settings: LinterSettings, skipFile: boolean, disabledRules: string[], + logsFromRun: string[], } type FileInfo = { diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 90423e56..1d3499a5 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -16,6 +16,10 @@ export enum LogLevels { export let logsFromLastRun: string[] = []; +export function setLogs(logs: string[]) { + logsFromLastRun = logs; +} + /** * Allows for the logging of errors * @param {string} labelForError The label for the error From 002f1a49c221abe3e20860e4213e82f2ea38f92f Mon Sep 17 00:00:00 2001 From: Peter Kaufman Date: Sat, 16 Mar 2024 12:32:49 -0400 Subject: [PATCH 08/10] added the dummy mocks to the esbuild for the worker since they are required for rules to run and added some more changes to get closer to getting the worker setup in place for all linting types --- esbuild.config.mjs | 8 +- src/main.ts | 44 ++--- src/rules-runner/file-lint-manager.ts | 91 +++------ src/rules-runner/rules-runner.ts | 233 +++++++++++------------- src/rules-runner/rules-runner.worker.ts | 32 ++-- src/typings/worker.ts | 5 +- 6 files changed, 169 insertions(+), 244 deletions(-) diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 44b1a2f5..67b08b87 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -12,7 +12,7 @@ if you want to view the source, please visit the github repository of this plugi */ `; -const dummyMocksForDocs = ` +const dummyMocksForDocsAndWorker = ` document = { createElement: function() {}, }; @@ -20,7 +20,7 @@ document = { const prod = (process.argv[2] === 'production'); -const mockedBanner = banner + dummyMocksForDocs; +const mockedBanner = banner + dummyMocksForDocsAndWorker; const mockedPlugins = [replace({ values: { // update usage of moment from obsidian to the node implementation of moment we have @@ -57,6 +57,10 @@ const createEsbuildArgs = function(banner, entryPoint, outfile, extraPlugins) { plugins: [ importGlobPlugin.default(), inlineWorkerPlugin({ + banner: + { + js: dummyMocksForDocsAndWorker, + }, external: externalPackages, format: 'cjs', plugins: [...webWorkerIgnores], diff --git a/src/main.ts b/src/main.ts index ae17dd76..4f0834e9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,10 +17,9 @@ import {RuleAliasSuggest} from './cm6/rule-alias-suggester'; import {DEFAULT_SETTINGS, LinterSettings} from './settings-data'; import AsyncLock from 'async-lock'; import {warn} from 'loglevel'; -// @ts-ignore because it does not have the expected default export, but it does not need one -// import MyWorker from './rules-runner/rules-runner.worker'; -// import {LinterWorker, WorkerArgs, WorkerResponseMessage} from './typings/worker'; import {FileLintManager} from './rules-runner/file-lint-manager'; +import {RunLinterRulesOptions} from './typings/worker'; +import {runCustomCommands} from './rules-runner/rules-runner'; // https://github.com/liamcain/obsidian-calendar-ui/blob/03ceecbf6d88ef260dadf223ee5e483d98d24ffc/src/localization.ts#L20-L43 const langToMomentLocale = { @@ -85,22 +84,6 @@ export default class LinterPlugin extends Plugin { this.lintFileManager = new FileLintManager(1, this.momentLocale, this.settings, this.app.vault); - // const worker = new MyWorker() as LinterWorker; - - // worker.postMessage({ - // oldText: 'text', - // fileInfo: { - // name: 'file name', - // createdAtFormatted: 'created', - // modifiedAtFormatted: 'updated', - // }, - // settings: this.settings, - // }); - // worker.onmessage = (event: WorkerResponseMessage) => { - // console.log(`Main thread received message: ${event.data}`); - // }; - - this.addCommands(); this.registerEventsAndSaveCallback(); @@ -125,6 +108,8 @@ export default class LinterPlugin extends Plugin { if (saveCommandDefinition && saveCommandDefinition.callback && this.originalSaveCallback) { saveCommandDefinition.callback = this.originalSaveCallback; } + + this.lintFileManager.terminateWorkers(); } async loadSettings() { @@ -295,7 +280,8 @@ export default class LinterPlugin extends Plugin { if (this.editorLintFiles.includes(file)) { this.editorLintFiles.remove(file); - this.runCustomCommands(file); + // TODO: come back and fix this since I need a way to pass over the options for this pjk + this.runCustomCommands(file, null); } else if (this.fileLintFiles.has(file)) { this.fileLintFiles.delete(file); @@ -454,23 +440,21 @@ export default class LinterPlugin extends Plugin { logInfo(getTextInLanguage('logs.linter-run')); const file = this.app.workspace.getActiveFile(); - // const oldText = editor.getValue(); - // let newText: string; try { - this.lintFileManager.lintFile(file, (oldText: string, newText: string) => { + this.lintFileManager.lintFile(file, (runOptions: RunLinterRulesOptions) => { const mode = this.getCurrentMode(); // Replace changed lines const dmp = new DiffMatchPatch.diff_match_patch(); // eslint-disable-line new-cap - const changes = dmp.diff_main(oldText, newText); + const changes = dmp.diff_main(runOptions.oldText, runOptions.newText); let curText = ''; let startingIndex = 0; // in Live Preview mode, there is some wonkiness around how the frontmatter values are replaced. // So if the frontmatter needs updating at all, we are treating it as the whole frontmatter needing // to be replaced. Hopefully this will fix issues with the frontmatter getting mangled. if (mode === 'preview') { - const oldTextFrontmatterInfo = getFrontMatterInfo(oldText); - const newTextFrontmatterInfo = getFrontMatterInfo(newText); + const oldTextFrontmatterInfo = getFrontMatterInfo(runOptions.oldText); + const newTextFrontmatterInfo = getFrontMatterInfo(runOptions.newText); if (oldTextFrontmatterInfo.exists != newTextFrontmatterInfo.exists || oldTextFrontmatterInfo.from != newTextFrontmatterInfo.from || @@ -512,7 +496,9 @@ export default class LinterPlugin extends Plugin { // run custom commands now since no change was made if (!charsAdded && !charsRemoved) { - this.runCustomCommands(file); + this.runCustomCommands(file, runOptions); + } else { + this.editorLintFiles.push(file); } setCollectLogs(false); @@ -714,14 +700,14 @@ export default class LinterPlugin extends Plugin { this.currentlyOpeningSidebar = false; } - private async runCustomCommands(file: TFile) { + private async runCustomCommands(file: TFile, runOptions: RunLinterRulesOptions) { if (!this.settings.lintCommands || this.settings.lintCommands.length == 0) { return; } await this.customCommandsLock.acquire('command', async () => { try { - this.rulesRunner.runCustomCommands(this.settings.lintCommands, this.app.commands); + runCustomCommands(this.settings.lintCommands, this.app.commands, runOptions); } catch (error) { this.handleLintError(file, error, getTextInLanguage('commands.lint-file.error-message') + ' \'{FILE_PATH}\'', false); } diff --git a/src/rules-runner/file-lint-manager.ts b/src/rules-runner/file-lint-manager.ts index 46bc2dba..30a63e7d 100644 --- a/src/rules-runner/file-lint-manager.ts +++ b/src/rules-runner/file-lint-manager.ts @@ -1,5 +1,6 @@ -// based on https://github.com/blacksmithgu/obsidian-dataview/blob/75b564bcfd23876f12fa3faf7f86184cdfcd91f1/src/data-import/web-worker/import-manager.ts -/** Makes sure that files are linted and that they are handled appropriately in an asynchronous manner. */ +/** Makes sure that files are linted and that they are handled appropriately in an asynchronous manner. + * based on https://github.com/blacksmithgu/obsidian-dataview/blob/75b564bcfd23876f12fa3faf7f86184cdfcd91f1/src/data-import/web-worker/import-manager.ts +*/ // @ts-ignore because this is a web worker and it does not play well with Typescript checking import Worker from './rules-runner.worker'; @@ -12,7 +13,7 @@ import YamlKeySort from '../rules/yaml-key-sort'; import {setLogs} from '../utils/logger'; /** Callback when a file is resolved. */ -type FileCallback = (oldText: string, newText: string) => void; +type FileCallback = (runOptions: RunLinterRulesOptions) => void; /** Multi-threaded file linter which debounces rapid file requests automatically. */ export class FileLintManager { @@ -23,52 +24,38 @@ export class FileLintManager { /** List of files which have been queued for to be linted */ lintQueue: TFile[]; - /** Fast-access set which holds the list of files queued to be linted; used for debouncing. */ - reloadSet: Set; /** Paths -> callback function to run once file linting has finished running rules. * Note: this does not mean that the logic for running custom commands has run. */ - callbacks: Map; - - /** Paths -> promises for file reloads which have not yet been queued. */ - // callbacks: Map; + callbacks: Map; public constructor(public numWorkers: number, public momentLocale: string, private settings: LinterSettings, private vault: Vault) { this.workers = []; this.busy = []; this.lintQueue = []; - this.reloadSet = new Set(); this.callbacks = new Map(); for (let index = 0; index < numWorkers; index++) { // eslint-disable-next-line new-cap const worker = Worker(); - // worker.onmessage = evt => this.finish(evt.data.path, Transferable.value(evt.data.result), index); worker.onmessage = (resp: any) => { - // console.log(data); - // this.busy[index] = false; this.finish(resp.data as RunLinterRulesOptions, index); }; - // worker.postMessage('first message'); + this.workers.push(worker); - // this.register(() => worker.terminate()); this.busy.push(false); } } public lintFile(file: TFile, callback: FileCallback): void { + // if the file is already in the list of files to process, we should skip it if (this.callbacks.has(file.path)) { - this.callbacks.get(file.path)?.push(callback); + return; } else { - this.callbacks.set(file.path, [callback]); + this.callbacks.set(file.path, callback); } - // const promise: Promise = new Promise((resolve, reject) => { - // if (this.callbacks.has(file.path)) this.callbacks.get(file.path)?.push([resolve, reject]); - // else this.callbacks.set(file.path, [[resolve, reject]]); - // }); - // Immediately run this task if there are available workers; otherwise, add it to the queue. const workerId = this.nextAvailableWorker(); if (workerId !== undefined) { @@ -76,44 +63,19 @@ export class FileLintManager { } else { this.lintQueue.push(file); } + } + + public terminateWorkers(): void { + for (const worker of this.workers) { + worker.terminate(); + } - // return promise; + this.workers = []; } - /** - * Queue the given file for reloading. Multiple reload requests for the same file in a short time period will be de-bounced - * and all be resolved by a single actual file reload. - */ - // public reload(file: TFile): Promise { - // const promise: Promise = new Promise((resolve, reject) => { - // if (this.callbacks.has(file.path)) this.callbacks.get(file.path)?.push([resolve, reject]); - // else this.callbacks.set(file.path, [[resolve, reject]]); - // }); - - // // De-bounce repeated requests for the same file. - // if (this.reloadSet.has(file.path)) return promise; - // this.reloadSet.add(file.path); - - // // Immediately run this task if there are available workers; otherwise, add it to the queue. - // const workerId = this.nextAvailableWorker(); - // if (workerId !== undefined) { - // this.send(file, workerId); - // } else { - // this.reloadQueue.push(file); - // } - - // return promise; - // } // Finish the parsing of a file, potentially queueing a new file. private finish(data: RunLinterRulesOptions, index: number) { - // Cache the callbacks before we do book-keeping. - // const calls = ([] as [FileCallback, FileCallback][]).concat(this.callbacks.get(path) ?? []); - - // Book-keeping to clear metadata & allow the file to be re-loaded again. - // this.reloadSet.delete(path); - // this.callbacks.delete(path); - // Notify the queue this file is available for new work. this.busy[index] = false; @@ -130,7 +92,7 @@ export class FileLintManager { // run lint actions related to moment and other areas that cannot be run in the worker let currentTime = moment(); currentTime.locale(data.momentLocale); - // let currentTime = runOptions.getCurrentTime(); + // run YAML timestamp at the end to help determine if something has changed let isYamlTimestampEnabled: boolean; let newText: string; @@ -152,21 +114,16 @@ export class FileLintManager { dateModifiedKey: yamlTimestampOptions.dateModifiedKey, }); - // TODO: add the callback resolution here... if (this.callbacks.has(data.fileInfo.path)) { - const callbacks = this.callbacks.get(data.fileInfo.path); + const callback = this.callbacks.get(data.fileInfo.path); this.callbacks.delete(data.fileInfo.path); - for (const callback of callbacks) { - callback(data.oldText, newText); - } - } + data.newText = newText; + callback(data); - // Resolve promises to let users know this file has finished. - // if ('$error' in data) { - // for (const [_, reject] of calls) reject(data['$error']); - // } else { - // for (const [callback, _] of calls) callback(data); - // } + // TODO: see about hashing the file contents here if possible, but custom commands may make this not viable + // likely needs to be called at the end of run custom commands since that waits until the cache is ready after + // the file is updated by the regular lint + } } // /** Send a new task to the given worker ID. */ diff --git a/src/rules-runner/rules-runner.ts b/src/rules-runner/rules-runner.ts index 5acdb4c3..623aab20 100644 --- a/src/rules-runner/rules-runner.ts +++ b/src/rules-runner/rules-runner.ts @@ -1,6 +1,6 @@ import {moment} from 'obsidian'; import {logDebug, logWarn, timingBegin, timingEnd} from '../utils/logger'; -import {getDisabledRules, rules, wrapLintError, RuleType} from '../rules'; +import {rules, wrapLintError, RuleType} from '../rules'; import BlockquotifyOnPaste from '../rules/blockquotify-on-paste'; import EscapeYamlSpecialCharacters from '../rules/escape-yaml-special-characters'; import ForceYamlEscape from '../rules/force-yaml-escape'; @@ -26,161 +26,150 @@ import {LinterSettings} from '../settings-data'; import {RunLinterRulesOptions, TFile} from '../typings/worker'; import TrailingSpaces from '../rules/trailing-spaces'; -export class RulesRunner { - private disabledRules: string[] = []; - skipFile: boolean; - - lintText(runOptions: RunLinterRulesOptions): string { - this.skipFile = false; - const originalText = runOptions.oldText; - [this.disabledRules, this.skipFile] = getDisabledRules(originalText); - runOptions.skipFile = this.skipFile; - runOptions.disabledRules = this.disabledRules; - if (this.skipFile) { - return originalText; +/** + * Lints the text provided in @runOptions. + * @param {RunLinterRulesOptions} runOptions the different options provided when linting text + * @return {string} the text after all of the updates have been made. + */ +export function lintText(runOptions: RunLinterRulesOptions): string { + timingBegin(getTextInLanguage('logs.rule-running')); + + const preRuleText = getTextInLanguage('logs.pre-rules'); + timingBegin(preRuleText); + let newText = runBeforeRegularRules(runOptions); + timingEnd(preRuleText); + + const disabledRuleText = getTextInLanguage('logs.disabled-text'); + for (const rule of rules) { + // if you are run prior to or after the regular rules or are a disabled rule, skip running the rule + if (runOptions.disabledRules.includes(rule.alias)) { + logDebug(rule.alias + ' ' + disabledRuleText); + continue; + } else if (rule.hasSpecialExecutionOrder || rule.type === RuleType.PASTE) { + continue; } - timingBegin(getTextInLanguage('logs.rule-running')); + [newText] = RuleBuilderBase.applyIfEnabledBase(rule, newText, runOptions.settings, { + fileCreatedTime: runOptions.fileInfo.createdAtFormatted, + fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, + fileName: runOptions.fileInfo.name, + minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, + aliasArrayStyle: runOptions.settings.commonStyles.aliasArrayStyle, + tagArrayStyle: runOptions.settings.commonStyles.tagArrayStyle, + defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, + removeUnnecessaryEscapeCharsForMultiLineArrays: runOptions.settings.commonStyles.removeUnnecessaryEscapeCharsForMultiLineArrays, + }); + } - const preRuleText = getTextInLanguage('logs.pre-rules'); - timingBegin(preRuleText); - let newText = this.runBeforeRegularRules(runOptions); - timingEnd(preRuleText); + const customRegexLogText = getTextInLanguage('logs.custom-regex'); + timingBegin(customRegexLogText); + newText = runCustomRegexReplacement(runOptions.settings.customRegexes, newText); + timingEnd(customRegexLogText); - const disabledRuleText = getTextInLanguage('logs.disabled-text'); - for (const rule of rules) { - // if you are run prior to or after the regular rules or are a disabled rule, skip running the rule - if (this.disabledRules.includes(rule.alias)) { - logDebug(rule.alias + ' ' + disabledRuleText); - continue; - } else if (rule.hasSpecialExecutionOrder || rule.type === RuleType.PASTE) { - continue; - } + return runAfterRegularRules(newText, runOptions); +} - [newText] = RuleBuilderBase.applyIfEnabledBase(rule, newText, runOptions.settings, { - fileCreatedTime: runOptions.fileInfo.createdAtFormatted, - fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, - fileName: runOptions.fileInfo.name, - minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, - aliasArrayStyle: runOptions.settings.commonStyles.aliasArrayStyle, - tagArrayStyle: runOptions.settings.commonStyles.tagArrayStyle, - defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, - removeUnnecessaryEscapeCharsForMultiLineArrays: runOptions.settings.commonStyles.removeUnnecessaryEscapeCharsForMultiLineArrays, - }); - } +function runBeforeRegularRules(runOptions: RunLinterRulesOptions): string { + let newText = runOptions.oldText; + // remove hashtags from tags before parsing yaml + [newText] = FormatTagsInYaml.applyIfEnabled(newText, runOptions.settings, runOptions.disabledRules); - const customRegexLogText = getTextInLanguage('logs.custom-regex'); - timingBegin(customRegexLogText); - newText = this.runCustomRegexReplacement(runOptions.settings.customRegexes, newText); - timingEnd(customRegexLogText); + // escape YAML where possible before parsing yaml + [newText] = EscapeYamlSpecialCharacters.applyIfEnabled(newText, runOptions.settings, runOptions.disabledRules, { + defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, + }); - runOptions.oldText = newText; + [newText] = MoveMathBlockIndicatorsToOwnLine.applyIfEnabled(newText, runOptions.settings, runOptions.disabledRules, { + minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, + }); - return this.runAfterRegularRules(runOptions); - } + return newText; +} - private runBeforeRegularRules(runOptions: RunLinterRulesOptions): string { - let newText = runOptions.oldText; - // remove hashtags from tags before parsing yaml - [newText] = FormatTagsInYaml.applyIfEnabled(newText, runOptions.settings, this.disabledRules); +function runAfterRegularRules(currentText: string, runOptions: RunLinterRulesOptions): string { + let newText = currentText; + const postRuleLogText = getTextInLanguage('logs.post-rules'); + timingBegin(postRuleLogText); + [newText] = CapitalizeHeadings.applyIfEnabled(newText, runOptions.settings, runOptions.disabledRules); - // escape YAML where possible before parsing yaml - [newText] = EscapeYamlSpecialCharacters.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, - }); + [newText] = BlockquoteStyle.applyIfEnabled(newText, runOptions.settings, runOptions.disabledRules); - [newText] = MoveMathBlockIndicatorsToOwnLine.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, - }); + [newText] = ForceYamlEscape.applyIfEnabled(newText, runOptions.settings, runOptions.disabledRules, { + defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, + }); - return newText; - } + [newText] = TrailingSpaces.applyIfEnabled(newText, runOptions.settings, runOptions.disabledRules); - private runAfterRegularRules(runOptions: RunLinterRulesOptions): string { - let newText = runOptions.oldText; - const postRuleLogText = getTextInLanguage('logs.post-rules'); - timingBegin(postRuleLogText); - [newText] = CapitalizeHeadings.applyIfEnabled(newText, runOptions.settings, this.disabledRules); + timingEnd(postRuleLogText); + timingEnd(getTextInLanguage('logs.rule-running')); + return newText; +} - [newText] = BlockquoteStyle.applyIfEnabled(newText, runOptions.settings, this.disabledRules); +function runCustomRegexReplacement(customRegexes: CustomReplace[], oldText: string): string { + return ignoreListOfTypes([IgnoreTypes.customIgnore], oldText, (text: string) => { + logDebug(getTextInLanguage('logs.running-custom-regex')); - [newText] = ForceYamlEscape.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, - }); + let newText = text; + for (const eachRegex of customRegexes) { + const findIsEmpty = eachRegex.find === undefined || eachRegex.find == '' || eachRegex.find === null; + const replaceIsEmpty = eachRegex.replace === undefined || eachRegex.replace === null; + if (findIsEmpty || replaceIsEmpty) { + continue; + } - [newText] = TrailingSpaces.applyIfEnabled(newText, runOptions.settings, this.disabledRules); + const regex = new RegExp(`${eachRegex.find}`, eachRegex.flags); + // make sure that characters are not string escaped unescape in the replace value to make sure things like \n and \t are correctly inserted + newText = newText.replace(regex, convertStringVersionOfEscapeCharactersToEscapeCharacters(eachRegex.replace)); + } - timingEnd(postRuleLogText); - timingEnd(getTextInLanguage('logs.rule-running')); return newText; + }); +} + +export function runCustomCommands(lintCommands: LintCommand[], commands: ObsidianCommandInterface, runOptions: RunLinterRulesOptions) { + if (runOptions.skipFile) { + return; } - runCustomCommands(lintCommands: LintCommand[], commands: ObsidianCommandInterface) { - if (this.skipFile) { - return; + logDebug(getTextInLanguage('logs.running-custom-lint-command')); + const commandsRun = new Set(); + for (const commandInfo of lintCommands) { + if (!commandInfo.id) { + continue; + } else if (commandsRun.has(commandInfo.id)) { + logWarn(getTextInLanguage('logs.custom-lint-duplicate-warning').replace('{COMMAND_NAME}', commandInfo.name)); + continue; } - logDebug(getTextInLanguage('logs.running-custom-lint-command')); - const commandsRun = new Set(); - for (const commandInfo of lintCommands) { - if (!commandInfo.id) { - continue; - } else if (commandsRun.has(commandInfo.id)) { - logWarn(getTextInLanguage('logs.custom-lint-duplicate-warning').replace('{COMMAND_NAME}', commandInfo.name)); - continue; - } - - try { - commandsRun.add(commandInfo.id); - commands.executeCommandById(commandInfo.id); - } catch (error) { - wrapLintError(error, `${getTextInLanguage('logs.custom-lint-error-message')} ${commandInfo.id}`); - } + try { + commandsRun.add(commandInfo.id); + commands.executeCommandById(commandInfo.id); + } catch (error) { + wrapLintError(error, `${getTextInLanguage('logs.custom-lint-error-message')} ${commandInfo.id}`); } } +} - runCustomRegexReplacement(customRegexes: CustomReplace[], oldText: string): string { - return ignoreListOfTypes([IgnoreTypes.customIgnore], oldText, (text: string) => { - logDebug(getTextInLanguage('logs.running-custom-regex')); - - let newText = text; - for (const eachRegex of customRegexes) { - const findIsEmpty = eachRegex.find === undefined || eachRegex.find == '' || eachRegex.find === null; - const replaceIsEmpty = eachRegex.replace === undefined || eachRegex.replace === null; - if (findIsEmpty || replaceIsEmpty) { - continue; - } - - const regex = new RegExp(`${eachRegex.find}`, eachRegex.flags); - // make sure that characters are not string escaped unescape in the replace value to make sure things like \n and \t are correctly inserted - newText = newText.replace(regex, convertStringVersionOfEscapeCharactersToEscapeCharacters(eachRegex.replace)); - } - - return newText; - }); - } - - runPasteLint(currentLine: string, selectedText: string, runOptions: RunLinterRulesOptions): string { - let newText = runOptions.oldText; +export function runPasteLint(currentLine: string, selectedText: string, runOptions: RunLinterRulesOptions): string { + let newText = runOptions.oldText; - [newText] = RemoveHyphensOnPaste.applyIfEnabled(newText, runOptions.settings, []); + [newText] = RemoveHyphensOnPaste.applyIfEnabled(newText, runOptions.settings, []); - [newText] = RemoveMultipleBlankLinesOnPaste.applyIfEnabled(newText, runOptions.settings, []); + [newText] = RemoveMultipleBlankLinesOnPaste.applyIfEnabled(newText, runOptions.settings, []); - [newText] = RemoveLeftoverFootnotesFromQuoteOnPaste.applyIfEnabled(newText, runOptions.settings, []); + [newText] = RemoveLeftoverFootnotesFromQuoteOnPaste.applyIfEnabled(newText, runOptions.settings, []); - [newText] = ProperEllipsisOnPaste.applyIfEnabled(newText, runOptions.settings, []); + [newText] = ProperEllipsisOnPaste.applyIfEnabled(newText, runOptions.settings, []); - [newText] = RemoveLeadingOrTrailingWhitespaceOnPaste.applyIfEnabled(newText, runOptions.settings, []); + [newText] = RemoveLeadingOrTrailingWhitespaceOnPaste.applyIfEnabled(newText, runOptions.settings, []); - [newText] = PreventDoubleChecklistIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine, selectedText: selectedText}); + [newText] = PreventDoubleChecklistIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine, selectedText: selectedText}); - [newText] = PreventDoubleListItemIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine, selectedText: selectedText}); + [newText] = PreventDoubleListItemIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine, selectedText: selectedText}); - [newText] = BlockquotifyOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine}); + [newText] = BlockquotifyOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine}); - return newText; - } + return newText; } export function createRunLinterRulesOptions(text: string, file: TFile = null, momentLocale: string, settings: LinterSettings): RunLinterRulesOptions { diff --git a/src/rules-runner/rules-runner.worker.ts b/src/rules-runner/rules-runner.worker.ts index 2a731613..6ef6931a 100644 --- a/src/rules-runner/rules-runner.worker.ts +++ b/src/rules-runner/rules-runner.worker.ts @@ -1,31 +1,23 @@ -// here is a worker to sent data back and forth +// This worker here is designed expressly for the purpose of running lint rules as possible off of the main thread. import {clearLogs, logsFromLastRun, setCollectLogs, setLogLevel} from '../utils/logger'; -import {RulesRunner, WorkerMessage} from '../typings/worker'; - - -let rulesRunner: RulesRunner = null; -import('./rules-runner').then((mod: any) => { - rulesRunner = new mod.RulesRunner(); -}); - -// import {RulesRunner} from './rules-runner'; - - -self.document = { - // @ts-ignore this is meant for preventing an error on run, but it is not really needed beyond that - createElement: () => {}, -}; +import {WorkerMessage} from '../typings/worker'; +import {getDisabledRules} from '../rules'; +import {lintText} from './rules-runner'; onmessage = (event: WorkerMessage) => { - const oldText = event.data.oldText; - setLogLevel(event.data.settings.logLevel); setCollectLogs(event.data.settings.recordLintOnSaveLogs); clearLogs(); - event.data.newText = rulesRunner.lintText(event.data); - event.data.oldText = oldText; + const originalText = event.data.oldText; + const [disabledRules, skipFile] = getDisabledRules(originalText); + event.data.skipFile = skipFile; + event.data.disabledRules = disabledRules; + + if (!skipFile) { + event.data.newText = lintText(event.data); + } if (event.data.settings.recordLintOnSaveLogs) { event.data.logsFromRun = logsFromLastRun; diff --git a/src/typings/worker.ts b/src/typings/worker.ts index fb50023a..dacff4ef 100644 --- a/src/typings/worker.ts +++ b/src/typings/worker.ts @@ -63,6 +63,7 @@ export type WorkerResponseMessage = { export interface LinterWorker { postMessage: (data: WorkerArgs) => void; onmessage: (data: WorkerResponseMessage) => void; + terminate: () => void; } export type RunLinterRulesOptions = { @@ -82,7 +83,3 @@ type FileInfo = { createdAtFormatted: string, modifiedAtFormatted: string, } - -export interface RulesRunner { - lintText(runOptions: RunLinterRulesOptions): string -} From bf720e6c611bce2301add6967b7b46152f9e87cc Mon Sep 17 00:00:00 2001 From: Peter Kaufman Date: Sat, 16 Mar 2024 13:15:20 -0400 Subject: [PATCH 09/10] cleaned up some more logic including the removal of duplicate code and the old rules runner which should be replaced by the worker now --- src/main.ts | 73 +++--- src/option.ts | 1 - src/rule-runner copy/file-lint-manager.ts | 128 ---------- src/rule-runner copy/rule-runner.worker.ts | 13 -- src/rule-runner copy/rules-runner.ts | 185 --------------- src/rules-runner.ts | 257 --------------------- src/rules-runner/file-lint-manager.ts | 19 +- src/rules-runner/rules-runner.ts | 8 +- src/typings/worker.ts | 19 +- 9 files changed, 50 insertions(+), 653 deletions(-) delete mode 100644 src/rule-runner copy/file-lint-manager.ts delete mode 100644 src/rule-runner copy/rule-runner.worker.ts delete mode 100644 src/rule-runner copy/rules-runner.ts delete mode 100644 src/rules-runner.ts diff --git a/src/main.ts b/src/main.ts index 4f0834e9..f2bf9df2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,12 +2,10 @@ import {App, Editor, EventRef, MarkdownView, Menu, Notice, Plugin, TAbstractFile import {Options, RuleType, ruleTypeToRules, rules} from './rules'; import DiffMatchPatch from 'diff-match-patch'; import dedent from 'ts-dedent'; -import {stripCr} from './utils/strings'; import {logInfo, logError, logDebug, setLogLevel, logWarn, setCollectLogs, clearLogs, convertNumberToLogLevel} from './utils/logger'; import {moment} from 'obsidian'; import './rules-registry'; import {iconInfo} from './ui/icons'; -import {createRunLinterRulesOptions, RulesRunner} from './rules-runner'; import {LinterError} from './linter-error'; import {LintConfirmationModal} from './ui/modals/lint-confirmation-modal'; import {SettingTab} from './ui/settings'; @@ -19,7 +17,7 @@ import AsyncLock from 'async-lock'; import {warn} from 'loglevel'; import {FileLintManager} from './rules-runner/file-lint-manager'; import {RunLinterRulesOptions} from './typings/worker'; -import {runCustomCommands} from './rules-runner/rules-runner'; +import {runCustomCommands, runPasteLint, createRunLinterRulesOptions} from './rules-runner/rules-runner'; // https://github.com/liamcain/obsidian-calendar-ui/blob/03ceecbf6d88ef260dadf223ee5e483d98d24ffc/src/localization.ts#L20-L43 const langToMomentLocale = { @@ -55,14 +53,13 @@ export default class LinterPlugin extends Plugin { private eventRefs: EventRef[] = []; private momentLocale: string; private isEnabled: boolean = true; - private rulesRunner = new RulesRunner(); private lastActiveFile: TFile; private overridePaste: boolean = false; private customCommandsLock = new AsyncLock(); private originalSaveCallback?: () => void = null; // The amount of files you can use editor lint on at once is pretty small, so we will use an array private editorLintFiles: TFile[] = []; - // the amount of files that can be linted as a file can be quite large, so we will want to use a set to make + // The amount of files that can be linted as a file can be quite large, so we will want to use a set to make // search and other operations faster private fileLintFiles: Set = new Set(); private customCommandsCallback: (file: TFile) => Promise = null; @@ -280,8 +277,7 @@ export default class LinterPlugin extends Plugin { if (this.editorLintFiles.includes(file)) { this.editorLintFiles.remove(file); - // TODO: come back and fix this since I need a way to pass over the options for this pjk - this.runCustomCommands(file, null); + this.runCustomCommands(file); } else if (this.fileLintFiles.has(file)) { this.fileLintFiles.delete(file); @@ -349,29 +345,32 @@ export default class LinterPlugin extends Plugin { } async runLinterFile(file: TFile, lintingLastActiveFile: boolean = false) { - const oldText = stripCr(await this.app.vault.read(file)); - const newText = this.rulesRunner.lintText(createRunLinterRulesOptions(oldText, file, this.momentLocale, this.settings)); + this.lintFileManager.lintFile(file, async (runOptions: RunLinterRulesOptions) => { + if (runOptions.oldText != runOptions.newText) { + await this.app.vault.modify(file, runOptions.newText); + + if (lintingLastActiveFile) { + const message = getTextInLanguage('logs.file-change-lint-message-start') + ' ' + this.lastActiveFile.path; + if (this.settings.displayLintOnFileChangeNotice) { + new Notice(message); + } - if (oldText != newText) { - await this.app.vault.modify(file, newText); + logInfo(message); + } - if (lintingLastActiveFile) { - const message = getTextInLanguage('logs.file-change-lint-message-start') + ' ' + this.lastActiveFile.path; - if (this.settings.displayLintOnFileChangeNotice) { - new Notice(message); + if (!runOptions.skipFile) { + // when a change is made to the file we know that the cache will update down the road + // so we can defer running the custom commands to the cache callback + this.fileLintFiles.add(file); } - logInfo(message); + return; } - // when a change is made to the file we know that the cache will update down the road - // so we can defer running the custom commands to the cache callback - this.fileLintFiles.add(file); - - return; - } - - await this.runCustomCommandsInSidebar(file); + if (!runOptions.skipFile) { + await this.runCustomCommandsInSidebar(file); + } + }); } async runLinterAllFiles(app: App) { @@ -441,7 +440,7 @@ export default class LinterPlugin extends Plugin { const file = this.app.workspace.getActiveFile(); try { - this.lintFileManager.lintFile(file, (runOptions: RunLinterRulesOptions) => { + this.lintFileManager.lintFile(file, async (runOptions: RunLinterRulesOptions) => { const mode = this.getCurrentMode(); // Replace changed lines @@ -494,16 +493,17 @@ export default class LinterPlugin extends Plugin { const charsRemoved = changes.map((change) => change[0] == DiffMatchPatch.DIFF_DELETE ? change[1].length : 0).reduce((a, b) => a + b, 0); this.displayChangedMessage(charsAdded, charsRemoved); - // run custom commands now since no change was made - if (!charsAdded && !charsRemoved) { - this.runCustomCommands(file, runOptions); - } else { - this.editorLintFiles.push(file); + if (!runOptions.skipFile) { + // run custom commands now since no change was made + if (!charsAdded && !charsRemoved) { + await this.runCustomCommands(file); + } else { + this.editorLintFiles.push(file); + } } setCollectLogs(false); }); - // newText = this.rulesRunner.lintText(createRunLinterRulesOptions(oldText, file, this.momentLocale, this.settings)); } catch (error) { this.handleLintError(file, error, getTextInLanguage('commands.lint-file.error-message') + ' \'{FILE_PATH}\'', false); return; @@ -593,7 +593,7 @@ export default class LinterPlugin extends Plugin { const cursorSelections = editor.listSelections(); if (cursorSelections.length === 1) { const cursorSelection = cursorSelections[0]; - clipboardText = this.rulesRunner.runPasteLint(this.getLineContent(editor, cursorSelection), + clipboardText = runPasteLint(this.getLineContent(editor, cursorSelection), editor.getSelection() ?? '', createRunLinterRulesOptions(clipboardText, null, this.momentLocale, this.settings), ); @@ -615,7 +615,7 @@ export default class LinterPlugin extends Plugin { const editorChange: EditorChange[] = []; cursorSelections.forEach((cursorSelection: EditorSelection, index: number) => { - clipboardText = this.rulesRunner.runPasteLint(this.getLineContent(editor, cursorSelection), editor.getRange(cursorSelection.anchor, cursorSelection.head) ?? '', createRunLinterRulesOptions(pasteContentPerCursor[index], null, this.momentLocale, this.settings)); + clipboardText = runPasteLint(this.getLineContent(editor, cursorSelection), editor.getRange(cursorSelection.anchor, cursorSelection.head) ?? '', createRunLinterRulesOptions(pasteContentPerCursor[index], null, this.momentLocale, this.settings)); editorChange.push({ text: clipboardText, from: cursorSelection.anchor, @@ -687,7 +687,8 @@ export default class LinterPlugin extends Plugin { this.currentlyOpeningSidebar = true; await sidebarTab.openFile(file); - this.rulesRunner.runCustomCommands(this.settings.lintCommands, this.app.commands); + + runCustomCommands(this.settings.lintCommands, this.app.commands); if (this.customCommandsCallback) { await this.customCommandsCallback(file); } @@ -700,14 +701,14 @@ export default class LinterPlugin extends Plugin { this.currentlyOpeningSidebar = false; } - private async runCustomCommands(file: TFile, runOptions: RunLinterRulesOptions) { + private async runCustomCommands(file: TFile) { if (!this.settings.lintCommands || this.settings.lintCommands.length == 0) { return; } await this.customCommandsLock.acquire('command', async () => { try { - runCustomCommands(this.settings.lintCommands, this.app.commands, runOptions); + runCustomCommands(this.settings.lintCommands, this.app.commands); } catch (error) { this.handleLintError(file, error, getTextInLanguage('commands.lint-file.error-message') + ' \'{FILE_PATH}\'', false); } diff --git a/src/option.ts b/src/option.ts index c5e01d3d..b5d1cc83 100644 --- a/src/option.ts +++ b/src/option.ts @@ -7,7 +7,6 @@ import {LinterSettings} from './settings-data'; export type SearchOptionInfo = {name: string, description: string, options?: DropdownRecord[]} /** Class representing an option of a rule */ - export abstract class Option { public ruleAlias: string; diff --git a/src/rule-runner copy/file-lint-manager.ts b/src/rule-runner copy/file-lint-manager.ts deleted file mode 100644 index 46bb2c00..00000000 --- a/src/rule-runner copy/file-lint-manager.ts +++ /dev/null @@ -1,128 +0,0 @@ -/** Makes sure that files are linted and that they are handled appropriately in an asynchronous manner. */ - -// @ts-ignore because this is a web worker and it does not play well with Typescript checking -import Worker from './rule-runner.worker'; -import {TFile, Vault} from 'obsidian'; -import {createRunLinterRulesOptions} from '../rules-runner'; -import {LinterSettings} from 'src/rules'; - -/** Callback when a file is resolved. */ -// type FileCallback = (p: any) => void; - -/** Multi-threaded file linter which debounces rapid file requests automatically. */ -export class FileLintManager { - /* Background workers which do the actual file parsing. */ - workers: Worker[]; - /** Tracks which workers are actively parsing a file, to make sure we properly delegate results. */ - busy: boolean[]; - - /** List of files which have been queued for to be linted */ - lintQueue: TFile[]; - /** Fast-access set which holds the list of files queued to be linted; used for debouncing. */ - reloadSet: Set; - /** Paths -> promises for file reloads which have not yet been queued. */ - // callbacks: Map; - - public constructor(public numWorkers: number, public momentLocale: string, private settings: LinterSettings, private vault: Vault) { - this.workers = []; - this.busy = []; - - this.lintQueue = []; - this.reloadSet = new Set(); - // this.callbacks = new Map(); - - for (let index = 0; index < numWorkers; index++) { - // eslint-disable-next-line new-cap - const worker = Worker(); - worker.onmessage = (data: string) => { - console.log(data); - this.busy[index] = false; - }; - // worker.postMessage('first message'); - this.workers.push(worker); - // this.register(() => worker.terminate()); - this.busy.push(false); - } - } - - public lintFile(file: TFile): void { - // const promise: Promise = new Promise((resolve, reject) => { - // if (this.callbacks.has(file.path)) this.callbacks.get(file.path)?.push([resolve, reject]); - // else this.callbacks.set(file.path, [[resolve, reject]]); - // }); - - // Immediately run this task if there are available workers; otherwise, add it to the queue. - const workerId = this.nextAvailableWorker(); - if (workerId !== undefined) { - this.send(file, workerId); - } else { - this.lintQueue.push(file); - } - - // return promise; - } - - /** - * Queue the given file for reloading. Multiple reload requests for the same file in a short time period will be de-bounced - * and all be resolved by a single actual file reload. - */ - // public reload(file: TFile): Promise { - // const promise: Promise = new Promise((resolve, reject) => { - // if (this.callbacks.has(file.path)) this.callbacks.get(file.path)?.push([resolve, reject]); - // else this.callbacks.set(file.path, [[resolve, reject]]); - // }); - - // // De-bounce repeated requests for the same file. - // if (this.reloadSet.has(file.path)) return promise; - // this.reloadSet.add(file.path); - - // // Immediately run this task if there are available workers; otherwise, add it to the queue. - // const workerId = this.nextAvailableWorker(); - // if (workerId !== undefined) { - // this.send(file, workerId); - // } else { - // this.reloadQueue.push(file); - // } - - // return promise; - // } - - /** Finish the parsing of a file, potentially queueing a new file. */ - // private finish(path: string, data: any, index: number) { - // // Cache the callbacks before we do book-keeping. - // const calls = ([] as [FileCallback, FileCallback][]).concat(this.callbacks.get(path) ?? []); - - // // Book-keeping to clear metadata & allow the file to be re-loaded again. - // this.reloadSet.delete(path); - // this.callbacks.delete(path); - - // // Notify the queue this file is available for new work. - // this.busy[index] = false; - - // // Queue a new job onto this worker. - // const job = this.reloadQueue.shift(); - // if (job !== undefined) this.send(job, index); - - // // Resolve promises to let users know this file has finished. - // if ('$error' in data) { - // for (const [_, reject] of calls) reject(data['$error']); - // } else { - // for (const [callback, _] of calls) callback(data); - // } - // } - - // /** Send a new task to the given worker ID. */ - private send(file: TFile, workerId: number) { - this.busy[workerId] = true; - this.vault.cachedRead(file).then((oldText: string) => { - const lintRunnerSettings = createRunLinterRulesOptions(oldText, file, this.momentLocale, this.settings); - this.workers[workerId].postMessage(lintRunnerSettings); - }); - } - - // /** Find the next available, non-busy worker; return undefined if all workers are busy. */ - private nextAvailableWorker(): number | undefined { - const index = this.busy.indexOf(false); - return index == -1 ? undefined : index; - } -} diff --git a/src/rule-runner copy/rule-runner.worker.ts b/src/rule-runner copy/rule-runner.worker.ts deleted file mode 100644 index eacf55b9..00000000 --- a/src/rule-runner copy/rule-runner.worker.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {RulesRunner} from './rules-runner'; - -const ruleRunner = new RulesRunner(); - -onmessage = (e) => { - const originalText = e.data.oldText; - const newText = ruleRunner.lintText(e.data); - postMessage({ - originalText: originalText, - newText: newText, - ruleSettings: e.data, - }); -}; diff --git a/src/rule-runner copy/rules-runner.ts b/src/rule-runner copy/rules-runner.ts deleted file mode 100644 index cfbcb3af..00000000 --- a/src/rule-runner copy/rules-runner.ts +++ /dev/null @@ -1,185 +0,0 @@ -// import {TFile, moment} from 'obsidian'; -import {logDebug, logWarn} from '../logger'; -import {getDisabledRules, LinterSettings, rules, wrapLintError, LintCommand, RuleType} from '../rules'; -import BlockquotifyOnPaste from '../rules/blockquotify-on-paste'; -import EscapeYamlSpecialCharacters from '../rules/escape-yaml-special-characters'; -import ForceYamlEscape from '../rules/force-yaml-escape'; -import FormatTagsInYaml from '../rules/format-tags-in-yaml'; -import PreventDoubleChecklistIndicatorOnPaste from '../rules/prevent-double-checklist-indicator-on-paste'; -import PreventDoubleListItemIndicatorOnPaste from '../rules/prevent-double-list-item-indicator-on-paste'; -import ProperEllipsisOnPaste from '../rules/proper-ellipsis-on-paste'; -import RemoveHyphensOnPaste from '../rules/remove-hyphens-on-paste'; -import RemoveLeadingOrTrailingWhitespaceOnPaste from '../rules/remove-leading-or-trailing-whitespace-on-paste'; -import RemoveLeftoverFootnotesFromQuoteOnPaste from '../rules/remove-leftover-footnotes-from-quote-on-paste'; -import RemoveMultipleBlankLinesOnPaste from '../rules/remove-multiple-blank-lines-on-paste'; -import {RuleBuilderBase} from '../rules/rule-builder'; -// import YamlKeySort from '../rules/yaml-key-sort'; -// import YamlTimestamp from '../rules/yaml-timestamp'; -import {ObsidianCommandInterface} from '../typings/obsidian-ex'; - -export type RunLinterRulesOptions = { - oldText: string, - fileInfo: FileInfo, - settings: LinterSettings, - momentLocale: string, - // getCurrentTime: () => moment.Moment -} - -type FileInfo = { - name: string, - createdAtFormatted: string, - modifiedAtFormatted: string, -} - -export class RulesRunner { - private disabledRules: string[] = []; - - lintText(runOptions: RunLinterRulesOptions): string { - const originalText = runOptions.oldText; - this.disabledRules = getDisabledRules(originalText); - - let newText = this.runBeforeRegularRules(runOptions); - - for (const rule of rules) { - // if you are run prior to or after the regular rules or are a disabled rule, skip running the rule - if (this.disabledRules.includes(rule.alias())) { - logDebug(rule.alias() + ' is disabled'); - continue; - } else if (rule.hasSpecialExecutionOrder || rule.type === RuleType.PASTE) { - continue; - } - - [newText] = RuleBuilderBase.applyIfEnabledBase(rule, newText, runOptions.settings, { - fileCreatedTime: runOptions.fileInfo.createdAtFormatted, - fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, - fileName: runOptions.fileInfo.name, - locale: runOptions.momentLocale, - minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, - aliasArrayStyle: runOptions.settings.commonStyles.aliasArrayStyle, - tagArrayStyle: runOptions.settings.commonStyles.tagArrayStyle, - defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, - }); - } - - runOptions.oldText = newText; - - return this.runAfterRegularRules(originalText, runOptions); - } - - private runBeforeRegularRules(runOptions: RunLinterRulesOptions): string { - let newText = runOptions.oldText; - // remove hashtags from tags before parsing yaml - [newText] = FormatTagsInYaml.applyIfEnabled(newText, runOptions.settings, this.disabledRules); - - // escape YAML where possible before parsing yaml - [newText] = EscapeYamlSpecialCharacters.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, - }); - - return newText; - } - - private runAfterRegularRules(originalText: string, runOptions: RunLinterRulesOptions): string { - let newText = runOptions.oldText; - - [newText] = ForceYamlEscape.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, - }); - - return newText; - } - - // runRulesThatCannotRunInWebWorker(originalText: string, runOptions: RunLinterRulesOptions, getCurrentTime: () => moment.Moment): string { - // let newText = runOptions.oldText; - // let currentTime = getCurrentTime(); - // // run yaml timestamp at the end to help determine if something has changed - // let isYamlTimestampEnabled; - // [newText, isYamlTimestampEnabled] = YamlTimestamp.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - // fileCreatedTime: runOptions.fileInfo.createdAtFormatted, - // fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, - // currentTime: currentTime, - // alreadyModified: originalText != newText, - // locale: runOptions.momentLocale, - // }); - - // const yamlTimestampOptions = YamlTimestamp.getRuleOptions(runOptions.settings); - - // currentTime = getCurrentTime(); - // [newText] = YamlKeySort.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - // currentTimeFormatted: currentTime.format(yamlTimestampOptions.format), - // yamlTimestampDateModifiedEnabled: isYamlTimestampEnabled && yamlTimestampOptions.dateModified, - // dateModifiedKey: yamlTimestampOptions.dateModifiedKey, - // }); - - // return newText; - // } - - runCustomCommands(lintCommands: LintCommand[], commands: ObsidianCommandInterface) { - // execute custom commands after regular rules, but before the timestamp rules - logDebug(`Running Custom Lint Commands`); - const commandsRun = new Set(); - for (const commandInfo of lintCommands) { - if (!commandInfo.id) { - continue; - } else if (commandsRun.has(commandInfo.id)) { - logWarn(`You cannot run the same command ("${commandInfo.name}") as a custom lint rule twice.`); - continue; - } - - try { - commandsRun.add(commandInfo.id); - commands.executeCommandById(commandInfo.id); - } catch (error) { - wrapLintError(error, `Custom Lint Command ${commandInfo.id}`); - } - } - } - - runPasteLint(currentLine: string, runOptions: RunLinterRulesOptions): string { - let newText = runOptions.oldText; - - [newText] = RemoveHyphensOnPaste.applyIfEnabled(newText, runOptions.settings, []); - - [newText] = RemoveMultipleBlankLinesOnPaste.applyIfEnabled(newText, runOptions.settings, []); - - [newText] = RemoveLeftoverFootnotesFromQuoteOnPaste.applyIfEnabled(newText, runOptions.settings, []); - - [newText] = ProperEllipsisOnPaste.applyIfEnabled(newText, runOptions.settings, []); - - [newText] = RemoveLeadingOrTrailingWhitespaceOnPaste.applyIfEnabled(newText, runOptions.settings, []); - - [newText] = PreventDoubleChecklistIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine}); - - [newText] = PreventDoubleListItemIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine}); - - [newText] = BlockquotifyOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine}); - - return newText; - } -} - -// export function createRunLinterRulesOptions(text: string, file: TFile = null, momentLocale: string, settings: LinterSettings): RunLinterRulesOptions { -// const createdAt = file ? moment(file.stat.ctime): moment(); -// createdAt.locale(momentLocale); -// const modifiedAt = file ? moment(file.stat.mtime): moment(); -// modifiedAt.locale(momentLocale); -// const modifiedAtTime = modifiedAt.format(); -// const createdAtTime = createdAt.format(); - -// // const currentTime = moment(); -// // currentTime.locale(momentLocale); - -// return { -// oldText: text, -// fileInfo: { -// name: file ? file.basename: '', -// createdAtFormatted: createdAtTime, -// modifiedAtFormatted: modifiedAtTime, -// }, -// settings: settings, -// momentLocale: momentLocale, -// // getCurrentTime: () => { -// // return undefined; -// // }, -// }; -// } diff --git a/src/rules-runner.ts b/src/rules-runner.ts deleted file mode 100644 index 73b1efaf..00000000 --- a/src/rules-runner.ts +++ /dev/null @@ -1,257 +0,0 @@ -import {TFile, moment} from 'obsidian'; -import {logDebug, logWarn, timingBegin, timingEnd} from './utils/logger'; -import {getDisabledRules, rules, wrapLintError, RuleType} from './rules'; -import BlockquotifyOnPaste from './rules/blockquotify-on-paste'; -import EscapeYamlSpecialCharacters from './rules/escape-yaml-special-characters'; -import ForceYamlEscape from './rules/force-yaml-escape'; -import FormatTagsInYaml from './rules/format-tags-in-yaml'; -import PreventDoubleChecklistIndicatorOnPaste from './rules/prevent-double-checklist-indicator-on-paste'; -import PreventDoubleListItemIndicatorOnPaste from './rules/prevent-double-list-item-indicator-on-paste'; -import ProperEllipsisOnPaste from './rules/proper-ellipsis-on-paste'; -import RemoveHyphensOnPaste from './rules/remove-hyphens-on-paste'; -import RemoveLeadingOrTrailingWhitespaceOnPaste from './rules/remove-leading-or-trailing-whitespace-on-paste'; -import RemoveLeftoverFootnotesFromQuoteOnPaste from './rules/remove-leftover-footnotes-from-quote-on-paste'; -import RemoveMultipleBlankLinesOnPaste from './rules/remove-multiple-blank-lines-on-paste'; -import {RuleBuilderBase} from './rules/rule-builder'; -import YamlKeySort from './rules/yaml-key-sort'; -import YamlTimestamp from './rules/yaml-timestamp'; -import {ObsidianCommandInterface} from './typings/obsidian-ex'; -import {CustomReplace} from './ui/linter-components/custom-replace-option'; -import {LintCommand} from './ui/linter-components/custom-command-option'; -import {convertStringVersionOfEscapeCharactersToEscapeCharacters} from './utils/strings'; -import {getTextInLanguage} from './lang/helpers'; -import CapitalizeHeadings from './rules/capitalize-headings'; -import BlockquoteStyle from './rules/blockquote-style'; -import {IgnoreTypes, ignoreListOfTypes} from './utils/ignore-types'; -import MoveMathBlockIndicatorsToOwnLine from './rules/move-math-block-indicators-to-own-line'; -import {LinterSettings} from './settings-data'; -import TrailingSpaces from './rules/trailing-spaces'; - -export type RunLinterRulesOptions = { - oldText: string, - fileInfo: FileInfo, - settings: LinterSettings, - momentLocale: string, - getCurrentTime: () => moment.Moment -} - -type FileInfo = { - name: string, - createdAtFormatted: string, - modifiedAtFormatted: string, -} - -export class RulesRunner { - private disabledRules: string[] = []; - skipFile: boolean; - - lintText(runOptions: RunLinterRulesOptions): string { - this.skipFile = false; - const originalText = runOptions.oldText; - [this.disabledRules, this.skipFile] = getDisabledRules(originalText); - if (this.skipFile) { - return originalText; - } - - timingBegin(getTextInLanguage('logs.rule-running')); - - const preRuleText = getTextInLanguage('logs.pre-rules'); - timingBegin(preRuleText); - let newText = this.runBeforeRegularRules(runOptions); - timingEnd(preRuleText); - - const disabledRuleText = getTextInLanguage('logs.disabled-text'); - for (const rule of rules) { - // if you are run prior to or after the regular rules or are a disabled rule, skip running the rule - if (this.disabledRules.includes(rule.alias)) { - logDebug(rule.alias + ' ' + disabledRuleText); - continue; - } else if (rule.hasSpecialExecutionOrder || rule.type === RuleType.PASTE) { - continue; - } - - [newText] = RuleBuilderBase.applyIfEnabledBase(rule, newText, runOptions.settings, { - fileCreatedTime: runOptions.fileInfo.createdAtFormatted, - fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, - fileName: runOptions.fileInfo.name, - locale: runOptions.momentLocale, - minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, - aliasArrayStyle: runOptions.settings.commonStyles.aliasArrayStyle, - tagArrayStyle: runOptions.settings.commonStyles.tagArrayStyle, - defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, - removeUnnecessaryEscapeCharsForMultiLineArrays: runOptions.settings.commonStyles.removeUnnecessaryEscapeCharsForMultiLineArrays, - }); - } - - const customRegexLogText = getTextInLanguage('logs.custom-regex'); - timingBegin(customRegexLogText); - newText = this.runCustomRegexReplacement(runOptions.settings.customRegexes, newText); - timingEnd(customRegexLogText); - - runOptions.oldText = newText; - - return this.runAfterRegularRules(originalText, runOptions); - } - - private runBeforeRegularRules(runOptions: RunLinterRulesOptions): string { - let newText = runOptions.oldText; - // remove hashtags from tags before parsing yaml - [newText] = FormatTagsInYaml.applyIfEnabled(newText, runOptions.settings, this.disabledRules); - - // escape YAML where possible before parsing yaml - [newText] = EscapeYamlSpecialCharacters.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, - }); - - [newText] = MoveMathBlockIndicatorsToOwnLine.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - minimumNumberOfDollarSignsToBeAMathBlock: runOptions.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock, - }); - - return newText; - } - - private runAfterRegularRules(originalText: string, runOptions: RunLinterRulesOptions): string { - let newText = runOptions.oldText; - const postRuleLogText = getTextInLanguage('logs.post-rules'); - timingBegin(postRuleLogText); - [newText] = CapitalizeHeadings.applyIfEnabled(newText, runOptions.settings, this.disabledRules); - - [newText] = BlockquoteStyle.applyIfEnabled(newText, runOptions.settings, this.disabledRules); - - [newText] = ForceYamlEscape.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - defaultEscapeCharacter: runOptions.settings.commonStyles.escapeCharacter, - }); - - [newText] = TrailingSpaces.applyIfEnabled(newText, runOptions.settings, this.disabledRules); - - let currentTime = runOptions.getCurrentTime(); - // run YAML timestamp at the end to help determine if something has changed - let isYamlTimestampEnabled; - [newText, isYamlTimestampEnabled] = YamlTimestamp.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - fileCreatedTime: runOptions.fileInfo.createdAtFormatted, - fileModifiedTime: runOptions.fileInfo.modifiedAtFormatted, - currentTime: currentTime, - alreadyModified: originalText != newText, - locale: runOptions.momentLocale, - }); - - const yamlTimestampOptions = YamlTimestamp.getRuleOptions(runOptions.settings); - - currentTime = runOptions.getCurrentTime(); - [newText] = YamlKeySort.applyIfEnabled(newText, runOptions.settings, this.disabledRules, { - currentTimeFormatted: currentTime.format(yamlTimestampOptions.format.trimEnd()), - yamlTimestampDateModifiedEnabled: isYamlTimestampEnabled && yamlTimestampOptions.dateModified, - dateModifiedKey: yamlTimestampOptions.dateModifiedKey, - }); - timingEnd(postRuleLogText); - timingEnd(getTextInLanguage('logs.rule-running')); - return newText; - } - - runCustomCommands(lintCommands: LintCommand[], commands: ObsidianCommandInterface) { - if (this.skipFile) { - return; - } - - logDebug(getTextInLanguage('logs.running-custom-lint-command')); - const commandsRun = new Set(); - for (const commandInfo of lintCommands) { - if (!commandInfo.id) { - continue; - } else if (commandsRun.has(commandInfo.id)) { - logWarn(getTextInLanguage('logs.custom-lint-duplicate-warning').replace('{COMMAND_NAME}', commandInfo.name)); - continue; - } - - try { - commandsRun.add(commandInfo.id); - commands.executeCommandById(commandInfo.id); - } catch (error) { - wrapLintError(error, `${getTextInLanguage('logs.custom-lint-error-message')} ${commandInfo.id}`); - } - } - } - - runCustomRegexReplacement(customRegexes: CustomReplace[], oldText: string): string { - return ignoreListOfTypes([IgnoreTypes.customIgnore], oldText, (text: string) => { - logDebug(getTextInLanguage('logs.running-custom-regex')); - - let newText = text; - let initialText = text; - for (const eachRegex of customRegexes) { - const findIsEmpty = eachRegex.find === undefined || eachRegex.find == '' || eachRegex.find === null; - const replaceIsEmpty = eachRegex.replace === undefined || eachRegex.replace === null; - if (findIsEmpty || replaceIsEmpty) { - continue; - } - - let debugMsg = eachRegex.label; - if (debugMsg && debugMsg.trim() != '') { - debugMsg += ':\n'; - } - debugMsg +=`/${eachRegex.find}/${eachRegex.flags}/${eachRegex.replace}/`; - - logDebug(debugMsg); - const regex = new RegExp(`${eachRegex.find}`, eachRegex.flags); - // make sure that characters are not string escaped unescape in the replace value to make sure things like \n and \t are correctly inserted - newText = newText.replace(regex, convertStringVersionOfEscapeCharactersToEscapeCharacters(eachRegex.replace)); - - if (initialText != newText) { - logDebug(newText); - } - - initialText = newText; - } - - return newText; - }); - } - - runPasteLint(currentLine: string, selectedText: string, runOptions: RunLinterRulesOptions): string { - let newText = runOptions.oldText; - - [newText] = RemoveHyphensOnPaste.applyIfEnabled(newText, runOptions.settings, []); - - [newText] = RemoveMultipleBlankLinesOnPaste.applyIfEnabled(newText, runOptions.settings, []); - - [newText] = RemoveLeftoverFootnotesFromQuoteOnPaste.applyIfEnabled(newText, runOptions.settings, []); - - [newText] = ProperEllipsisOnPaste.applyIfEnabled(newText, runOptions.settings, []); - - [newText] = RemoveLeadingOrTrailingWhitespaceOnPaste.applyIfEnabled(newText, runOptions.settings, []); - - [newText] = PreventDoubleChecklistIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine, selectedText: selectedText}); - - [newText] = PreventDoubleListItemIndicatorOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine, selectedText: selectedText}); - - [newText] = BlockquotifyOnPaste.applyIfEnabled(newText, runOptions.settings, [], {lineContent: currentLine}); - - return newText; - } -} - -export function createRunLinterRulesOptions(text: string, file: TFile = null, momentLocale: string, settings: LinterSettings): RunLinterRulesOptions { - const createdAt = file ? moment(file.stat.ctime): moment(); - createdAt.locale(momentLocale); - const modifiedAt = file ? moment(file.stat.mtime): moment(); - modifiedAt.locale(momentLocale); - const modifiedAtTime = modifiedAt.format(); - const createdAtTime = createdAt.format(); - - return { - oldText: text, - fileInfo: { - name: file ? file.basename: '', - createdAtFormatted: createdAtTime, - modifiedAtFormatted: modifiedAtTime, - }, - settings: settings, - momentLocale: momentLocale, - getCurrentTime: () => { - const currentTime = moment(); - currentTime.locale(momentLocale); - - return currentTime; - }, - }; -} diff --git a/src/rules-runner/file-lint-manager.ts b/src/rules-runner/file-lint-manager.ts index 30a63e7d..8a42812b 100644 --- a/src/rules-runner/file-lint-manager.ts +++ b/src/rules-runner/file-lint-manager.ts @@ -11,18 +11,19 @@ import {LinterWorker, RunLinterRulesOptions} from '../typings/worker'; import YamlTimestamp from '../rules/yaml-timestamp'; import YamlKeySort from '../rules/yaml-key-sort'; import {setLogs} from '../utils/logger'; +import {stripCr} from '../utils/strings'; /** Callback when a file is resolved. */ type FileCallback = (runOptions: RunLinterRulesOptions) => void; /** Multi-threaded file linter which debounces rapid file requests automatically. */ export class FileLintManager { - /* Background workers which do the actual file parsing. */ + /* Background workers which do the actual file linting. */ workers: LinterWorker[]; - /** Tracks which workers are actively parsing a file, to make sure we properly delegate results. */ + /** Tracks which workers are actively linting a file, to make sure we properly delegate results. */ busy: boolean[]; - /** List of files which have been queued for to be linted */ + /** List of files which have been queued to be linted */ lintQueue: TFile[]; /** Paths -> callback function to run once file linting has finished running rules. * Note: this does not mean that the logic for running custom commands has run. @@ -39,8 +40,8 @@ export class FileLintManager { for (let index = 0; index < numWorkers; index++) { // eslint-disable-next-line new-cap const worker = Worker(); - worker.onmessage = (resp: any) => { - this.finish(resp.data as RunLinterRulesOptions, index); + worker.onmessage = async (resp: any) => { + await this.finish(resp.data as RunLinterRulesOptions, index); }; this.workers.push(worker); @@ -75,7 +76,7 @@ export class FileLintManager { // Finish the parsing of a file, potentially queueing a new file. - private finish(data: RunLinterRulesOptions, index: number) { + private async finish(data: RunLinterRulesOptions, index: number) { // Notify the queue this file is available for new work. this.busy[index] = false; @@ -118,7 +119,7 @@ export class FileLintManager { const callback = this.callbacks.get(data.fileInfo.path); this.callbacks.delete(data.fileInfo.path); data.newText = newText; - callback(data); + await callback(data); // TODO: see about hashing the file contents here if possible, but custom commands may make this not viable // likely needs to be called at the end of run custom commands since that waits until the cache is ready after @@ -129,8 +130,8 @@ export class FileLintManager { // /** Send a new task to the given worker ID. */ private send(file: TFile, workerId: number) { this.busy[workerId] = true; - this.vault.cachedRead(file).then((oldText: string) => { - const lintRunnerSettings = createRunLinterRulesOptions(oldText, file, this.momentLocale, this.settings); + this.vault.read(file).then((oldText: string) => { + const lintRunnerSettings = createRunLinterRulesOptions(stripCr(oldText), file, this.momentLocale, this.settings); this.workers[workerId].postMessage(lintRunnerSettings); }); } diff --git a/src/rules-runner/rules-runner.ts b/src/rules-runner/rules-runner.ts index 623aab20..ae8f20c9 100644 --- a/src/rules-runner/rules-runner.ts +++ b/src/rules-runner/rules-runner.ts @@ -27,7 +27,7 @@ import {RunLinterRulesOptions, TFile} from '../typings/worker'; import TrailingSpaces from '../rules/trailing-spaces'; /** - * Lints the text provided in @runOptions. + * Lints the text provided in runOptions. * @param {RunLinterRulesOptions} runOptions the different options provided when linting text * @return {string} the text after all of the updates have been made. */ @@ -126,11 +126,7 @@ function runCustomRegexReplacement(customRegexes: CustomReplace[], oldText: stri }); } -export function runCustomCommands(lintCommands: LintCommand[], commands: ObsidianCommandInterface, runOptions: RunLinterRulesOptions) { - if (runOptions.skipFile) { - return; - } - +export function runCustomCommands(lintCommands: LintCommand[], commands: ObsidianCommandInterface) { logDebug(getTextInLanguage('logs.running-custom-lint-command')); const commandsRun = new Set(); for (const commandInfo of lintCommands) { diff --git a/src/typings/worker.ts b/src/typings/worker.ts index dacff4ef..3045bad2 100644 --- a/src/typings/worker.ts +++ b/src/typings/worker.ts @@ -35,33 +35,16 @@ export interface TFile { path: string; } -export type WorkerArgs = { - oldText: string, - fileInfo: FileInfo, - settings: LinterSettings, - skipFile: boolean, - disabledRules: string[], -} - export type WorkerMessage = { data: RunLinterRulesOptions, } -export type WorkerResponse = { - oldText: string, - newText: string, - fileInfo: FileInfo, - settings: LinterSettings, - skipFile: boolean, - disabledRules: string[], -} - export type WorkerResponseMessage = { data: RunLinterRulesOptions, } export interface LinterWorker { - postMessage: (data: WorkerArgs) => void; + postMessage: (data: RunLinterRulesOptions) => void; onmessage: (data: WorkerResponseMessage) => void; terminate: () => void; } From da3c8380b2ea007c9c7640ad0aa3ba94123435bf Mon Sep 17 00:00:00 2001 From: Peter Kaufman Date: Wed, 21 Aug 2024 19:23:34 -0400 Subject: [PATCH 10/10] added a fix for yaml timestamp always running --- src/rules-runner/file-lint-manager.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rules-runner/file-lint-manager.ts b/src/rules-runner/file-lint-manager.ts index 8a42812b..d0639ed6 100644 --- a/src/rules-runner/file-lint-manager.ts +++ b/src/rules-runner/file-lint-manager.ts @@ -101,12 +101,11 @@ export class FileLintManager { fileCreatedTime: data.fileInfo.createdAtFormatted, fileModifiedTime: data.fileInfo.modifiedAtFormatted, currentTime: currentTime, - alreadyModified: data.oldText != newText, + alreadyModified: data.oldText != data.newText, locale: data.momentLocale, }); const yamlTimestampOptions = YamlTimestamp.getRuleOptions(data.settings); - currentTime = moment(); currentTime.locale(data.momentLocale); [newText] = YamlKeySort.applyIfEnabled(newText, data.settings, data.disabledRules, {