refactor: resolve script history service through TypeDI

This commit is contained in:
whyour committed 2026-10-06 02:04:46 +08:00
1 parent 91e6005152
commit 6b20cd326a
4 files changed
+58 -28

No files matched your search

+16
View File
@@ -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,
);
}
}