mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
feat: 自动化流程
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import fs from 'fs'
|
||||
import logger from '../utils/util.log.js'
|
||||
export class AbstractPlugin {
|
||||
constructor () {
|
||||
this.logger = logger
|
||||
}
|
||||
|
||||
async executeFromContextFile (options = {}) {
|
||||
const { contextPath } = options
|
||||
const contextJson = fs.readFileSync(contextPath)
|
||||
@@ -13,5 +18,10 @@ export class AbstractPlugin {
|
||||
return context
|
||||
}
|
||||
|
||||
|
||||
getAccessProvider (accessProvider, accessProviders) {
|
||||
if (typeof accessProvider === 'string' && accessProviders) {
|
||||
accessProvider = accessProviders[accessProvider]
|
||||
}
|
||||
return accessProvider
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user