mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:52:20 +08:00
chore: 移除autowire特性
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from '@certd/plugin-cert';
|
||||
import { Autowire } from '@certd/pipeline';
|
||||
|
||||
import { DemoAccess } from './access.js';
|
||||
import { isDev } from '../../utils/env.js';
|
||||
@@ -19,12 +18,11 @@ type DemoRecord = {
|
||||
accessType: 'demo',
|
||||
})
|
||||
export class DemoDnsProvider extends AbstractDnsProvider<DemoRecord> {
|
||||
// 通过Autowire注入工具对象
|
||||
@Autowire()
|
||||
access!: DemoAccess;
|
||||
|
||||
async onInstance() {
|
||||
// 也可以通过ctx成员变量传递context, 与Autowire效果一样
|
||||
this.access = this.ctx.access as DemoAccess
|
||||
// 也可以通过ctx成员变量传递context
|
||||
this.logger.debug('access', this.access);
|
||||
//初始化的操作
|
||||
//...
|
||||
|
||||
Reference in New Issue
Block a user