fix: 修复插件任务Worker启动依赖环
This commit is contained in:
parent
10cabc5d6f
commit
500f5c69f1
@ -1,5 +1,5 @@
|
||||
import * as path from 'path';
|
||||
import { normalizeQqbotPluginTaskCron } from '../../application/task';
|
||||
import { normalizeQqbotPluginTaskCron } from '../../application/task/qqbot-plugin-task-cron.validator';
|
||||
import {
|
||||
QQBOT_PLUGIN_ALLOWED_PERMISSIONS,
|
||||
QQBOT_PLUGIN_WORKER_TYPES,
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { QqbotPluginPlatformService } from '../../../../src/modules/qqbot/plugin-platform/application/plugin-platform.service';
|
||||
import { QqbotPluginTaskWorkerProcessor } from '../../../../src/modules/qqbot/plugin-platform/application/task/qqbot-plugin-task-worker.processor';
|
||||
|
||||
describe('QQBot plugin platform DI tokens', () => {
|
||||
it('does not inject the removed built-in plugin loader into platform services', () => {
|
||||
@ -17,4 +19,12 @@ describe('QQBot plugin platform DI tokens', () => {
|
||||
expect(source).toContain('QqbotPluginPackageSourceService');
|
||||
expect(source).toContain('QqbotPluginWorkerRuntimeFactoryService');
|
||||
});
|
||||
|
||||
it('keeps the task worker platform service dependency available at runtime', () => {
|
||||
const paramTypes =
|
||||
Reflect.getMetadata('design:paramtypes', QqbotPluginTaskWorkerProcessor) ||
|
||||
[];
|
||||
|
||||
expect(paramTypes[1]).toBe(QqbotPluginPlatformService);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user