Commit 2364bf60 authored by nanahira's avatar nanahira

fix compile

parent f812eed7
...@@ -27,7 +27,9 @@ app.plugin(ExtrasInDev); ...@@ -27,7 +27,9 @@ app.plugin(ExtrasInDev);
// Target plugin // Target plugin
app.plugin(TargetPlugin, { app.plugin(TargetPlugin, {
instances: [{ name: 'ygopro', isDefault: true, path: './dev/test-pics' }], name: 'ygopro',
isDefault: true,
path: './dev/test-pics',
}); });
app.start(); app.start();
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"version": "9.2.3", "version": "9.2.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"koishi-thirdeye": "^10.2.8", "koishi-thirdeye": "^10.3.1",
"read-dir-deep": "^7.0.1" "read-dir-deep": "^7.0.1"
}, },
"devDependencies": { "devDependencies": {
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
"ws": "^8.3.0" "ws": "^8.3.0"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.7.4", "koishi": "^4.7.5",
"koishi-plugin-pics": "^9.3.3" "koishi-plugin-pics": "^9.4.1"
} }
}, },
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
...@@ -1058,15 +1058,15 @@ ...@@ -1058,15 +1058,15 @@
} }
}, },
"node_modules/@koishijs/core": { "node_modules/@koishijs/core": {
"version": "4.7.4", "version": "4.7.5",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.7.4.tgz", "resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.7.5.tgz",
"integrity": "sha512-S4pPaO05WC0htkQVcTMTluBZv4g8sEEBJ2ItHN2zJA8syet3iKJidT+s2gYt8d2rBo0Ndlvo1gBLGLNl/Zc9yg==", "integrity": "sha512-So8tBtSTVIq8dTGs/0o92Om3bQhgYUhmzVhnYTqJbx+kW3kSowl/ORiBhJFK3GR6Dj+JyKLptsqQNE4DjZdNhw==",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@koishijs/utils": "^5.4.5", "@koishijs/utils": "^5.4.5",
"cordis": "^1.3.3", "cordis": "^1.5.5",
"fastest-levenshtein": "^1.0.12", "fastest-levenshtein": "^1.0.12",
"minato": "^1.1.0" "minato": "^1.2.1"
}, },
"engines": { "engines": {
"node": ">=12.0.0" "node": ">=12.0.0"
...@@ -2611,9 +2611,9 @@ ...@@ -2611,9 +2611,9 @@
"peer": true "peer": true
}, },
"node_modules/cordis": { "node_modules/cordis": {
"version": "1.3.3", "version": "1.5.5",
"resolved": "https://registry.npmjs.org/cordis/-/cordis-1.3.3.tgz", "resolved": "https://registry.npmjs.org/cordis/-/cordis-1.5.5.tgz",
"integrity": "sha512-mpyBWAEVYX8/YHoGWIqaOjrOk6DmtrOWZfsBSinNR+nDBlB39Ks6aC1B5oZ7AdnVoRE2ZYBCGecoHrlxcRxd6w==", "integrity": "sha512-vCw6FA+OLO5e40so5XjhRnIw1ldGH1L74q/wlnuckqFtIq8teYkfnnmlNTS24RJNcgPz2DWdbVgCnoc+5Lc+UQ==",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"cosmokit": "^1.1.2" "cosmokit": "^1.1.2"
...@@ -5231,13 +5231,13 @@ ...@@ -5231,13 +5231,13 @@
} }
}, },
"node_modules/koishi": { "node_modules/koishi": {
"version": "4.7.4", "version": "4.7.5",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.7.4.tgz", "resolved": "https://registry.npmjs.org/koishi/-/koishi-4.7.5.tgz",
"integrity": "sha512-VVHf3TyFsTuKrB8IZffxwmwiGx+zyhDo+DNNEFQjvomgqFdGEceAnLxNIf10K48aB1CDmkmi37b6uaURi4Z1Hw==", "integrity": "sha512-Q+czD5hZIsikYwdoKUOZFZIuvXoamikXK6iX4FXnHUPsoXX16PjqX3D1sBKd9JLVMA49KSAGoFW0fN9IMHykYw==",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@koa/router": "^10.1.1", "@koa/router": "^10.1.1",
"@koishijs/core": "^4.7.4", "@koishijs/core": "^4.7.5",
"@koishijs/utils": "^5.4.5", "@koishijs/utils": "^5.4.5",
"@types/koa": "*", "@types/koa": "*",
"@types/koa__router": "*", "@types/koa__router": "*",
...@@ -5246,7 +5246,7 @@ ...@@ -5246,7 +5246,7 @@
"file-type": "^16.5.3", "file-type": "^16.5.3",
"koa": "^2.13.4", "koa": "^2.13.4",
"koa-bodyparser": "^4.3.0", "koa-bodyparser": "^4.3.0",
"ns-require": "^1.1.2", "ns-require": "^1.1.4",
"parseurl": "^1.3.3", "parseurl": "^1.3.3",
"path-to-regexp": "^6.2.1", "path-to-regexp": "^6.2.1",
"portfinder": "^1.0.28", "portfinder": "^1.0.28",
...@@ -5258,9 +5258,9 @@ ...@@ -5258,9 +5258,9 @@
} }
}, },
"node_modules/koishi-decorators": { "node_modules/koishi-decorators": {
"version": "2.1.6", "version": "2.1.7",
"resolved": "https://registry.npmjs.org/koishi-decorators/-/koishi-decorators-2.1.6.tgz", "resolved": "https://registry.npmjs.org/koishi-decorators/-/koishi-decorators-2.1.7.tgz",
"integrity": "sha512-G1NN31fCIOafKkDME4YBzgHZ6J3b/CjsKr2AszZw9rmH6j7qHbs3PxXrkEK7zFSvTJh1RLHR2gDMhxqC7A3zTQ==", "integrity": "sha512-OoExVOdpVEmv8FywtdjR8JUPQtBz1P2rabkIfmt3SQpp3jrkm67EgdQNH+Nw8+6CfSDukMP3+/xWsA64VE5VEQ==",
"dependencies": { "dependencies": {
"@types/koa": "^2.13.4", "@types/koa": "^2.13.4",
"@types/koa__router": "^8.0.11", "@types/koa__router": "^8.0.11",
...@@ -5271,30 +5271,30 @@ ...@@ -5271,30 +5271,30 @@
"typed-reflector": "^1.0.10" "typed-reflector": "^1.0.10"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.7.4" "koishi": "^4.7.5"
} }
}, },
"node_modules/koishi-plugin-pics": { "node_modules/koishi-plugin-pics": {
"version": "9.3.3", "version": "9.4.1",
"resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-9.3.3.tgz", "resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-9.4.1.tgz",
"integrity": "sha512-PvBVJw9wAm8u+Cgn4ykrFbWZzA7uxq050rnpMOWjWz3qVG5NbaHimTQYbKhQoqCEHjVenCdj/JMCRjVtzrYHzg==", "integrity": "sha512-TmUpK9hKwcBSbc1zrWaZksvs0a7xfFSvVSTsGkOG6QIMX38cEVGqzeFDy58Hu1f8CR2gJNenM53hI/6lq2Dd2Q==",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"koishi-thirdeye": "^10.2.5", "koishi-thirdeye": "^10.3.1",
"lodash": "^4.17.21" "lodash": "^4.17.21"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.7.4" "koishi": "^4.7.5"
} }
}, },
"node_modules/koishi-thirdeye": { "node_modules/koishi-thirdeye": {
"version": "10.2.8", "version": "10.3.1",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-10.2.8.tgz", "resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-10.3.1.tgz",
"integrity": "sha512-fjHDMvc9SxwDuh7E34sl2qvpHrtkYQcrwrHXqk6K8X9sw0RiznL0QSx0EgPqUtr7QkbTm96p2J7MCPaTl5trWg==", "integrity": "sha512-MEppegxBnl9MgwHxjXzItsgzmMnizewllJsuFGRyWasacOHrXieHTG07yGEVKhc8yWJT2JuqS79WI7excXcBXQ==",
"dependencies": { "dependencies": {
"@types/koa": "^2.13.4", "@types/koa": "^2.13.4",
"@types/koa__router": "^8.0.11", "@types/koa__router": "^8.0.11",
"koishi-decorators": "^2.1.6", "koishi-decorators": "^2.1.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"minato-decorators": "^2.0.7", "minato-decorators": "^2.0.7",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
...@@ -5302,7 +5302,7 @@ ...@@ -5302,7 +5302,7 @@
"typed-reflector": "^1.0.10" "typed-reflector": "^1.0.10"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.7.4", "koishi": "^4.7.5",
"schemastery": "^3.4.3" "schemastery": "^3.4.3"
} }
}, },
...@@ -5522,13 +5522,13 @@ ...@@ -5522,13 +5522,13 @@
} }
}, },
"node_modules/minato": { "node_modules/minato": {
"version": "1.1.0", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/minato/-/minato-1.1.0.tgz", "resolved": "https://registry.npmjs.org/minato/-/minato-1.2.1.tgz",
"integrity": "sha512-by1KMWxWlzq0iDV7tMkqS3thDRzYNQoS2ECfX5HRpMGaPQJqSgm5aY9IAky7knwAMoW3cMxQ/IhpvEShQqyj6A==", "integrity": "sha512-BYY18rr82aXAAVtMKkN4yDFsTUtsAmeDmyTRVOXG3mEzG74sNF5TU1nVT1QSC9dpvAcCFFs/vZO2rJoC8vSetQ==",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"cosmokit": "^1.1.2", "cosmokit": "^1.1.2",
"ns-require": "^1.1.2" "ns-require": "^1.1.4"
} }
}, },
"node_modules/minato-decorators": { "node_modules/minato-decorators": {
...@@ -5648,9 +5648,9 @@ ...@@ -5648,9 +5648,9 @@
} }
}, },
"node_modules/ns-require": { "node_modules/ns-require": {
"version": "1.1.2", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/ns-require/-/ns-require-1.1.2.tgz", "resolved": "https://registry.npmjs.org/ns-require/-/ns-require-1.1.4.tgz",
"integrity": "sha512-GUF6I1hWDsGx1cA9FW27KIRAlkMel2UZagR39dVNPAPBgwWK1Ez0XB96WEz2OFcwHsCORI9h75dEZueHqZ/1pA==", "integrity": "sha512-Zk25pQj4u5i6DS0vaNO5aSSXewybVqqVVjz8AOxFy9DNPtmu3jlexMz6kUXLV2oB+X6iQeAnHXSzj5Qz/IeDaQ==",
"peer": true "peer": true
}, },
"node_modules/nwsapi": { "node_modules/nwsapi": {
...@@ -8673,15 +8673,15 @@ ...@@ -8673,15 +8673,15 @@
} }
}, },
"@koishijs/core": { "@koishijs/core": {
"version": "4.7.4", "version": "4.7.5",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.7.4.tgz", "resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.7.5.tgz",
"integrity": "sha512-S4pPaO05WC0htkQVcTMTluBZv4g8sEEBJ2ItHN2zJA8syet3iKJidT+s2gYt8d2rBo0Ndlvo1gBLGLNl/Zc9yg==", "integrity": "sha512-So8tBtSTVIq8dTGs/0o92Om3bQhgYUhmzVhnYTqJbx+kW3kSowl/ORiBhJFK3GR6Dj+JyKLptsqQNE4DjZdNhw==",
"peer": true, "peer": true,
"requires": { "requires": {
"@koishijs/utils": "^5.4.5", "@koishijs/utils": "^5.4.5",
"cordis": "^1.3.3", "cordis": "^1.5.5",
"fastest-levenshtein": "^1.0.12", "fastest-levenshtein": "^1.0.12",
"minato": "^1.1.0" "minato": "^1.2.1"
} }
}, },
"@koishijs/plugin-cache-lru": { "@koishijs/plugin-cache-lru": {
...@@ -9947,9 +9947,9 @@ ...@@ -9947,9 +9947,9 @@
"peer": true "peer": true
}, },
"cordis": { "cordis": {
"version": "1.3.3", "version": "1.5.5",
"resolved": "https://registry.npmjs.org/cordis/-/cordis-1.3.3.tgz", "resolved": "https://registry.npmjs.org/cordis/-/cordis-1.5.5.tgz",
"integrity": "sha512-mpyBWAEVYX8/YHoGWIqaOjrOk6DmtrOWZfsBSinNR+nDBlB39Ks6aC1B5oZ7AdnVoRE2ZYBCGecoHrlxcRxd6w==", "integrity": "sha512-vCw6FA+OLO5e40so5XjhRnIw1ldGH1L74q/wlnuckqFtIq8teYkfnnmlNTS24RJNcgPz2DWdbVgCnoc+5Lc+UQ==",
"peer": true, "peer": true,
"requires": { "requires": {
"cosmokit": "^1.1.2" "cosmokit": "^1.1.2"
...@@ -11912,13 +11912,13 @@ ...@@ -11912,13 +11912,13 @@
} }
}, },
"koishi": { "koishi": {
"version": "4.7.4", "version": "4.7.5",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.7.4.tgz", "resolved": "https://registry.npmjs.org/koishi/-/koishi-4.7.5.tgz",
"integrity": "sha512-VVHf3TyFsTuKrB8IZffxwmwiGx+zyhDo+DNNEFQjvomgqFdGEceAnLxNIf10K48aB1CDmkmi37b6uaURi4Z1Hw==", "integrity": "sha512-Q+czD5hZIsikYwdoKUOZFZIuvXoamikXK6iX4FXnHUPsoXX16PjqX3D1sBKd9JLVMA49KSAGoFW0fN9IMHykYw==",
"peer": true, "peer": true,
"requires": { "requires": {
"@koa/router": "^10.1.1", "@koa/router": "^10.1.1",
"@koishijs/core": "^4.7.4", "@koishijs/core": "^4.7.5",
"@koishijs/utils": "^5.4.5", "@koishijs/utils": "^5.4.5",
"@types/koa": "*", "@types/koa": "*",
"@types/koa__router": "*", "@types/koa__router": "*",
...@@ -11927,7 +11927,7 @@ ...@@ -11927,7 +11927,7 @@
"file-type": "^16.5.3", "file-type": "^16.5.3",
"koa": "^2.13.4", "koa": "^2.13.4",
"koa-bodyparser": "^4.3.0", "koa-bodyparser": "^4.3.0",
"ns-require": "^1.1.2", "ns-require": "^1.1.4",
"parseurl": "^1.3.3", "parseurl": "^1.3.3",
"path-to-regexp": "^6.2.1", "path-to-regexp": "^6.2.1",
"portfinder": "^1.0.28", "portfinder": "^1.0.28",
...@@ -11936,9 +11936,9 @@ ...@@ -11936,9 +11936,9 @@
} }
}, },
"koishi-decorators": { "koishi-decorators": {
"version": "2.1.6", "version": "2.1.7",
"resolved": "https://registry.npmjs.org/koishi-decorators/-/koishi-decorators-2.1.6.tgz", "resolved": "https://registry.npmjs.org/koishi-decorators/-/koishi-decorators-2.1.7.tgz",
"integrity": "sha512-G1NN31fCIOafKkDME4YBzgHZ6J3b/CjsKr2AszZw9rmH6j7qHbs3PxXrkEK7zFSvTJh1RLHR2gDMhxqC7A3zTQ==", "integrity": "sha512-OoExVOdpVEmv8FywtdjR8JUPQtBz1P2rabkIfmt3SQpp3jrkm67EgdQNH+Nw8+6CfSDukMP3+/xWsA64VE5VEQ==",
"requires": { "requires": {
"@types/koa": "^2.13.4", "@types/koa": "^2.13.4",
"@types/koa__router": "^8.0.11", "@types/koa__router": "^8.0.11",
...@@ -11950,23 +11950,23 @@ ...@@ -11950,23 +11950,23 @@
} }
}, },
"koishi-plugin-pics": { "koishi-plugin-pics": {
"version": "9.3.3", "version": "9.4.1",
"resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-9.3.3.tgz", "resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-9.4.1.tgz",
"integrity": "sha512-PvBVJw9wAm8u+Cgn4ykrFbWZzA7uxq050rnpMOWjWz3qVG5NbaHimTQYbKhQoqCEHjVenCdj/JMCRjVtzrYHzg==", "integrity": "sha512-TmUpK9hKwcBSbc1zrWaZksvs0a7xfFSvVSTsGkOG6QIMX38cEVGqzeFDy58Hu1f8CR2gJNenM53hI/6lq2Dd2Q==",
"peer": true, "peer": true,
"requires": { "requires": {
"koishi-thirdeye": "^10.2.5", "koishi-thirdeye": "^10.3.1",
"lodash": "^4.17.21" "lodash": "^4.17.21"
} }
}, },
"koishi-thirdeye": { "koishi-thirdeye": {
"version": "10.2.8", "version": "10.3.1",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-10.2.8.tgz", "resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-10.3.1.tgz",
"integrity": "sha512-fjHDMvc9SxwDuh7E34sl2qvpHrtkYQcrwrHXqk6K8X9sw0RiznL0QSx0EgPqUtr7QkbTm96p2J7MCPaTl5trWg==", "integrity": "sha512-MEppegxBnl9MgwHxjXzItsgzmMnizewllJsuFGRyWasacOHrXieHTG07yGEVKhc8yWJT2JuqS79WI7excXcBXQ==",
"requires": { "requires": {
"@types/koa": "^2.13.4", "@types/koa": "^2.13.4",
"@types/koa__router": "^8.0.11", "@types/koa__router": "^8.0.11",
"koishi-decorators": "^2.1.6", "koishi-decorators": "^2.1.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"minato-decorators": "^2.0.7", "minato-decorators": "^2.0.7",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
...@@ -12144,13 +12144,13 @@ ...@@ -12144,13 +12144,13 @@
"dev": true "dev": true
}, },
"minato": { "minato": {
"version": "1.1.0", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/minato/-/minato-1.1.0.tgz", "resolved": "https://registry.npmjs.org/minato/-/minato-1.2.1.tgz",
"integrity": "sha512-by1KMWxWlzq0iDV7tMkqS3thDRzYNQoS2ECfX5HRpMGaPQJqSgm5aY9IAky7knwAMoW3cMxQ/IhpvEShQqyj6A==", "integrity": "sha512-BYY18rr82aXAAVtMKkN4yDFsTUtsAmeDmyTRVOXG3mEzG74sNF5TU1nVT1QSC9dpvAcCFFs/vZO2rJoC8vSetQ==",
"peer": true, "peer": true,
"requires": { "requires": {
"cosmokit": "^1.1.2", "cosmokit": "^1.1.2",
"ns-require": "^1.1.2" "ns-require": "^1.1.4"
} }
}, },
"minato-decorators": { "minato-decorators": {
...@@ -12246,9 +12246,9 @@ ...@@ -12246,9 +12246,9 @@
} }
}, },
"ns-require": { "ns-require": {
"version": "1.1.2", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/ns-require/-/ns-require-1.1.2.tgz", "resolved": "https://registry.npmjs.org/ns-require/-/ns-require-1.1.4.tgz",
"integrity": "sha512-GUF6I1hWDsGx1cA9FW27KIRAlkMel2UZagR39dVNPAPBgwWK1Ez0XB96WEz2OFcwHsCORI9h75dEZueHqZ/1pA==", "integrity": "sha512-Zk25pQj4u5i6DS0vaNO5aSSXewybVqqVVjz8AOxFy9DNPtmu3jlexMz6kUXLV2oB+X6iQeAnHXSzj5Qz/IeDaQ==",
"peer": true "peer": true
}, },
"nwsapi": { "nwsapi": {
......
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
}, },
"homepage": "https://github.com/koishijs/koishi-plugin-picsource-localfs", "homepage": "https://github.com/koishijs/koishi-plugin-picsource-localfs",
"dependencies": { "dependencies": {
"koishi-thirdeye": "^10.2.8", "koishi-thirdeye": "^10.3.1",
"read-dir-deep": "^7.0.1" "read-dir-deep": "^7.0.1"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.7.4", "koishi": "^4.7.5",
"koishi-plugin-pics": "^9.3.3" "koishi-plugin-pics": "^9.4.1"
}, },
"devDependencies": { "devDependencies": {
"@koishijs/plugin-cache-lru": "^1.0.0-rc.0", "@koishijs/plugin-cache-lru": "^1.0.0-rc.0",
......
import { Random } from 'koishi'; import { Random } from 'koishi';
import { PicResult, PicSourcePlugin } from 'koishi-plugin-pics'; import { PicResult, PicSourcePlugin } from 'koishi-plugin-pics';
import { DefinePlugin, MultiInstancePlugin } from 'koishi-thirdeye'; import { DefinePlugin } from 'koishi-thirdeye';
import path from 'path'; import path from 'path';
import { readDirDeep } from 'read-dir-deep'; import { readDirDeep } from 'read-dir-deep';
import { LocalSourceConfig } from './config'; import { LocalSourceConfig } from './config';
import fs from 'fs'; import fs from 'fs';
@DefinePlugin() @DefinePlugin()
export class LocalSource extends PicSourcePlugin(LocalSourceConfig) { export default class LocalSource extends PicSourcePlugin(LocalSourceConfig) {
async randomPic(picTags: string[]): Promise<PicResult> { async randomPic(picTags: string[]): Promise<PicResult> {
const absolutePath = path.resolve(process.cwd(), this.config.path); const absolutePath = path.resolve(process.cwd(), this.config.path);
const files = ( const files = (
...@@ -33,8 +33,3 @@ export class LocalSource extends PicSourcePlugin(LocalSourceConfig) { ...@@ -33,8 +33,3 @@ export class LocalSource extends PicSourcePlugin(LocalSourceConfig) {
}; };
} }
} }
@DefinePlugin()
export default class LocalSourcePlugin extends MultiInstancePlugin(
LocalSource,
) {}
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