feat: 自动化流程

This commit is contained in:
xiaojunnuo
2020-12-21 00:32:17 +08:00
parent e84f5e8b0a
commit 6529fd2fdb
27 changed files with 343 additions and 184 deletions

View File

@@ -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
}
}