mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 01:39:52 +08:00
refactor: resolve script history service through TypeDI
This commit is contained in:
1 parent
91e6005152
commit
6b20cd326a
4 files changed
+58
-28
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import path from 'path';
|
||||
import { Service } from 'typedi';
|
||||
import config from '../config';
|
||||
import { ScriptHistory } from '../shared/scriptHistory';
|
||||
|
||||
/** Panel configuration and lifecycle; the storage core stays independently testable. */
|
||||
@Service()
|
||||
export default class ScriptHistoryService extends ScriptHistory {
|
||||
constructor() {
|
||||
super(
|
||||
config.scriptPath,
|
||||
path.join(config.dataPath, 'script-history'),
|
||||
config.blackFileList,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user