mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
feat: deployFlow
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import fs from 'fs'
|
||||
export class AbstractPlugin {
|
||||
async executeFromContextFile (options = {}) {
|
||||
const { contextPath } = options
|
||||
const contextJson = fs.readFileSync(contextPath)
|
||||
const context = JSON.parse(contextJson)
|
||||
const newContext = await this.execute(options, context)
|
||||
fs.writeFileSync(JSON.stringify(newContext || context))
|
||||
}
|
||||
|
||||
async execute (options, context) {
|
||||
console.log('请实现此方法,context:', context)
|
||||
return context
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user