diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index 1c4e838..ce6fd7a 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -47,6 +47,7 @@ jobs: pull-request-header: "Update version in CHANGELOG.md and package.json" default-branch: develop labels: automerge + last-release-sha: "59b7861318647436eced27dcfc98c2078da7d7ab" - name: Print release outputs env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b3857a..65eeb5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,28 +1,37 @@ # Changelog -## [3.0.0](https://github.com/soberhacker/obsidian-telegram-sync/compare/3.0.0...3.0.0) (2024-01-08) +## [3.1.0](https://github.com/soberhacker/obsidian-telegram-sync/compare/3.0.0...3.1.0) (2024-09-25) -### Bug Fixes +### Features -* empty css ([2cb867f](https://github.com/soberhacker/obsidian-telegram-sync/commit/2cb867fbacefca3cd759d7849b95df5ccb0efd5e)) +* appending new messages under a note heading ([0b08384](https://github.com/soberhacker/obsidian-telegram-sync/commit/0b0838481bde3b68e4d92f8e7fc923bf96d69e82)) +* getting to the channel from settings ([3644661](https://github.com/soberhacker/obsidian-telegram-sync/commit/364466152999872de496b6b73d4297385653d7b0)) +* ignore formatting (bold, italic, underline) in the notes names ([26c584d](https://github.com/soberhacker/obsidian-telegram-sync/commit/26c584da2c583e67d55c97b9149fa087abc3d243)) +* mark message as processed by bot reaction ([3cd40f4](https://github.com/soberhacker/obsidian-telegram-sync/commit/3cd40f43963cf60bac2d187e3108b34822522311)) +* process old messages after sleep or lack of internet ([6b1b3c4](https://github.com/soberhacker/obsidian-telegram-sync/commit/6b1b3c4b4c3e3f1eaa94a2857bff7fae91d9198d)) +* telegram channel is free ([f73cf0f](https://github.com/soberhacker/obsidian-telegram-sync/commit/f73cf0fba65fe17c82e942901d3ed10a751025b4)) -### Miscellaneous Chores +### Bug Fixes -* release 3.0.0 ([bcdc23b](https://github.com/soberhacker/obsidian-telegram-sync/commit/bcdc23b29bc38c3eb36745c96ff73a2d02963a91)) +* "Bytes or str expected, not Buffer" error on authorizing the user ([cb065ed](https://github.com/soberhacker/obsidian-telegram-sync/commit/cb065ed43264b863e790cf409a6c98b0b1a7dea5)) +* connecting user issues ([b012b59](https://github.com/soberhacker/obsidian-telegram-sync/commit/b012b5989ab0eab99dfaaa3714f399b08b266eeb)) +* duplicate notes with emojis in names in Windows 10 ([365d4ef](https://github.com/soberhacker/obsidian-telegram-sync/commit/365d4efd1d434196d355a72835f58ac783245d89)) +* markdown formatting of messages with attachments ([e164e0a](https://github.com/soberhacker/obsidian-telegram-sync/commit/e164e0ac239337273e2f093d3d8e8bd174cbfcbb)) +* missing first letter of logged message ([be50838](https://github.com/soberhacker/obsidian-telegram-sync/commit/be50838df4d5ee263e8c0031a957bcd467e306aa)) +* not processing edited messages ([71a63bb](https://github.com/soberhacker/obsidian-telegram-sync/commit/71a63bb84f09891ac8619d7513ac1586d27bf748)) +* partially deleting of media groups ([9b52c40](https://github.com/soberhacker/obsidian-telegram-sync/commit/9b52c4054c036f282c8e5dfe82e7de31ca30b165)) ## [3.0.0](https://github.com/soberhacker/obsidian-telegram-sync/compare/3.0.0...3.0.0) (2024-01-08) - ### Bug Fixes -* empty css ([2cb867f](https://github.com/soberhacker/obsidian-telegram-sync/commit/2cb867fbacefca3cd759d7849b95df5ccb0efd5e)) - +- empty css ([2cb867f](https://github.com/soberhacker/obsidian-telegram-sync/commit/2cb867fbacefca3cd759d7849b95df5ccb0efd5e)) ### Miscellaneous Chores -* release 3.0.0 ([bcdc23b](https://github.com/soberhacker/obsidian-telegram-sync/commit/bcdc23b29bc38c3eb36745c96ff73a2d02963a91)) +- release 3.0.0 ([bcdc23b](https://github.com/soberhacker/obsidian-telegram-sync/commit/bcdc23b29bc38c3eb36745c96ff73a2d02963a91)) ## [2.2.0](https://github.com/soberhacker/obsidian-telegram-sync/compare/2.1.0...2.2.0) (2023-10-18) diff --git a/README.md b/README.md index 4875233..727bc2b 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@   -  +  -  + 

diff --git a/docs/Authorized User Features.md b/docs/Authorized User Features.md index 78c9b23..bcee7c8 100644 --- a/docs/Authorized User Features.md +++ b/docs/Authorized User Features.md @@ -8,8 +8,10 @@ ##### All Telegram User +✅ available to download files more than 50MB (telegram bot limit)
✅ reacting with "👍" instead of replying for marking messages as processed
✅ easy installing the latest published beta versions
✅ processing messages older than 24 hours if Obsidian wasn't running
+✅ sending notes from Obsidian to Telegram
❌ getting messages from other bots in connected group chats (_not implemented_)
❌ automatically identifying renamed topic without using command /topicName (_not implemented_)
diff --git a/docs/Telegram Sync Insider Features.md b/docs/Telegram Sync Insider Features.md index f44fa4c..4b92eed 100644 --- a/docs/Telegram Sync Insider Features.md +++ b/docs/Telegram Sync Insider Features.md @@ -1,9 +1,12 @@ #### Telegram Sync Insider Features ✅ complete list of new features
+✅ vote for the next features to be developed
+✅ processing messages older than 24 hours if Obsidian wasn't running
✅ easy installing the latest published beta versions
✅ plugin updates in the channel instead of informational messages in your bot
✅ processing messages older than 24 hours if Obsidian wasn't running
+❌ sending notes from Telegram to Obsidian (_not implemented_)
❌ getting messages from other bots in connected group chats (_not implemented_)
❌ posting messages in selected chats (_not implemented_)
diff --git a/docs/Template Variables List.md b/docs/Template Variables List.md index 446acda..09e719c 100644 --- a/docs/Template Variables List.md +++ b/docs/Template Variables List.md @@ -113,7 +113,7 @@ myNotes/{{messageDate:YYYY/MM/DD}}/{{messageTime:HHmmssSSS}}.md ```json ⚠️ If a note path template is empty, then notes will not be created -⚠️ If a note with such name exists then new data will be always appended to this notes +⚠️ If a note with such name exists then new data will be always appended to this note ``` ### File Path Variables diff --git a/package-lock.json b/package-lock.json index 443471a..c1bb533 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "obsidian-telegram-sync", - "version": "3.0.0", + "version": "3.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "obsidian-telegram-sync", - "version": "3.0.0", + "version": "3.1.0", "license": "GNU Affero General Public License v3.0", "dependencies": { "@popperjs/core": "^2.11.7", @@ -15,16 +15,15 @@ "linkify-it": "^4.0.1", "mime-types": "^2.1.35", "node-machine-id": "^1.1.12", - "node-telegram-bot-api": "^0.64.0", + "node-telegram-bot-api": "^0.66.0", "qrcode": "^1.5.3", - "telegram": "2.16.4" + "telegram": "^2.25.11" }, "devDependencies": { "@types/async": "^3.2.18", "@types/linkify-it": "^3.0.2", "@types/mime-types": "^2.1.1", "@types/node": "^16.11.6", - "@types/node-telegram-bot-api": "^0.63.3", "@typescript-eslint/eslint-plugin": "5.29.0", "@typescript-eslint/parser": "5.29.0", "builtin-modules": "3.3.0", @@ -34,7 +33,7 @@ "eslint-plugin-prettier": "latest", "obsidian": "latest", "prettier": "latest", - "release-please": "^16.3.0", + "release-please": "^16.14.0", "tslib": "2.4.0", "typescript": "4.7.4" } @@ -261,9 +260,10 @@ "integrity": "sha512-PcYz4FDGblO6tM2kSC+VzhhK62vml6k6/YAkiWtyPvrgJVfnDRoHGDtKn5UiaRRUrvUTTocBpvc2rRgTCqxjsg==" }, "node_modules/@cypress/request": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", - "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.5.tgz", + "integrity": "sha512-v+XHd9XmWbufxF1/bTaVm2yhbxY+TB4YtWRqF2zaXBlDNMkls34KiATz0AVDLavL3iB6bQk9/7n3oY1EoLSWGA==", + "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -271,14 +271,14 @@ "combined-stream": "~1.0.6", "extend": "~3.0.2", "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "http-signature": "~1.3.6", + "form-data": "~4.0.0", + "http-signature": "~1.4.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "6.10.4", + "qs": "6.13.0", "safe-buffer": "^5.1.2", "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", @@ -292,6 +292,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/@cypress/request-promise/-/request-promise-5.0.0.tgz", "integrity": "sha512-eKdYVpa9cBEw2kTBlHeu1PP16Blwtum6QHg/u9s/MoHkZfuo1pRGka1VlUHXF5kdew82BvOJVVGk0x8X0nbp+w==", + "license": "ISC", "dependencies": { "bluebird": "^3.5.0", "request-promise-core": "1.1.3", @@ -305,19 +306,6 @@ "@cypress/request": "^3.0.0" } }, - "node_modules/@cypress/request/node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, "node_modules/@esbuild/android-arm": { "version": "0.17.3", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.3.tgz", @@ -727,17 +715,18 @@ } }, "node_modules/@google-automations/git-file-utils": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@google-automations/git-file-utils/-/git-file-utils-1.2.6.tgz", - "integrity": "sha512-wNWeNLBtQH39kTayGuJMF1IRVPxfcywH//thQHD+xzRlanTNDI/5WACUvBkIz9bhnEC7ADm5ibA+DX9meU+JwQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@google-automations/git-file-utils/-/git-file-utils-2.0.0.tgz", + "integrity": "sha512-F6h8npq7rt60fr3W+cil/zXbIiF9Hj8JzaN3LNh7uBIJpsWnjL9ObV84qW/345boMheDdo/n+cItmvCfsn0lLA==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@octokit/rest": "^19.0.7", "@octokit/types": "^9.0.0", "minimatch": "^5.1.0" }, "engines": { - "node": ">= 14" + "node": ">= 18" } }, "node_modules/@google-automations/git-file-utils/node_modules/brace-expansion": { @@ -745,6 +734,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -754,6 +744,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1047,12 +1038,6 @@ "integrity": "sha512-8iHVLHsCCOBKjCF2KwFe0p9Z3rfM9mL+sSP8btyR5vTjJRAqpBYD28/ZLgXPf0pjG1VxOvtCV/BgXkQbpSe8Hw==", "dev": true }, - "node_modules/@types/caseless": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", - "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==", - "dev": true - }, "node_modules/@types/codemirror": { "version": "5.60.8", "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.8.tgz", @@ -1097,16 +1082,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.64.tgz", "integrity": "sha512-TiY2gIDob8+QOPIcVpS0ZY+H1DVTfplBW6UgL2b4gOYbigIlKVIh6Lcv+7YDUciUTqhVLG91PrZBXW10IoBhtw==" }, - "node_modules/@types/node-telegram-bot-api": { - "version": "0.63.3", - "resolved": "https://registry.npmjs.org/@types/node-telegram-bot-api/-/node-telegram-bot-api-0.63.3.tgz", - "integrity": "sha512-K0uo0em5IBqMqUrQ8l6bFgvlrFCyd6FLjVmn9xux7R/71kMDrNutCp8nd1WSaNp2D782JWcf0dbiS5iJofzOTw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/request": "*" - } - }, "node_modules/@types/normalize-package-data": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", @@ -1127,18 +1102,6 @@ "@types/node": "*" } }, - "node_modules/@types/request": { - "version": "2.48.12", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz", - "integrity": "sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==", - "dev": true, - "dependencies": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.0" - } - }, "node_modules/@types/tern": { "version": "0.23.9", "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz", @@ -1148,12 +1111,6 @@ "@types/estree": "*" } }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "dev": true - }, "node_modules/@types/unist": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", @@ -1451,12 +1408,16 @@ "dev": true }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1478,27 +1439,31 @@ } }, "node_modules/array.prototype.findindex": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/array.prototype.findindex/-/array.prototype.findindex-2.2.2.tgz", - "integrity": "sha512-fnTMT+Xq/VloVDsroPW9JLL1M5UxNTVfoNxU4KeyDcH5C/Jmjikf5+KDH5207wWMC8MBlSOn7kZkkys8XnqWNg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findindex/-/array.prototype.findindex-2.2.3.tgz", + "integrity": "sha512-Saz3pStJ2X5bg27GTWWLyhJrcwbMVLsnbho2zUVQFW2Pgrh0mSKKvAeZr6BPww7E1AygK33cX7w0W1YERC1RHA==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -1521,6 +1486,7 @@ "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } @@ -1529,6 +1495,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "license": "MIT", "engines": { "node": ">=0.8" } @@ -1553,12 +1520,17 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -1570,14 +1542,16 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "license": "MIT" }, "node_modules/balanced-match": { "version": "1.0.2", @@ -1608,6 +1582,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } @@ -1630,6 +1605,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "license": "MIT", "dependencies": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" @@ -1638,7 +1614,8 @@ "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "license": "MIT" }, "node_modules/boolbase": { "version": "1.0.0", @@ -1743,13 +1720,19 @@ } }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "license": "MIT", "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1792,7 +1775,8 @@ "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "license": "Apache-2.0" }, "node_modules/chalk": { "version": "4.1.2", @@ -1916,6 +1900,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1993,7 +1978,8 @@ "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -2050,6 +2036,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" }, @@ -2057,6 +2044,57 @@ "node": ">=0.10" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -2157,16 +2195,20 @@ } }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-lazy-prop": { @@ -2185,6 +2227,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "license": "MIT", "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -2201,6 +2244,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -2328,6 +2372,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "license": "MIT", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -2347,6 +2392,7 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "license": "MIT", "dependencies": { "once": "^1.4.0" } @@ -2373,49 +2419,57 @@ } }, "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -2424,14 +2478,48 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -2441,6 +2529,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "license": "MIT", "dependencies": { "hasown": "^2.0.0" } @@ -2449,6 +2538,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "license": "MIT", "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -2904,7 +2994,8 @@ "node_modules/eventemitter3": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "license": "MIT" }, "node_modules/execa": { "version": "7.2.0", @@ -2945,7 +3036,8 @@ "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" }, "node_modules/extsprintf": { "version": "1.3.0", @@ -2953,7 +3045,8 @@ "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "engines": [ "node >=0.6.0" - ] + ], + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -3054,6 +3147,7 @@ "version": "3.9.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3110,6 +3204,7 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "license": "MIT", "dependencies": { "is-callable": "^1.1.3" } @@ -3118,22 +3213,23 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", "mime-types": "^2.1.12" }, "engines": { - "node": ">= 0.12" + "node": ">= 6" } }, "node_modules/fs.realpath": { @@ -3154,6 +3250,7 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -3177,6 +3274,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3190,15 +3288,20 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "license": "MIT", "dependencies": { + "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3216,12 +3319,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -3234,6 +3339,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" } @@ -3286,11 +3392,13 @@ } }, "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "license": "MIT", "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -3323,6 +3431,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -3366,6 +3475,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "license": "ISC", "peer": true, "engines": { "node": ">=4" @@ -3376,6 +3486,7 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "deprecated": "this library is no longer supported", + "license": "MIT", "peer": true, "dependencies": { "ajv": "^6.12.3", @@ -3398,6 +3509,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3412,20 +3524,22 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3437,6 +3551,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3445,11 +3560,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -3459,9 +3575,10 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -3570,13 +3687,14 @@ } }, "node_modules/http-signature": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", - "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", + "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", - "sshpk": "^1.14.1" + "sshpk": "^1.18.0" }, "engines": { "node": ">=0.10" @@ -3681,11 +3799,12 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.2", + "es-errors": "^1.3.0", "hasown": "^2.0.0", "side-channel": "^1.0.4" }, @@ -3699,13 +3818,16 @@ "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3721,6 +3843,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "license": "MIT", "dependencies": { "has-bigints": "^1.0.1" }, @@ -3732,6 +3855,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -3747,6 +3871,7 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3766,10 +3891,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "license": "MIT", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -3843,9 +3984,10 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3866,6 +4008,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -3916,6 +4059,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -3928,11 +4072,15 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3954,6 +4102,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -3968,6 +4117,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "license": "MIT", "dependencies": { "has-symbols": "^1.0.2" }, @@ -3979,11 +4129,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -4001,6 +4152,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "license": "MIT", "dependencies": { "call-bind": "^1.0.2" }, @@ -4038,7 +4190,8 @@ "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", @@ -4049,7 +4202,8 @@ "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "license": "MIT" }, "node_modules/js-tokens": { "version": "4.0.0", @@ -4072,7 +4226,8 @@ "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "license": "MIT" }, "node_modules/json-buffer": { "version": "3.0.1", @@ -4089,7 +4244,8 @@ "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -4125,6 +4281,7 @@ "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -4195,7 +4352,8 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" }, "node_modules/lodash.ismatch": { "version": "4.4.0", @@ -4302,6 +4460,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -4481,9 +4640,10 @@ "integrity": "sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ==" }, "node_modules/node-telegram-bot-api": { - "version": "0.64.0", - "resolved": "https://registry.npmjs.org/node-telegram-bot-api/-/node-telegram-bot-api-0.64.0.tgz", - "integrity": "sha512-/gxCuaEDUyWMBiHInP0ufopUkaaKprXiv3lyP9MMZdPy2KPfYKNYNKfd1Ph7o9KhfURDtOYowPZCi4UCr+2caw==", + "version": "0.66.0", + "resolved": "https://registry.npmjs.org/node-telegram-bot-api/-/node-telegram-bot-api-0.66.0.tgz", + "integrity": "sha512-s4Hrg5q+VPl4/tJVG++pImxF6eb8tNJNj4KnDqAOKL6zGU34lo9RXmyAN158njwGN+v8hdNf8s9fWIYW9hPb5A==", + "license": "MIT", "dependencies": { "@cypress/request": "^3.0.1", "@cypress/request-promise": "^5.0.0", @@ -4503,6 +4663,7 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "license": "MIT", "dependencies": { "ms": "^2.1.1" } @@ -4565,15 +4726,20 @@ "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "license": "Apache-2.0", "peer": true, "engines": { "node": "*" } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4582,17 +4748,19 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -4809,7 +4977,8 @@ "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "license": "MIT" }, "node_modules/picocolors": { "version": "1.0.0", @@ -4837,6 +5006,15 @@ "node": ">=10.13.0" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4876,17 +5054,20 @@ "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "license": "MIT" }, "node_modules/pump": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -4918,11 +5099,12 @@ } }, "node_modules/qs": { - "version": "6.10.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", - "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -4934,7 +5116,8 @@ "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "license": "MIT" }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -5098,6 +5281,7 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -5111,7 +5295,8 @@ "node_modules/readable-stream/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" }, "node_modules/real-cancellable-promise": { "version": "1.2.0", @@ -5132,13 +5317,15 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -5160,13 +5347,14 @@ } }, "node_modules/release-please": { - "version": "16.3.0", - "resolved": "https://registry.npmjs.org/release-please/-/release-please-16.3.0.tgz", - "integrity": "sha512-I2sPd5Lz7EGciaDVPzKLn7whlGKE15rW26MzlSjdcpGobQQOD53mamrF4/gSNcwOg0uj4uJ3Ju88ChFXdId83w==", + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/release-please/-/release-please-16.14.0.tgz", + "integrity": "sha512-INuaHSY3+fYmJQm530Vw+QGaW4XzQTYw9zDg0trcap5DAVG7yJvyZGTWk1cex9haI1/o2i5vp06qKxq9W+5gFg==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@conventional-commits/parser": "^0.4.1", - "@google-automations/git-file-utils": "^1.2.5", + "@google-automations/git-file-utils": "^2.0.0", "@iarna/toml": "^3.0.0", "@octokit/graphql": "^5.0.0", "@octokit/request": "^6.0.0", @@ -5180,7 +5368,7 @@ "conventional-changelog-writer": "^6.0.0", "conventional-commits-filter": "^3.0.0", "detect-indent": "^6.1.0", - "diff": "^5.0.0", + "diff": "^7.0.0", "figures": "^3.0.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", @@ -5193,7 +5381,7 @@ "typescript": "^4.6.4", "unist-util-visit": "^2.0.3", "unist-util-visit-parents": "^3.1.1", - "xpath": "^0.0.32", + "xpath": "^0.0.34", "yaml": "^2.2.2", "yargs": "^17.0.0" }, @@ -5218,6 +5406,16 @@ "node": ">=12" } }, + "node_modules/release-please/node_modules/diff": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/release-please/node_modules/type-fest": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", @@ -5288,6 +5486,7 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "license": "Apache-2.0", "peer": true, "dependencies": { "aws-sign2": "~0.7.0", @@ -5319,6 +5518,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==", + "license": "ISC", "dependencies": { "lodash": "^4.17.15" }, @@ -5333,6 +5533,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "license": "MIT", "peer": true, "dependencies": { "asynckit": "^0.4.0", @@ -5347,6 +5548,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "license": "MIT", "peer": true, "dependencies": { "assert-plus": "^1.0.0", @@ -5362,6 +5564,7 @@ "version": "1.4.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "license": "MIT", "peer": true, "dependencies": { "assert-plus": "1.0.0", @@ -5377,6 +5580,7 @@ "version": "6.5.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "license": "BSD-3-Clause", "peer": true, "engines": { "node": ">=0.6" @@ -5386,6 +5590,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "license": "BSD-3-Clause", "peer": true, "dependencies": { "psl": "^1.1.28", @@ -5400,6 +5605,7 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "license": "MIT", "peer": true, "bin": { "uuid": "bin/uuid" @@ -5421,7 +5627,8 @@ "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "license": "MIT" }, "node_modules/resolve": { "version": "1.22.8", @@ -5611,12 +5818,13 @@ } }, "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -5630,7 +5838,8 @@ "node_modules/safe-array-concat/node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" }, "node_modules/safe-buffer": { "version": "5.2.1", @@ -5649,17 +5858,22 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5667,7 +5881,8 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, "node_modules/semver": { "version": "7.5.4", @@ -5690,27 +5905,32 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "license": "MIT", "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -5738,13 +5958,18 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5852,6 +6077,7 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "license": "MIT", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -5885,6 +6111,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", + "license": "ISC", "engines": { "node": ">=0.10.0" } @@ -5898,6 +6125,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } @@ -5905,7 +6133,8 @@ "node_modules/string_decoder/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" }, "node_modules/string-width": { "version": "4.2.3", @@ -5921,13 +6150,15 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -5937,26 +6168,31 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6063,9 +6299,10 @@ "dev": true }, "node_modules/telegram": { - "version": "2.16.4", - "resolved": "https://registry.npmjs.org/telegram/-/telegram-2.16.4.tgz", - "integrity": "sha512-UgMXqabJo7v8kdRZm08M5bcTDaJ2JLtd65fzUFkarkeVgdZdgpovb+B8+WYgxmxTj13o+FKrQOYXNu6yNC8QSQ==", + "version": "2.25.11", + "resolved": "https://registry.npmjs.org/telegram/-/telegram-2.25.11.tgz", + "integrity": "sha512-OgkbBZNooaPbO8TG7+qhhjCoUhRfvsnU+6Tx9+8v07mkcNNcR+2CQ0TiHz3TF4oAmZUf+x418WREDOqbuNlZ6w==", + "license": "MIT", "dependencies": { "@cryptography/aes": "^0.1.1", "async-mutex": "^0.3.0", @@ -6135,9 +6372,10 @@ } }, "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -6201,6 +6439,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -6211,7 +6450,8 @@ "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "license": "Unlicense" }, "node_modules/type": { "version": "1.2.0", @@ -6243,27 +6483,30 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -6273,15 +6516,17 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -6291,13 +6536,20 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6346,6 +6598,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -6411,6 +6664,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "license": "MIT", "engines": { "node": ">= 4.0.0" } @@ -6436,6 +6690,7 @@ "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "license": "MIT", "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -6456,12 +6711,14 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -6483,6 +6740,7 @@ "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -6492,7 +6750,8 @@ "node_modules/verror/node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "license": "MIT" }, "node_modules/w3c-keyname": { "version": "2.2.8", @@ -6565,6 +6824,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "license": "MIT", "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -6582,15 +6842,16 @@ "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" }, "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6643,10 +6904,11 @@ } }, "node_modules/xpath": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", - "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==", + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.34.tgz", + "integrity": "sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.6.0" } diff --git a/package.json b/package.json index 8a5377b..0645f1a 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "@types/linkify-it": "^3.0.2", "@types/mime-types": "^2.1.1", "@types/node": "^16.11.6", - "@types/node-telegram-bot-api": "^0.63.3", "@typescript-eslint/eslint-plugin": "5.29.0", "@typescript-eslint/parser": "5.29.0", "builtin-modules": "3.3.0", @@ -36,7 +35,7 @@ "eslint-plugin-prettier": "latest", "obsidian": "latest", "prettier": "latest", - "release-please": "^16.3.0", + "release-please": "^16.14.0", "tslib": "2.4.0", "typescript": "4.7.4" }, @@ -47,8 +46,8 @@ "linkify-it": "^4.0.1", "mime-types": "^2.1.35", "node-machine-id": "^1.1.12", - "node-telegram-bot-api": "^0.64.0", + "node-telegram-bot-api": "^0.66.0", "qrcode": "^1.5.3", - "telegram": "2.16.4" + "telegram": "^2.25.11" } } diff --git a/release-notes.mjs b/release-notes.mjs index 0cf3601..fe42140 100644 --- a/release-notes.mjs +++ b/release-notes.mjs @@ -1,21 +1,27 @@ // TODO translating messages -// TODO notify in setting that new beta version is ready for installing +// TODO notify in setting tab and bottom panel that new beta version is ready for installing // TODO add messagesLeftCnt displaying in status bar +// TODO NEXT: sending notes from Obsidian to Telegram +// TODO MED: "delete messages from Telegram" settings for each distribution rules +// TODO NEXT: save files if no template file +// TODO NEXT: check reconnecting +// TODO NEXT: bur in reconnecting on MacBook https://t.me/sm1rnov_id import { compareVersions } from "compare-versions"; -export const releaseVersion = "3.1.0"; +export const releaseVersion = "3.2.0"; export const showNewFeatures = true; -export let showBreakingChanges = false; +export let showBreakingChanges = true; -const newFeatures = - "This release adds the possibility to append new messages either above or below a specified note heading."; -export const breakingChanges = `⚠️ In this release, approximately 30 files have been changed. Although this version has gone through beta testing, please pay close attention during the initial runs of the plugin with the old message processing feature enabled. ⚠️`; -export const telegramChannelLink = "https://t.me/tribute/app?startapp=s1uX"; +const newFeatures = `In this release, the main change is that all processed messages will be marked with the bot reaction [👾] instead of replying with a separate message [...✅...].`; +export const breakingChanges = `⚠️ Breaking changes!\n\nThe user's connection to the plugin may need to be reestablished due to the GramJs library update.\n\nGrant your bot admin rights if you want to use bot reactions in groups and channels. ⚠️`; +export const telegramChannelLink = "https://t.me/obsidian_telegram_sync"; +export const insiderFeaturesLink = + "https://github.com/soberhacker/obsidian-telegram-sync/blob/main/docs/Telegram%20Sync%20Insider%20Features.md"; const telegramChannelAHref = `channel`; -const telegramChannelIntroduction = `Subscribe to the plugin's ${telegramChannelAHref} to not only silence these informational messages in your bot, but also to be the first to get all the latest updates (paid access via the @tribute bot).`; -const telegramChatLink = "chat"; -const telegramChatIntroduction = `For discussions, please feel free to join the plugin's ${telegramChatLink}.`; -const donation = - "If you appreciate this plugin and would like to support its continued development, please consider donating through the buttons below!"; +const insiderFeaturesAHref = `insider features`; +const telegramChannelIntroduction = `Subscribe for free to the plugin's ${telegramChannelAHref} and enjoy access to ${insiderFeaturesAHref} and the latest beta versions, several months ahead of public release.`; +const telegramChatLink = "chat"; +const telegramChatIntroduction = `Join the plugin's ${telegramChatLink} - your space to seek advice, ask questions, and share knowledge (access via the @tribute bot).`; +const donation = `If you appreciate this plugin and would like to support its continued development, please consider donating through the buttons below or via Telegram Stars in the ${telegramChannelAHref}!`; const bestRegards = "Best regards,\nYour soberhacker🍃🧘💻\n⌞"; export const privacyPolicyLink = "https://github.com/soberhacker/obsidian-telegram-sync/blob/main/PRIVACY-POLICY.md"; diff --git a/src/main.ts b/src/main.ts index b8da75a..fb754ab 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,7 +2,17 @@ import { Plugin } from "obsidian"; import { DEFAULT_SETTINGS, TelegramSyncSettings, TelegramSyncSettingTab } from "./settings/Settings"; import TelegramBot from "node-telegram-bot-api"; import { machineIdSync } from "node-machine-id"; -import { _15sec, _2min, displayAndLog, StatusMessages, displayAndLogError, hideMTProtoAlerts } from "./utils/logUtils"; +import { + _15sec, + _2min, + displayAndLog, + StatusMessages, + displayAndLogError, + hideMTProtoAlerts, + _1sec, + _5sec, + _day, +} from "./utils/logUtils"; import * as Client from "./telegram/user/client"; import * as Bot from "./telegram/bot/bot"; import * as User from "./telegram/user/user"; @@ -21,8 +31,9 @@ import { defaultTelegramFolder, } from "./settings/messageDistribution"; import os from "os"; +import { clearCachedUnprocessedMessages, forwardUnprocessedMessages } from "./telegram/user/sync"; -// TODO in 2024: add "connecting" +// TODO LOW: add "connecting" export type ConnectionStatus = "connected" | "disconnected"; export type PluginStatus = "unloading" | "unloaded" | "loading" | "loaded"; @@ -31,11 +42,11 @@ export default class TelegramSyncPlugin extends Plugin { settings: TelegramSyncSettings; settingsTab?: TelegramSyncSettingTab; private botStatus: ConnectionStatus = "disconnected"; - // TODO in 2024: change to userStatus and display in status bar + // TODO LOW: change to userStatus and display in status bar userConnected = false; checkingBotConnection = false; checkingUserConnection = false; - // TODO in 2024: TelegramSyncBot extends TelegramBot + // TODO LOW: TelegramSyncBot extends TelegramBot bot?: TelegramBot; botUser?: TelegramBot.User; createdFilePaths: string[] = []; @@ -46,6 +57,8 @@ export default class TelegramSyncPlugin extends Plugin { messagesLeftCnt = 0; connectionStatusIndicator? = new ConnectionStatusIndicator(this); status: PluginStatus = "loading"; + time4processOldMessages = false; + processOldMessagesIntervalId?: NodeJS.Timer; async initTelegram(initType?: Client.SessionType) { this.lastPollingErrors = []; @@ -69,6 +82,13 @@ export default class TelegramSyncPlugin extends Plugin { // restart telegram bot or user if needed if (!this.restartingIntervalId) this.setRestartTelegramInterval(this.restartingIntervalTime); + + // start processing old messages + if (!this.processOldMessagesIntervalId) { + this.setProcessOldMessagesInterval(); + this.time4processOldMessages = true; + await this.processOldMessages(); + } } setRestartTelegramInterval(newRestartingIntervalTime: number, sessionType?: Client.SessionType) { @@ -80,6 +100,20 @@ export default class TelegramSyncPlugin extends Plugin { ); } + setProcessOldMessagesInterval() { + this.clearProcessOldMessagesInterval(); + this.processOldMessagesIntervalId = setInterval(async () => { + this.time4processOldMessages = true; + await enqueue(this, this.processOldMessages); + }, _day); + } + + clearProcessOldMessagesInterval() { + clearInterval(this.processOldMessagesIntervalId); + this.processOldMessagesIntervalId = undefined; + this.time4processOldMessages = false; + } + async restartTelegram(sessionType?: Client.SessionType) { let needRestartInterval = false; try { @@ -119,9 +153,21 @@ export default class TelegramSyncPlugin extends Plugin { } } + async processOldMessages() { + if (!this.time4processOldMessages) return; + if (!this.settings.processOldMessages) clearCachedUnprocessedMessages(); + if (!this.userConnected || !this.settings.processOldMessages || !this.botUser) return; + try { + await forwardUnprocessedMessages(this); + } finally { + this.time4processOldMessages = false; + } + } + stopTelegram() { this.checkingBotConnection = false; this.checkingUserConnection = false; + this.clearProcessOldMessagesInterval(); clearInterval(this.restartingIntervalId); this.restartingIntervalId = undefined; Bot.disconnect(this); diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts index 91214a8..505a64b 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.ts @@ -5,8 +5,14 @@ import { createProgressBar, updateProgressBar, deleteProgressBar, ProgressBarTyp import * as Client from "src/telegram/user/client"; import { BotSettingsModal } from "./modals/BotSettings"; import { UserLogInModal } from "./modals/UserLogin"; -import { releaseVersion, versionALessThanVersionB, telegramChannelLink, privacyPolicyLink } from "release-notes.mjs"; -import { _15sec, _1sec, _5sec, displayAndLog, doNotHide } from "src/utils/logUtils"; +import { + releaseVersion, + versionALessThanVersionB, + telegramChannelLink, + privacyPolicyLink, + insiderFeaturesLink, +} from "release-notes.mjs"; +import { _15sec, _1sec, _5sec, displayAndLog, _day } from "src/utils/logUtils"; import { getTopicId } from "src/telegram/bot/message/getters"; import * as User from "../telegram/user/user"; import { replaceMainJs } from "src/utils/fsUtils"; @@ -145,9 +151,9 @@ export class TelegramSyncSettingTab extends PluginSettingTab { new Setting(this.containerEl).setName("Insider features").setHeading(); this.subscribedOnInsiderChannel = await Client.subscribedOnInsiderChannel(); - this.addTelegramChannel(); await this.addProcessOldMessages(); await this.addBetaRelease(); + this.addTelegramChannel(); await this.setRefreshInterval(); } @@ -286,6 +292,17 @@ export class TelegramSyncSettingTab extends PluginSettingTab { }); } + addAdvancedSettings() { + new Setting(this.containerEl).addButton((btn: ButtonComponent) => { + btn.setButtonText("Advanced settings"); + btn.setClass("mod-cta"); + btn.onClick(async () => { + const advancedSettingsModal = new AdvancedSettingsModal(this.plugin); + advancedSettingsModal.open(); + }); + }); + } + async addMessageDistributionRules() { this.plugin.settings.messageDistributionRules.forEach((rule, index) => { const ruleInfo = getMessageDistributionRuleInfo(rule); @@ -358,33 +375,8 @@ export class TelegramSyncSettingTab extends PluginSettingTab { }); } - addTelegramChannel() { - if (this.subscribedOnInsiderChannel) return; - - const telegramChannelSetting = new Setting(this.containerEl) - .setName("Telegram plugin's channel") - .setDesc( - "If you like this open source plugin and are considering donating to support its continued development, subscribe to the private Telegram channel. In exchange, you will be the first to get all the latest updates and secrets🤫, as well as gain access to beta versions and ", - ) - .addButton((btn) => { - btn.setButtonText("Subscribe"); - btn.setClass("mod-cta"); - btn.onClick(() => { - displayAndLog( - this.plugin, - "After channel subscription, connect your Telegram user (if not done) and refresh the plugin settings for insider features", - ); - window.open(telegramChannelLink, "_blank"); - }); - }); - telegramChannelSetting.descEl.createEl("a", { - href: "https://github.com/soberhacker/obsidian-telegram-sync/blob/main/docs/Telegram%20Sync%20Insider%20Features.md", - text: "exclusive features", - }); - } - async addBetaRelease() { - if (!this.plugin.userConnected || !this.subscribedOnInsiderChannel) return; + const disabled = !this.plugin.userConnected || !this.subscribedOnInsiderChannel; const installed = "Installed\n\nRestart the plugin or Obsidian to apply the changes"; @@ -394,11 +386,12 @@ export class TelegramSyncSettingTab extends PluginSettingTab { "Install the latest beta release to be among the first to try out new features. It will launch during the plugin's next load", ) .addButton(async (btn) => { + btn.setDisabled(disabled); btn.setTooltip("Install Beta Release"); btn.setWarning(); btn.setIcon("install"); btn.onClick(async () => { - const notice = new Notice("Downloading...", doNotHide); + const notice = new Notice("Downloading...", _day); try { const betaRelease = await Client.getLastBetaRelease(this.plugin.manifest.version); notice.setMessage(`Installing...`); @@ -414,12 +407,13 @@ export class TelegramSyncSettingTab extends PluginSettingTab { .addButton(async (btn) => { btn.setTooltip("Return to production release"); btn.setIcon("undo-glyph"); + btn.setDisabled(disabled); btn.onClick(async () => { if (!this.plugin.settings.betaVersion) { new Notice(`You already have the production version of the plugin installed`, _5sec); return; } - const notice = new Notice("Installing...", doNotHide); + const notice = new Notice("Installing...", _day); try { await replaceMainJs(this.app.vault, "main-prod.js"); this.plugin.settings.betaVersion = ""; @@ -433,7 +427,7 @@ export class TelegramSyncSettingTab extends PluginSettingTab { } async addProcessOldMessages() { - if (!this.plugin.userConnected || !this.subscribedOnInsiderChannel) return; + const disabled = !this.plugin.userConnected || !this.subscribedOnInsiderChannel; new Setting(this.containerEl) .setName("Process old messages") @@ -441,15 +435,17 @@ export class TelegramSyncSettingTab extends PluginSettingTab { "During the plugin loading, unprocessed messages that are older than 24 hours and are not accessible to the bot will be forwarded to the same chat using the connected user's account. This action will enable the bot to detect and process these messages", ) .addButton((btn) => { - btn.setIcon("settings") - .setTooltip("Settings") - .onClick(async () => { - const processOldMessagesSettingsModal = new ProcessOldMessagesSettingsModal(this.plugin); - processOldMessagesSettingsModal.open(); - }); + btn.setIcon("settings"); + btn.setTooltip("Settings"); + btn.setDisabled(disabled); + btn.onClick(async () => { + const processOldMessagesSettingsModal = new ProcessOldMessagesSettingsModal(this.plugin); + processOldMessagesSettingsModal.open(); + }); }) .addToggle((toggle) => { - toggle.setValue(this.plugin.settings.processOldMessages); + toggle.setValue(disabled ? false : this.plugin.settings.processOldMessages); + toggle.setDisabled(disabled); toggle.onChange(async (value) => { if (!value) clearCachedUnprocessedMessages(); else this.plugin.settings.processOldMessagesSettings.lastProcessingDate = getOffsetDate(); @@ -460,14 +456,30 @@ export class TelegramSyncSettingTab extends PluginSettingTab { }); } - addAdvancedSettings() { - new Setting(this.containerEl).addButton((btn: ButtonComponent) => { - btn.setButtonText("Advanced settings"); - btn.setClass("mod-cta"); - btn.onClick(async () => { - const advancedSettingsModal = new AdvancedSettingsModal(this.plugin); - advancedSettingsModal.open(); + addTelegramChannel() { + const telegramChannelSetting = new Setting(this.containerEl) + .setName("Telegram Sync Insider channel") + .setDesc( + "By connecting your user to the plugin and subscribing to our Telegram channel, you'll get access to the latest beta versions, several months ahead of public release, and unlock for free ", + ) + .addButton((btn: ButtonComponent) => { + if (this.subscribedOnInsiderChannel) btn.setButtonText("Open"); + else { + btn.setButtonText("Unlock Features for Free"); + btn.setClass("mod-cta"); + } + btn.onClick(async () => { + if (!this.subscribedOnInsiderChannel) + displayAndLog( + this.plugin, + "After channel subscription, connect your Telegram user (if not done) and refresh the plugin settings for insider features", + ); + window.open(telegramChannelLink, "_blank"); + }); }); + telegramChannelSetting.descEl.createEl("a", { + href: insiderFeaturesLink, + text: "all insider features", }); } diff --git a/src/settings/modals/BotSettings.ts b/src/settings/modals/BotSettings.ts index 4bf185d..01aa9a7 100644 --- a/src/settings/modals/BotSettings.ts +++ b/src/settings/modals/BotSettings.ts @@ -29,10 +29,14 @@ export class BotSettingsModal extends Modal { lim24Hours.style.marginLeft = "10px"; const limBlocks = document.createElement("div"); limBlocks.style.marginLeft = "10px"; - limBlocks.setText("- Use VPN to bypass blocks in China, Iran, and limited corporate networks "); + limBlocks.setText("- Use VPN or proxy to bypass blocks in China, Iran, and limited corporate networks "); limBlocks.createEl("a", { href: "https://github.com/soberhacker/obsidian-telegram-sync/issues/225#issuecomment-1780539957", - text: "(ex. config of Clash)", + text: "([ex. config of Clash],", + }); + limBlocks.createEl("a", { + href: "https://github.com/windingblack/obsidian-global-proxy", + text: " [Obsidian Global Proxy])", }); limitations.descEl.appendChild(lim24Hours); limitations.descEl.appendChild(limBlocks); diff --git a/src/settings/modals/MessageDistributionRules.ts b/src/settings/modals/MessageDistributionRules.ts index 5bafd0f..67e4eed 100644 --- a/src/settings/modals/MessageDistributionRules.ts +++ b/src/settings/modals/MessageDistributionRules.ts @@ -135,7 +135,7 @@ export class MessageDistributionRulesModal extends Modal { setting .setName("Reversed order") .setDesc( - "Turn on to have new messages appear at the beginning of the note, or, if a heading is specified, above it", + `Turn on to have new messages appear at the beginning of the note, or, if a heading is specified, above it. Warning: If "Parallel Message Processing" turn on, it may disrupt message order`, ) .addToggle((toggle) => { toggle.setValue(this.messageDistributionRule.reversedOrder); diff --git a/src/settings/modals/UserLogin.ts b/src/settings/modals/UserLogin.ts index 462588f..f7e87e7 100644 --- a/src/settings/modals/UserLogin.ts +++ b/src/settings/modals/UserLogin.ts @@ -102,5 +102,6 @@ export class UserLogInModal extends Modal { const message = this.qrCodeContainer.createEl("pre", { text }); if (color) message.style.color = color; message.style.fontWeight = "bold"; + message.style.whiteSpace = "pre-wrap"; } } diff --git a/src/telegram/bot/bot.ts b/src/telegram/bot/bot.ts index 0c9d47b..bf04b08 100644 --- a/src/telegram/bot/bot.ts +++ b/src/telegram/bot/bot.ts @@ -4,7 +4,6 @@ import { _1sec, displayAndLog } from "src/utils/logUtils"; import { handleMessage } from "./message/handlers"; import { reconnect } from "../user/user"; import { enqueueByCondition } from "src/utils/queues"; -import { clearCachedUnprocessedMessages, forwardUnprocessedMessages } from "../user/sync"; // Initialize the Telegram bot and set up message handling export async function connect(plugin: TelegramSyncPlugin) { @@ -42,16 +41,11 @@ export async function connect(plugin: TelegramSyncPlugin) { try { plugin.botUser = await bot.getMe(); plugin.lastPollingErrors = []; - - if (plugin.settings.processOldMessages && plugin.userConnected && plugin.botUser) { - await forwardUnprocessedMessages(plugin); - } else if (!plugin.settings.processOldMessages) { - clearCachedUnprocessedMessages(); - } } finally { await bot.startPolling(); } plugin.setBotStatus("connected"); + plugin.time4processOldMessages = true; } catch (error) { if (!plugin.bot || !plugin.bot.isPolling()) { plugin.setBotStatus("disconnected", error); @@ -115,7 +109,12 @@ async function checkConnectionAfterError(plugin: TelegramSyncPlugin, intervalInS plugin.lastPollingErrors = []; plugin.checkingBotConnection = false; reconnect(plugin); + plugin.time4processOldMessages = true; } catch { plugin.checkingBotConnection = false; } } + +export async function setReaction(plugin: TelegramSyncPlugin, msg: TelegramBot.Message, emoji: string) { + await plugin.bot?.setMessageReaction(msg.chat.id, msg.message_id, { reaction: [{ emoji: emoji, type: "emoji" }] }); +} diff --git a/src/telegram/bot/message/convertToMarkdown.ts b/src/telegram/bot/message/convertToMarkdown.ts index 3a6c596..06823ce 100644 --- a/src/telegram/bot/message/convertToMarkdown.ts +++ b/src/telegram/bot/message/convertToMarkdown.ts @@ -4,7 +4,8 @@ import { getInlineUrls } from "./getters"; export async function convertMessageTextToMarkdown(msg: TelegramBot.Message): Promise { let text = msg.text || msg.caption || ""; const entities = msg.entities || msg.caption_entities || []; - entities.forEach((entity, index, updatedEntities) => { + const copiedEntities: TelegramBot.MessageEntity[] = structuredClone(entities); + copiedEntities.forEach((entity, index, updatedEntities) => { const entityStart = entity.offset; let entityEnd = entityStart + entity.length; let entityText = text.slice(entityStart, entityEnd); diff --git a/src/telegram/bot/message/handlers.ts b/src/telegram/bot/message/handlers.ts index a47ca86..2fc77a2 100644 --- a/src/telegram/bot/message/handlers.ts +++ b/src/telegram/bot/message/handlers.ts @@ -83,18 +83,26 @@ export async function handleMessage(plugin: TelegramSyncPlugin, msg: TelegramBot // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((msg as any).userMsg) { - displayAndLog(plugin, `Message "${msgText}" skipped\nAlready processed before!`, 0); + displayAndLog(plugin, `Message skipped: already processed before!\n--- Message ---\n${msgText}\n<===`, 0); return; } const distributionRule = await getMessageDistributionRule(plugin, msg); - if (msgText.length > 30) msgText = msgText.slice(1, 30) + "..."; + if (msgText.length > 200) msgText = msgText.slice(0, 200) + "... (trimmed)"; if (!distributionRule) { - displayAndLog(plugin, `Message "${msgText}" skipped\nNo matched distribution rule!`, 0); + displayAndLog(plugin, `Message skipped: no matched distribution rule!\n--- Message ---\n${msgText}\n<===`, 0); return; } else { const ruleInfo = getMessageDistributionRuleInfo(distributionRule); - displayAndLog(plugin, `Message: ${msgText}\nDistribution rule: ${JSON.stringify(ruleInfo)}`, 0); + displayAndLog( + plugin, + `Message received\n--- Message ---\n${msgText}\n--- Distribution rule ---\n${JSON.stringify( + ruleInfo, + undefined, + 4, + )}\n<===`, + 0, + ); } // Check if message has been sended by allowed users or chats @@ -321,7 +329,15 @@ async function handleMediaGroup(plugin: TelegramSyncPlugin, distributionRule: Me mg.filesPaths, mg.error, ); - await enqueue(appendContentToNote, plugin.app.vault, mg.notePath, noteContent); + await enqueue( + appendContentToNote, + plugin.app.vault, + mg.notePath, + noteContent, + distributionRule.heading, + plugin.settings.defaultMessageDelimiter ? defaultDelimiter : "", + distributionRule.reversedOrder, + ); await finalizeMessageProcessing(plugin, mg.initialMsg, mg.error); } catch (e) { displayAndLogError(plugin, e, "", "", mg.initialMsg, 0); @@ -369,7 +385,15 @@ async function appendFileToNote( const noteContent = await createNoteContent(plugin, notePath, msg, distributionRule, [filePath], error); - await enqueue(appendContentToNote, plugin.app.vault, notePath, noteContent); + await enqueue( + appendContentToNote, + plugin.app.vault, + notePath, + noteContent, + distributionRule.heading, + plugin.settings.defaultMessageDelimiter ? defaultDelimiter : "", + distributionRule.reversedOrder, + ); } // show changes about new release diff --git a/src/telegram/bot/message/processors.ts b/src/telegram/bot/message/processors.ts index a2a8ec8..06843b0 100644 --- a/src/telegram/bot/message/processors.ts +++ b/src/telegram/bot/message/processors.ts @@ -24,6 +24,8 @@ import { sanitizeFileName, sanitizeFilePath } from "src/utils/fsUtils"; import path from "path"; import { defaultFileNameTemplate, defaultNoteNameTemplate } from "src/settings/messageDistribution"; import { Api } from "telegram"; +import { setReaction } from "../bot"; +import { emoticonProcessed, emoticonProcessedEdited } from "src/telegram/user/config"; // Delete a message or send a confirmation reply based on settings and message age export async function finalizeMessageProcessing(plugin: TelegramSyncPlugin, msg: TelegramBot.Message, error?: Error) { @@ -54,14 +56,23 @@ export async function finalizeMessageProcessing(plugin: TelegramSyncPlugin, msg: } else { let needReply = true; let errorMessage = ""; + + const emoticon = msg.edit_date ? emoticonProcessedEdited : emoticonProcessed; + // reacting by bot + try { + await enqueue(setReaction, plugin, msg, emoticon); + needReply = false; + } catch (e) { + errorMessage = `\n\nCan't "like" the message by bot, ${e}`; + } + // reacting by user try { - if (plugin.settings.telegramSessionType == "user" && plugin.botUser) { - const emoticon = msg.edit_date ? "👌" : "👍"; + if (needReply && plugin.settings.telegramSessionType == "user" && plugin.botUser) { await enqueue(Client.sendReaction, plugin.botUser, msg, emoticon); needReply = false; } } catch (e) { - errorMessage = `\n\nCan't "like" the message, ${e}`; + errorMessage = `\n\nCan't "like" the message by user, ${e}`; } const ok_msg = msg.edit_date ? "...🆗..." : "...✅..."; if (needReply && originalMsg) { @@ -157,7 +168,7 @@ export async function applyNotePathTemplate( let processedPath = notePathTemplate.endsWith("/") ? notePathTemplate + defaultNoteNameTemplate : notePathTemplate; let textContentMd = ""; - if (processedPath.includes("{{content")) textContentMd = await convertMessageTextToMarkdown(msg); + if (processedPath.includes("{{content")) textContentMd = msg.text || msg.caption || ""; processedPath = await processBasicVariables(plugin, msg, processedPath, textContentMd); if (processedPath.endsWith("/.md")) processedPath = processedPath.replace("/.md", "/_.md"); if (!path.extname(processedPath)) processedPath = processedPath + ".md"; diff --git a/src/telegram/bot/progressBar.ts b/src/telegram/bot/progressBar.ts index 26bfd3d..3f9b896 100644 --- a/src/telegram/bot/progressBar.ts +++ b/src/telegram/bot/progressBar.ts @@ -43,7 +43,7 @@ export async function updateProgressBar( ); } catch (e) { // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (!checkIfTooManyRequests(e)) console.log(e); + if (!checkIfTooManyRequests(e)) console.log(`Telegram Sync => ${e}`); } return stage; } diff --git a/src/telegram/convertors/botMessageToClientMessage.ts b/src/telegram/convertors/botMessageToClientMessage.ts index d8f65d3..822794d 100644 --- a/src/telegram/convertors/botMessageToClientMessage.ts +++ b/src/telegram/convertors/botMessageToClientMessage.ts @@ -75,7 +75,7 @@ export async function getInputPeer( const dialog = dialogs.find((d) => d.id?.toJSNumber() == chatId); if (!dialog && limit <= 20) return await getInputPeer(client, user, botUser, botMsg, limit + 10); else if (!dialog || !dialog.inputEntity) { - console.log(dialogs); + console.log(`Telegram Sync => Dialogs:\n${dialogs}`); throw new Error( `User ${user.username || user.firstName || user.id} does not have chat with ${ botMsg.chat.username || botMsg.chat.title || botMsg.chat.first_name || botMsg.chat.id diff --git a/src/telegram/user/client.ts b/src/telegram/user/client.ts index b9e557e..f1e8f26 100644 --- a/src/telegram/user/client.ts +++ b/src/telegram/user/client.ts @@ -65,7 +65,7 @@ export async function init(sessionId: number, sessionType: SessionType, deviceId _sessionId = sessionId; _sessionType = sessionType; client = new TelegramClient(session, config.dIipa, config.hsaHipa, { - connectionRetries: 2, + connectionRetries: 10, deviceModel: os.hostname() || os.type(), appVersion: releaseVersion, useWSS: true, @@ -162,9 +162,10 @@ export async function signInAsUserWithQrCode(container: HTMLDivElement, password password: async (hint) => { return password ? password : ""; }, - onError: (error) => { - container.setText(error.message); - console.log(error); + onError: async (error) => { + container.setText(`Error: ${error.message}`); + console.log(`Telegram Sync => ${error}`); + return true; }, }, ) @@ -174,7 +175,7 @@ export async function signInAsUserWithQrCode(container: HTMLDivElement, password }) .catch((e) => { clientUser = undefined; - console.log(e); + console.log(`Telegram Sync => ${e}`); }); } diff --git a/src/telegram/user/config.ts b/src/telegram/user/config.ts index 866adaf..2c95dc0 100644 --- a/src/telegram/user/config.ts +++ b/src/telegram/user/config.ts @@ -7,3 +7,6 @@ const id4 = "MzMzYzVmNDUxNTRjNjM1YmQ="; export const dIipa = Number(base64ToString(id1) + base64ToString(id2)); export const hsaHipa = base64ToString(id3) + base64ToString(id4); + +export const emoticonProcessed = "👾"; +export const emoticonProcessedEdited = "🦄"; diff --git a/src/telegram/user/sync.ts b/src/telegram/user/sync.ts index 04d44ac..f1c0daf 100644 --- a/src/telegram/user/sync.ts +++ b/src/telegram/user/sync.ts @@ -1,9 +1,9 @@ import { Api } from "telegram"; -import { checkUserService, subscribedOnInsiderChannel } from "./client"; +import { checkUserService, clientUser, subscribedOnInsiderChannel } from "./client"; import { getOffsetDate } from "src/utils/dateUtils"; import TelegramSyncPlugin from "src/main"; import { Dialog } from "telegram/tl/custom/dialog"; -import { _5sec, cleanErrorCache, displayAndLog, displayAndLogError, doNotHide, errorCache } from "src/utils/logUtils"; +import { _5sec, cleanErrorCache, displayAndLog, displayAndLogError, _day, errorCache } from "src/utils/logUtils"; import { Notice } from "obsidian"; import TelegramBot from "node-telegram-bot-api"; import { extractMediaId } from "../convertors/botFileToMessageMedia"; @@ -11,6 +11,7 @@ import { getFileObject } from "../bot/message/getters"; import { findUserMsg } from "../convertors/botMessageToClientMessage"; import bigInt from "big-integer"; import { getChat, getUser } from "../convertors/clientMessageToBotMessage"; +import { emoticonProcessed, emoticonProcessedEdited } from "./config"; const defaultDaysLimit = 14; const defaultDialogsLimit = 100; @@ -51,7 +52,7 @@ export function getDefaultProcessOldMessagesSettings(): ProcessOldMessagesSettin export async function getChatsForSearch(plugin: TelegramSyncPlugin, offsetDays: number): Promise { let progress = "\n\n..."; let notification = `1 of 3\nSearching for chats with activity in the last "${offsetDays}" days`; - const notice = new Notice(notification + progress, doNotHide); + const notice = new Notice(notification + progress, _day); const { checkedClient } = await checkUserService(); const botUserName = plugin.botUser?.username; if (!botUserName) { @@ -146,14 +147,25 @@ export async function getUnprocessedMessages(plugin: TelegramSyncPlugin): Promis if (msg.fromId && msg.fromId instanceof Api.PeerUser && msg.fromId.userId.toJSNumber() == botId) return false; + if (!msg.reactions || msg.reactions.results.length == 0) return true; // skip already processed messages - const reactions = msg.reactions?.results; + const reactions = [{ userId: "-", reaction: "-" }]; + if (msg.reactions.canSeeList) + msg.reactions.recentReactions?.forEach((r) => { + if (!(r.peerId instanceof Api.PeerUser) || !(r.reaction instanceof Api.ReactionEmoji)) return; + reactions.push({ userId: r.peerId.userId.toString(), reaction: r.reaction.emoticon }); + }); + else + msg.reactions.results.forEach((r) => { + if (!(r.reaction instanceof Api.ReactionEmoji)) return; + reactions.push({ userId: "0", reaction: r.reaction.emoticon }); + }); + if ( - reactions && reactions.find( - (reaction) => - reaction.reaction instanceof Api.ReactionEmoji && - ["👍", "👌"].includes(reaction.reaction.emoticon), + (r) => + [emoticonProcessed, emoticonProcessedEdited].includes(r.reaction) && + ["0", botId.toString(), clientUser?.id.toString()].includes(r.userId), ) ) return false; @@ -186,7 +198,7 @@ export async function forwardUnprocessedMessages(plugin: TelegramSyncPlugin) { if (message.forward && message.forward.chatId && !message.forward._chat) message.forward._chat = await message.forward.getChat(); const forwardedMessage = getFirstMessage(await message.forwardTo(message.inputChat || message.peerId)); - if (!errorCache) processOldMessagesSettings.lastProcessingDate = message.date; + if (!errorCache) processOldMessagesSettings.lastProcessingDate = message.editDate || message.date; cachedUnprocessedMessages.push({ original: message, forwarded: forwardedMessage }); } catch (e) { displayAndLogError( diff --git a/src/telegram/user/user.ts b/src/telegram/user/user.ts index 7ec1f4f..69e8f47 100644 --- a/src/telegram/user/user.ts +++ b/src/telegram/user/user.ts @@ -34,7 +34,11 @@ export async function connect( await Client.signInAsBot(plugin.settings.botToken); } - if (sessionType == "user" && !plugin.userConnected) return "Connection failed. See logs"; + if (sessionType == "user" && !plugin.userConnected) { + let qrError = qrCodeContainer?.getText(); + qrError = qrError?.contains("Error") ? qrError : "See errors in console (CTRL + SHIFT + I)"; + return `Connection failed.\n${qrError}`; + } if (plugin.userConnected && !sessionId) { plugin.settings.telegramSessionId = newSessionId; @@ -45,7 +49,7 @@ export async function connect( if (!error.message.includes("API_ID_PUBLISHED_FLOOD")) { plugin.userConnected = false; await displayAndLogError(plugin, error, "", "", undefined, 0); - return "Connection failed: " + error.message; + return `Connection failed.\n${error.message}`; } } finally { plugin.checkingUserConnection = false; diff --git a/src/types/node-telegram-bot-api/index.d.ts b/src/types/node-telegram-bot-api/index.d.ts new file mode 100644 index 0000000..e7f4c2c --- /dev/null +++ b/src/types/node-telegram-bot-api/index.d.ts @@ -0,0 +1,2077 @@ +/* eslint-disable @typescript-eslint/ban-types */ +/* eslint-disable @typescript-eslint/no-explicit-any */ +declare module "node-telegram-bot-api" { + import { ServerOptions } from "https"; + import { Options } from "request"; + import { Readable, Stream } from "stream"; + namespace TelegramBot { + type ReactionType = ReactionTypeEmoji | ReactionTypeCustomEmoji; + + interface ReactionTypeEmoji { + type: string; + emoji: string; + } + + interface ReactionTypeCustomEmoji { + type: string; + custom_emoji_id: string; + } + interface TextListener { + regexp: RegExp; + callback(msg: Message, match: RegExpExecArray | null): void; + } + + export interface MessageReactionUpdated { + chat: Chat; + message_id: number; + user?: User; + actor_chat?: any; + date: number; + old_reaction: ReactionType[]; + new_reaction: ReactionType[]; + } + + interface SetMessageReactionOptions { + reaction: ReactionType[]; + } + + interface ReplyListener { + id: number; + chatId: ChatId; + messageId: number | string; + callback(msg: Message): void; + } + + type ChatType = "private" | "group" | "supergroup" | "channel"; + + type ChatAction = + | "typing" + | "upload_photo" + | "record_video" + | "upload_video" + | "record_voice" + | "upload_voice" + | "upload_document" + | "find_location" + | "record_video_note" + | "upload_video_note"; + + type ChatMemberStatus = "creator" | "administrator" | "member" | "restricted" | "left" | "kicked"; + + type DocumentMimeType = "application/pdf" | "application/zip"; + + type MessageType = + | "text" + | "animation" + | "audio" + | "channel_chat_created" + | "contact" + | "delete_chat_photo" + | "document" + | "game" + | "group_chat_created" + | "invoice" + | "left_chat_member" + | "location" + | "migrate_from_chat_id" + | "migrate_to_chat_id" + | "new_chat_members" + | "new_chat_photo" + | "new_chat_title" + | "passport_data" + | "photo" + | "pinned_message" + | "sticker" + | "successful_payment" + | "supergroup_chat_created" + | "video" + | "video_note" + | "voice" + | "video_chat_started" + | "video_chat_ended" + | "video_chat_participants_invited" + | "video_chat_scheduled" + | "message_auto_delete_timer_changed" + | "chat_invite_link" + | "chat_member_updated" + | "web_app_data" + | "message_reaction"; + + type MessageEntityType = + | "mention" + | "hashtag" + | "cashtag" + | "bot_command" + | "url" + | "email" + | "phone_number" + | "bold" + | "italic" + | "underline" + | "strikethrough" + | "code" + | "pre" + | "text_link" + | "text_mention" + | "spoiler" + | "custom_emoji"; + + type ParseMode = "Markdown" | "MarkdownV2" | "HTML"; + + /// METHODS OPTIONS /// + interface PollingOptions { + interval?: string | number | undefined; + autoStart?: boolean | undefined; + params?: GetUpdatesOptions | undefined; + } + + interface WebHookOptions { + host?: string | undefined; + port?: number | undefined; + key?: string | undefined; + cert?: string | undefined; + pfx?: string | undefined; + autoOpen?: boolean | undefined; + https?: ServerOptions | undefined; + healthEndpoint?: string | undefined; + } + + interface ConstructorOptions { + polling?: boolean | PollingOptions | undefined; + webHook?: boolean | WebHookOptions | undefined; + onlyFirstMatch?: boolean | undefined; + request?: Options | undefined; + baseApiUrl?: string | undefined; + filepath?: boolean | undefined; + testEnvironment?: boolean | undefined; + } + + interface StartPollingOptions extends ConstructorOptions { + restart?: boolean | undefined; + } + + interface StopPollingOptions { + cancel?: boolean | undefined; + reason?: string | undefined; + } + + interface SetWebHookOptions { + url?: string | undefined; + certificate?: string | Stream | undefined; + max_connections?: number | undefined; + allowed_updates?: string[] | undefined; + secret_token?: string | undefined; + } + + interface GetUpdatesOptions { + offset?: number | undefined; + limit?: number | undefined; + timeout?: number | undefined; + allowed_updates?: string[] | undefined; + } + + interface SendBasicOptions { + message_thread_id?: number | undefined; + disable_notification?: boolean | undefined; + reply_to_message_id?: number | undefined; + reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply | undefined; + protect_content?: boolean | undefined; + allow_sending_without_reply?: boolean | undefined; + } + + interface SendMessageOptions extends SendBasicOptions { + parse_mode?: ParseMode | undefined; + disable_web_page_preview?: boolean | undefined; + entities?: MessageEntity[] | undefined; + } + + interface AnswerInlineQueryOptions { + cache_time?: number | undefined; + is_personal?: boolean | undefined; + next_offset?: string | undefined; + switch_pm_text?: string | undefined; + switch_pm_parameter?: string | undefined; + } + + interface ForwardMessageOptions { + disable_notification?: boolean | undefined; + protect_content?: boolean | undefined; + } + + interface SendPhotoOptions extends SendBasicOptions { + has_spoiler?: boolean | undefined; + parse_mode?: ParseMode | undefined; + caption?: string | undefined; + caption_entities?: MessageEntity[] | undefined; + } + + interface FileOptions { + filename?: string | undefined; + contentType?: string | undefined; + } + + interface BanOptions { + until_date?: number | undefined; + revoke_messages?: boolean | undefined; + } + + interface UnbanOptions { + only_if_banned?: boolean | undefined; + } + + interface SendAudioOptions extends SendBasicOptions { + parse_mode?: ParseMode | undefined; + caption?: string | undefined; + duration?: number | undefined; + performer?: string | undefined; + title?: string | undefined; + thumbnail?: string | Stream | Buffer; + caption_entities?: MessageEntity[] | undefined; + } + + interface SendAnimationOptions extends SendBasicOptions { + has_spoiler?: boolean | undefined; + parse_mode?: ParseMode | undefined; + caption?: string | undefined; + duration?: number | undefined; + width?: number | undefined; + height?: number | undefined; + thumbnail?: string | Stream | Buffer; + caption_entities?: MessageEntity[] | undefined; + } + + interface SendDocumentOptions extends SendBasicOptions { + parse_mode?: ParseMode | undefined; + caption?: string | undefined; + thumbnail?: string | Stream | Buffer; + caption_entities?: MessageEntity[] | undefined; + } + + interface SendMediaGroupOptions { + disable_notification?: boolean | undefined; + reply_to_message_id?: number | undefined; + } + + interface SendPollOptions extends SendBasicOptions { + is_anonymous?: boolean | undefined; + type?: PollType | undefined; + allows_multiple_answers?: boolean | undefined; + correct_option_id?: number | undefined; + explanation?: string | undefined; + explanation_parse_mode?: ParseMode | undefined; + open_period?: number | undefined; + close_date?: number | undefined; + is_closed?: boolean | undefined; + } + + interface StopPollOptions { + reply_markup?: InlineKeyboardMarkup | undefined; + } + + type SendStickerOptions = SendBasicOptions; + + interface SendVideoOptions extends SendBasicOptions { + has_spoiler?: boolean | undefined; + parse_mode?: ParseMode | undefined; + duration?: number | undefined; + width?: number | undefined; + height?: number | undefined; + caption?: string | undefined; + thumbnail?: string | Stream | Buffer; + caption_entities?: MessageEntity[] | undefined; + } + + interface SendVoiceOptions extends SendBasicOptions { + parse_mode?: ParseMode | undefined; + caption?: string | undefined; + duration?: number | undefined; + caption_entities?: MessageEntity[] | undefined; + } + + interface SendVideoNoteOptions extends SendBasicOptions { + duration?: number | undefined; + length?: number | undefined; + thumbnail?: string | Stream | Buffer; + } + + interface SendLocationOptions extends SendBasicOptions { + live_period?: number | undefined; + horizontal_accuracy?: number | undefined; + heading?: number | undefined; + proximity_alert_radius?: number | undefined; + } + + type EditMessageLiveLocationOptions = EditMessageCaptionOptions; + + type StopMessageLiveLocationOptions = EditMessageCaptionOptions; + + interface SendVenueOptions extends SendBasicOptions { + foursquare_id?: string | undefined; + } + + interface SendContactOptions extends SendBasicOptions { + last_name?: string | undefined; + vcard?: string | undefined; + } + + type SendGameOptions = SendBasicOptions; + + interface SendInvoiceOptions extends SendBasicOptions { + provider_data?: string | undefined; + photo_url?: string | undefined; + photo_size?: number | undefined; + photo_width?: number | undefined; + photo_height?: number | undefined; + start_parameter?: string | undefined; + need_name?: boolean | undefined; + need_phone_number?: boolean | undefined; + need_email?: boolean | undefined; + need_shipping_address?: boolean | undefined; + is_flexible?: boolean | undefined; + } + + interface CopyMessageOptions extends SendBasicOptions { + caption?: string | undefined; + parse_mode?: ParseMode | undefined; + caption_entities?: MessageEntity[] | undefined; + } + + interface RestrictChatMemberOptions { + until_date?: number | undefined; + use_independent_chat_permissions?: boolean | undefined; + } + + type RestrictChatMemberOptionsWithChatPermissions = RestrictChatMemberOptions & ChatPermissions; + + interface PromoteChatMemberOptions { + is_anonymous?: boolean | undefined; + can_manage_chat?: boolean | undefined; + can_change_info?: boolean | undefined; + can_post_messages?: boolean | undefined; + can_edit_messages?: boolean | undefined; + can_delete_messages?: boolean | undefined; + can_invite_users?: boolean | undefined; + can_restrict_members?: boolean | undefined; + can_pin_messages?: boolean | undefined; + can_promote_members?: boolean | undefined; + can_manage_video_chats?: boolean | undefined; + can_manage_topics?: boolean | undefined; + } + + interface CreateForumTopicOptions { + icon_color?: number | undefined; + icon_custom_emoji_id?: string | undefined; + } + + interface EditForumTopicOptions { + name?: string | undefined; + icon_custom_emoji_id?: string | undefined; + } + + interface SendChatActionOptions { + message_thread_id?: number | undefined; + } + + interface SetChatPermissionsOptions { + use_independent_chat_permissions?: boolean | undefined; + } + + interface AnswerCallbackQueryOptions { + callback_query_id: string; + text?: string | undefined; + show_alert?: boolean | undefined; + url?: string | undefined; + cache_time?: number | undefined; + } + + interface EditMessageTextOptions extends EditMessageCaptionOptions { + parse_mode?: ParseMode | undefined; + disable_web_page_preview?: boolean | undefined; + } + + interface EditMessageCaptionOptions extends EditMessageReplyMarkupOptions { + reply_markup?: InlineKeyboardMarkup | undefined; + parse_mode?: ParseMode | undefined; + caption_entities?: MessageEntity[] | undefined; + } + + interface EditMessageReplyMarkupOptions { + chat_id?: ChatId | undefined; + message_id?: number | undefined; + inline_message_id?: string | undefined; + } + + interface EditMessageMediaOptions { + chat_id?: ChatId | undefined; + message_id?: number | undefined; + inline_message_id?: string | undefined; + reply_markup?: InlineKeyboardMarkup | undefined; + } + + interface GetUserProfilePhotosOptions { + offset?: number | undefined; + limit?: number | undefined; + } + + interface SetGameScoreOptions { + force?: boolean | undefined; + disable_edit_message?: boolean | undefined; + chat_id?: number | undefined; + message_id?: number | undefined; + inline_message_id?: string | undefined; + } + + interface GetGameHighScoresOptions { + chat_id?: number | undefined; + message_id?: number | undefined; + inline_message_id?: string | undefined; + } + + interface AnswerShippingQueryOptions { + shipping_options?: ShippingOption[] | undefined; + error_message?: string | undefined; + } + + interface AnswerPreCheckoutQueryOptions { + error_message?: string | undefined; + } + + interface SendDiceOptions extends SendBasicOptions { + emoji?: string | undefined; + } + + interface PinChatMessageOptions { + disable_notification?: boolean | undefined; + } + + interface UnpinChatMessageOptions { + message_id?: number | undefined; + } + + /// TELEGRAM TYPES /// + interface PassportFile { + file_id: string; + file_size: number; + file_date: number; + } + + interface EncryptedPassportElement { + type: string; + data?: string | undefined; + phone_number?: string | undefined; + email?: string | undefined; + files?: PassportFile[] | undefined; + front_side?: PassportFile | undefined; + reverse_side?: PassportFile | undefined; + selfie?: PassportFile | undefined; + translation?: PassportFile[] | undefined; + hash: string; + } + + interface EncryptedCredentials { + data: string; + hash: string; + secret: string; + } + + interface PassportData { + data: EncryptedPassportElement[]; + credentials: EncryptedCredentials; + } + + interface Update { + update_id: number; + message?: Message | undefined; + edited_message?: Message | undefined; + channel_post?: Message | undefined; + edited_channel_post?: Message | undefined; + inline_query?: InlineQuery | undefined; + chosen_inline_result?: ChosenInlineResult | undefined; + callback_query?: CallbackQuery | undefined; + shipping_query?: ShippingQuery | undefined; + pre_checkout_query?: PreCheckoutQuery | undefined; + poll?: Poll | undefined; + poll_answer?: PollAnswer | undefined; + my_chat_member?: ChatMemberUpdated | undefined; + chat_member?: ChatMemberUpdated | undefined; + chat_join_request?: ChatJoinRequest | undefined; + message_reaction?: MessageReactionUpdated | undefined; + } + + interface WebhookInfo { + url: string; + has_custom_certificate: boolean; + pending_update_count: number; + ip_address?: string | undefined; + last_error_date?: number | undefined; + last_error_message?: string | undefined; + last_synchronization_error_date?: number | undefined; + max_connections?: number | undefined; + allowed_updates?: string[] | undefined; + } + + interface User { + id: number; + is_bot: boolean; + first_name: string; + last_name?: string | undefined; + username?: string | undefined; + language_code?: string | undefined; + } + + interface Chat { + id: number; + type: ChatType; + title?: string | undefined; + username?: string | undefined; + first_name?: string | undefined; + last_name?: string | undefined; + is_forum?: boolean | undefined; + photo?: ChatPhoto | undefined; + active_usernames?: string[] | undefined; + emoji_status_custom_emoji_id?: string | undefined; + bio?: string | undefined; + has_restricted_voice_and_video_messages?: boolean | undefined; + join_to_send_messages?: boolean | undefined; + join_by_request?: boolean | undefined; + description?: string | undefined; + invite_link?: string | undefined; + has_aggressive_anti_spam_enabled?: boolean | undefined; + has_hidden_members?: boolean | undefined; + pinned_message?: Message | undefined; + permissions?: ChatPermissions | undefined; + can_set_sticker_set?: boolean | undefined; + sticker_set_name?: string | undefined; + has_private_forwards?: boolean | undefined; + has_protected_content?: boolean | undefined; + slow_mode_delay?: number | undefined; + message_auto_delete_time?: number | undefined; + linked_chat_id?: number | undefined; + location?: ChatLocation | undefined; + /** + * @deprecated since version Telegram Bot API 4.4 - July 29, 2019 + */ + all_members_are_administrators?: boolean | undefined; + } + + interface Message { + message_id: number; + message_thread_id?: number | undefined; + from?: User | undefined; + date: number; + chat: Chat; + sender_chat?: Chat | undefined; + forward_from?: User | undefined; + forward_from_chat?: Chat | undefined; + forward_from_message_id?: number | undefined; + forward_signature?: string | undefined; + forward_sender_name?: string | undefined; + forward_date?: number | undefined; + is_topic_message?: boolean | undefined; + reply_to_message?: Message | undefined; + edit_date?: number | undefined; + media_group_id?: string | undefined; + author_signature?: string | undefined; + text?: string | undefined; + entities?: MessageEntity[] | undefined; + caption_entities?: MessageEntity[] | undefined; + audio?: Audio | undefined; + document?: Document | undefined; + animation?: Animation | undefined; + game?: Game | undefined; + photo?: PhotoSize[] | undefined; + sticker?: Sticker | undefined; + video?: Video | undefined; + voice?: Voice | undefined; + video_note?: VideoNote | undefined; + caption?: string | undefined; + contact?: Contact | undefined; + location?: Location | undefined; + venue?: Venue | undefined; + poll?: Poll | undefined; + new_chat_members?: User[] | undefined; + left_chat_member?: User | undefined; + new_chat_title?: string | undefined; + new_chat_photo?: PhotoSize[] | undefined; + delete_chat_photo?: boolean | undefined; + group_chat_created?: boolean | undefined; + supergroup_chat_created?: boolean | undefined; + channel_chat_created?: boolean | undefined; + migrate_to_chat_id?: number | undefined; + migrate_from_chat_id?: number | undefined; + pinned_message?: Message | undefined; + invoice?: Invoice | undefined; + successful_payment?: SuccessfulPayment | undefined; + connected_website?: string | undefined; + passport_data?: PassportData | undefined; + reply_markup?: InlineKeyboardMarkup | undefined; + web_app_data?: WebAppData | undefined; + is_automatic_forward?: boolean | undefined; + has_protected_content?: boolean | undefined; + dice?: Dice | undefined; + forum_topic_created?: ForumTopicCreated | undefined; + forum_topic_edited?: ForumTopicEdited | undefined; + forum_topic_closed?: ForumTopicClosed | undefined; + forum_topic_reopened?: ForumTopicReopened | undefined; + general_forum_topic_hidden?: GeneralForumTopicHidden | undefined; + general_forum_topic_unhidden?: GeneralForumTopicUnhidden | undefined; + has_media_spoiler?: boolean | undefined; + user_shared?: UserShared | undefined; + chat_shared?: ChatShared | undefined; + } + + interface MessageEntity { + type: MessageEntityType; + offset: number; + length: number; + url?: string | undefined; + user?: User | undefined; + language?: string | undefined; + custom_emoji_id?: string | undefined; + } + + interface FileBase { + file_id: string; + file_unique_id: string; + file_size?: number | undefined; + } + + interface PhotoSize extends FileBase { + width: number; + height: number; + } + + interface Audio extends FileBase { + duration: number; + performer?: string | undefined; + title?: string | undefined; + mime_type?: string | undefined; + thumb?: PhotoSize | undefined; + } + + interface Document extends FileBase { + thumb?: PhotoSize | undefined; + file_name?: string | undefined; + mime_type?: string | undefined; + } + + interface Video extends FileBase { + width: number; + height: number; + duration: number; + thumb?: PhotoSize | undefined; + mime_type?: string | undefined; + } + + interface Voice extends FileBase { + duration: number; + mime_type?: string | undefined; + } + + interface InputMediaBase { + media: string; + has_spoiler?: boolean | undefined; + caption?: string | undefined; + caption_entities?: MessageEntity[] | undefined; + parse_mode?: ParseMode | undefined; + } + + interface InputMediaPhoto extends InputMediaBase { + type: "photo"; + } + + interface InputMediaVideo extends InputMediaBase { + type: "video"; + width?: number | undefined; + height?: number | undefined; + duration?: number | undefined; + supports_streaming?: boolean | undefined; + } + + type InputMedia = InputMediaPhoto | InputMediaVideo; + + interface VideoNote extends FileBase { + length: number; + duration: number; + thumb?: PhotoSize | undefined; + } + + interface Contact { + phone_number: string; + first_name: string; + last_name?: string | undefined; + user_id?: number | undefined; + vcard?: string | undefined; + } + + interface ChatLocation { + location: Location; + address: string; + } + + interface Location { + longitude: number; + latitude: number; + } + + interface Venue { + location: Location; + title: string; + address: string; + foursquare_id?: string | undefined; + foursquare_type?: string | undefined; + } + + type PollType = "regular" | "quiz"; + + interface PollAnswer { + poll_id: string; + user: User; + option_ids: number[]; + } + + interface PollOption { + text: string; + voter_count: number; + } + + interface Poll { + id: string; + question: string; + options: PollOption[]; + is_closed: boolean; + is_anonymous: boolean; + allows_multiple_answers: boolean; + type: PollType; + total_voter_count: number; + } + + interface Dice { + emoji: string; + value: number; + } + + interface ChatJoinRequest { + chat: Chat; + from: User; + user_chat_id: number; + date: number; + bio?: string | undefined; + invite_link?: ChatInviteLink | undefined; + } + + interface UserProfilePhotos { + total_count: number; + photos: PhotoSize[][]; + } + + interface File extends FileBase { + file_path?: string | undefined; + } + + interface ReplyKeyboardMarkup { + keyboard: KeyboardButton[][]; + is_persistent?: boolean | undefined; + resize_keyboard?: boolean | undefined; + one_time_keyboard?: boolean | undefined; + input_field_placeholder?: string | undefined; + selective?: boolean | undefined; + } + + interface KeyboardButton { + text: string; + request_user?: KeyboardButtonRequestUser | undefined; + request_chat?: KeyboardButtonRequestChat | undefined; + request_contact?: boolean | undefined; + request_location?: boolean | undefined; + request_poll?: KeyboardButtonPollType; + web_app?: WebAppInfo; + } + + interface KeyboardButtonPollType { + type: PollType; + } + + interface KeyboardButtonRequestUser { + request_id: number; + user_is_bot?: boolean | undefined; + user_is_premium?: boolean | undefined; + } + + interface KeyboardButtonRequestChat { + request_id: number; + chat_is_channel: boolean; + chat_is_forum?: boolean | undefined; + chat_has_username?: boolean | undefined; + chat_is_created?: boolean | undefined; + user_administrator_rights?: boolean | undefined; + bot_administrator_rights?: boolean | undefined; + bot_is_member?: boolean | undefined; + } + + interface ReplyKeyboardRemove { + remove_keyboard: boolean; + selective?: boolean | undefined; + } + + interface InlineKeyboardMarkup { + inline_keyboard: InlineKeyboardButton[][]; + } + + interface InlineKeyboardButton { + text: string; + url?: string | undefined; + callback_data?: string | undefined; + web_app?: WebAppInfo; + login_url?: LoginUrl | undefined; + switch_inline_query?: string | undefined; + switch_inline_query_current_chat?: string | undefined; + callback_game?: CallbackGame | undefined; + pay?: boolean | undefined; + } + + interface LoginUrl { + url: string; + forward_text?: string | undefined; + bot_username?: string | undefined; + request_write_access?: boolean | undefined; + } + + interface CallbackQuery { + id: string; + from: User; + message?: Message | undefined; + inline_message_id?: string | undefined; + chat_instance: string; + data?: string | undefined; + game_short_name?: string | undefined; + } + + interface ForceReply { + force_reply: boolean; + input_field_placeholder?: string | undefined; + selective?: boolean | undefined; + } + + interface ChatPhoto { + small_file_id: string; + big_file_id: string; + } + + interface ChatInviteLink { + invite_link: string; + creator: User; + is_primary: boolean; + is_revoked: boolean; + expire_date?: number; + member_limit?: number; + name?: string; + } + + interface ChatMember { + user: User; + status: ChatMemberStatus; + until_date?: number | undefined; + can_be_edited?: boolean | undefined; + can_post_messages?: boolean | undefined; + can_edit_messages?: boolean | undefined; + can_delete_messages?: boolean | undefined; + can_restrict_members?: boolean | undefined; + can_promote_members?: boolean | undefined; + can_change_info?: boolean | undefined; + can_invite_users?: boolean | undefined; + can_pin_messages?: boolean | undefined; + is_member?: boolean | undefined; + can_send_messages?: boolean | undefined; + can_send_media_messages?: boolean | undefined; + can_send_polls?: boolean | undefined; + can_send_other_messages?: boolean | undefined; + can_add_web_page_previews?: boolean | undefined; + } + + interface ChatMemberUpdated { + chat: Chat; + from: User; + date: number; + old_chat_member: ChatMember; + new_chat_member: ChatMember; + invite_link?: ChatInviteLink; + } + + type ChatPermissionsNames = + | "can_send_messages" + | "can_send_audios" + | "can_send_documents" + | "can_send_photos" + | "can_send_videos" + | "can_send_video_notes" + | "can_send_voice_notes" + | "can_send_polls" + | "can_send_other_messages" + | "can_add_web_page_previews" + | "can_change_info" + | "can_invite_users" + | "can_pin_messages" + | "can_manage_topics"; + + type ChatPermissions = Partial>; + type StickerType = "regular" | "mask" | "custom_emoji"; + + interface Sticker extends FileBase { + type: StickerType; + is_animated: boolean; + is_video: boolean; + width: number; + height: number; + thumb?: PhotoSize | undefined; + emoji?: string | undefined; + set_name?: string | undefined; + premium_animation?: File | undefined; + mask_position?: MaskPosition | undefined; + custom_emoji_id?: string | undefined; + } + + interface StickerSet { + name: string; + title: string; + sticker_type: StickerType; + is_animated: boolean; + is_video: boolean; + stickers: Sticker[]; + thumb?: PhotoSize | undefined; + } + + interface CreateStickerSetOptions { + tgs_sticker?: string | Stream | Buffer; + webm_sticker?: string | Stream | Buffer; + sticker_type?: "regular" | "mask"; + mask_position?: MaskPosition; + } + + interface AddStickerToSetOptions { + mask_position?: MaskPosition; + } + + interface ForumTopicCreated { + name: string; + icon_color: number; + icon_custom_emoji_id: string; + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface -- Currently holds no information (https://core.telegram.org/bots/api#forumtopicclosed) + interface ForumTopicClosed {} + + interface ForumTopicEdited { + name: string; + icon_custom_emoji_id: string; + } + + // eslint-disable-next-line @typescript-eslint/no-empty-interface -- Currently holds no information (https://core.telegram.org/bots/api#forumtopicreopened) + interface ForumTopicReopened {} + + // eslint-disable-next-line @typescript-eslint/no-empty-interface -- Currently holds no information (https://core.telegram.org/bots/api#generalforumtopichidden) + interface GeneralForumTopicHidden {} + + // eslint-disable-next-line @typescript-eslint/no-empty-interface -- Currently holds no information (https://core.telegram.org/bots/api#generalforumtopicunhidden) + interface GeneralForumTopicUnhidden {} + + interface UserShared { + request_id: number; + user_id: number; + } + + interface ChatShared { + request_id: number; + chat_id: number; + } + + interface MaskPosition { + point: string; + x_shift: number; + y_shift: number; + scale: number; + } + + interface InlineQuery { + id: string; + from: User; + location?: Location | undefined; + query: string; + offset: string; + } + + interface InlineQueryResultBase { + id: string; + reply_markup?: InlineKeyboardMarkup | undefined; + } + + interface InlineQueryResultArticle extends InlineQueryResultBase { + type: "article"; + title: string; + input_message_content: InputMessageContent; + url?: string | undefined; + hide_url?: boolean | undefined; + description?: string | undefined; + thumb_url?: string | undefined; + thumb_width?: number | undefined; + thumb_height?: number | undefined; + } + + interface InlineQueryResultPhoto extends InlineQueryResultBase { + type: "photo"; + photo_url: string; + thumb_url: string; + photo_width?: number | undefined; + photo_height?: number | undefined; + title?: string | undefined; + description?: string | undefined; + caption?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultGif extends InlineQueryResultBase { + type: "gif"; + gif_url: string; + gif_width?: number | undefined; + gif_height?: number | undefined; + gif_duration?: number | undefined; + thumb_url?: string | undefined; + title?: string | undefined; + caption?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultMpeg4Gif extends InlineQueryResultBase { + type: "mpeg4_gif"; + mpeg4_url: string; + mpeg4_width?: number | undefined; + mpeg4_height?: number | undefined; + mpeg4_duration?: number | undefined; + thumb_url?: string | undefined; + title?: string | undefined; + caption?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultVideo extends InlineQueryResultBase { + type: "video"; + video_url: string; + mime_type: string; + thumb_url: string; + title: string; + caption?: string | undefined; + video_width?: number | undefined; + video_height?: number | undefined; + video_duration?: number | undefined; + description?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultAudio extends InlineQueryResultBase { + type: "audio"; + audio_url: string; + title: string; + caption?: string | undefined; + performer?: string | undefined; + audio_duration?: number | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultVoice extends InlineQueryResultBase { + type: "voice"; + voice_url: string; + title: string; + caption?: string | undefined; + voice_duration?: number | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultDocument extends InlineQueryResultBase { + type: "document"; + title: string; + caption?: string | undefined; + document_url: string; + mime_type: string; + description?: string | undefined; + input_message_content?: InputMessageContent | undefined; + thumb_url?: string | undefined; + thumb_width?: number | undefined; + thumb_height?: number | undefined; + } + + interface InlineQueryResultLocationBase extends InlineQueryResultBase { + latitude: number; + longitude: number; + title: string; + input_message_content?: InputMessageContent | undefined; + thumb_url?: string | undefined; + thumb_width?: number | undefined; + thumb_height?: number | undefined; + } + + interface InlineQueryResultLocation extends InlineQueryResultLocationBase { + type: "location"; + } + + interface InlineQueryResultVenue extends InlineQueryResultLocationBase { + type: "venue"; + address: string; + foursquare_id?: string | undefined; + } + + interface InlineQueryResultContact extends InlineQueryResultBase { + type: "contact"; + phone_number: string; + first_name: string; + last_name?: string | undefined; + input_message_content?: InputMessageContent | undefined; + thumb_url?: string | undefined; + thumb_width?: number | undefined; + thumb_height?: number | undefined; + } + + interface InlineQueryResultGame extends InlineQueryResultBase { + type: "game"; + game_short_name: string; + } + + interface InlineQueryResultCachedPhoto extends InlineQueryResultBase { + type: "photo"; + photo_file_id: string; + title?: string | undefined; + description?: string | undefined; + caption?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultCachedGif extends InlineQueryResultBase { + type: "gif"; + gif_file_id: string; + title?: string | undefined; + caption?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultCachedMpeg4Gif extends InlineQueryResultBase { + type: "mpeg4_gif"; + mpeg4_file_id: string; + title?: string | undefined; + caption?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultCachedSticker extends InlineQueryResultBase { + type: "sticker"; + sticker_file_id: string; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultCachedDocument extends InlineQueryResultBase { + type: "document"; + title: string; + document_file_id: string; + description?: string | undefined; + caption?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultCachedVideo extends InlineQueryResultBase { + type: "video"; + video_file_id: string; + title: string; + description?: string | undefined; + caption?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultCachedVoice extends InlineQueryResultBase { + type: "voice"; + voice_file_id: string; + title: string; + caption?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + interface InlineQueryResultCachedAudio extends InlineQueryResultBase { + type: "audio"; + audio_file_id: string; + caption?: string | undefined; + input_message_content?: InputMessageContent | undefined; + } + + type InlineQueryResult = + | InlineQueryResultCachedAudio + | InlineQueryResultCachedDocument + | InlineQueryResultCachedGif + | InlineQueryResultCachedMpeg4Gif + | InlineQueryResultCachedPhoto + | InlineQueryResultCachedSticker + | InlineQueryResultCachedVideo + | InlineQueryResultCachedVoice + | InlineQueryResultArticle + | InlineQueryResultAudio + | InlineQueryResultContact + | InlineQueryResultGame + | InlineQueryResultDocument + | InlineQueryResultGif + | InlineQueryResultLocation + | InlineQueryResultMpeg4Gif + | InlineQueryResultPhoto + | InlineQueryResultVenue + | InlineQueryResultVideo + | InlineQueryResultVoice; + + type InputMessageContent = object; + + interface InputTextMessageContent extends InputMessageContent { + message_text: string; + parse_mode?: ParseMode | undefined; + disable_web_page_preview?: boolean | undefined; + } + + interface InputLocationMessageContent extends InputMessageContent { + latitude: number; + longitude: number; + } + + interface InputVenueMessageContent extends InputLocationMessageContent { + title: string; + address: string; + foursquare_id?: string | undefined; + } + + interface InputContactMessageContent extends InputMessageContent { + phone_number: string; + first_name: string; + last_name?: string | undefined; + } + + interface ChosenInlineResult { + result_id: string; + from: User; + location?: Location | undefined; + inline_message_id?: string | undefined; + query: string; + } + + interface ResponseParameters { + migrate_to_chat_id?: number | undefined; + retry_after?: number | undefined; + } + + interface LabeledPrice { + label: string; + amount: number; + } + + interface Invoice { + title: string; + description: string; + start_parameter: string; + currency: string; + total_amount: number; + } + + interface ShippingAddress { + country_code: string; + state: string; + city: string; + street_line1: string; + street_line2: string; + post_code: string; + } + + interface OrderInfo { + name?: string | undefined; + phone_number?: string | undefined; + email?: string | undefined; + shipping_address?: ShippingAddress | undefined; + } + + interface ShippingOption { + id: string; + title: string; + prices: LabeledPrice[]; + } + + interface SuccessfulPayment { + currency: string; + total_amount: number; + invoice_payload: string; + shipping_option_id?: string | undefined; + order_info?: OrderInfo | undefined; + telegram_payment_charge_id: string; + provider_payment_charge_id: string; + } + + interface ShippingQuery { + id: string; + from: User; + invoice_payload: string; + shipping_address: ShippingAddress; + } + + interface PreCheckoutQuery { + id: string; + from: User; + currency: string; + total_amount: number; + invoice_payload: string; + shipping_option_id?: string | undefined; + order_info?: OrderInfo | undefined; + } + + interface Game { + title: string; + description: string; + photo: PhotoSize[]; + text?: string | undefined; + text_entities?: MessageEntity[] | undefined; + animation?: Animation | undefined; + } + + interface Animation extends FileBase { + width: number; + height: number; + duration: number; + thumb?: PhotoSize | undefined; + file_name?: string | undefined; + mime_type?: string | undefined; + } + + type CallbackGame = object; + + interface GameHighScore { + position: number; + user: User; + score: number; + } + + interface Metadata { + type?: MessageType | undefined; + } + + interface BotCommand { + command: string; + description: string; + } + + interface MessageId { + message_id: number; + } + + type ChatId = number | string; + + interface BotCommandScopeDefault { + type: "default"; + } + + interface BotCommandScopeAllPrivateChats { + type: "all_private_chats"; + } + + interface BotCommandScopeAllGroupChats { + type: "all_group_chats"; + } + + interface BotCommandScopeAllChatAdministrators { + type: "all_chat_administrators"; + } + + interface BotCommandScopeChat { + type: "chat"; + chat_id: ChatId; + } + + interface BotCommandScopeChatAdministrators { + type: "chat_administrators"; + chat_id: ChatId; + } + + interface BotCommandScopeChatMember { + type: "chat_member"; + chat_id: ChatId; + user_id: number; + } + + type BotCommandScope = + | BotCommandScopeDefault + | BotCommandScopeAllPrivateChats + | BotCommandScopeAllGroupChats + | BotCommandScopeAllChatAdministrators + | BotCommandScopeChat + | BotCommandScopeChatAdministrators + | BotCommandScopeChatMember; + interface WebAppInfo { + url: string; + } + + interface WebAppData { + data: string; + button_text: string; + } + + interface MenuButtonCommands { + type: "commands"; + } + interface MenuButtonWebApp { + type: "web_app"; + text: string; + web_app: WebAppInfo; + } + interface MenuButtonDefault { + type: "default"; + } + + type MenuButton = MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault; + + interface ChatAdministratorRights { + is_anonymous: boolean; + can_manage_chat: boolean; + can_delete_messages: boolean; + can_manage_video_chats: boolean; + can_restrict_members: boolean; + can_promote_members: boolean; + can_change_info: boolean; + can_invite_users: boolean; + can_post_messages?: boolean; + can_edit_messages?: boolean; + can_pin_messages?: boolean; + can_manage_topics?: boolean; + } + + interface SentWebAppMessage { + inline_message_id?: string; + } + + interface TelegramEvents { + message: (message: Message, metadata: Metadata) => any; + text: (message: Message, metadata: Metadata) => any; + animation: (message: Message, metadata: Metadata) => any; + audio: (message: Message, metadata: Metadata) => any; + channel_chat_created: (message: Message, metadata: Metadata) => any; + contact: (message: Message, metadata: Metadata) => any; + delete_chat_photo: (message: Message, metadata: Metadata) => any; + document: (message: Message, metadata: Metadata) => any; + game: (message: Message, metadata: Metadata) => any; + group_chat_created: (message: Message, metadata: Metadata) => any; + invoice: (message: Message, metadata: Metadata) => any; + left_chat_member: (message: Message, metadata: Metadata) => any; + location: (message: Message, metadata: Metadata) => any; + migrate_from_chat_id: (message: Message, metadata: Metadata) => any; + migrate_to_chat_id: (message: Message, metadata: Metadata) => any; + new_chat_members: (message: Message, metadata: Metadata) => any; + new_chat_photo: (message: Message, metadata: Metadata) => any; + new_chat_title: (message: Message, metadata: Metadata) => any; + passport_data: (message: Message, metadata: Metadata) => any; + photo: (message: Message, metadata: Metadata) => any; + pinned_message: (message: Message, metadata: Metadata) => any; + sticker: (message: Message, metadata: Metadata) => any; + successful_payment: (message: Message, metadata: Metadata) => any; + supergroup_chat_created: (message: Message, metadata: Metadata) => any; + video: (message: Message, metadata: Metadata) => any; + video_note: (message: Message, metadata: Metadata) => any; + voice: (message: Message, metadata: Metadata) => any; + video_chat_started: (message: Message, metadata: Metadata) => any; + video_chat_ended: (message: Message, metadata: Metadata) => any; + video_chat_participants_invited: (message: Message, metadata: Metadata) => any; + video_chat_scheduled: (message: Message, metadata: Metadata) => any; + message_auto_delete_timer_changed: (message: Message, metadata: Metadata) => any; + chat_invite_link: (message: Message, metadata: Metadata) => any; + chat_member_updated: (message: Message, metadata: Metadata) => any; + web_app_data: (message: Message, metadata: Metadata) => any; + callback_query: (query: CallbackQuery) => any; + inline_query: (query: InlineQuery) => any; + poll: (pollObject: Poll) => any; + poll_answer: (poll: PollAnswer) => any; + chat_member: (member: ChatMemberUpdated) => any; + my_chat_member: (member: ChatMemberUpdated) => any; + chosen_inline_result: (result: ChosenInlineResult) => any; + channel_post: (message: Message) => any; + edited_message: (message: Message) => any; + edited_message_text: (message: Message) => any; + edited_message_caption: (message: Message) => any; + edited_channel_post: (message: Message) => any; + edited_channel_post_text: (message: Message) => any; + edited_channel_post_caption: (message: Message) => any; + shipping_query: (query: ShippingQuery) => any; + pre_checkout_query: (query: PreCheckoutQuery) => any; + polling_error: (error: Error) => any; + webhook_error: (error: Error) => any; + chat_join_request: (query: ChatJoinRequest) => any; + message_reaction: (reaction: MessageReactionUpdated) => any; + } + } + + class TelegramBotEventEmitter> { + on>(event: K, listener: E[K]): TelegramBotEventEmitter; + on( + event: Exclude, + listener: (...args: any[]) => any, + ): TelegramBotEventEmitter; + + off>(event: K, listener: E[K]): TelegramBotEventEmitter; + off( + event: Exclude, + listener: (...args: any[]) => any, + ): TelegramBotEventEmitter; + + addListener>(event: K, listener: E[K]): TelegramBotEventEmitter; + addListener( + event: Exclude, + listener: (...args: any[]) => any, + ): TelegramBotEventEmitter; + + removeListener>(event: K, listener: E[K]): TelegramBotEventEmitter; + removeListener( + event: Exclude, + listener: (...args: any[]) => any, + ): TelegramBotEventEmitter; + + prependListener>(event: K, listener: E[K]): TelegramBotEventEmitter; + prependListener( + event: Exclude, + listener: (...args: any[]) => any, + ): TelegramBotEventEmitter; + + prependOnceListener>(event: K, listener: E[K]): TelegramBotEventEmitter; + prependOnceListener( + event: Exclude, + listener: (...args: any[]) => any, + ): TelegramBotEventEmitter; + + once>(event: K, listener: E[K]): TelegramBotEventEmitter; + once( + event: Exclude, + listener: (...args: any[]) => any, + ): TelegramBotEventEmitter; + + removeAllListeners>(event?: K): TelegramBotEventEmitter; + removeAllListeners(event?: Exclude): TelegramBotEventEmitter; + + emit>(event: K, ...args: E[K]): boolean; + emit(event: Exclude, ...args: any[]): boolean; + } + + class TelegramBot extends TelegramBotEventEmitter { + constructor(token: string, options?: TelegramBot.ConstructorOptions); + + startPolling(options?: TelegramBot.StartPollingOptions): Promise; + + stopPolling(options?: TelegramBot.StopPollingOptions): Promise; + + isPolling(): boolean; + + openWebHook(): Promise; + + closeWebHook(): Promise; + + hasOpenWebHook(): boolean; + + getMe(): Promise; + + logOut(): Promise; + + close(): Promise; + + setWebHook( + url: string, + options?: TelegramBot.SetWebHookOptions, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + deleteWebHook(): Promise; + + getWebHookInfo(): Promise; + + getUpdates(options?: TelegramBot.GetUpdatesOptions): Promise; + + processUpdate(update: TelegramBot.Update): void; + + sendMessage( + chatId: TelegramBot.ChatId, + text: string, + options?: TelegramBot.SendMessageOptions, + ): Promise; + + answerInlineQuery( + inlineQueryId: string, + results: readonly TelegramBot.InlineQueryResult[], + options?: TelegramBot.AnswerInlineQueryOptions, + ): Promise; + + forwardMessage( + chatId: TelegramBot.ChatId, + fromChatId: TelegramBot.ChatId, + messageId: number, + options?: TelegramBot.ForwardMessageOptions, + ): Promise; + + copyMessage( + chatId: TelegramBot.ChatId, + fromChatId: TelegramBot.ChatId, + messageId: number, + options?: TelegramBot.CopyMessageOptions, + ): Promise; + + sendPhoto( + chatId: TelegramBot.ChatId, + photo: string | Stream | Buffer, + options?: TelegramBot.SendPhotoOptions, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + sendAudio( + chatId: TelegramBot.ChatId, + audio: string | Stream | Buffer, + options?: TelegramBot.SendAudioOptions, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + sendAnimation( + chatId: TelegramBot.ChatId, + animation: string | Stream | Buffer, + options?: TelegramBot.SendAnimationOptions, + ): Promise; + + sendDice(chatId: TelegramBot.ChatId, options?: TelegramBot.SendDiceOptions): Promise; + + sendDocument( + chatId: TelegramBot.ChatId, + doc: string | Stream | Buffer, + options?: TelegramBot.SendDocumentOptions, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + sendMediaGroup( + chatId: TelegramBot.ChatId, + media: readonly TelegramBot.InputMedia[], + options?: TelegramBot.SendMediaGroupOptions, + ): Promise; + + sendPoll( + chatId: TelegramBot.ChatId, + question: string, + pollOptions: readonly string[], + options?: TelegramBot.SendPollOptions, + ): Promise; + + // `messageId` was referred to as `pollId` in `node-telegram-bot-api/src/telegram.js`, + // but actually `pollId` is another thing, and I believe that's a mistake. + // see https://core.telegram.org/bots/api#stoppoll for more info. + stopPoll( + chatId: TelegramBot.ChatId, + messageId: number, + options?: TelegramBot.StopPollOptions, + ): Promise; + + sendSticker( + chatId: TelegramBot.ChatId, + sticker: string | Stream | Buffer, + options?: TelegramBot.SendStickerOptions, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + getStickerSet(name: string, options?: {}): Promise; + + getCustomEmojiStickers(customEmojiIds: string[], options?: {}): Promise; + + uploadStickerFile( + userId: number, + pngSticker: string | Stream | Buffer, + options?: {}, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + createNewStickerSet( + userId: number, + name: string, + title: string, + pngSticker: string | Stream | Buffer, + emojis: string, + options?: TelegramBot.CreateStickerSetOptions, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + addStickerToSet( + userId: number, + name: string, + sticker: string | Stream | Buffer, + emojis: string, + stickerType: "png_sticker" | "tgs_sticker" | "webm_sticker", + options?: TelegramBot.AddStickerToSetOptions, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + setStickerPositionInSet(sticker: string, position: number): Promise; + + deleteStickerFromSet(sticker: string, options?: {}): Promise; + + setStickerSetThumb( + userId: number, + name: string, + pngThumb: string | Stream | Buffer, + options?: {}, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + sendVideo( + chatId: TelegramBot.ChatId, + video: string | Stream | Buffer, + options?: TelegramBot.SendVideoOptions, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + sendVideoNote( + chatId: TelegramBot.ChatId, + videoNote: string | Stream | Buffer, + options?: TelegramBot.SendVideoNoteOptions, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + sendVoice( + chatId: TelegramBot.ChatId, + voice: string | Stream | Buffer, + options?: TelegramBot.SendVoiceOptions, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + sendChatAction( + chatId: TelegramBot.ChatId, + action: TelegramBot.ChatAction, + options?: TelegramBot.SendChatActionOptions, + ): Promise; + + banChatMember(chatId: TelegramBot.ChatId, userId: number, options?: TelegramBot.BanOptions): Promise; + + unbanChatMember( + chatId: TelegramBot.ChatId, + userId: number, + options?: TelegramBot.UnbanOptions, + ): Promise; + + banChatSenderChat(chatId: TelegramBot.ChatId, senderChatId: TelegramBot.ChatId): Promise; + + unbanChatSenderChat(chatId: TelegramBot.ChatId, senderChatId: TelegramBot.ChatId): Promise; + + restrictChatMember( + chatId: TelegramBot.ChatId, + userId: number, + options?: TelegramBot.RestrictChatMemberOptionsWithChatPermissions, + ): Promise; + + restrictChatMember( + chatId: TelegramBot.ChatId, + userId: number, + options?: TelegramBot.RestrictChatMemberOptions & { permissions?: string }, + ): Promise; + + /** + * @deprecated + */ + restrictChatMember( + chatId: TelegramBot.ChatId, + userId: number, + options?: TelegramBot.RestrictChatMemberOptions & { + permissions?: TelegramBot.ChatPermissions; + }, + ): Promise; + + restrictChatMember( + chatId: TelegramBot.ChatId, + userId: number, + options?: TelegramBot.RestrictChatMemberOptions & { permissions?: string | TelegramBot.ChatPermissions }, + ): Promise; + + promoteChatMember( + chatId: TelegramBot.ChatId, + userId: number, + options?: TelegramBot.PromoteChatMemberOptions, + ): Promise; + + exportChatInviteLink(chatId: TelegramBot.ChatId): Promise; + + createChatInviteLink( + chatId: TelegramBot.ChatId, + options?: { + name?: string; + expire_date?: number; + member_limit?: number; + creates_join_request?: boolean; + }, + ): Promise; + + editChatInviteLink( + chatId: TelegramBot.ChatId, + inviteLink: string, + options?: { + name?: string; + expire_date?: number; + member_limit?: number; + creates_join_request?: boolean; + }, + ): Promise; + + revokeChatInviteLink(chatId: TelegramBot.ChatId, inviteLink: string): Promise; + + approveChatJoinRequest(chatId: TelegramBot.ChatId, userId: number, form?: object): Promise; + + declineChatJoinRequest(chatId: TelegramBot.ChatId, userId: number, form?: object): Promise; + + setChatPhoto( + chatId: TelegramBot.ChatId, + photo: string | Stream | Buffer, + options?: object, + fileOptions?: TelegramBot.FileOptions, + ): Promise; + + deleteChatPhoto(chatId: TelegramBot.ChatId): Promise; + + setChatTitle(chatId: TelegramBot.ChatId, title: string): Promise; + + setChatDescription(chatId: TelegramBot.ChatId, description: string): Promise; + + pinChatMessage( + chatId: TelegramBot.ChatId, + messageId: number, + options?: TelegramBot.PinChatMessageOptions, + ): Promise; + + unpinChatMessage(chatId: TelegramBot.ChatId, options?: TelegramBot.UnpinChatMessageOptions): Promise; + + unpinAllChatMessages(chatId: TelegramBot.ChatId): Promise; + + answerCallbackQuery( + callbackQueryId: string, + options?: Partial, + ): Promise; + + /** + * @deprecated since version 0.30.0 + */ + answerCallbackQuery(options?: TelegramBot.AnswerCallbackQueryOptions): Promise; + + editMessageText( + text: string, + options?: TelegramBot.EditMessageTextOptions, + ): Promise; + + editMessageCaption( + caption: string, + options?: TelegramBot.EditMessageCaptionOptions, + ): Promise; + + editMessageMedia( + media: TelegramBot.InputMedia, + options: TelegramBot.EditMessageMediaOptions, + ): Promise; + + editMessageReplyMarkup( + replyMarkup: TelegramBot.InlineKeyboardMarkup, + options?: TelegramBot.EditMessageReplyMarkupOptions, + ): Promise; + + getUserProfilePhotos( + userId: number, + options?: TelegramBot.GetUserProfilePhotosOptions, + ): Promise; + + sendLocation( + chatId: TelegramBot.ChatId, + latitude: number, + longitude: number, + options?: TelegramBot.SendLocationOptions, + ): Promise; + + editMessageLiveLocation( + latitude: number, + longitude: number, + options?: TelegramBot.EditMessageLiveLocationOptions, + ): Promise; + + stopMessageLiveLocation( + options?: TelegramBot.StopMessageLiveLocationOptions, + ): Promise; + + sendVenue( + chatId: TelegramBot.ChatId, + latitude: number, + longitude: number, + title: string, + address: string, + options?: TelegramBot.SendVenueOptions, + ): Promise; + + sendContact( + chatId: TelegramBot.ChatId, + phoneNumber: string, + firstName: string, + options?: TelegramBot.SendContactOptions, + ): Promise; + + getFile(fileId: string): Promise; + + getFileLink(fileId: string): Promise; + + getFileStream(fileId: string): Readable; + + downloadFile(fileId: string, downloadDir: string): Promise; + + onText(regexp: RegExp, callback: (msg: TelegramBot.Message, match: RegExpExecArray | null) => void): void; + + removeTextListener(regexp: RegExp): TelegramBot.TextListener | null; + + clearTextListeners(): void; + + onReplyToMessage( + chatId: TelegramBot.ChatId, + messageId: number, + callback: (msg: TelegramBot.Message) => void, + ): number; + + removeReplyListener(replyListenerId: number): TelegramBot.ReplyListener; + + clearReplyListeners(): void; + + getChat(chatId: TelegramBot.ChatId): Promise; + + getChatAdministrators(chatId: TelegramBot.ChatId): Promise; + + getChatMemberCount(chatId: TelegramBot.ChatId): Promise; + + getChatMember(chatId: TelegramBot.ChatId, userId: number): Promise; + + leaveChat(chatId: TelegramBot.ChatId): Promise; + + setChatStickerSet(chatId: TelegramBot.ChatId, stickerSetName: string): Promise; + + deleteChatStickerSet(chatId: TelegramBot.ChatId): Promise; + + createForumTopic( + chatId: TelegramBot.ChatId, + name: string, + options?: TelegramBot.CreateForumTopicOptions, + ): Promise; + + editForumTopic( + chatId: TelegramBot.ChatId, + messageThreadId: number, + options?: TelegramBot.EditForumTopicOptions, + ): Promise; + + closeForumTopic(chatId: TelegramBot.ChatId, messageThreadId: number): Promise; + + reopenForumTopic(chatId: TelegramBot.ChatId, messageThreadId: number): Promise; + + deleteForumTopic(chatId: TelegramBot.ChatId, messageThreadId: number): Promise; + + unpinAllForumTopicMessages(chatId: TelegramBot.ChatId, messageThreadId: number): Promise; + + editGeneralForumTopic(chatId: TelegramBot.ChatId, name: string): Promise; + + closeGeneralForumTopic(chatId: TelegramBot.ChatId): Promise; + + reopenGeneralForumTopic(chatId: TelegramBot.ChatId): Promise; + + hideGeneralForumTopic(chatId: TelegramBot.ChatId): Promise; + + unhideGeneralForumTopic(chatId: TelegramBot.ChatId): Promise; + + sendGame( + chatId: TelegramBot.ChatId, + gameShortName: string, + options?: TelegramBot.SendGameOptions, + ): Promise; + + setGameScore( + userId: number, + score: number, + options?: TelegramBot.SetGameScoreOptions, + ): Promise; + + getGameHighScores( + userId: number, + options?: TelegramBot.GetGameHighScoresOptions, + ): Promise; + + deleteMessage(chatId: TelegramBot.ChatId, messageId: number, options?: any): Promise; + + sendInvoice( + chatId: TelegramBot.ChatId, + title: string, + description: string, + payload: string, + providerToken: string, + currency: string, + prices: readonly TelegramBot.LabeledPrice[], + options?: TelegramBot.SendInvoiceOptions, + ): Promise; + + answerShippingQuery( + shippingQueryId: string, + ok: boolean, + options?: TelegramBot.AnswerShippingQueryOptions, + ): Promise; + + answerPreCheckoutQuery( + preCheckoutQueryId: string, + ok: boolean, + options?: TelegramBot.AnswerPreCheckoutQueryOptions, + ): Promise; + + listeners(event: keyof TelegramBot.TelegramEvents): Array<(data: any, metadata?: TelegramBot.Metadata) => void>; + + rawListeners( + event: keyof TelegramBot.TelegramEvents, + ): Array<(data: any, metadata?: TelegramBot.Metadata) => void>; + + eventNames(): Array; + + listenerCount(event: keyof TelegramBot.TelegramEvents): number; + + setChatPermissions( + chatId: TelegramBot.ChatId, + chatPermissions: TelegramBot.ChatPermissions, + options?: TelegramBot.SetChatPermissionsOptions, + ): Promise; + + setChatAdministratorCustomTitle( + chatId: TelegramBot.ChatId, + userId: number, + customTitle: string, + ): Promise; + + getMyCommands(scope?: TelegramBot.BotCommandScope, language_code?: string): Promise; + + setMyCommands( + commands: TelegramBot.BotCommand[], + options?: { + language_code?: string; + scope?: TelegramBot.BotCommandScope; + }, + ): Promise; + + setChatMenuButton(form: { chat_id?: number; menu_button?: TelegramBot.MenuButton }): Promise; + + getChatMenuButton(form: { chat_id?: number }): Promise; + + setMyDefaultAdministratorRights(form: { + rights?: TelegramBot.ChatAdministratorRights; + for_channels?: boolean; + }): Promise; + + getMyDefaultAdministratorRights(form: { for_channels?: boolean }): Promise; + + answerWebAppQuery( + web_app_query_id: string, + result: TelegramBot.InlineQueryResult, + ): Promise; + + setMessageReaction( + chatId: TelegramBot.ChatId, + messageId: number, + options?: TelegramBot.SetMessageReactionOptions, + ): Promise; + } + export = TelegramBot; +} diff --git a/src/utils/fsUtils.ts b/src/utils/fsUtils.ts index 7a00fea..03f2d9a 100644 --- a/src/utils/fsUtils.ts +++ b/src/utils/fsUtils.ts @@ -83,11 +83,10 @@ export async function appendContentToNote( if (!notePath || !newContent.trim()) return; if (startLine == undefined) startLine = ""; - let noteFile: TFile = vault.getAbstractFileByPath(notePath) as TFile; + const noteFile: TFile = vault.getAbstractFileByPath(notePath) as TFile; - if (!noteFile) noteFile = await vault.create(notePath, ""); - - const currentContent = await vault.read(noteFile); + let currentContent = ""; + if (noteFile) currentContent = await vault.read(noteFile); let index = reversedOrder ? 0 : currentContent.length; if (currentContent.length == 0 && !startLine) delimiter = ""; newContent = reversedOrder ? newContent + delimiter : delimiter + newContent; @@ -99,7 +98,8 @@ export async function appendContentToNote( } const content = currentContent.slice(0, index) + newContent + currentContent.slice(index); - if (currentContent != content) await vault.modify(noteFile, content); + if (!noteFile) await vault.create(notePath, content); + else if (currentContent != content) await vault.modify(noteFile, content); } export function base64ToString(base64: string): string { diff --git a/src/utils/logUtils.ts b/src/utils/logUtils.ts index 9d2204d..bf2e887 100644 --- a/src/utils/logUtils.ts +++ b/src/utils/logUtils.ts @@ -13,9 +13,9 @@ export const _5min = 5 * _1min; export const _30min = 30 * _1min; export const _1h = 60 * _1min; export const _2h = 2 * _1h; -export const doNotHide = 24 * _1h; +export const _day = 24 * _1h; -// TODO in 2024: connect with ConnectionStatus +// TODO LOW: connect with ConnectionStatus export enum StatusMessages { BOT_CONNECTED = "Telegram bot is connected!", BOT_DISCONNECTED = "Telegram bot is disconnected!", @@ -35,7 +35,7 @@ export function displayAndLog(plugin: TelegramSyncPlugin, message: string, timeo console.log(`${plugin.manifest.name} => ${message}`); if (timeout == 0) return; - const notice = new Notice(message, timeout || doNotHide); + const notice = new Notice(message, timeout || _day); const hideBotDisconnectedMessages = message.contains(StatusMessages.BOT_CONNECTED); persistentNotices = persistentNotices.filter((persistentNotice) => {