Commit 2364bf60 authored by nanahira's avatar nanahira

fix compile

parent f812eed7
......@@ -27,7 +27,9 @@ app.plugin(ExtrasInDev);
// Target plugin
app.plugin(TargetPlugin, {
instances: [{ name: 'ygopro', isDefault: true, path: './dev/test-pics' }],
name: 'ygopro',
isDefault: true,
path: './dev/test-pics',
});
app.start();
This diff is collapsed.
......@@ -28,12 +28,12 @@
},
"homepage": "https://github.com/koishijs/koishi-plugin-picsource-localfs",
"dependencies": {
"koishi-thirdeye": "^10.2.8",
"koishi-thirdeye": "^10.3.1",
"read-dir-deep": "^7.0.1"
},
"peerDependencies": {
"koishi": "^4.7.4",
"koishi-plugin-pics": "^9.3.3"
"koishi": "^4.7.5",
"koishi-plugin-pics": "^9.4.1"
},
"devDependencies": {
"@koishijs/plugin-cache-lru": "^1.0.0-rc.0",
......
import { Random } from 'koishi';
import { PicResult, PicSourcePlugin } from 'koishi-plugin-pics';
import { DefinePlugin, MultiInstancePlugin } from 'koishi-thirdeye';
import { DefinePlugin } from 'koishi-thirdeye';
import path from 'path';
import { readDirDeep } from 'read-dir-deep';
import { LocalSourceConfig } from './config';
import fs from 'fs';
@DefinePlugin()
export class LocalSource extends PicSourcePlugin(LocalSourceConfig) {
export default class LocalSource extends PicSourcePlugin(LocalSourceConfig) {
async randomPic(picTags: string[]): Promise<PicResult> {
const absolutePath = path.resolve(process.cwd(), this.config.path);
const files = (
......@@ -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