koishijs / koishi-plugin-booru

Image service for Koishi | 最好的涩图插件!
https://booru.koishi.chat
MIT License
12 stars 8 forks source link

refa: migrate most small booru to subpackages of core #164

Open MaikoTan opened 7 months ago

MaikoTan commented 7 months ago

This PR migrates most small booru sources to core, and then re-export from their original package.

Still not migrated

github-actions[bot] commented 7 months ago

PR Health

Build ❌

Details ```shell packages/core/src/source.ts(20,55): error TS2353: Object literal may only specify known properties, and 'proxyAgent' does not exist in type 'Config'. packages/yande/src/index.ts(1,30): error TS2307: Cannot find module 'koishi-plugin-booru/yande' or its corresponding type declarations. packages/sankaku/src/index.ts(1,39): error TS2307: Cannot find module 'koishi-plugin-booru/sankaku' or its corresponding type declarations. packages/safebooru/src/index.ts(1,34): error TS2307: Cannot find module 'koishi-plugin-booru/safebooru' or its corresponding type declarations. packages/pixiv/src/index.ts(9,29): error TS2307: Cannot find module 'koishi-plugin-booru' or its corresponding type declarations. packages/pixiv/src/index.ts(31,25): error TS2339: Property 'ctx' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(38,34): error TS2339: Property 'ctx' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(46,14): error TS2339: Property 'ctx' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(50,12): error TS2339: Property 'ctx' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(54,33): error TS2339: Property 'http' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(68,12): error TS4112: This member cannot have an 'override' modifier because its containing class 'PixivImageSource' does not extend another class. packages/pixiv/src/index.ts(79,63): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(80,59): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(81,63): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(121,28): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(130,23): error TS2339: Property 'http' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(130,67): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(143,23): error TS2339: Property 'http' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(143,67): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(166,31): error TS2339: Property 'http' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(206,14): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(206,54): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(207,33): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(207,66): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(207,86): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(209,21): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(209,61): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(209,82): error TS2339: Property 'ctx' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(210,50): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(212,24): error TS2339: Property 'ctx' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(212,68): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(214,21): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(214,61): error TS2339: Property 'ctx' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(216,31): error TS2339: Property 'http' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(218,19): error TS2339: Property 'ctx' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(221,41): error TS2339: Property 'config' does not exist on type 'PixivImageSource'. packages/pixiv/src/index.ts(241,16): error TS2322: Type 'Schema' is not assignable to type 'Schema'. Types of property 'value' are incompatible. Type 'unknown' is not assignable to type 'Config'. packages/moehu/src/index.ts(3,29): error TS2307: Cannot find module 'koishi-plugin-booru' or its corresponding type declarations. packages/moehu/src/index.ts(23,22): error TS2339: Property 'config' does not exist on type 'MoehuImageSource'. packages/moehu/src/index.ts(28,29): error TS2339: Property 'ctx' does not exist on type 'MoehuImageSource'. packages/moehu/src/index.ts(61,16): error TS2322: Type 'Schema' is not assignable to type 'Schema'. Types of property 'value' are incompatible. Type 'unknown' is not assignable to type 'Config'. packages/lolicon/src/index.ts(2,29): error TS2307: Cannot find module 'koishi-plugin-booru' or its corresponding type declarations. packages/lolicon/src/index.ts(10,12): error TS4112: This member cannot have an 'override' modifier because its containing class 'LoliconImageSource' does not extend another class. packages/lolicon/src/index.ts(15,31): error TS2339: Property 'config' does not exist on type 'LoliconImageSource'. packages/lolicon/src/index.ts(15,64): error TS2339: Property 'config' does not exist on type 'LoliconImageSource'. packages/lolicon/src/index.ts(15,84): error TS2339: Property 'config' does not exist on type 'LoliconImageSource'. packages/lolicon/src/index.ts(17,17): error TS2339: Property 'config' does not exist on type 'LoliconImageSource'. packages/lolicon/src/index.ts(20,23): error TS2339: Property 'config' does not exist on type 'LoliconImageSource'. packages/lolicon/src/index.ts(23,29): error TS2339: Property 'http' does not exist on type 'LoliconImageSource'. packages/lolicon/src/index.ts(23,62): error TS2339: Property 'config' does not exist on type 'LoliconImageSource'. packages/lolicon/src/index.ts(30,32): error TS2339: Property 'config' does not exist on type 'LoliconImageSource'. packages/lolicon/src/index.ts(31,32): error TS2339: Property 'config' does not exist on type 'LoliconImageSource'. packages/lolicon/src/index.ts(31,53): error TS2339: Property 'config' does not exist on type 'LoliconImageSource'. packages/lolicon/src/index.ts(59,16): error TS2322: Type 'Schema' is not assignable to type 'Schema'. Types of property 'value' are incompatible. Type 'unknown' is not assignable to type 'Config'. packages/lolibooru/src/index.ts(1,34): error TS2307: Cannot find module 'koishi-plugin-booru/lolibooru' or its corresponding type declarations. packages/local/src/index.ts(7,29): error TS2307: Cannot find module 'koishi-plugin-booru' or its corresponding type declarations. packages/local/src/index.ts(21,19): error TS4112: This member cannot have an 'override' modifier because its containing class 'LocalImageSource' does not extend another class. packages/local/src/index.ts(95,14): error TS2339: Property 'config' does not exist on type 'LocalImageSource'. packages/local/src/index.ts(95,49): error TS2339: Property 'config' does not exist on type 'LocalImageSource'. packages/local/src/index.ts(185,16): error TS2322: Type 'Schema' is not assignable to type 'Schema'. Types of property 'value' are incompatible. Type 'unknown' is not assignable to type 'Config'. packages/konachan/src/index.ts(1,33): error TS2307: Cannot find module 'koishi-plugin-booru/konachan' or its corresponding type declarations. packages/gelbooru/src/index.ts(1,33): error TS2307: Cannot find module 'koishi-plugin-booru/gelbooru' or its corresponding type declarations. packages/e621/src/index.ts(1,29): error TS2307: Cannot find module 'koishi-plugin-booru/e621' or its corresponding type declarations. packages/danbooru/src/index.ts(1,33): error TS2307: Cannot find module 'koishi-plugin-booru/danbooru' or its corresponding type declarations. ```

Lint ✅

Details ```shell /home/runner/work/koishi-plugin-booru/koishi-plugin-booru/packages/core/src/sources/danbooru/index.ts 11:3 warning Useless constructor @typescript-eslint/no-useless-constructor /home/runner/work/koishi-plugin-booru/koishi-plugin-booru/packages/core/src/sources/gelbooru/index.ts 11:3 warning Useless constructor @typescript-eslint/no-useless-constructor /home/runner/work/koishi-plugin-booru/koishi-plugin-booru/packages/core/src/sources/konachan/index.ts 26:3 warning Useless constructor @typescript-eslint/no-useless-constructor /home/runner/work/koishi-plugin-booru/koishi-plugin-booru/packages/core/src/sources/lolibooru/index.ts 25:3 warning Useless constructor @typescript-eslint/no-useless-constructor /home/runner/work/koishi-plugin-booru/koishi-plugin-booru/packages/core/src/sources/safebooru/index.ts 11:3 warning Useless constructor @typescript-eslint/no-useless-constructor /home/runner/work/koishi-plugin-booru/koishi-plugin-booru/packages/core/src/sources/yande/index.ts 26:3 warning Useless constructor @typescript-eslint/no-useless-constructor ✖ 6 problems (0 errors, 6 warnings) Checking formatting... All matched files use Prettier code style! ```