Commit 8ae5584a authored by nanahira's avatar nanahira

bump version

parent eba141cb
......@@ -26,6 +26,6 @@ app.plugin(DatabasePlugin);
app.plugin(ExtrasInDev);
// Target plugin
app.plugin(TargetPlugin, { isDefault: true });
app.plugin(TargetPlugin, { isDefault: true, mirror: 'i.pixiv.re' });
app.start();
......@@ -15,7 +15,7 @@
"@koishijs/plugin-cache-lru": "^1.0.0-rc.0",
"@koishijs/plugin-console": "^3.2.4",
"@koishijs/plugin-database-memory": "^1.1.0",
"@koishijs/plugin-sandbox": "^1.0.2",
"@koishijs/plugin-sandbox": "^1.1.0",
"@types/jest": "^27.4.0",
"@types/node": "^16.11.4",
"@typescript-eslint/eslint-plugin": "^4.33.0",
......@@ -35,8 +35,8 @@
"ws": "^8.3.0"
},
"peerDependencies": {
"koishi": "^4.5.0",
"koishi-plugin-pics": "^8.7.3"
"koishi": "^4.5.2",
"koishi-plugin-pics": "^8.7.9"
}
},
"node_modules/@ampproject/remapping": {
......@@ -1057,13 +1057,13 @@
}
},
"node_modules/@koishijs/core": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.5.0.tgz",
"integrity": "sha512-+kppTq/FcJcZf0bESunfxCAcP3xyLUK2lNaHUzP/oKJCD5L2oyGRFjl1JskRJnwwSSscUKYv409ZWCHPqJ4plA==",
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.5.2.tgz",
"integrity": "sha512-ETp//1GsWFBRr4AL4YhZ6NCB4kuhleo+J/KmnGJ90oDignV6k4xtl9fjRLPWsW2IIb2i3BRUHtwSzE9PQTl5+A==",
"peer": true,
"dependencies": {
"@koishijs/orm": "^1.0.0",
"@koishijs/utils": "^5.2.1",
"@koishijs/orm": "^1.0.1",
"@koishijs/utils": "^5.2.2",
"fastest-levenshtein": "^1.0.12"
},
"engines": {
......@@ -1071,11 +1071,11 @@
}
},
"node_modules/@koishijs/orm": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@koishijs/orm/-/orm-1.0.0.tgz",
"integrity": "sha512-uWSOVCF2THR/S4PPS5FsvsYNhWcPIHO6pXVlSckV5GmJMDQ4zAppSi4s6MwvBHPRX5CMjicK/T2huUlEA/srOQ==",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@koishijs/orm/-/orm-1.0.1.tgz",
"integrity": "sha512-RZL3XdJ/DMfUstaaoHuhIm4cGAY4VwPiUcDeIsNhZqWT/qS4HhS0pxlEVxtJdDS3138Ou8bjMchHmVZNo2/TIw==",
"dependencies": {
"@koishijs/utils": "^5.2.1"
"@koishijs/utils": "^5.2.2"
},
"engines": {
"node": ">=12.0.0"
......@@ -1120,12 +1120,12 @@
}
},
"node_modules/@koishijs/plugin-sandbox": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-sandbox/-/plugin-sandbox-1.0.2.tgz",
"integrity": "sha512-vOZ4A8At8KJ0Bk5KmBThRiUztFRStg/PKqW2KSPcdj1DWJ4zGIcBNS0+XshH7n2SUWgSWUOaBTdl7kcWtCkAGw==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-sandbox/-/plugin-sandbox-1.1.0.tgz",
"integrity": "sha512-y0eJcgBMvGhCYjfVP1IsFvHkmiubAJHWdMlbnkss7eZ39nt0nzApfHAubITIEPBr7A0c7gqfC4fUUw5Z3UldXg==",
"dev": true,
"peerDependencies": {
"koishi": "^4.3.1"
"koishi": "^4.5.2"
}
},
"node_modules/@koishijs/segment": {
......@@ -1134,12 +1134,12 @@
"integrity": "sha512-HmLRKJiIX++U+ow+RP0BVGwgAFzDRqwHusUzjoZcZdcnG8yudTsvB6MXnzBMnBL7k9LBxUlfB5P8ukkM1roZFQ=="
},
"node_modules/@koishijs/utils": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.2.1.tgz",
"integrity": "sha512-Yu+QzmpStHAx5ZknSZhp9Zv3rfy6M4b1tuU3Wh8D3gTgZPeo+gqh07X7GyN7SA76Nr472rN8+hDqq5rafuA9iQ==",
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.2.2.tgz",
"integrity": "sha512-Dm3xNxCjWviEGRNzI+23kbd/6urTe+QBmsuBEr44HYDQXxntqf3KSJtEVL8Fua5g3+R6gOk/zzFIneWK4qzP+g==",
"dependencies": {
"@koishijs/segment": "^1.1.1",
"schemastery": "^3.1.1",
"schemastery": "^3.2.0",
"supports-color": "^8.1.1"
}
},
......@@ -5178,14 +5178,14 @@
}
},
"node_modules/koishi": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.5.0.tgz",
"integrity": "sha512-1VI3Hpm304myRjx7PoV21t8E5ckB4IYFhaE6uUKVIpBBOK25zWCI1X/RwXhxqRGflL8BEpegIP0Y7Be208J+kw==",
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.5.2.tgz",
"integrity": "sha512-5dHLzlBNJeZkjznBQWwYwd/rN06hcw74a0La91VCnCuXAXoGpMeUg2OdemNAtshRl3rtmYXe0UlPw3UZ+m3SEQ==",
"peer": true,
"dependencies": {
"@koa/router": "^10.1.1",
"@koishijs/core": "^4.5.0",
"@koishijs/utils": "^5.2.1",
"@koishijs/core": "^4.5.2",
"@koishijs/utils": "^5.2.2",
"@types/koa": "*",
"@types/koa__router": "*",
"@types/ws": "^8.5.3",
......@@ -5231,16 +5231,16 @@
}
},
"node_modules/koishi-plugin-pics": {
"version": "8.7.3",
"resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-8.7.3.tgz",
"integrity": "sha512-fPKxDe3uqucVco+FtAEc7mbsevY/hmBfyy31Z+4ygur7v3u6PHy+FlqqFamLFplU6v/EBAvwL+1U0p5GKwfy/A==",
"version": "8.7.9",
"resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-8.7.9.tgz",
"integrity": "sha512-mXnxY+JXTNrCtkJmwcXvZMGzRbZyEjfpjcujCdod6S1Xdd8vCeOtNPE7rwvvCqtKV0YBNAD5oYZhdPVoaZUuVQ==",
"peer": true,
"dependencies": {
"koishi-thirdeye": "^9.2.18",
"lodash": "^4.17.21"
},
"peerDependencies": {
"koishi": "^4.5.0"
"koishi": "^4.5.2"
}
},
"node_modules/koishi-thirdeye": {
......@@ -6388,9 +6388,9 @@
}
},
"node_modules/schemastery": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-3.1.1.tgz",
"integrity": "sha512-TdbphUvailcX1FqxSq3sqlxdFx/HhBD7TXliq1r4Su7BTChRQimHvrauK/Q75jLVCYaJPACDU92s0JTovmVrtA=="
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-3.2.0.tgz",
"integrity": "sha512-ZVhQ07wllG9saIuSpJhK996b3X9g9YdqVzGsKedJG9lfNtRnBDu+UiPmMDfvTMRVdK7IvMJgyS3025j/UV4cHA=="
},
"node_modules/schemastery-gen": {
"version": "3.1.2",
......@@ -8498,22 +8498,22 @@
}
},
"@koishijs/core": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.5.0.tgz",
"integrity": "sha512-+kppTq/FcJcZf0bESunfxCAcP3xyLUK2lNaHUzP/oKJCD5L2oyGRFjl1JskRJnwwSSscUKYv409ZWCHPqJ4plA==",
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.5.2.tgz",
"integrity": "sha512-ETp//1GsWFBRr4AL4YhZ6NCB4kuhleo+J/KmnGJ90oDignV6k4xtl9fjRLPWsW2IIb2i3BRUHtwSzE9PQTl5+A==",
"peer": true,
"requires": {
"@koishijs/orm": "^1.0.0",
"@koishijs/utils": "^5.2.1",
"@koishijs/orm": "^1.0.1",
"@koishijs/utils": "^5.2.2",
"fastest-levenshtein": "^1.0.12"
}
},
"@koishijs/orm": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@koishijs/orm/-/orm-1.0.0.tgz",
"integrity": "sha512-uWSOVCF2THR/S4PPS5FsvsYNhWcPIHO6pXVlSckV5GmJMDQ4zAppSi4s6MwvBHPRX5CMjicK/T2huUlEA/srOQ==",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@koishijs/orm/-/orm-1.0.1.tgz",
"integrity": "sha512-RZL3XdJ/DMfUstaaoHuhIm4cGAY4VwPiUcDeIsNhZqWT/qS4HhS0pxlEVxtJdDS3138Ou8bjMchHmVZNo2/TIw==",
"requires": {
"@koishijs/utils": "^5.2.1"
"@koishijs/utils": "^5.2.2"
}
},
"@koishijs/plugin-cache-lru": {
......@@ -8545,9 +8545,9 @@
}
},
"@koishijs/plugin-sandbox": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-sandbox/-/plugin-sandbox-1.0.2.tgz",
"integrity": "sha512-vOZ4A8At8KJ0Bk5KmBThRiUztFRStg/PKqW2KSPcdj1DWJ4zGIcBNS0+XshH7n2SUWgSWUOaBTdl7kcWtCkAGw==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-sandbox/-/plugin-sandbox-1.1.0.tgz",
"integrity": "sha512-y0eJcgBMvGhCYjfVP1IsFvHkmiubAJHWdMlbnkss7eZ39nt0nzApfHAubITIEPBr7A0c7gqfC4fUUw5Z3UldXg==",
"dev": true,
"requires": {}
},
......@@ -8557,12 +8557,12 @@
"integrity": "sha512-HmLRKJiIX++U+ow+RP0BVGwgAFzDRqwHusUzjoZcZdcnG8yudTsvB6MXnzBMnBL7k9LBxUlfB5P8ukkM1roZFQ=="
},
"@koishijs/utils": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.2.1.tgz",
"integrity": "sha512-Yu+QzmpStHAx5ZknSZhp9Zv3rfy6M4b1tuU3Wh8D3gTgZPeo+gqh07X7GyN7SA76Nr472rN8+hDqq5rafuA9iQ==",
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.2.2.tgz",
"integrity": "sha512-Dm3xNxCjWviEGRNzI+23kbd/6urTe+QBmsuBEr44HYDQXxntqf3KSJtEVL8Fua5g3+R6gOk/zzFIneWK4qzP+g==",
"requires": {
"@koishijs/segment": "^1.1.1",
"schemastery": "^3.1.1",
"schemastery": "^3.2.0",
"supports-color": "^8.1.1"
},
"dependencies": {
......@@ -11694,14 +11694,14 @@
}
},
"koishi": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.5.0.tgz",
"integrity": "sha512-1VI3Hpm304myRjx7PoV21t8E5ckB4IYFhaE6uUKVIpBBOK25zWCI1X/RwXhxqRGflL8BEpegIP0Y7Be208J+kw==",
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.5.2.tgz",
"integrity": "sha512-5dHLzlBNJeZkjznBQWwYwd/rN06hcw74a0La91VCnCuXAXoGpMeUg2OdemNAtshRl3rtmYXe0UlPw3UZ+m3SEQ==",
"peer": true,
"requires": {
"@koa/router": "^10.1.1",
"@koishijs/core": "^4.5.0",
"@koishijs/utils": "^5.2.1",
"@koishijs/core": "^4.5.2",
"@koishijs/utils": "^5.2.2",
"@types/koa": "*",
"@types/koa__router": "*",
"@types/ws": "^8.5.3",
......@@ -11738,9 +11738,9 @@
}
},
"koishi-plugin-pics": {
"version": "8.7.3",
"resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-8.7.3.tgz",
"integrity": "sha512-fPKxDe3uqucVco+FtAEc7mbsevY/hmBfyy31Z+4ygur7v3u6PHy+FlqqFamLFplU6v/EBAvwL+1U0p5GKwfy/A==",
"version": "8.7.9",
"resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-8.7.9.tgz",
"integrity": "sha512-mXnxY+JXTNrCtkJmwcXvZMGzRbZyEjfpjcujCdod6S1Xdd8vCeOtNPE7rwvvCqtKV0YBNAD5oYZhdPVoaZUuVQ==",
"peer": true,
"requires": {
"koishi-thirdeye": "^9.2.18",
......@@ -12594,9 +12594,9 @@
}
},
"schemastery": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-3.1.1.tgz",
"integrity": "sha512-TdbphUvailcX1FqxSq3sqlxdFx/HhBD7TXliq1r4Su7BTChRQimHvrauK/Q75jLVCYaJPACDU92s0JTovmVrtA=="
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-3.2.0.tgz",
"integrity": "sha512-ZVhQ07wllG9saIuSpJhK996b3X9g9YdqVzGsKedJG9lfNtRnBDu+UiPmMDfvTMRVdK7IvMJgyS3025j/UV4cHA=="
},
"schemastery-gen": {
"version": "3.1.2",
......
......@@ -31,14 +31,14 @@
"koishi-thirdeye": "^9.2.18"
},
"peerDependencies": {
"koishi": "^4.5.0",
"koishi-plugin-pics": "^8.7.3"
"koishi": "^4.5.2",
"koishi-plugin-pics": "^8.7.9"
},
"devDependencies": {
"@koishijs/plugin-cache-lru": "^1.0.0-rc.0",
"@koishijs/plugin-console": "^3.2.4",
"@koishijs/plugin-database-memory": "^1.1.0",
"@koishijs/plugin-sandbox": "^1.0.2",
"@koishijs/plugin-sandbox": "^1.1.0",
"@types/jest": "^27.4.0",
"@types/node": "^16.11.4",
"@typescript-eslint/eslint-plugin": "^4.33.0",
......
......@@ -16,7 +16,7 @@ export class PicSourceLoliconPluginConfig
name: string;
@DefineSchema({
description: '图片类型, 0 = 非 R18 ,1 = R18 ,2 = 混合',
description: '图片类型, 0 = 非 R18 ,1 = R18 ,2 = 混合',
default: 2,
})
r18: number;
......@@ -26,17 +26,30 @@ export class PicSourceLoliconPluginConfig
default: {},
hidden: true,
description:
'额外的 POST 参数,参照 [Lolicon 文档](https://api.lolicon.app/#/setu?id=%e8%af%b7%e6%b1%82)',
'额外的 POST 参数,参照 [Lolicon 文档](https://api.lolicon.app/#/setu?id=%e8%af%b7%e6%b1%82)',
})
extraConfig: any;
@DefineSchema({
description: 'Lolicon POST 地址',
description: 'Lolicon POST 地址',
default: 'https://api.lolicon.app/setu/v2',
hidden: true,
role: 'url',
})
endpoint: string;
@DefineSchema({ description: '使用的镜像站,不包含协议。' })
mirror: string;
getExactUrl(url: string): string {
if (!this.mirror) {
return url;
}
return url.replace(
'https://i.pixiv.cat',
this.mirror.startsWith('http') ? this.mirror : `https://${this.mirror}`,
);
}
}
export type PicSourceLoliconPluginConfigLike =
......
......@@ -66,7 +66,7 @@ export default class PicSourceLolicon extends PicSource {
return;
}
return {
url: data.urls.original,
url: this.config.getExactUrl(data.urls.original),
description: `PID:${data.pid} ${data.title} by ${data.author}`,
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment