mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
refactor: host
This commit is contained in:
@@ -33,6 +33,9 @@ export default {
|
||||
|
||||
const templatePkg = require('../templates/certd-run/package.json')
|
||||
templatePkg.dependencies['@certd/executor'] = '^' + currentVersion
|
||||
templatePkg.dependencies['@certd/plugin-aliyun'] = '^' + currentVersion
|
||||
templatePkg.dependencies['@certd/plugin-host'] = '^' + currentVersion
|
||||
templatePkg.dependencies['@certd/plugin-tencent'] = '^' + currentVersion
|
||||
const pkgFilePath = path.join(targetProjectDir, 'package.json')
|
||||
fs.writeJsonSync(pkgFilePath, templatePkg)
|
||||
|
||||
|
||||
@@ -2,11 +2,17 @@ import { Executor } from '@certd/executor'
|
||||
import PluginAliyun from '@certd/plugin-aliyun'
|
||||
import PluginTencent from '@certd/plugin-tencent'
|
||||
import PluginHost from '@certd/plugin-host'
|
||||
import options from './options.json'
|
||||
|
||||
// 安装默认插件和授权提供者
|
||||
PluginAliyun.install()
|
||||
PluginTencent.install()
|
||||
PluginHost.install()
|
||||
|
||||
// import options
|
||||
import { createRequire } from 'module'
|
||||
const require = createRequire(import.meta.url)
|
||||
const options =require('./options.json')
|
||||
|
||||
//开始执行
|
||||
const executor = new Executor()
|
||||
executor.run(options)
|
||||
await executor.run(options)
|
||||
|
||||
Reference in New Issue
Block a user