diff --git a/CHANGELOG.md b/CHANGELOG.md index cfae1c3b..cea31470 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,160 +1,213 @@ +## [1.5.4](https://github.com/kotorijs/kotori/compare/v1.5.3...v1.5.4) (2024-06-07) + + + ## [1.5.3](https://github.com/kotorijs/kotori/compare/v1.5.0...v1.5.3) (2024-06-07) + ### Bug Fixes -- module version support information ([0756359](https://github.com/kotorijs/kotori/commit/07563592c160edd437d110cf54daba3062953072)) -- some bugs ([14e2a0e](https://github.com/kotorijs/kotori/commit/14e2a0ef2ed8dd759882e9d343af4bfa8f13899e)) +* module version support information ([0756359](https://github.com/kotorijs/kotori/commit/07563592c160edd437d110cf54daba3062953072)) +* some bugs ([14e2a0e](https://github.com/kotorijs/kotori/commit/14e2a0ef2ed8dd759882e9d343af4bfa8f13899e)) + ### Features -- delete dev-source mode ([4517c54](https://github.com/kotorijs/kotori/commit/4517c5405576a9cdec4241ae4284c0a833c1e985)) +* delete dev-source mode ([4517c54](https://github.com/kotorijs/kotori/commit/4517c5405576a9cdec4241ae4284c0a833c1e985)) + + # [1.5.0](https://github.com/kotorijs/kotori/compare/v1.4.2-beta.1...v1.5.0) (2024-06-07) + ### Features -- logger color method ([ea94103](https://github.com/kotorijs/kotori/commit/ea94103a4a65f5da78c62e5d952a6c41d6df916c)) -- logger color method ([cb7cb12](https://github.com/kotorijs/kotori/commit/cb7cb128b3fe8eac2799d4a98eaadae04de246c5)) +* logger color method ([ea94103](https://github.com/kotorijs/kotori/commit/ea94103a4a65f5da78c62e5d952a6c41d6df916c)) +* logger color method ([cb7cb12](https://github.com/kotorijs/kotori/commit/cb7cb128b3fe8eac2799d4a98eaadae04de246c5)) + + ## [1.4.2-beta.1](https://github.com/kotorijs/kotori/compare/v1.4.1...v1.4.2-beta.1) (2024-06-06) + ### Bug Fixes -- add locales with loader ([324c315](https://github.com/kotorijs/kotori/commit/324c315bc8f3e97618e5006f1140ac00ec904c7d)) +* add locales with loader ([324c315](https://github.com/kotorijs/kotori/commit/324c315bc8f3e97618e5006f1140ac00ec904c7d)) + ### Features -- Adapter websocket and server ([365a320](https://github.com/kotorijs/kotori/commit/365a3205dc78c3a2064f975b3e7bc53a027287f2)) -- command args and opts infer display ([9acbd69](https://github.com/kotorijs/kotori/commit/9acbd699359f16639b21845196c501203596e440)) -- command type display ([4b893b8](https://github.com/kotorijs/kotori/commit/4b893b891006ed6e5f6ca132a869b1f5a0364970)) -- http and ws merge ([01abaa9](https://github.com/kotorijs/kotori/commit/01abaa976b6570e08503d50d11e0dd56b910cd02)) -- logger record, msg stats sync ([e6f654d](https://github.com/kotorijs/kotori/commit/e6f654d2c63aa80b34a7c08db763b04da764654e)) -- message ctx.notify() ([1d0e596](https://github.com/kotorijs/kotori/commit/1d0e596c80bf970db36ca13929f06ddf2533a6a2)) -- usage record and ctx.task() ([37a8483](https://github.com/kotorijs/kotori/commit/37a848328dae6fdc951a88b6cf63839c0282bdca)) -- webui auth ([4277125](https://github.com/kotorijs/kotori/commit/42771258b055cdebe9a80c779b74703249f0cdbe)) -- webui auth ([48c3bd2](https://github.com/kotorijs/kotori/commit/48c3bd290cee3138274254f47350c64bb37b7751)) +* Adapter websocket and server ([365a320](https://github.com/kotorijs/kotori/commit/365a3205dc78c3a2064f975b3e7bc53a027287f2)) +* command args and opts infer display ([9acbd69](https://github.com/kotorijs/kotori/commit/9acbd699359f16639b21845196c501203596e440)) +* command type display ([4b893b8](https://github.com/kotorijs/kotori/commit/4b893b891006ed6e5f6ca132a869b1f5a0364970)) +* http and ws merge ([01abaa9](https://github.com/kotorijs/kotori/commit/01abaa976b6570e08503d50d11e0dd56b910cd02)) +* logger record, msg stats sync ([e6f654d](https://github.com/kotorijs/kotori/commit/e6f654d2c63aa80b34a7c08db763b04da764654e)) +* message ctx.notify() ([1d0e596](https://github.com/kotorijs/kotori/commit/1d0e596c80bf970db36ca13929f06ddf2533a6a2)) +* usage record and ctx.task() ([37a8483](https://github.com/kotorijs/kotori/commit/37a848328dae6fdc951a88b6cf63839c0282bdca)) +* webui auth ([4277125](https://github.com/kotorijs/kotori/commit/42771258b055cdebe9a80c779b74703249f0cdbe)) +* webui auth ([48c3bd2](https://github.com/kotorijs/kotori/commit/48c3bd290cee3138274254f47350c64bb37b7751)) + + ## [1.4.1](https://github.com/kotorijs/kotori/compare/v1.4.0...v1.4.1) (2024-05-12) + ### Bug Fixes -- pnpm dev start ([c7cc457](https://github.com/kotorijs/kotori/commit/c7cc457b9d76184508cd2dc28f174f4ef83ff21f)) -- some bugs ([a870a6d](https://github.com/kotorijs/kotori/commit/a870a6dd783afb54d78bae789b38cd5f1d79faca)) -- webui login token ([35843e1](https://github.com/kotorijs/kotori/commit/35843e10eacbba61c0a9002c855cef0a2be49121)) +* pnpm dev start ([c7cc457](https://github.com/kotorijs/kotori/commit/c7cc457b9d76184508cd2dc28f174f4ef83ff21f)) +* some bugs ([a870a6d](https://github.com/kotorijs/kotori/commit/a870a6dd783afb54d78bae789b38cd5f1d79faca)) +* webui login token ([35843e1](https://github.com/kotorijs/kotori/commit/35843e10eacbba61c0a9002c855cef0a2be49121)) + + # [1.4.0](https://github.com/kotorijs/kotori/compare/v1.3.2...v1.4.0) (2024-05-05) + ### Bug Fixes -- Module Version with core tips ([b6b55cb](https://github.com/kotorijs/kotori/commit/b6b55cb524596e22a7e1fd1cfea952e29a82049c)) +* Module Version with core tips ([b6b55cb](https://github.com/kotorijs/kotori/commit/b6b55cb524596e22a7e1fd1cfea952e29a82049c)) + ### Features -- decorator module form ([e049c10](https://github.com/kotorijs/kotori/commit/e049c10456f099c7b56a9642887de0de0fd38b0f)) -- kotori-plugin-adapter-minecraft ([56e9eae](https://github.com/kotorijs/kotori/commit/56e9eaef6ed1702a164b2596b3389248d0b2d0b5)) -- meta-framework fluoro ([cfee895](https://github.com/kotorijs/kotori/commit/cfee895cf4e7011dd2850e679fb96fe0ca805993)) -- webui ([b4bd053](https://github.com/kotorijs/kotori/commit/b4bd053df6407576b507363f55a3083b7b3daef3)) -- webui websocket and stats ([0ac6331](https://github.com/kotorijs/kotori/commit/0ac63314eb8b72b6ed5136634bb75933255fcf54)) +* decorator module form ([e049c10](https://github.com/kotorijs/kotori/commit/e049c10456f099c7b56a9642887de0de0fd38b0f)) +* kotori-plugin-adapter-minecraft ([56e9eae](https://github.com/kotorijs/kotori/commit/56e9eaef6ed1702a164b2596b3389248d0b2d0b5)) +* meta-framework fluoro ([cfee895](https://github.com/kotorijs/kotori/commit/cfee895cf4e7011dd2850e679fb96fe0ca805993)) +* webui ([b4bd053](https://github.com/kotorijs/kotori/commit/b4bd053df6407576b507363f55a3083b7b3daef3)) +* webui websocket and stats ([0ac6331](https://github.com/kotorijs/kotori/commit/0ac63314eb8b72b6ed5136634bb75933255fcf54)) + + ## [1.3.2](https://github.com/kotorijs/kotori/compare/v1.3.1...v1.3.2) (2024-02-24) + ### Bug Fixes -- cli version view and fucking packages ([cbaf26d](https://github.com/kotorijs/kotori/commit/cbaf26d43afa5b4dfef003cbf5f8fc2ef209cc51)) -- linux database install ([26d2c03](https://github.com/kotorijs/kotori/commit/26d2c03f32097ac5ab8d5a4e63e3444735f94c4f)) +* cli version view and fucking packages ([cbaf26d](https://github.com/kotorijs/kotori/commit/cbaf26d43afa5b4dfef003cbf5f8fc2ef209cc51)) +* linux database install ([26d2c03](https://github.com/kotorijs/kotori/commit/26d2c03f32097ac5ab8d5a4e63e3444735f94c4f)) + + ## [1.3.1](https://github.com/kotorijs/kotori/compare/v1.2.0...v1.3.1) (2024-02-21) + ### Bug Fixes -- alias,manger,requester,drift-bottle ([4b9deb5](https://github.com/kotorijs/kotori/commit/4b9deb5308d196c89c71d0ba8d22b280dd60d7ae)) -- async session events ([26f2915](https://github.com/kotorijs/kotori/commit/26f29157dd1db49e65c428bf570813a8ab684d00)) -- loader catch error ([d1914be](https://github.com/kotorijs/kotori/commit/d1914bee4d1b2adec136195004442706a8a97b85)) -- update service content ([dd7f912](https://github.com/kotorijs/kotori/commit/dd7f9122f50bcba3ad8669bbcd0f641aced0195e)) +* alias,manger,requester,drift-bottle ([4b9deb5](https://github.com/kotorijs/kotori/commit/4b9deb5308d196c89c71d0ba8d22b280dd60d7ae)) +* async session events ([26f2915](https://github.com/kotorijs/kotori/commit/26f29157dd1db49e65c428bf570813a8ab684d00)) +* loader catch error ([d1914be](https://github.com/kotorijs/kotori/commit/d1914bee4d1b2adec136195004442706a8a97b85)) +* update service content ([dd7f912](https://github.com/kotorijs/kotori/commit/dd7f9122f50bcba3ad8669bbcd0f641aced0195e)) + ### Features -- database,cache,file and server service ([536a6b9](https://github.com/kotorijs/kotori/commit/536a6b92886af2e53d3b2b8375e3615da7a54968)) -- prompt, confirm and run-code plugin ([aa4848e](https://github.com/kotorijs/kotori/commit/aa4848e6bdf8a85af60125a7ac679ce3e83fa30c)) -- requester run-code modules ([f75a341](https://github.com/kotorijs/kotori/commit/f75a341642784e0bad6b4ea2266501055b721c15)) -- requester,manger,alias modules ([1f145c6](https://github.com/kotorijs/kotori/commit/1f145c6f9d060774edd02268194b3609b88cd7b8)) -- sandbox ([e98b4b4](https://github.com/kotorijs/kotori/commit/e98b4b48a5de66427456dce94758695f7a7b0703)) -- sed and access ([24b6549](https://github.com/kotorijs/kotori/commit/24b6549b9a8f4157ad302ad29f1df83e25d68db4)) -- service, cache, database and server ([58a0ae0](https://github.com/kotorijs/kotori/commit/58a0ae02b60493f2fc205c125856b8ed7a7d7d89)) -- status and minecraft modules ([f100467](https://github.com/kotorijs/kotori/commit/f100467a15ec95dcecaa52fcbeca530d9be49b8c)) -- webui ([3743694](https://github.com/kotorijs/kotori/commit/37436945c5ba6e2a8d18aad17d27613f6f975dd5)) -- webui websocket and sandbox ([f64e25f](https://github.com/kotorijs/kotori/commit/f64e25f196756287c9f0b0087493eb184e10201a)) +* database,cache,file and server service ([536a6b9](https://github.com/kotorijs/kotori/commit/536a6b92886af2e53d3b2b8375e3615da7a54968)) +* prompt, confirm and run-code plugin ([aa4848e](https://github.com/kotorijs/kotori/commit/aa4848e6bdf8a85af60125a7ac679ce3e83fa30c)) +* requester run-code modules ([f75a341](https://github.com/kotorijs/kotori/commit/f75a341642784e0bad6b4ea2266501055b721c15)) +* requester,manger,alias modules ([1f145c6](https://github.com/kotorijs/kotori/commit/1f145c6f9d060774edd02268194b3609b88cd7b8)) +* sandbox ([e98b4b4](https://github.com/kotorijs/kotori/commit/e98b4b48a5de66427456dce94758695f7a7b0703)) +* sed and access ([24b6549](https://github.com/kotorijs/kotori/commit/24b6549b9a8f4157ad302ad29f1df83e25d68db4)) +* service, cache, database and server ([58a0ae0](https://github.com/kotorijs/kotori/commit/58a0ae02b60493f2fc205c125856b8ed7a7d7d89)) +* status and minecraft modules ([f100467](https://github.com/kotorijs/kotori/commit/f100467a15ec95dcecaa52fcbeca530d9be49b8c)) +* webui ([3743694](https://github.com/kotorijs/kotori/commit/37436945c5ba6e2a8d18aad17d27613f6f975dd5)) +* webui websocket and sandbox ([f64e25f](https://github.com/kotorijs/kotori/commit/f64e25f196756287c9f0b0087493eb184e10201a)) + + # [1.2.0](https://github.com/kotorijs/kotori/compare/v1.1.0...v1.2.0) (2024-02-06) + ### Bug Fixes -- module load logic ([8b4c508](https://github.com/kotorijs/kotori/commit/8b4c508e24315f167ed5cd02d505134586de7259)) +* module load logic ([8b4c508](https://github.com/kotorijs/kotori/commit/8b4c508e24315f167ed5cd02d505134586de7259)) + ### Features -- events class move to @kotori-bot/tools ([a4e016d](https://github.com/kotorijs/kotori/commit/a4e016d9e898932af8017f0251a5a1d951ab2a7b)) -- new @kotori-bot/i18n ([b2bf016](https://github.com/kotorijs/kotori/commit/b2bf0161f10b2dec494ca3d109fc36ff853d8377)) -- new command parse ([85f1ea0](https://github.com/kotorijs/kotori/commit/85f1ea031073f636c2e0374e7bce979d91d3648c)) -- new context ([4843569](https://github.com/kotorijs/kotori/commit/4843569e9242aba4c1af48c0ccf6f532e229c392)) -- new logger ([f2cfd06](https://github.com/kotorijs/kotori/commit/f2cfd067bbd20e70eed00d6e8d662b15b7baf1a8)) -- qqadapter send image ([be9e966](https://github.com/kotorijs/kotori/commit/be9e966c8c44e0057a8a22110c979b2502d753c8)) -- service, cache, module config ([8a347ec](https://github.com/kotorijs/kotori/commit/8a347ec0b8c4225914847009d17573c6dadfc6a3)) -- service, cache, module config ([83bf83e](https://github.com/kotorijs/kotori/commit/83bf83eba328ac55adcebf2b4387ec5277c2c385)) -- service, cache, module config ([d42ec69](https://github.com/kotorijs/kotori/commit/d42ec69cf53450ffc776e1aaf28a360da758f389)) +* events class move to @kotori-bot/tools ([a4e016d](https://github.com/kotorijs/kotori/commit/a4e016d9e898932af8017f0251a5a1d951ab2a7b)) +* new @kotori-bot/i18n ([b2bf016](https://github.com/kotorijs/kotori/commit/b2bf0161f10b2dec494ca3d109fc36ff853d8377)) +* new command parse ([85f1ea0](https://github.com/kotorijs/kotori/commit/85f1ea031073f636c2e0374e7bce979d91d3648c)) +* new context ([4843569](https://github.com/kotorijs/kotori/commit/4843569e9242aba4c1af48c0ccf6f532e229c392)) +* new logger ([f2cfd06](https://github.com/kotorijs/kotori/commit/f2cfd067bbd20e70eed00d6e8d662b15b7baf1a8)) +* qqadapter send image ([be9e966](https://github.com/kotorijs/kotori/commit/be9e966c8c44e0057a8a22110c979b2502d753c8)) +* service, cache, module config ([8a347ec](https://github.com/kotorijs/kotori/commit/8a347ec0b8c4225914847009d17573c6dadfc6a3)) +* service, cache, module config ([83bf83e](https://github.com/kotorijs/kotori/commit/83bf83eba328ac55adcebf2b4387ec5277c2c385)) +* service, cache, module config ([d42ec69](https://github.com/kotorijs/kotori/commit/d42ec69cf53450ffc776e1aaf28a360da758f389)) + + # [1.1.0](https://github.com/kotorijs/kotori/compare/v1.0.0...v1.1.0) (2023-12-31) + ### Features -- kotori-bot core ([ab3894e](https://github.com/kotorijs/kotori/commit/ab3894e54a391653b3169ddbb6770d17e85bd8d3)) +* kotori-bot core ([ab3894e](https://github.com/kotorijs/kotori/commit/ab3894e54a391653b3169ddbb6770d17e85bd8d3)) + + # [1.0.0](https://github.com/kotorijs/kotori/compare/v0.7.8...v1.0.0) (2023-12-29) + ### Features -- add more callback type and querytool ([952d6fc](https://github.com/kotorijs/kotori/commit/952d6fc9e2bd34af3c7f77c63e8652c8ad7a14bb)) -- add some events and fix command,message ([a68b292](https://github.com/kotorijs/kotori/commit/a68b292b165b02707cce04818c0226adc9876e21)) -- cmd adapter and loader modules ([d698df1](https://github.com/kotorijs/kotori/commit/d698df1cdae524c43a39bd75aeebde8c32fdca39)) -- cmd adapter and loader modules ([f2b656a](https://github.com/kotorijs/kotori/commit/f2b656a3a367d74a1b16a058430d7027b539a2e4)) -- loader and modules && mixed && command ([c0a2abe](https://github.com/kotorijs/kotori/commit/c0a2abe5a27dbb7a3f5523861ca1310c76b1645f)) -- loader and modules && mixed && command ([9ba0bc9](https://github.com/kotorijs/kotori/commit/9ba0bc98a18aa193d588630c8c6ca8c9ab3a25e8)) -- loader and modules,mixed,command ([5d11c5f](https://github.com/kotorijs/kotori/commit/5d11c5f1e25fbd30a49a5333661e1c052bdf83d2)) -- loader updated, as subpack and core-18n ([1e5a6ec](https://github.com/kotorijs/kotori/commit/1e5a6ec12cc7a3ee697fc0d4249acc2e74fe4220)) -- new plugins and adapter-tencent-qq and some fixs ([5512975](https://github.com/kotorijs/kotori/commit/55129758c529cf7ac6cc446ed2202d14c6446a63)) -- new plugins,event.before and bug fix ([283d4c8](https://github.com/kotorijs/kotori/commit/283d4c8505b828151ff84e16bfdb23d7928135ae)) -- some changes about class static ([a440959](https://github.com/kotorijs/kotori/commit/a4409593f645004b2465af2cafe7304205262bff)) -- type checker i18n and error handle ([4596740](https://github.com/kotorijs/kotori/commit/45967408dcd3957a433d7f0aa0b01dd79931ef89)) -- v1 events,modules,message,content,api,adapter,core ([b6349cb](https://github.com/kotorijs/kotori/commit/b6349cb075f1caf7d1151e607e368f4e5de44c45)) +* add more callback type and querytool ([952d6fc](https://github.com/kotorijs/kotori/commit/952d6fc9e2bd34af3c7f77c63e8652c8ad7a14bb)) +* add some events and fix command,message ([a68b292](https://github.com/kotorijs/kotori/commit/a68b292b165b02707cce04818c0226adc9876e21)) +* cmd adapter and loader modules ([d698df1](https://github.com/kotorijs/kotori/commit/d698df1cdae524c43a39bd75aeebde8c32fdca39)) +* cmd adapter and loader modules ([f2b656a](https://github.com/kotorijs/kotori/commit/f2b656a3a367d74a1b16a058430d7027b539a2e4)) +* loader and modules && mixed && command ([c0a2abe](https://github.com/kotorijs/kotori/commit/c0a2abe5a27dbb7a3f5523861ca1310c76b1645f)) +* loader and modules && mixed && command ([9ba0bc9](https://github.com/kotorijs/kotori/commit/9ba0bc98a18aa193d588630c8c6ca8c9ab3a25e8)) +* loader and modules,mixed,command ([5d11c5f](https://github.com/kotorijs/kotori/commit/5d11c5f1e25fbd30a49a5333661e1c052bdf83d2)) +* loader updated, as subpack and core-18n ([1e5a6ec](https://github.com/kotorijs/kotori/commit/1e5a6ec12cc7a3ee697fc0d4249acc2e74fe4220)) +* new plugins and adapter-tencent-qq and some fixs ([5512975](https://github.com/kotorijs/kotori/commit/55129758c529cf7ac6cc446ed2202d14c6446a63)) +* new plugins,event.before and bug fix ([283d4c8](https://github.com/kotorijs/kotori/commit/283d4c8505b828151ff84e16bfdb23d7928135ae)) +* some changes about class static ([a440959](https://github.com/kotorijs/kotori/commit/a4409593f645004b2465af2cafe7304205262bff)) +* type checker i18n and error handle ([4596740](https://github.com/kotorijs/kotori/commit/45967408dcd3957a433d7f0aa0b01dd79931ef89)) +* v1 events,modules,message,content,api,adapter,core ([b6349cb](https://github.com/kotorijs/kotori/commit/b6349cb075f1caf7d1151e607e368f4e5de44c45)) + + ## [0.7.8](https://github.com/kotorijs/kotori/compare/v0.7.7...v0.7.8) (2023-09-10) + ### Features -- grouper plugin and favicon ([3640024](https://github.com/kotorijs/kotori/commit/3640024d5a8b289826b2068a4a78b9397b9fdb5f)) +* grouper plugin and favicon ([3640024](https://github.com/kotorijs/kotori/commit/3640024d5a8b289826b2068a4a78b9397b9fdb5f)) + + ## [0.7.7](https://github.com/kotorijs/kotori/compare/v0.7.6...v0.7.7) (2023-08-26) + ### Features -- grouper plugin and favicon ([6756cee](https://github.com/kotorijs/kotori/commit/6756cee88a5bf1e1b9e88a2becef1023ca401b3a)) +* grouper plugin and favicon ([6756cee](https://github.com/kotorijs/kotori/commit/6756cee88a5bf1e1b9e88a2becef1023ca401b3a)) + + ## [0.7.6](https://github.com/kotorijs/kotori/compare/v0.7.5...v0.7.6) (2023-08-25) + ### Features -- **many plugins:** many plugins ([9e7464a](https://github.com/kotorijs/kotori/commit/9e7464ad6c0bc3e10a673063d762eb469b8cf74c)) +* **many plugins:** many plugins ([9e7464a](https://github.com/kotorijs/kotori/commit/9e7464ad6c0bc3e10a673063d762eb469b8cf74c)) + + ## [0.7.5](https://github.com/kotorijs/kotori/compare/dba239dbd4f1c4fe0067e4b603aab62c31049063...v0.7.5) (2023-08-25) + ### Bug Fixes -- regiser plugin events ([6dbca7e](https://github.com/kotorijs/kotori/commit/6dbca7e436abc05842f51154af12a12d22e7c196)) +* regiser plugin events ([6dbca7e](https://github.com/kotorijs/kotori/commit/6dbca7e436abc05842f51154af12a12d22e7c196)) + ### Features -- create module,requester ([dba239d](https://github.com/kotorijs/kotori/commit/dba239dbd4f1c4fe0067e4b603aab62c31049063)) -- framework ([18cbe84](https://github.com/kotorijs/kotori/commit/18cbe84ecb5cbbca91c009db5f2e2bd5db0a9351)) -- manger and hitokotos plugin ([20ee234](https://github.com/kotorijs/kotori/commit/20ee23496a209433c656032d300e5474da664945)) -- plugins ([ea644e8](https://github.com/kotorijs/kotori/commit/ea644e85641f39ddbe2fb0b3790cd401d2c758b8)) -- querytool plugin ([d2e5d7c](https://github.com/kotorijs/kotori/commit/d2e5d7c1465d58b84fb916d52c71985bd391f75f)) +* create module,requester ([dba239d](https://github.com/kotorijs/kotori/commit/dba239dbd4f1c4fe0067e4b603aab62c31049063)) +* framework ([18cbe84](https://github.com/kotorijs/kotori/commit/18cbe84ecb5cbbca91c009db5f2e2bd5db0a9351)) +* manger and hitokotos plugin ([20ee234](https://github.com/kotorijs/kotori/commit/20ee23496a209433c656032d300e5474da664945)) +* plugins ([ea644e8](https://github.com/kotorijs/kotori/commit/ea644e85641f39ddbe2fb0b3790cd401d2c758b8)) +* querytool plugin ([d2e5d7c](https://github.com/kotorijs/kotori/commit/d2e5d7c1465d58b84fb916d52c71985bd391f75f)) + + + diff --git a/modules/access/package.json b/modules/access/package.json index af8111ea..73951376 100644 --- a/modules/access/package.json +++ b/modules/access/package.json @@ -1,6 +1,6 @@ { "name": "@kotori-bot/kotori-plugin-access", - "version": "1.0.0", + "version": "1.0.1", "description": "access plugin", "main": "lib/index.js", "keywords": [ diff --git a/modules/access/src/index.ts b/modules/access/src/index.ts index 8c367c86..36e131a4 100644 --- a/modules/access/src/index.ts +++ b/modules/access/src/index.ts @@ -7,13 +7,13 @@ export const inject = ['file']; type Data = Record; export function main(ctx: Context) { - const load = (platform: string) => ctx.file.load(`${platform}.json`, 'json', {}) as Data; - const save = (platform: string, data: Data) => ctx.file.save(`${platform}.json`, data); + const load = (bot: string) => ctx.file.load(`${bot}.json`, 'json', {}); + const save = (bot: string, data: Data) => ctx.file.save(`${bot}.json`, data); ctx.on('before_parse', (data) => { const d = data; if (d.session.type !== MessageScope.GROUP || !d.session.groupId) return; - const list = load(d.session.api.adapter.platform); + const list = load(d.session.api.adapter.identity); if (!(String(d.session.groupId) in list)) return; if (!list[String(d.session.groupId)].includes(String(d.session.userId))) return; d.session.sender.role = 'admin'; @@ -22,7 +22,7 @@ export function main(ctx: Context) { ctx .command('access query - access.descr.access.query') .action((_, session) => { - const list = (load(session.api.adapter.platform)[String(session.groupId)] ?? []) + const list = (load(session.api.adapter.identity)[String(session.groupId)] ?? []) .map((el) => session.format('access.msg.access.list', [el])) .join(''); return ['access.msg.access.query', [list]]; @@ -33,14 +33,14 @@ export function main(ctx: Context) { ctx .command('access add - access.descr.access.add') .action((data, session) => { - const list = load(session.api.adapter.platform); + const list = load(session.api.adapter.identity); const index = String(session.groupId); list[index] = list[index] ?? []; if (list[index].includes(data.args[0] as string)) { return session.error('exists', { target: data.args[0] as string }); } list[index].push(data.args[0] as string); - save(session.api.adapter.platform, list); + save(session.api.adapter.identity, list); return ['access.msg.access.add', [data.args[0]]]; }) .scope(MessageScope.GROUP) @@ -49,14 +49,14 @@ export function main(ctx: Context) { ctx .command('access del - access.descr.access.del') .action((data, session) => { - const list = load(session.api.adapter.platform); + const list = load(session.api.adapter.identity); const index = String(session.groupId); list[index] = list[index] ?? []; if (!list[index].includes(data.args[0] as string)) { return session.error('no_exists', { target: data.args[0] as string }); } list[index] = list[index].filter((el) => el !== data.args[0]); - save(session.api.adapter.platform, list); + save(session.api.adapter.identity, list); return ['access.msg.access.del', [data.args[0]]]; }) .scope(MessageScope.GROUP) diff --git a/modules/adapter-minecraft/package.json b/modules/adapter-minecraft/package.json index 3ce5aa6e..66dda422 100644 --- a/modules/adapter-minecraft/package.json +++ b/modules/adapter-minecraft/package.json @@ -1,6 +1,6 @@ { "name": "kotori-plugin-adapter-minecraft", - "version": "1.0.1", + "version": "2.0.0", "description": "Adapter For Minecraft Bedrock Edition", "main": "lib/index.js", "keywords": [ @@ -24,6 +24,10 @@ "kotori-bot": "workspace:^" }, "dependencies": { - "mcwss": "^2.1.2" + "mcwss": "^2.1.3", + "ws": "^8.14.2" + }, + "devDependencies": { + "@types/ws": "^8.5.8" } } diff --git a/modules/adapter-minecraft/src/adapter.ts b/modules/adapter-minecraft/src/adapter.ts index 332552c9..063be8b1 100644 --- a/modules/adapter-minecraft/src/adapter.ts +++ b/modules/adapter-minecraft/src/adapter.ts @@ -3,18 +3,15 @@ * @Blog: https://hotaru.icu * @Date: 2023-09-29 14:31:09 * @LastEditors: Hotaru biyuehuya@gmail.com - * @LastEditTime: 2024-05-02 18:12:01 + * @LastEditTime: 2024-06-07 20:14:31 */ -import { Adapter, AdapterConfig, Context, MessageScope, Tsu, stringTemp } from 'kotori-bot'; +import { AdapterConfig, Adapters, Context, MessageScope, Tsu, stringTemp } from 'kotori-bot'; import Mcwss from 'mcwss'; +import WebSocket from 'ws'; import McApi from './api'; import McElements from './elements'; export const config = Tsu.Object({ - port: Tsu.Number().int().range(1, 65535), - address: Tsu.String() - .regexp(/^ws(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$/) - .default('ws://127.0.0.1'), nickname: Tsu.String().default('Romi'), template: Tsu.Union([Tsu.Null(), Tsu.String()]).default('<%nickname%> %msg%') }); @@ -30,9 +27,7 @@ type MessageData = : never : never; -export class McAdapter extends Adapter { - private app?: Mcwss; - +export class McAdapter extends Adapters.WebSocket { private clients: Record = {}; private messageId = 1; @@ -44,7 +39,27 @@ export class McAdapter extends Adapter { this.config = config; } - public handle(data: MessageData) { + public start() { + this.connection = (ws, req) => { + const fakeServer = new WebSocket.Server({ noServer: true }); + const app = new Mcwss({ server: fakeServer }); + app.on('error', (err) => this.ctx.logger.error(err)); + app.on('connection', (data) => { + this.online(); + this.clients[data.client.sessionId] = data.client; + }); + app.on('player_message', (data) => this.onMessage(data)); + app.start(); + fakeServer.emit('connection', ws, req); + }; + this.setup(); + } + + public handle() { + this.handle.toString(); + } + + public onMessage(data: MessageData) { this.session('on_message', { type: data.body.type === 'chat' ? MessageScope.GROUP : MessageScope.PRIVATE, messageId: this.messageId, @@ -60,29 +75,6 @@ export class McAdapter extends Adapter { this.messageId += 1; } - public start() { - this.connect(); - this.ctx.emit('connect', { - type: 'connect', - adapter: this, - normal: true, - mode: 'ws-reverse', - address: `${this.config.address}:${this.config.port}` - }); - } - - public stop() { - this.app?.stop(); - this.ctx.emit('connect', { - type: 'disconnect', - adapter: this, - normal: true, - mode: 'other', - address: `${this.config.address}:${this.config.port}` - }); - this.offline(); - } - public send(action: string, params: { msg: string }) { const [sessionId, playerName] = action.split('@'); const { msg } = params; @@ -99,17 +91,6 @@ export class McAdapter extends Adapter { messageId: this.messageId }); } - - private connect() { - this.app = new Mcwss({ port: this.config.port, autoRegister: true, autoClearEvents: true }); - this.app.on('error', (err) => this.ctx.logger.error(err)); - this.app.on('connection', (data) => { - if (Object.keys(this.clients).length === 0) this.online(); - this.clients[data.client.sessionId] = data.client; - }); - this.app.on('player_message', (data) => this.handle(data)); - this.app.start(); - } } export default McAdapter; diff --git a/modules/adapter-onebot/package.json b/modules/adapter-onebot/package.json index 21eddd8a..9e9cd924 100644 --- a/modules/adapter-onebot/package.json +++ b/modules/adapter-onebot/package.json @@ -1,6 +1,6 @@ { "name": "@kotori-bot/kotori-plugin-adapter-onebot", - "version": "1.2.1", + "version": "2.0.0", "description": "Adapter For Onebot (go-cqhttp)", "main": "lib/index.js", "keywords": [ diff --git a/modules/adapter-onebot/src/adapter.ts b/modules/adapter-onebot/src/adapter.ts index 47943eec..790f544a 100644 --- a/modules/adapter-onebot/src/adapter.ts +++ b/modules/adapter-onebot/src/adapter.ts @@ -3,12 +3,11 @@ * @Blog: https://hotaru.icu * @Date: 2023-09-29 14:31:09 * @LastEditors: Hotaru biyuehuya@gmail.com - * @LastEditTime: 2024-02-16 15:33:09 + * @LastEditTime: 2024-06-07 19:53:00 */ -import { Adapter, AdapterConfig, Context, EventDataApiBase, EventDataTargetId, MessageScope, Tsu } from 'kotori-bot'; +import { Adapters, AdapterConfig, Context, EventDataApiBase, EventDataTargetId, MessageScope, Tsu } from 'kotori-bot'; import WebSocket from 'ws'; import OnebotApi from './api'; -import WsServer from './services/wsserver'; import { EventDataType } from './types'; import OnebotElements from './elements'; @@ -24,37 +23,40 @@ declare module 'kotori-bot' { } } -export const config = Tsu.Intersection([ +export const config = Tsu.Union([ Tsu.Object({ + mode: Tsu.Literal('ws'), port: Tsu.Number().int().range(1, 65535), address: Tsu.String() .regexp(/^ws(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$/) .default('ws://127.0.0.1'), retry: Tsu.Number().int().min(1).default(10) }), - Tsu.Union([ - Tsu.Object({ - mode: Tsu.Literal('ws') - }), - Tsu.Object({ - mode: Tsu.Literal('ws-reverse') - }) - ]) + Tsu.Object({ + mode: Tsu.Literal('ws-reverse') + }) ]); type OnebotConfig = Tsu.infer & AdapterConfig; const handleMsg = (msg: string) => msg.replace(/\[CQ:at,qq=(.*?)\]/g, '$1'); -export class OnebotAdapter extends Adapter { +export class OnebotAdapter extends Adapters.WebSocket { private readonly address: string; + private readonly isReverse: boolean; + public readonly config: OnebotConfig; public constructor(ctx: Context, config: OnebotConfig, identity: string) { super(ctx, config, identity, OnebotApi, new OnebotElements()); this.config = config; - this.address = `${this.config.address ?? 'ws://127.0.0.1'}:${this.config.port}`; + this.address = this.config.mode === 'ws' ? `${this.config.address ?? 'ws://127.0.0.1'}:${this.config.port}` : ''; + this.isReverse = !this.address; + if (!this.isReverse) return; + this.connection = (ws) => { + this.socket = ws; + }; } public handle(data: EventDataType) { @@ -168,32 +170,48 @@ export class OnebotAdapter extends Adapter { groupId: data.group_id! }); } - if (!this.onlineTimerId) this.onlineTimerId = setTimeout(() => this.offline, 50 * 1000); + if (!this.onlineTimerId) this.onlineTimerId = setTimeout(() => this.offline(), 50 * 1000); } public start() { - if (this.config.mode === 'ws-reverse') { + if (this.isReverse) { + this.setup(); + return; + } + /* ws mode handle */ + this.ctx.emit('connect', { + type: 'connect', + mode: 'ws', + adapter: this, + normal: true, + address: this.address + }); + this.socket = new WebSocket(`${this.address}`); + this.socket.on('close', () => { this.ctx.emit('connect', { - type: 'connect', - mode: 'ws-reverse', + type: 'disconnect', adapter: this, - normal: true, + normal: false, + mode: 'ws', address: this.address }); - } - this.connectWss(); + }); + this.socket.on('message', (raw) => this.handle(JSON.parse(raw.toString()))); } public stop() { + if (this.isReverse) { + super.stop(); + return; + } this.ctx.emit('connect', { type: 'disconnect', adapter: this, normal: true, address: this.address, - mode: this.config.mode + mode: 'ws' }); this.socket?.close(); - this.offline(); } public send(action: string, params?: object) { @@ -202,45 +220,6 @@ export class OnebotAdapter extends Adapter { private socket: WebSocket | null = null; - private async connectWss() { - if (this.config.mode === 'ws-reverse') { - const wss = await WsServer(this.config.port); - const [socket] = wss; - this.socket = socket; - } else { - this.ctx.emit('connect', { - type: 'connect', - mode: 'ws', - adapter: this, - normal: true, - address: this.address - }); - this.socket = new WebSocket(`${this.address}`); - this.socket.on('close', () => { - this.ctx.emit('connect', { - type: 'disconnect', - adapter: this, - normal: false, - mode: 'ws', - address: this.address - }); - setTimeout(() => { - if (!this.socket) return; - this.socket.close(); - this.ctx.emit('connect', { - type: 'connect', - mode: 'ws-reverse', - adapter: this, - normal: false, - address: this.address - }); - this.connectWss(); - }, this.config.retry * 1000); - }); - } - this.socket.on('message', (data) => this.handle(JSON.parse(data.toString()))); - } - /* global NodeJS */ private onlineTimerId: NodeJS.Timeout | null = null; } diff --git a/modules/adapter-onebot/src/services/wsserver.ts b/modules/adapter-onebot/src/services/wsserver.ts deleted file mode 100644 index ebabd4a8..00000000 --- a/modules/adapter-onebot/src/services/wsserver.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * @Author: hotaru biyuehuya@gmail.com - * @Blog: https://hotaru.icu - * @Date: 2023-06-24 15:12:55 - * @LastEditors: Hotaru biyuehuya@gmail.com - * @LastEditTime: 2024-02-20 20:17:46 - */ -import WebSocket from 'ws'; - -export const WsServer = async (port: number) => - new Promise<[WebSocket, WebSocket.Server]>((resolve, reject) => { - try { - const WebSocketServer: WebSocket.Server = new WebSocket.Server({ port }); - WebSocketServer.on('connection', (ws) => { - resolve([ws, WebSocketServer]); - }); - } catch (e) { - reject(e); - } - }); - -export default WsServer; diff --git a/modules/alias/package.json b/modules/alias/package.json index 3a30bbef..d38b6159 100644 --- a/modules/alias/package.json +++ b/modules/alias/package.json @@ -1,6 +1,6 @@ { "name": "@kotori-bot/kotori-plugin-alias", - "version": "1.0.0", + "version": "1.0.1", "description": "alias plugin", "main": "lib/index.js", "keywords": [ diff --git a/modules/alias/src/index.ts b/modules/alias/src/index.ts index 552b879b..cf41e4ad 100644 --- a/modules/alias/src/index.ts +++ b/modules/alias/src/index.ts @@ -3,7 +3,7 @@ * @Blog: https://hotaru.icu * @Date: 2023-07-11 14:18:27 * @LastEditors: Hotaru biyuehuya@gmail.com - * @LastEditTime: 2024-02-21 11:07:52 + * @LastEditTime: 2024-06-07 21:19:44 */ import { Context, Symbols } from 'kotori-bot'; @@ -14,25 +14,25 @@ export const inject = ['file']; type Data = Record; export function main(ctx: Context) { - const load = (platform: string) => ctx.file.load(`${platform}.json`, 'json', {}) as Data; - const save = (platform: string, data: Data) => ctx.file.save(`${platform}.json`, data); + const load = (bot: string) => ctx.file.load(`${bot}.json`, 'json', {}); + const save = (bot: string, data: Data) => ctx.file.save(`${bot}.json`, data); ctx.midware((next, session) => { const s = session; - const list = load(s.api.adapter.platform); + const list = load(s.api.adapter.identity); if (list[s.message] || s.message.trim() in list) s.message = list[s.message]; next(); }, 90); ctx.command('alias query - alias.descr.alias.query').action((_, session) => { - const list = Object.entries(load(session.api.adapter.platform) ?? {}) + const list = Object.entries(load(session.api.adapter.identity) ?? {}) .map((el) => session.format('alias.msg.alias.list', [...el])) .join(''); return ['alias.msg.alias.query', [list]]; }); ctx.command('alias add <...command> - alias.descr.alias.add').action((data, session) => { - const list = load(session.api.adapter.platform); + const list = load(session.api.adapter.identity); if ((data.args[0] as string) in list) return 'alias.msg.alias.fail'; let useful = false; ctx[Symbols.command].forEach((command) => { @@ -41,15 +41,15 @@ export function main(ctx: Context) { }); if (!useful) return 'alias.msg.alias.fail.2'; list[data.args[0] as string] = data.args.slice(1).join(' '); - save(session.api.adapter.platform, list); + save(session.api.adapter.identity, list); return ['alias.msg.alias.add', [data.args[0]]]; }); ctx.command('alias del - alias.descr.alias.del').action((data, session) => { - const list = load(session.api.adapter.platform); + const list = load(session.api.adapter.identity); if (!((data.args[0] as string) in list)) return session.error('no_exists', { target: data.args[0] as string }); delete list[data.args[0] as string]; - save(session.api.adapter.platform, list); + save(session.api.adapter.identity, list); return ['alias.msg.alias.del', [data.args[0]]]; }); } diff --git a/modules/drift-bottle/package.json b/modules/drift-bottle/package.json index d3005213..e3e724be 100644 --- a/modules/drift-bottle/package.json +++ b/modules/drift-bottle/package.json @@ -1,6 +1,6 @@ { "name": "kotori-plugin-drift-bottle", - "version": "1.0.1", + "version": "1.0.2", "description": "throw and pick bottles", "main": "lib/index.js", "keywords": [ diff --git a/modules/drift-bottle/src/index.ts b/modules/drift-bottle/src/index.ts index 8f70f054..2aa4d0d5 100644 --- a/modules/drift-bottle/src/index.ts +++ b/modules/drift-bottle/src/index.ts @@ -20,14 +20,14 @@ const getZero = () => { }; export function main(ctx: Context, conf: Tsu.infer) { - const getBottle = (platform: string) => ctx.file.load(`${platform}.json`, 'json', {}) as Bottle[]; - const setBottle = (platform: string, data: Bottle[]) => ctx.file.save(`${platform}.json`, data, 'json'); + const getBottle = (bot: string) => ctx.file.load(`${bot}.json`, 'json', []); + const setBottle = (bot: string, data: Bottle[]) => ctx.file.save(`${bot}.json`, data, 'json'); ctx .command('throw - drift_bottle.descr.throw') .action((data, session) => { const at = session.el.at(session.userId); - const bottles = getBottle(session.api.adapter.platform); + const bottles = getBottle(session.api.adapter.identity); const zero = getZero(); let count = 0; bottles.forEach((Element) => { @@ -37,7 +37,7 @@ export function main(ctx: Context, conf: Tsu.infer) { }); if (count > conf.max) return ['drift_bottle.msg.throw.fail', [at, conf.max]]; bottles.push([data.args[0] as string, new Date().getTime(), session.groupId!, session.userId!]); - setBottle(session.api.adapter.platform, bottles); + setBottle(session.api.adapter.identity, bottles); return ['drift_bottle.msg.throw.info', [at]]; }) .scope(MessageScope.GROUP); @@ -45,7 +45,7 @@ export function main(ctx: Context, conf: Tsu.infer) { ctx .command('pick - drift_bottle.descr.pick') .action((_, session) => { - const data = getBottle(session.api.adapter.platform); + const data = getBottle(session.api.adapter.identity); if (!data || data.length <= 0) return 'drift_bottle.msg.pick.none'; const bottle = data[getRandomInt(data.length - 1)]; return ['drift_bottle.msg.pick.info', [bottle[0], session.i18n.time(new Date(bottle[1])), bottle[2]]]; diff --git a/modules/goodnight/package.json b/modules/goodnight/package.json index 001cb412..9e6939a0 100644 --- a/modules/goodnight/package.json +++ b/modules/goodnight/package.json @@ -1,6 +1,6 @@ { "name": "kotori-plugin-goodnight", - "version": "1.3.1", + "version": "1.3.2", "description": "And in case i don't see you,good afternoon,good evening,and good night!", "main": "lib/index.js", "keywords": [ diff --git a/modules/goodnight/src/index.ts b/modules/goodnight/src/index.ts index 0f6d96bc..f60470a7 100644 --- a/modules/goodnight/src/index.ts +++ b/modules/goodnight/src/index.ts @@ -36,13 +36,13 @@ export function main(ctx: Context, config: Config) { `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${yesterday ? new Date().getDate() - 1 : new Date().getDate()}.json`; const defaultData: Good = { morning: {}, night: {} }; const loadTodayData = (yesterday: boolean = false) => - (ctx.file.load(getTodayPath(yesterday), 'json', defaultData) as Good) || defaultData; + ctx.file.load(getTodayPath(yesterday), 'json', defaultData) || defaultData; const saveTodayData = (data: Good) => ctx.file.save(getTodayPath(), data); ctx.regexp(/^(早|早安|早上好)$/, (_, session) => { const record = loadTodayData(); const at = session.el.at(session.userId); - const prop = `${session.api.adapter.platform}${session.userId}`; + const prop = `${session.api.adapter.identity}${session.userId}`; if (prop in record.morning) return ['goodnight.msg.morning.already', { at }]; const hours = new Date().getHours(); @@ -62,7 +62,7 @@ export function main(ctx: Context, config: Config) { ctx.regexp(/^(晚|晚安|晚上好)$/, (_, session) => { const record = loadTodayData(); const at = session.el.at(session.userId)!; - const prop = `${session.api.adapter.platform}${session.userId}`; + const prop = `${session.api.adapter.identity}${session.userId}`; if (prop in record.night) return ['goodnight.msg.night.already', { at }]; const record2 = loadTodayData(true); diff --git a/modules/manger/package.json b/modules/manger/package.json index b4d7bb00..4b732c97 100644 --- a/modules/manger/package.json +++ b/modules/manger/package.json @@ -1,6 +1,6 @@ { "name": "kotori-plugin-manger", - "version": "1.0.2", + "version": "1.0.4", "description": "Groups Mange tools", "main": "lib/index.js", "keywords": [ diff --git a/modules/manger/src/index.ts b/modules/manger/src/index.ts index abdefbc0..9f932870 100644 --- a/modules/manger/src/index.ts +++ b/modules/manger/src/index.ts @@ -12,15 +12,13 @@ export const config = Tsu.Object({ }); export function main(ctx: Context, con: Tsu.infer) { - const loadBlack = (platform: string, target: string = 'global') => - ctx.file.load(`${platform}_${target}`, 'json', {}) as string[]; - const saveBlack = (platform: string, data: string[], target: string = 'global') => - ctx.file.save(`${platform}_${target}`, data); + const loadBlack = (bot: string, target: string = 'global') => ctx.file.load(`${bot}_${target}`, 'json', []); + const saveBlack = (bot: string, data: string[], target: string = 'global') => ctx.file.save(`${bot}_${target}`, data); ctx.midware((next, session) => { - const blackGlobal = loadBlack(session.api.adapter.platform); + const blackGlobal = loadBlack(session.api.adapter.identity); if (blackGlobal.includes(String(session.userId))) return; - const black = session.groupId ? loadBlack(session.api.adapter.platform, String(session.groupId)) : []; + const black = session.groupId ? loadBlack(session.api.adapter.identity, String(session.groupId)) : []; if (black.includes(String(session.userId))) return; next(); }, 80); @@ -86,7 +84,7 @@ export function main(ctx: Context, con: Tsu.infer) { .action((data, session) => { const isGlobal = data.options.global; if (isGlobal && session.userId !== session.api.adapter.config.master) return session.error('no_access_admin'); - const list = loadBlack(session.api.adapter.platform, isGlobal ? undefined : String(session.groupId)); + const list = loadBlack(session.api.adapter.identity, isGlobal ? undefined : String(session.groupId)); return [ `manger.msg.black${isGlobal ? 'g' : ''}.query`, [list.map((el) => session.format('manger.msg.black.list', [el])).join('')] @@ -102,10 +100,10 @@ export function main(ctx: Context, con: Tsu.infer) { const target = data.args[0] as string; const isGlobal = data.options.global; if (isGlobal && session.userId !== session.api.adapter.config.master) return session.error('no_access_admin'); - const list = loadBlack(session.api.adapter.platform, isGlobal ? undefined : String(session.groupId)); + const list = loadBlack(session.api.adapter.identity, isGlobal ? undefined : String(session.groupId)); if (target in list) return session.error('exists', { target }); list.push(target); - saveBlack(session.api.adapter.platform, list, isGlobal ? undefined : String(session.groupId)); + saveBlack(session.api.adapter.identity, list, isGlobal ? undefined : String(session.groupId)); return [`manger.msg.black${isGlobal ? 'g' : ''}.add`, [target]]; }); @@ -118,10 +116,10 @@ export function main(ctx: Context, con: Tsu.infer) { const target = data.args[0] as string; const isGlobal = data.options.global; if (isGlobal && session.userId !== session.api.adapter.config.master) return session.error('no_access_admin'); - const list = loadBlack(session.api.adapter.platform, isGlobal ? undefined : String(session.groupId)); + const list = loadBlack(session.api.adapter.identity, isGlobal ? undefined : String(session.groupId)); if (!(target in list)) return session.error('no_exists', { target }); saveBlack( - session.api.adapter.platform, + session.api.adapter.identity, list.filter((el) => el !== target), isGlobal ? undefined : String(session.groupId) ); @@ -130,21 +128,21 @@ export function main(ctx: Context, con: Tsu.infer) { if (con.exitGroupAddBlack) { ctx.on('on_group_decrease', (session) => { - const list = loadBlack(session.api.adapter.platform, String(session.groupId)); + const list = loadBlack(session.api.adapter.identity, String(session.groupId)); list.push(String(session.userId)); - saveBlack(session.api.adapter.platform, list, String(session.groupId)); + saveBlack(session.api.adapter.identity, list, String(session.groupId)); if (con.exitGroupAddBlackTips) session.quick(['manger.msg.exit_group_add_black', [session.userId]]); }); } if (con.blackJoinGroupTips) { ctx.on('on_group_increase', (session) => { - const list = loadBlack(session.api.adapter.platform, String(session.groupId)); + const list = loadBlack(session.api.adapter.identity, String(session.groupId)); if (String(session.userId) in list) { session.quick(['manger.msg.black_join_group.group', [session.userId]]); return; } - const list2 = loadBlack(session.api.adapter.platform); + const list2 = loadBlack(session.api.adapter.identity); if (!(String(session.userId) in list2)) return; session.quick(['manger.msg.black_join_group.global', [session.userId]]); }); diff --git a/modules/mediawiki/package.json b/modules/mediawiki/package.json index 0d1e5ec8..b039bce4 100644 --- a/modules/mediawiki/package.json +++ b/modules/mediawiki/package.json @@ -1,6 +1,6 @@ { "name": "kotori-plugin-mediawiki", - "version": "1.2.3", + "version": "1.2.4", "description": "mediawiki search tool", "main": "lib/index.js", "keywords": [ diff --git a/modules/mediawiki/src/index.ts b/modules/mediawiki/src/index.ts index cc5d164b..ff701c58 100644 --- a/modules/mediawiki/src/index.ts +++ b/modules/mediawiki/src/index.ts @@ -18,7 +18,7 @@ const defaultData = [ ]; export function main(ctx: Context) { - const loadWikiData = () => ctx.file.load('mediawiki.json', 'json', defaultData) as wikiData[]; + const loadWikiData = () => ctx.file.load('mediawiki.json', 'json', defaultData); const saveWikiData = (data: wikiData[]) => ctx.file.save('mediawiki.json', data); ctx.command('wiki [order:number] - mediawiki.descr.wiki').action(async (data) => { diff --git a/modules/newnew/package.json b/modules/newnew/package.json index b51c4aad..0e7e85e5 100644 --- a/modules/newnew/package.json +++ b/modules/newnew/package.json @@ -1,6 +1,6 @@ { "name": "kotori-plugin-penis", - "version": "1.2.1", + "version": "1.2.2", "description": "查看今日牛牛的长度和排行", "main": "lib/index.js", "keywords": [ diff --git a/modules/newnew/src/index.ts b/modules/newnew/src/index.ts index a42d7099..744bd457 100644 --- a/modules/newnew/src/index.ts +++ b/modules/newnew/src/index.ts @@ -3,7 +3,7 @@ * @Blog: https://hotaru.icu * @Date: 2023-07-30 11:33:15 * @LastEditors: Hotaru biyuehuya@gmail.com - * @LastEditTime: 2024-02-14 14:20:08 + * @LastEditTime: 2024-06-07 21:26:07 */ import { Context, Tsu } from 'kotori-bot'; @@ -25,9 +25,9 @@ type StatData = Record; export function main(ctx: Context, config: Config) { const getNewLength = () => config.min + Math.floor(Math.random() * (config.max - config.min + 1)); const getTodayPath = () => `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDay()}.json`; - const loadTodayData = () => (ctx.file.load(getTodayPath(), 'json', {}) as TodayData) || {}; + const loadTodayData = () => ctx.file.load(getTodayPath(), 'json', {}); const saveTodayData = (data: TodayData) => ctx.file.save(getTodayPath(), data); - const loadStatData = (): StatData => (ctx.file.load('stat.json', 'json', {}) as StatData) || {}; + const loadStatData = (): StatData => ctx.file.load('stat.json', 'json', {}); const saveStatData = (data: StatData) => ctx.file.save('stat.json', data); ctx.midware((next, session) => { @@ -38,7 +38,7 @@ export function main(ctx: Context, config: Config) { ctx.regexp(/^今日长度$/, (_, session) => { /* 加载数据 */ - const id = `${session.api.adapter.platform}${session.userId}`; + const id = `${session.api.adapter.identity}${session.userId}`; const today = loadTodayData(); const todayLength = typeof today[id] === 'number' ? today[id] : getNewLength(); @@ -70,7 +70,7 @@ export function main(ctx: Context, config: Config) { ctx.regexp(/^我的长度$/, (_, session) => { const stat = loadStatData(); - const person = stat[`${session.api.adapter.platform}${session.userId}`]; + const person = stat[`${session.api.adapter.identity}${session.userId}`]; if (!person || person.length <= 0) return ['newnew.msg.my_length.fail', [session.el.at(session.userId)]]; return [ 'newnew.msg.my_length', @@ -86,7 +86,7 @@ export function main(ctx: Context, config: Config) { const item = stat[key]; item[3] /= item[2]; }); - const entries = Object.entries(stat).filter((val) => val[0].startsWith(session.api.adapter.platform)); + const entries = Object.entries(stat).filter((val) => val[0].startsWith(session.api.adapter.identity)); entries.sort((a, b) => b[1][3] - a[1][3]); let list = ''; @@ -97,7 +97,7 @@ export function main(ctx: Context, config: Config) { if (nums < config.avgMinNum) return; list += session.format('newnew.msg.avg_ranking.list', [ num, - entry[0].slice(session.api.adapter.platform.length), + entry[0].slice(session.api.adapter.identity.length), entry[1][3].toFixed(2), nums, statOrigin[entry[0]][3] @@ -111,7 +111,7 @@ export function main(ctx: Context, config: Config) { const today = loadTodayData(); if (today.length <= 0) return 'newnew.msg.today_ranking.fail'; - const entries = Object.entries(today).filter((val) => val[0].startsWith(session.api.adapter.platform)); + const entries = Object.entries(today).filter((val) => val[0].startsWith(session.api.adapter.identity)); entries.sort((a, b) => b[1] - a[1]); let list = ''; @@ -120,7 +120,7 @@ export function main(ctx: Context, config: Config) { if (num > 20) return; list += session.format('newnew.msg.today_ranking.list', [ num, - entry[0].slice(session.api.adapter.platform.length), + entry[0].slice(session.api.adapter.identity.length), entry[1] ]); num += 1; diff --git a/modules/requester/package.json b/modules/requester/package.json index 21b9da66..58300bd8 100644 --- a/modules/requester/package.json +++ b/modules/requester/package.json @@ -1,6 +1,6 @@ { "name": "kotori-plugin-requester", - "version": "1.1.0", + "version": "1.1.1", "description": "Listen delete message and request event call to master", "main": "lib/index.js", "keywords": [ diff --git a/modules/requester/src/index.ts b/modules/requester/src/index.ts index 4c132241..ae948f67 100644 --- a/modules/requester/src/index.ts +++ b/modules/requester/src/index.ts @@ -90,12 +90,12 @@ export function main(ctx: Context, cfg: Tsu.infer) { if (session.userId === session.api.adapter.selfId || session.operatorId === session.api.adapter.selfId) return; if (cfg.onPrivateRecall && session.type === MessageScope.PRIVATE) { - const message = ctx.cache.get(`${session.api.adapter.platform}${session.messageId}`); + const message = ctx.cache.get(`${session.api.adapter.identity}${session.messageId}`); if (!message) return; send(session)([`requester.msg.recall.private`, [session.userId, message]]); } else if (cfg.onGroupRecall && session.type === MessageScope.GROUP) { - const message = ctx.cache.get(`${session.api.adapter.platform}${session.messageId}`); + const message = ctx.cache.get(`${session.api.adapter.identity}${session.messageId}`); if (!message) return; const equaled = session.operatorId === session.userId; @@ -121,9 +121,9 @@ export function main(ctx: Context, cfg: Tsu.infer) { ctx.on('on_message', (session) => { if (session.userId === session.api.adapter.selfId) return; if (session.type === MessageScope.GROUP && cfg.onGroupRecall) { - ctx.cache.set(`${session.api.adapter.platform}${session.messageId}`, session.message); + ctx.cache.set(`${session.api.adapter.identity}${session.messageId}`, session.message); } else if (cfg.onPrivateRecall) { - ctx.cache.set(`${session.api.adapter.platform}${session.messageId}`, session.message); + ctx.cache.set(`${session.api.adapter.identity}${session.messageId}`, session.message); } if (cfg.onPrivateMsg && String(session.userId) !== String(session.api.adapter.config.master)) { send(session)([`requester.msg.msg.private`, [session.userId, session.message]]); diff --git a/modules/webui/package.json b/modules/webui/package.json index e4b1d2ad..b40a6d1b 100644 --- a/modules/webui/package.json +++ b/modules/webui/package.json @@ -1,6 +1,6 @@ { "name": "@kotori-bot/kotori-plugin-webui", - "version": "1.1.3", + "version": "1.1.4", "description": "webui plugin", "main": "lib/index.js", "keywords": [ diff --git a/modules/webui/src/routers/api/accounts.ts b/modules/webui/src/routers/api/accounts.ts index b46399ef..f073677d 100644 --- a/modules/webui/src/routers/api/accounts.ts +++ b/modules/webui/src/routers/api/accounts.ts @@ -8,12 +8,12 @@ export default (ctx: Context, app: Context['server']) => { const loginStats = ctx.webui.getLoginStats(); if (ctx.webui.checkVerifyHash(username, password)) { - ctx.logger.label('server').trace('Login successful'); + ctx.logger.label('server').record('user login successful'); loginStats.success += 1; ctx.webui.setLoginStats(loginStats); return res.json({ token: ctx.webui.addToken() }); } - ctx.logger.label('server').trace('Login failed'); + ctx.logger.label('server').error('user login failed'); loginStats.failed += 1; ctx.webui.setLoginStats(loginStats); return res.status(401).json({ message: 'Invalid username or password' }); diff --git a/package.json b/package.json index d7512a2c..9271f20a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@kotori-bot/root", "description": "ChatBot Framework", - "version": "1.5.1", + "version": "1.5.4", "private": true, "license": "GPL-3.0", "author": "Hotaru ", @@ -41,7 +41,7 @@ "node": ">=17.9.0" }, "nodemonConfig": { - "exec": "pnpm --filter \"./packages/*\" exec \"tsup-node --silent\" && tsx ./packages/kotori/src/start/dev.ts", + "exec": "pnpm --filter \"./packages/*\" exec \"tsup-node --silent\" && tsx packages/kotori/src/start/dev", "ext": "ts,toml,json", "ignore": [ "dist", diff --git a/packages/kotori/package.json b/packages/kotori/package.json index 4d409e4d..7815ff69 100644 --- a/packages/kotori/package.json +++ b/packages/kotori/package.json @@ -1,6 +1,6 @@ { "name": "kotori-bot", - "version": "1.5.3", + "version": "1.5.4", "description": "Cross-platform chatbot framework base on Node.js and TypeScript", "main": "lib/index.js", "license": "GPL-3.0", diff --git a/packages/loader/package.json b/packages/loader/package.json index 322695e4..037c9698 100644 --- a/packages/loader/package.json +++ b/packages/loader/package.json @@ -1,6 +1,6 @@ { "name": "@kotori-bot/loader", - "version": "1.6.3", + "version": "1.6.4", "description": "Loader For KotoriBot", "license": "GPL-3.0", "main": "lib/index.js", diff --git a/packages/loader/src/index.ts b/packages/loader/src/index.ts index 9723489c..14bba034 100644 --- a/packages/loader/src/index.ts +++ b/packages/loader/src/index.ts @@ -3,11 +3,12 @@ * @Blog: https://hotaru.icu * @Date: 2023-10-29 16:20:51 * @LastEditors: Hotaru biyuehuya@gmail.com - * @LastEditTime: 2024-05-26 15:36:01 + * @LastEditTime: 2024-06-07 18:07:51 */ export * from './class/loader'; export * from './constants'; export * from './decorators'; export * from './types'; +export * from './service/adapters'; export * from '@kotori-bot/logger'; diff --git a/packages/loader/src/service/adapter.ts b/packages/loader/src/service/adapter.ts deleted file mode 100644 index 2ab3ff4a..00000000 --- a/packages/loader/src/service/adapter.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Api, Adapter as OriginAdapter } from '@kotori-bot/core'; -import { WsRouteHandler } from '../types/server'; - -/* eslint-disable-next-line @typescript-eslint/no-namespace */ -export namespace Adapter { - export abstract class WebSocket extends OriginAdapter { - private isSetup = false; - - private destroyFn?: () => void; - - protected destroy() { - if (!this.destroyFn) return; - this.destroyFn(); - this.isSetup = false; - } - - protected setup() { - if (this.isSetup) return; - this.ctx.inject('server'); - this.destroyFn = this.ctx.server.wss(`/adapter/${this.identity}`, (ws, req) => { - if (this.connection) this.connection(ws, req); - ws.on('message', (raw) => { - let data; - try { - data = JSON.parse(raw.toString()); - } catch (e) { - this.ctx.logger.error(`Data parse error: ${e instanceof Error ? e.message : e}`); - } - if (data) this.handle(data); - }); - }); - this.isSetup = true; - } - - public abstract handle(data: T): void; - - public connection?: (ws: Parameters[0], req: Parameters[1]) => void; - - public start() { - this.setup(); - } - - public stop() { - this.destroy(); - } - } -} - -export default Adapter; diff --git a/packages/loader/src/service/adapters.ts b/packages/loader/src/service/adapters.ts new file mode 100644 index 00000000..6d7418e4 --- /dev/null +++ b/packages/loader/src/service/adapters.ts @@ -0,0 +1,79 @@ +import { Api, Adapter as OriginAdapter } from '@kotori-bot/core'; +import { WsRouteHandler } from '../types/server'; + +/* eslint-disable-next-line @typescript-eslint/no-namespace */ +export namespace Adapters { + export abstract class WebSocket extends OriginAdapter { + private isSetup = false; + + private destroyFn?: () => void; + + private wssPath = `/adapter/${this.identity}`; + + private wssAddress = `ws://127.0.0.1:${this.ctx.config.global.port}${this.wssPath}`; + + protected destroy() { + if (!this.destroyFn) return; + this.destroyFn(); + this.isSetup = false; + } + + protected setup() { + if (this.isSetup) return; + this.ctx.inject('server'); + + this.destroyFn = this.ctx.server.wss(this.wssPath, (ws, req) => { + if (this.connection) this.connection(ws, req); + ws.on('message', (raw) => { + let data; + try { + data = JSON.parse(raw.toString()); + } catch (e) { + this.ctx.logger.error(`Data parse error: ${e instanceof Error ? e.message : e}`); + } + if (data) this.handle(data); + }); + ws.on('close', () => { + this.offline(); + this.ctx.emit('connect', { + type: 'disconnect', + mode: 'ws-reverse', + adapter: this, + normal: false, + address: this.wssAddress + }); + }); + }); + this.isSetup = true; + this.ctx.emit('connect', { + type: 'connect', + mode: 'ws-reverse', + adapter: this, + normal: true, + address: this.wssAddress + }); + } + + public abstract handle(data: D): void; + + public connection?: (ws: Parameters[0], req: Parameters[1]) => void; + + public start() { + this.setup(); + } + + public stop() { + this.destroy(); + this.offline(); + this.ctx.emit('connect', { + type: 'disconnect', + mode: 'ws-reverse', + adapter: this, + normal: false, + address: this.wssAddress + }); + } + } +} + +export default Adapters; diff --git a/packages/loader/src/service/server.ts b/packages/loader/src/service/server.ts index f3775aa2..56398d6a 100644 --- a/packages/loader/src/service/server.ts +++ b/packages/loader/src/service/server.ts @@ -78,7 +78,7 @@ export class Server extends Service implements HttpRoutes { this.server = createServer(this.app); this.wsServer = new Ws.Server({ noServer: true }); this.server.on('upgrade', (req, socket, head) => { - this.wsServer.handleUpgrade(req, socket, head, (ws) => { + this.wsServer.handleUpgrade(req, socket, head, (ws, req) => { this.wsServer.emit('connection', ws, req); }); }); @@ -89,13 +89,16 @@ export class Server extends Service implements HttpRoutes { if (!req.url) continue; const result = match(template, { decode: decodeURIComponent })(req.url); if (!result) continue; - if (!triggered) triggered = true; + triggered = true; list.forEach((callback) => { callback(ws, Object.assign(req, { params: result.params as Record })); }); } /* eslint-enable no-restricted-syntax,no-continue */ - if (!triggered) ws.close(1002); + if (!triggered) { + ws.close(1003); + req.destroy(); + } }); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 04a4d54c..5c8000d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,15 @@ importers: specifier: workspace:^ version: link:../../packages/kotori mcwss: - specifier: ^2.1.2 - version: 2.1.2 + specifier: ^2.1.3 + version: 2.1.3 + ws: + specifier: ^8.14.2 + version: 8.17.0 + devDependencies: + '@types/ws': + specifier: ^8.5.8 + version: 8.5.10 modules/adapter-onebot: dependencies: @@ -923,23 +930,26 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /@kotori-bot/i18n@1.3.0: - resolution: {integrity: sha512-qfi9DR4aH99Ff+bv1aCpqndtgGXcB1X3VKdLUntU0JvwwkwbOW8k169A0Vz0YEdNgiMsFlivdzeT6KvueZ9HUw==} + /@kotori-bot/i18n@1.3.1: + resolution: {integrity: sha512-58D3WZJbfq5FBUuyZWlXTivRcObdr77Jcjl20LCUcHqO+moKtSIvdNNqmeDwfrEaoVFd4bJbMEv7/8yrXvFnOA==} dev: false - /@kotori-bot/logger@1.2.1: - resolution: {integrity: sha512-AloqGRkPvXUm4F/YgKOVtd8RE7ixBwKeRPfUbT6qUwXep2BCr/N9xsz5YXuvLMlbd+ZJ4lUm4iydFm8hxIhqaw==} + /@kotori-bot/logger@1.3.1: + resolution: {integrity: sha512-/bHJvVOQdpzGJCJrg13GR3/TzVkVbbq56DGBKuENvC4EnsYfLFXxNmpkzP6e6FQS8nw/Mo6SuUVecas9xa9gxQ==} dependencies: - colorette: 2.0.20 + '@kotori-bot/tools': 1.4.1 dayjs: 1.11.11 fast-safe-stringify: 2.1.1 + transitivePeerDependencies: + - debug dev: false - /@kotori-bot/tools@1.3.1: - resolution: {integrity: sha512-e0zPoqoXcX4CBE9vL11372nVoH7YcgRjdwHOTEpua25+OkDHqcPsms4y6bLlrrvlWFXZrEArOSCPe1o/Uf09Rg==} + /@kotori-bot/tools@1.4.1: + resolution: {integrity: sha512-MnlPDvGG+1SAtkVw1irTNlxCYBGkdfVQMT3X15oA0oKZEWViluJbtBoRE+Zw3ZrVKvoDlcBT1eIrMEwTIxWB/A==} dependencies: + '@iarna/toml': 2.2.5 axios: 1.7.2 - node-fetch: 3.3.2 + colorette: 2.0.20 yaml: 2.4.3 transitivePeerDependencies: - debug @@ -1167,12 +1177,12 @@ packages: resolution: {integrity: sha512-T2MzSGEu+ysB/FkWfqmhV3PLyQlowdptmmgD20C6QxsS8Fmv5SjpZ1ayXaEC0S21/h5UJ9iA6W/5vSNU5l00OA==} dependencies: undici-types: 5.26.5 + dev: true /@types/node@20.14.2: resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==} dependencies: undici-types: 5.26.5 - dev: true /@types/normalize-package-data@2.4.4: resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1208,7 +1218,7 @@ packages: /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: - '@types/node': 20.14.1 + '@types/node': 20.14.2 /@typescript-eslint/eslint-plugin@7.12.0(@typescript-eslint/parser@7.12.0)(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-7F91fcbuDf/d3S8o21+r3ZncGIke/+eWk0EpO21LXhDfLahriZF9CGj4fbAetEjlaBdjdSm9a6VeXbpbT6Z40Q==} @@ -1899,11 +1909,6 @@ packages: engines: {node: '>=12'} dev: true - /data-uri-to-buffer@4.0.1: - resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} - engines: {node: '>= 12'} - dev: false - /data-view-buffer@1.0.1: resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} engines: {node: '>= 0.4'} @@ -2570,14 +2575,6 @@ packages: reusify: 1.0.4 dev: true - /fetch-blob@3.2.0: - resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} - engines: {node: ^12.20 || >= 14.13} - dependencies: - node-domexception: 1.0.0 - web-streams-polyfill: 3.3.3 - dev: false - /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -2683,13 +2680,6 @@ packages: mime-types: 2.1.35 dev: false - /formdata-polyfill@4.0.10: - resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} - engines: {node: '>=12.20.0'} - dependencies: - fetch-blob: 3.2.0 - dev: false - /forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -3372,16 +3362,16 @@ packages: engines: {node: '>=12'} dev: false - /mcwss@2.1.2: - resolution: {integrity: sha512-Ixxjk7dqlAs2xx1Vpoazl7Oi02iep66EsDYx0Qwm8oN8wtGOc767+OmN9qkuwJ7g1XEIe6zoSRkxX82jkb9baw==} + /mcwss@2.1.3: + resolution: {integrity: sha512-CLDNK1zo6b6bK4gZr2AsckXXms04Arng01ClMh6nHclebmeRxyQoAW9BEfmuUmnQ7tppdb0AhzXkKEZxMU7rCQ==} hasBin: true dependencies: - '@kotori-bot/i18n': 1.3.0 - '@kotori-bot/logger': 1.2.1 - '@kotori-bot/tools': 1.3.1 + '@kotori-bot/i18n': 1.3.1 + '@kotori-bot/logger': 1.3.1 + '@kotori-bot/tools': 1.4.1 cac: 6.7.14 fluoro: 1.0.2 - tsukiko: 1.2.5 + tsukiko: 1.2.6 ws: 8.17.0 transitivePeerDependencies: - bufferutil @@ -3502,20 +3492,6 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true - /node-domexception@1.0.0: - resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} - engines: {node: '>=10.5.0'} - dev: false - - /node-fetch@3.3.2: - resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - data-uri-to-buffer: 4.0.1 - fetch-blob: 3.2.0 - formdata-polyfill: 4.0.10 - dev: false - /nodemon@3.1.3: resolution: {integrity: sha512-m4Vqs+APdKzDFpuaL9F9EVOF85+h070FnkHVEoU4+rmT6Vw0bmNl7s61VEkY/cJkL7RCv1p4urnUDUMrS5rk2w==} engines: {node: '>=10'} @@ -4378,7 +4354,13 @@ packages: /tsukiko@1.2.5: resolution: {integrity: sha512-/g3ITn/eRCmq2DOdftXGykola5xrXfhQmIvGjWMIiQ+e5MSvjYDWA/pqCZ+VV/Z8xGpBcQ5xOhMid9iF4W7xtQ==} dependencies: - '@kotori-bot/i18n': 1.3.0 + '@kotori-bot/i18n': 1.3.1 + dev: false + + /tsukiko@1.2.6: + resolution: {integrity: sha512-mhNoGO2W80MFhSzANCvGo+mSSUaGCF2l+75GedLx65KMkIcGKucbQFJCSaLqwffRm4Q/XKGc9zXuJK04gLKijw==} + dependencies: + '@kotori-bot/i18n': 1.3.1 dev: false /tsup@8.1.0(typescript@5.4.5): @@ -4569,11 +4551,6 @@ packages: engines: {node: '>= 0.8'} dev: false - /web-streams-polyfill@3.3.3: - resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} - engines: {node: '>= 8'} - dev: false - /webidl-conversions@4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} dev: true