From e68862b63346afcfea79e2b8bd5764e4b577f625 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 31 Oct 2022 21:27:32 +0800 Subject: [PATCH] refactor: remove certd v1 code --- packages/core/certd/.eslintrc | 14 - packages/core/certd/.gitignore | 7 - packages/core/certd/package.json | 29 - packages/core/certd/src/acme.js | 202 ------- packages/core/certd/src/index.js | 131 ----- packages/core/certd/src/store/cert-store.js | 127 ----- packages/core/certd/src/store/file-store.js | 66 --- packages/core/certd/test/index.test.js | 88 --- packages/core/executor/.eslintrc | 14 - packages/core/executor/.gitignore | 7 - packages/core/executor/package.json | 39 -- packages/core/executor/rollup.config.js | 21 - packages/core/executor/src/index.js | 182 ------- packages/core/executor/src/trace.js | 96 ---- packages/core/executor/test/index.test.js | 42 -- packages/core/executor/webpack.config.cjs | 23 - packages/core/pipeline/package.json | 1 - packages/core/pipeline/src/access/api.ts | 8 +- .../pipeline/src/access/impl/aliyun-access.ts | 11 +- packages/core/pipeline/src/d.ts/fast-crud.ts | 115 ++++ packages/core/pipeline/src/d.ts/index.ts | 1 + packages/core/pipeline/src/plugin/api.ts | 2 +- .../src/plugin/plugins/cert-plugin/index.ts | 22 +- .../core/pipeline/src/registry/registry.ts | 18 +- .../pipeline/test/pipeline/pipeline.define.ts | 1 + packages/core/pipeline/vite.config.ts | 13 + packages/server/certd-client | 2 +- packages/server/certd-server | 2 +- packages/ui/certd-server/.eslintrc.cjs | 16 - packages/ui/certd-server/.gitignore | 7 - packages/ui/certd-server/Dockerfile | 6 - packages/ui/certd-server/app.js | 59 -- packages/ui/certd-server/bin/www.js | 93 ---- .../controllers/access-providers.js | 16 - .../certd-server/controllers/dns-providers.js | 16 - .../ui/certd-server/controllers/exports.js | 23 - packages/ui/certd-server/controllers/index.js | 10 - .../ui/certd-server/controllers/plugins.js | 16 - packages/ui/certd-server/install.js | 8 - packages/ui/certd-server/models/Ret.js | 15 - packages/ui/certd-server/package.json | 43 -- packages/ui/certd-server/public/favicon.ico | Bin 16958 -> 0 bytes .../ui/certd-server/public/logo/logo-lang.png | Bin 12326 -> 0 bytes .../ui/certd-server/public/logo/logo-svg.png | Bin 7542 -> 0 bytes packages/ui/certd-server/public/logo/logo.svg | 17 - .../certd-server/service/exports-service.js | 55 -- .../certd-server/templates/certd-run/index.js | 18 - .../templates/certd-run/options.json | 1 - .../templates/certd-run/package.json | 22 - packages/ui/certd-server/utils/util.path.js | 11 - packages/ui/certd-server/utils/util.zip.js | 8 - packages/ui/certd-ui/.browserslistrc | 3 - packages/ui/certd-ui/.editorconfig | 5 - packages/ui/certd-ui/.env | 1 - packages/ui/certd-ui/.eslintignore | 2 - packages/ui/certd-ui/.eslintrc.js | 76 --- packages/ui/certd-ui/.gitignore | 11 - packages/ui/certd-ui/.npmignore | 2 - packages/ui/certd-ui/.prettierrc | 5 - packages/ui/certd-ui/README.md | 29 - packages/ui/certd-ui/babel.config.js | 9 - packages/ui/certd-ui/index.html | 21 - packages/ui/certd-ui/package.json | 88 --- packages/ui/certd-ui/public/favicon.ico | Bin 16958 -> 0 bytes packages/ui/certd-ui/public/images/plugin.png | Bin 7742 -> 0 bytes .../ui/certd-ui/public/images/provider.png | Bin 8704 -> 0 bytes packages/ui/certd-ui/public/index.html | 17 - .../ui/certd-ui/public/public/favicon.ico | Bin 4286 -> 0 bytes .../public/public/images/logo-certd/logo.svg | 7 - .../public/images/logo-certd/rect-black.svg | 44 -- .../public/public/images/logo-certd/rect.svg | 44 -- .../public/images/logo-certd/square.svg | 17 - .../public/public/images/logo/logo.svg | 7 - .../public/public/images/logo/rect-black.svg | 108 ---- .../public/public/images/logo/rect.svg | 44 -- .../public/public/images/logo/square.svg | 106 ---- packages/ui/certd-ui/public/public/index.css | 12 - packages/ui/certd-ui/public/public/index.html | 17 - packages/ui/certd-ui/public/public/logo.svg | 106 ---- packages/ui/certd-ui/src/App.vue | 38 -- packages/ui/certd-ui/src/antdv.js | 86 --- .../certd-ui/src/api/api.access-providers.js | 14 - .../ui/certd-ui/src/api/api.dns-providers.js | 14 - packages/ui/certd-ui/src/api/api.exports.js | 40 -- packages/ui/certd-ui/src/api/api.plugins.js | 14 - packages/ui/certd-ui/src/api/index.js | 15 - packages/ui/certd-ui/src/api/service.js | 117 ---- packages/ui/certd-ui/src/api/tools.js | 68 --- .../ui/certd-ui/src/api/util.input.handler.js | 35 -- packages/ui/certd-ui/src/assets/favicon.ico | Bin 16958 -> 0 bytes packages/ui/certd-ui/src/assets/logo-svg.png | Bin 7542 -> 0 bytes packages/ui/certd-ui/src/assets/logo.svg | 17 - .../access-provider-manager.vue | 295 ---------- .../access-provider-selector.vue | 87 --- .../src/components/component-render.vue | 33 -- .../certd-ui/src/components/d-container.vue | 56 -- packages/ui/certd-ui/src/components/index.js | 16 - packages/ui/certd-ui/src/i18n.js | 11 - packages/ui/certd-ui/src/icons.js | 26 - packages/ui/certd-ui/src/locales/en.json | 3 - packages/ui/certd-ui/src/locales/zh.json | 9 - packages/ui/certd-ui/src/main.ts | 13 - packages/ui/certd-ui/src/router/index.js | 24 - packages/ui/certd-ui/src/style/common.less | 97 ---- packages/ui/certd-ui/src/utils/util.common.js | 33 -- packages/ui/certd-ui/src/utils/util.env.ts | 40 -- packages/ui/certd-ui/src/views/Home.vue | 122 ----- .../src/views/detail/components/cert-form.vue | 261 --------- .../src/views/detail/components/task-form.vue | 314 ----------- .../ui/certd-ui/src/views/detail/index.vue | 502 ------------------ .../ui/certd-ui/tests/unit/example.spec.js | 13 - packages/ui/certd-ui/tsconfig.json | 45 -- packages/ui/certd-ui/vite.config.ts | 66 --- 113 files changed, 181 insertions(+), 4868 deletions(-) delete mode 100644 packages/core/certd/.eslintrc delete mode 100644 packages/core/certd/.gitignore delete mode 100644 packages/core/certd/package.json delete mode 100644 packages/core/certd/src/acme.js delete mode 100644 packages/core/certd/src/index.js delete mode 100644 packages/core/certd/src/store/cert-store.js delete mode 100644 packages/core/certd/src/store/file-store.js delete mode 100644 packages/core/certd/test/index.test.js delete mode 100644 packages/core/executor/.eslintrc delete mode 100644 packages/core/executor/.gitignore delete mode 100644 packages/core/executor/package.json delete mode 100644 packages/core/executor/rollup.config.js delete mode 100644 packages/core/executor/src/index.js delete mode 100644 packages/core/executor/src/trace.js delete mode 100644 packages/core/executor/test/index.test.js delete mode 100644 packages/core/executor/webpack.config.cjs create mode 100644 packages/core/pipeline/src/d.ts/fast-crud.ts delete mode 100644 packages/ui/certd-server/.eslintrc.cjs delete mode 100644 packages/ui/certd-server/.gitignore delete mode 100644 packages/ui/certd-server/Dockerfile delete mode 100644 packages/ui/certd-server/app.js delete mode 100644 packages/ui/certd-server/bin/www.js delete mode 100644 packages/ui/certd-server/controllers/access-providers.js delete mode 100644 packages/ui/certd-server/controllers/dns-providers.js delete mode 100644 packages/ui/certd-server/controllers/exports.js delete mode 100644 packages/ui/certd-server/controllers/index.js delete mode 100644 packages/ui/certd-server/controllers/plugins.js delete mode 100644 packages/ui/certd-server/install.js delete mode 100644 packages/ui/certd-server/models/Ret.js delete mode 100644 packages/ui/certd-server/package.json delete mode 100644 packages/ui/certd-server/public/favicon.ico delete mode 100644 packages/ui/certd-server/public/logo/logo-lang.png delete mode 100644 packages/ui/certd-server/public/logo/logo-svg.png delete mode 100644 packages/ui/certd-server/public/logo/logo.svg delete mode 100644 packages/ui/certd-server/service/exports-service.js delete mode 100644 packages/ui/certd-server/templates/certd-run/index.js delete mode 100644 packages/ui/certd-server/templates/certd-run/options.json delete mode 100644 packages/ui/certd-server/templates/certd-run/package.json delete mode 100644 packages/ui/certd-server/utils/util.path.js delete mode 100644 packages/ui/certd-server/utils/util.zip.js delete mode 100644 packages/ui/certd-ui/.browserslistrc delete mode 100644 packages/ui/certd-ui/.editorconfig delete mode 100644 packages/ui/certd-ui/.env delete mode 100644 packages/ui/certd-ui/.eslintignore delete mode 100644 packages/ui/certd-ui/.eslintrc.js delete mode 100644 packages/ui/certd-ui/.gitignore delete mode 100644 packages/ui/certd-ui/.npmignore delete mode 100644 packages/ui/certd-ui/.prettierrc delete mode 100644 packages/ui/certd-ui/README.md delete mode 100644 packages/ui/certd-ui/babel.config.js delete mode 100644 packages/ui/certd-ui/index.html delete mode 100644 packages/ui/certd-ui/package.json delete mode 100644 packages/ui/certd-ui/public/favicon.ico delete mode 100644 packages/ui/certd-ui/public/images/plugin.png delete mode 100644 packages/ui/certd-ui/public/images/provider.png delete mode 100644 packages/ui/certd-ui/public/index.html delete mode 100644 packages/ui/certd-ui/public/public/favicon.ico delete mode 100644 packages/ui/certd-ui/public/public/images/logo-certd/logo.svg delete mode 100644 packages/ui/certd-ui/public/public/images/logo-certd/rect-black.svg delete mode 100644 packages/ui/certd-ui/public/public/images/logo-certd/rect.svg delete mode 100644 packages/ui/certd-ui/public/public/images/logo-certd/square.svg delete mode 100644 packages/ui/certd-ui/public/public/images/logo/logo.svg delete mode 100644 packages/ui/certd-ui/public/public/images/logo/rect-black.svg delete mode 100644 packages/ui/certd-ui/public/public/images/logo/rect.svg delete mode 100644 packages/ui/certd-ui/public/public/images/logo/square.svg delete mode 100644 packages/ui/certd-ui/public/public/index.css delete mode 100644 packages/ui/certd-ui/public/public/index.html delete mode 100644 packages/ui/certd-ui/public/public/logo.svg delete mode 100644 packages/ui/certd-ui/src/App.vue delete mode 100644 packages/ui/certd-ui/src/antdv.js delete mode 100644 packages/ui/certd-ui/src/api/api.access-providers.js delete mode 100644 packages/ui/certd-ui/src/api/api.dns-providers.js delete mode 100644 packages/ui/certd-ui/src/api/api.exports.js delete mode 100644 packages/ui/certd-ui/src/api/api.plugins.js delete mode 100644 packages/ui/certd-ui/src/api/index.js delete mode 100644 packages/ui/certd-ui/src/api/service.js delete mode 100644 packages/ui/certd-ui/src/api/tools.js delete mode 100644 packages/ui/certd-ui/src/api/util.input.handler.js delete mode 100644 packages/ui/certd-ui/src/assets/favicon.ico delete mode 100644 packages/ui/certd-ui/src/assets/logo-svg.png delete mode 100644 packages/ui/certd-ui/src/assets/logo.svg delete mode 100644 packages/ui/certd-ui/src/components/access-provider-selector/access-provider-manager.vue delete mode 100644 packages/ui/certd-ui/src/components/access-provider-selector/access-provider-selector.vue delete mode 100644 packages/ui/certd-ui/src/components/component-render.vue delete mode 100644 packages/ui/certd-ui/src/components/d-container.vue delete mode 100644 packages/ui/certd-ui/src/components/index.js delete mode 100644 packages/ui/certd-ui/src/i18n.js delete mode 100644 packages/ui/certd-ui/src/icons.js delete mode 100644 packages/ui/certd-ui/src/locales/en.json delete mode 100644 packages/ui/certd-ui/src/locales/zh.json delete mode 100644 packages/ui/certd-ui/src/main.ts delete mode 100644 packages/ui/certd-ui/src/router/index.js delete mode 100644 packages/ui/certd-ui/src/style/common.less delete mode 100644 packages/ui/certd-ui/src/utils/util.common.js delete mode 100644 packages/ui/certd-ui/src/utils/util.env.ts delete mode 100644 packages/ui/certd-ui/src/views/Home.vue delete mode 100644 packages/ui/certd-ui/src/views/detail/components/cert-form.vue delete mode 100644 packages/ui/certd-ui/src/views/detail/components/task-form.vue delete mode 100644 packages/ui/certd-ui/src/views/detail/index.vue delete mode 100644 packages/ui/certd-ui/tests/unit/example.spec.js delete mode 100644 packages/ui/certd-ui/tsconfig.json delete mode 100644 packages/ui/certd-ui/vite.config.ts diff --git a/packages/core/certd/.eslintrc b/packages/core/certd/.eslintrc deleted file mode 100644 index c6ce67f2..00000000 --- a/packages/core/certd/.eslintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "standard", - "env": { - "mocha": true - }, - "overrides": [ - { - "files": ["*.test.js", "*.spec.js"], - "rules": { - "no-unused-expressions": "off" - } - } - ] -} diff --git a/packages/core/certd/.gitignore b/packages/core/certd/.gitignore deleted file mode 100644 index cbb386fa..00000000 --- a/packages/core/certd/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.vscode/ -node_modules/ -npm-debug.log -yarn-error.log -yarn.lock -package-lock.json -/.idea/ diff --git a/packages/core/certd/package.json b/packages/core/certd/package.json deleted file mode 100644 index a63abd35..00000000 --- a/packages/core/certd/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@certd/certd", - "version": "0.3.0", - "description": "a ssl cert keeper", - "main": "src/index.js", - "scripts": { - "test": "echo \\\"Error: no test specified\\\" && exit 1" - }, - "type": "module", - "author": "Greper", - "license": "MIT", - "dependencies": { - "@certd/acme-client": "^0.3.0", - "@certd/api": "^0.3.0", - "dayjs": "^1.9.7", - "lodash-es": "^4.17.20", - "node-forge": "^0.10.0" - }, - "devDependencies": { - "chai": "^4.2.0", - "eslint": "^7.15.0", - "eslint-config-standard": "^16.0.2", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.2.1", - "mocha": "^8.2.1" - }, - "gitHead": "5fbd7742665c0a949333d805153e9b6af91c0a71" -} diff --git a/packages/core/certd/src/acme.js b/packages/core/certd/src/acme.js deleted file mode 100644 index 6ad6a64d..00000000 --- a/packages/core/certd/src/acme.js +++ /dev/null @@ -1,202 +0,0 @@ -import acme from '@certd/acme-client' -import _ from 'lodash-es' -import { util } from '@certd/api' -const logger = util.logger -export class AcmeService { - constructor (store) { - this.store = store - acme.setLogger((text) => { - logger.info(text) - }) - } - - async getAccountConfig (email) { - let conf = this.store.get(this.buildAccountPath(email)) - if (conf == null) { - conf = {} - } else { - conf = JSON.parse(conf) - } - return conf - } - - buildAccountPath (email) { - return this.store.buildKey(email, 'account.json') - } - - saveAccountConfig (email, conf) { - this.store.set(this.buildAccountPath(email), JSON.stringify(conf)) - } - - async getAcmeClient (email, isTest) { - const conf = await this.getAccountConfig(email) - if (conf.key == null) { - conf.key = await this.createNewKey() - this.saveAccountConfig(email, conf) - } - if (isTest == null) { - isTest = process.env.CERTD_MODE === 'test' - } - const client = new acme.Client({ - directoryUrl: isTest ? acme.directory.letsencrypt.staging : acme.directory.letsencrypt.production, - accountKey: conf.key, - accountUrl: conf.accountUrl, - backoffAttempts: 20, - backoffMin: 5000, - backoffMax: 10000 - }) - - if (conf.accountUrl == null) { - const accountPayload = { termsOfServiceAgreed: true, contact: [`mailto:${email}`] } - await client.createAccount(accountPayload) - conf.accountUrl = client.getAccountUrl() - this.saveAccountConfig(email, conf) - } - return client - } - - async createNewKey () { - const key = await acme.forge.createPrivateKey() - return key.toString() - } - - async challengeCreateFn (authz, challenge, keyAuthorization, dnsProvider) { - logger.info('Triggered challengeCreateFn()') - - /* http-01 */ - if (challenge.type === 'http-01') { - const filePath = `/var/www/html/.well-known/acme-challenge/${challenge.token}` - const fileContents = keyAuthorization - - logger.info(`Creating challenge response for ${authz.identifier.value} at path: ${filePath}`) - - /* Replace this */ - logger.info(`Would write "${fileContents}" to path "${filePath}"`) - // await fs.writeFileAsync(filePath, fileContents); - } else if (challenge.type === 'dns-01') { - /* dns-01 */ - const dnsRecord = `_acme-challenge.${authz.identifier.value}` - const recordValue = keyAuthorization - - logger.info(`Creating TXT record for ${authz.identifier.value}: ${dnsRecord}`) - - /* Replace this */ - logger.info(`Would create TXT record "${dnsRecord}" with value "${recordValue}"`) - - return await dnsProvider.createRecord({ - fullRecord: dnsRecord, - type: 'TXT', - value: recordValue - }) - } - } - - /** - * Function used to remove an ACME challenge response - * - * @param {object} authz Authorization object - * @param {object} challenge Selected challenge - * @param {string} keyAuthorization Authorization key - * @param recordItem challengeCreateFn create record item - * @param dnsProvider dnsProvider - * @returns {Promise} - */ - - async challengeRemoveFn (authz, challenge, keyAuthorization, recordItem, dnsProvider) { - logger.info('Triggered challengeRemoveFn()') - - /* http-01 */ - if (challenge.type === 'http-01') { - const filePath = `/var/www/html/.well-known/acme-challenge/${challenge.token}` - - logger.info(`Removing challenge response for ${authz.identifier.value} at path: ${filePath}`) - - /* Replace this */ - logger.info(`Would remove file on path "${filePath}"`) - // await fs.unlinkAsync(filePath); - } else if (challenge.type === 'dns-01') { - const dnsRecord = `_acme-challenge.${authz.identifier.value}` - const recordValue = keyAuthorization - - logger.info(`Removing TXT record for ${authz.identifier.value}: ${dnsRecord}`) - - /* Replace this */ - logger.info(`Would remove TXT record "${dnsRecord}" with value "${recordValue}"`) - await dnsProvider.removeRecord({ - fullRecord: dnsRecord, - type: 'TXT', - value: keyAuthorization, - record: recordItem - }) - } - } - - async order ({ email, domains, dnsProvider, dnsProviderCreator, csrInfo, isTest }) { - const client = await this.getAcmeClient(email, isTest) - - let accountUrl - try { - accountUrl = client.getAccountUrl() - } catch (e) { - } - - /* Create CSR */ - const { commonName, altNames } = this.buildCommonNameByDomains(domains) - - const [key, csr] = await acme.forge.createCsr({ - commonName, - ...csrInfo, - altNames - }) - if (dnsProvider == null && dnsProviderCreator) { - dnsProvider = await dnsProviderCreator() - } - if (dnsProvider == null) { - throw new Error('dnsProvider 不能为空') - } - /* 自动申请证书 */ - const crt = await client.auto({ - csr, - email: email, - termsOfServiceAgreed: true, - challengePriority: ['dns-01'], - challengeCreateFn: async (authz, challenge, keyAuthorization) => { - return await this.challengeCreateFn(authz, challenge, keyAuthorization, dnsProvider) - }, - challengeRemoveFn: async (authz, challenge, keyAuthorization, recordItem) => { - return await this.challengeRemoveFn(authz, challenge, keyAuthorization, recordItem, dnsProvider) - } - }) - - // 保存账号url - if (!accountUrl) { - try { - accountUrl = client.getAccountUrl() - this.setAccountUrl(email, accountUrl) - } catch (e) { - logger.warn('保存accountUrl出错', e) - } - } - /* Done */ - logger.debug(`CSR:\n${csr.toString()}`) - logger.debug(`Certificate:\n${crt.toString()}`) - logger.info('证书申请成功') - return { key, crt, csr } - } - - buildCommonNameByDomains (domains) { - if (typeof domains === 'string') { - domains = domains.split(',') - } - if (domains.length === 0) { - throw new Error('domain can not be empty') - } - const ret = { - commonName: domains[0] - } - if (domains.length > 1) { - ret.altNames = _.slice(domains, 1) - } - return ret - } -} diff --git a/packages/core/certd/src/index.js b/packages/core/certd/src/index.js deleted file mode 100644 index 41dbdcb3..00000000 --- a/packages/core/certd/src/index.js +++ /dev/null @@ -1,131 +0,0 @@ -import { util, Store, dnsProviderRegistry } from '@certd/api' -import { AcmeService } from './acme.js' -import { FileStore } from './store/file-store.js' -import { CertStore } from './store/cert-store.js' -import dayjs from 'dayjs' -import forge from 'node-forge' - -const logger = util.logger -export class Certd { - constructor (options) { - this.options = options - this.email = options.cert.email - this.domains = options.cert.domains - - if (!(options.store instanceof Store)) { - this.store = new FileStore(options.store || {}) - } - this.certStore = new CertStore({ - store: this.store, - email: options.cert.email, - domains: this.domains - }) - this.acme = new AcmeService(this.store) - } - - async certApply () { - let oldCert - try { - oldCert = await this.readCurrentCert() - } catch (e) { - logger.warn('读取cert失败:', e) - } - - if (oldCert == null) { - logger.info('还未申请过,准备申请新证书') - } else { - const ret = this.isWillExpire(oldCert.expires, this.options.cert.renewDays) - if (!ret.isWillExpire) { - logger.info('证书还未过期:', oldCert.expires, ',剩余', ret.leftDays, '天') - if (this.options.args.forceCert) { - logger.info('准备强制更新证书') - } else { - logger.info('暂不更新证书') - - oldCert.isNew = false - return oldCert - } - } else { - logger.info('即将过期,准备更新证书') - } - } - - // 执行证书申请步骤 - return await this.doCertApply() - } - - async doCertApply () { - const options = this.options - const dnsProvider = this.createDnsProvider(options) - const cert = await this.acme.order({ - email: options.cert.email, - domains: options.cert.domains, - dnsProvider, - csrInfo: options.cert.csrInfo, - isTest: options.args.test - }) - - await this.writeCert(cert) - const certRet = await this.readCurrentCert() - certRet.isNew = true - return certRet - } - - createDnsProvider (options) { - return this.createProviderByType(options.cert.dnsProvider, options.accessProviders) - } - - async writeCert (cert) { - const newPath = await this.certStore.writeCert(cert) - return { - realPath: this.certStore.store.getActualKey(newPath), - currentPath: this.certStore.store.getActualKey(this.certStore.currentMarkPath) - } - } - - async readCurrentCert () { - const cert = await this.certStore.readCert() - if (cert == null) { - return null - } - const { detail, expires } = this.getCrtDetail(cert.crt) - const domain = this.certStore.getMainDomain(this.options.cert.domains) - return { - ...cert, detail, expires, domain, domains: this.domains, email: this.email - } - } - - getCrtDetail (crt) { - const pki = forge.pki - const detail = pki.certificateFromPem(crt.toString()) - const expires = detail.validity.notAfter - return { detail, expires } - } - - /** - * 检查是否过期,默认提前20天 - * @param expires - * @param maxDays - * @returns {boolean} - */ - isWillExpire (expires, maxDays = 20) { - if (expires == null) { - throw new Error('过期时间不能为空') - } - // 检查有效期 - const leftDays = dayjs(expires).diff(dayjs(), 'day') - return { - isWillExpire: leftDays < maxDays, - leftDays - } - } - - createProviderByType (props, accessProviders) { - const { type } = props - const Provider = dnsProviderRegistry.get(type) - if (Provider == null) { - throw new Error('暂不支持此dnsProvider,请先注册该provider:' + type) - } - return new Provider({ accessProviders, props }) - } -} diff --git a/packages/core/certd/src/store/cert-store.js b/packages/core/certd/src/store/cert-store.js deleted file mode 100644 index b4ea4ee0..00000000 --- a/packages/core/certd/src/store/cert-store.js +++ /dev/null @@ -1,127 +0,0 @@ -import dayjs from 'dayjs' -import crypto from 'crypto' -// eslint-disable-next-line no-unused-vars -function md5 (content) { - return crypto.createHash('md5').update(content).digest('hex') -} -export class CertStore { - constructor ({ store, email, domains }) { - this.store = store - this.email = email - this.domains = domains - this.domain = this.getMainDomain(this.domains) - this.safetyDomain = this.getSafetyDomain(this.domain) - this.domainDir = this.safetyDomain + '-' + md5(this.getDomainStr(this.domains)) - // this.domainDir = this.safetyDomain - this.certsRootPath = this.store.buildKey(this.email, 'certs') - - this.currentMarkPath = this.store.buildKey(this.certsRootPath, this.domainDir, 'current.json') - } - - getMainDomain (domains) { - if (domains == null) { - return null - } - if (typeof domains === 'string') { - return domains - } - if (domains.length > 0) { - return domains[0] - } - } - - getDomainStr (domains) { - if (domains == null) { - return null - } - if (typeof domains === 'string') { - return domains - } - return domains.join(',') - } - - buildNewCertRootPath (dir) { - if (dir == null) { - dir = dayjs().format('YYYY.MM.DD.HHmmss') - } - return this.store.buildKey(this.certsRootPath, this.domainDir, dir) - } - - formatCert (pem) { - pem = pem.replace(/\r/g, '') - pem = pem.replace(/\n\n/g, '\n') - pem = pem.replace(/\n$/g, '') - return pem - } - - async writeCert (cert) { - const newDir = this.buildNewCertRootPath() - - const crtKey = this.buildKey(newDir, this.safetyDomain + '.crt') - const priKey = this.buildKey(newDir, this.safetyDomain + '.key') - const csrKey = this.buildKey(newDir, this.safetyDomain + '.csr') - await this.store.set(crtKey, this.formatCert(cert.crt.toString())) - await this.store.set(priKey, this.formatCert(cert.key.toString())) - await this.store.set(csrKey, cert.csr.toString()) - - await this.store.set(this.currentMarkPath, JSON.stringify({ latest: newDir })) - - return newDir - } - - async readCert (dir) { - if (dir == null) { - dir = await this.getCurrentDir() - } - if (dir == null) { - return - } - - const crtKey = this.buildKey(dir, this.safetyDomain + '.crt') - const priKey = this.buildKey(dir, this.safetyDomain + '.key') - const csrKey = this.buildKey(dir, this.safetyDomain + '.csr') - const crt = await this.store.get(crtKey) - if (crt == null) { - return null - } - const key = await this.store.get(priKey) - const csr = await this.store.get(csrKey) - - return { - crt: this.formatCert(crt), - key: this.formatCert(key), - csr, - crtPath: this.store.getActualKey(crtKey), - keyPath: this.store.getActualKey(priKey), - certDir: this.store.getActualKey(dir) - } - } - - buildKey (...keyItem) { - return this.store.buildKey(...keyItem) - } - - getSafetyDomain (domain) { - return domain.replace(/\*/g, '_') - } - - async getCurrentDir () { - const current = await this.store.get(this.currentMarkPath) - if (current == null) { - return null - } - return JSON.parse(current).latest - } - - async getCurrentFile (file) { - const currentDir = await this.getCurrentDir() - const key = this.buildKey(currentDir, file) - return this.store.get(key) - } - - async setCurrentFile (file, value) { - const currentDir = await this.getCurrentDir() - const key = this.buildKey(currentDir, file) - return this.store.set(key, value) - } -} diff --git a/packages/core/certd/src/store/file-store.js b/packages/core/certd/src/store/file-store.js deleted file mode 100644 index 3233aeb1..00000000 --- a/packages/core/certd/src/store/file-store.js +++ /dev/null @@ -1,66 +0,0 @@ -import { Store, util } from '@certd/api' -import path from 'path' -import fs from 'fs' -const logger = util.logger -export class FileStore extends Store { - constructor (opts) { - super() - if (opts.rootDir != null) { - this.rootDir = opts.rootDir - } else { - this.rootDir = util.path.getUserBasePath() - } - if (opts.test) { - this.rootDir = path.join(this.rootDir, '/test/') - } - } - - getActualKey (key) { - // return 前缀+key - return this.getPathByKey(key) - } - - buildKey (...keyItem) { - return path.join(...keyItem) - } - - getPathByKey (key) { - return path.join(this.rootDir, key) - } - - set (key, value) { - const filePath = this.getPathByKey(key) - const dir = path.dirname(filePath) - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir, { recursive: true }) - } - fs.writeFileSync(filePath, value) - return filePath - } - - get (key) { - const filePath = this.getPathByKey(key) - if (!fs.existsSync(filePath)) { - return null - } - return fs.readFileSync(filePath).toString() - } - - link (targetPath, linkPath) { - targetPath = this.getPathByKey(targetPath) - linkPath = this.getPathByKey(linkPath) - if (fs.existsSync(linkPath)) { - try { - fs.unlinkSync(linkPath) - } catch (e) { - logger.error('unlink error:', e) - } - } - fs.symlinkSync(targetPath, linkPath, 'dir') - } - - unlink (linkPath) { - linkPath = this.getPathByKey(linkPath) - fs.unlinkSync(linkPath) - } -} diff --git a/packages/core/certd/test/index.test.js b/packages/core/certd/test/index.test.js deleted file mode 100644 index ca5b4bce..00000000 --- a/packages/core/certd/test/index.test.js +++ /dev/null @@ -1,88 +0,0 @@ -import chai from 'chai' -import { Certd } from '../src/index.js' -import { createOptions } from '../../../../test/options.js' -const { expect } = chai -const fakeCrt = `-----BEGIN CERTIFICATE----- -MIIFSTCCBDGgAwIBAgITAPoZZk/LhVIyXoic2NnJyxubezANBgkqhkiG9w0BAQsF -ADAiMSAwHgYDVQQDDBdGYWtlIExFIEludGVybWVkaWF0ZSBYMTAeFw0yMDEyMTQx -NjA1NTFaFw0yMTAzMTQxNjA1NTFaMBsxGTAXBgNVBAMMECouZG9jbWlycm9yLmNs -dWIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC75tGrYjly+RpcZehQ -my1EpaXElT4L60pINKV2YDKnBrcSSo1c6rO7nFh12eC/ju4WwYUep0RVmBDF8xD0 -I1Sd1uuDTQWP0UT1X9yqdXtjvxpUqoCHAzG633f3sJRFul7mDLuC9tRCuae9o7qP -EZ827XOmjBR35dso9I2GEE4828J3YE3tS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8+EuyyCm9Wg6MHoGCCsGAQUFBwEBBG4wbDA0 -BggrBgEFBQcwAYYoaHR0cDovL29jc3Auc3RnLXJvb3QteDEubGV0c2VuY3J5cHQu -b3JnLzA0BggrBgEFBQcwAoYoaHR0cDovL2NlcnQuc3RnLXJvb3QteDEubGV0c2Vu -Y3J5cHQub3JnLzAfBgNVHSMEGDAWgBTBJnSkikSg5vogKNhcI5pFiBh54DANBgkq -hkiG9w0BAQsFAAOCAgEABYSu4Il+fI0MYU42OTmEj+1HqQ5DvyAeyCA6sGuZdwjF -UGeVOv3NnLyfofuUOjEbY5irFCDtnv+0ckukUZN9lz4Q2YjWGUpW4TTu3ieTsaC9 -AFvCSgNHJyWSVtWvB5XDxsqawl1KzHzzwr132bF2rtGtazSqVqK9E07sGHMCf+zp -DQVDVVGtqZPHwX3KqUtefE621b8RI6VCl4oD30Olf8pjuzG4JKBFRFclzLRjo/h7 -IkkfjZ8wDa7faOjVXx6n+eUQ29cIMCzr8/rNWHS9pYGGQKJiY2xmVC9h12H99Xyf -zWE9vb5zKP3MVG6neX1hSdo7PEAb9fqRhHkqVsqUvJlIRmvXvVKTwNCP3eCjRCCI -PTAvjV+4ni786iXwwFYNz8l3PmPLCyQXWGohnJ8iBm+5nk7O2ynaPVW0U2W+pt2w -SVuvdDM5zGv2f9ltNWUiYZHJ1mmO97jSY/6YfdOUH66iRtQtDkHBRdkNBsMbD+Em -2TgBldtHNSJBfB3pm9FblgOcJ0FSWcUDWJ7vO0+NTXlgrRofRT6pVywzxVo6dND0 -WzYlTWeUVsO40xJqhgUQRER9YLOLxJ0O6C8i0xFxAMKOtSdodMB3RIwt7RFQ0uyt -n5Z5MqkYhlMI3J1tPRTp1nEt9fyGspBOO05gi148Qasp+3N+svqKomoQglNoAxU= ------END CERTIFICATE-----` -describe('Certd', function () { - it('#buildCertDir', function () { - const options = createOptions() - options.cert.email = 'xiaojunnuo@qq.com' - options.cert.domains = ['*.docmirror.club'] - const certd = new Certd(options) - const currentRootPath = certd.certStore.currentMarkPath - console.log('rootDir', currentRootPath) - expect(currentRootPath).match(/xiaojunnuo@qq.com\\certs\\_.docmirror.club-\w*\\current.json/) - }) - it('#writeAndReadCert', async function () { - const options = createOptions() - options.cert.email = 'xiaojunnuo@qq.com' - options.cert.domains = ['*.domain.cn'] - const certd = new Certd(options) - await certd.writeCert({ csr: 'csr', crt: fakeCrt, key: 'bbb' }) - - const cert = await certd.readCurrentCert() - expect(cert).to.be.ok - expect(cert.crt).ok - expect(cert.key).to.be.ok - expect(cert.detail).to.be.ok - expect(cert.expires).to.be.ok - console.log('cert:', JSON.stringify(cert)) - }) -}) diff --git a/packages/core/executor/.eslintrc b/packages/core/executor/.eslintrc deleted file mode 100644 index c6ce67f2..00000000 --- a/packages/core/executor/.eslintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "standard", - "env": { - "mocha": true - }, - "overrides": [ - { - "files": ["*.test.js", "*.spec.js"], - "rules": { - "no-unused-expressions": "off" - } - } - ] -} diff --git a/packages/core/executor/.gitignore b/packages/core/executor/.gitignore deleted file mode 100644 index cbb386fa..00000000 --- a/packages/core/executor/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.vscode/ -node_modules/ -npm-debug.log -yarn-error.log -yarn.lock -package-lock.json -/.idea/ diff --git a/packages/core/executor/package.json b/packages/core/executor/package.json deleted file mode 100644 index ca2e0cd0..00000000 --- a/packages/core/executor/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "@certd/executor", - "version": "0.3.0", - "description": "", - "main": "src/index.js", - "scripts": { - "test": "echo \\\"Error: no test specified\\\" && exit 1", - "build": "webpack --config webpack.config.cjs ", - "rollup": "rollup --config rollup.config.js" - }, - "type": "module", - "dependencies": { - "@certd/api": "^0.3.0", - "@certd/certd": "^0.3.0", - "dayjs": "^1.9.7", - "lodash-es": "^4.17.20" - }, - "devDependencies": { - "@certd/plugin-aliyun": "^0.3.0", - "@certd/plugin-host": "^0.3.0", - "@certd/plugin-tencent": "^0.3.0", - "@rollup/plugin-commonjs": "^17.0.0", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-node-resolve": "^11.0.1", - "chai": "^4.2.0", - "eslint": "^7.15.0", - "eslint-config-standard": "^16.0.2", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.2.1", - "mocha": "^8.2.1", - "rollup": "^2.35.1", - "rollup-plugin-terser": "^7.0.2" - }, - "author": "Greper", - "license": "MIT", - "sideEffects": false, - "gitHead": "5fbd7742665c0a949333d805153e9b6af91c0a71" -} diff --git a/packages/core/executor/rollup.config.js b/packages/core/executor/rollup.config.js deleted file mode 100644 index 5545a468..00000000 --- a/packages/core/executor/rollup.config.js +++ /dev/null @@ -1,21 +0,0 @@ -import json from '@rollup/plugin-json' -import { terser } from 'rollup-plugin-terser' -import commonjs from '@rollup/plugin-commonjs' -import { nodeResolve } from '@rollup/plugin-node-resolve' - -export default { - input: 'src/index.js', - output: [ - { - file: 'bundle.js', - format: 'es' - }, - { - file: 'bundle.min.js', - format: 'iife', - name: 'version', - plugins: [terser()] - } - ], - plugins: [json(), commonjs(), nodeResolve()] -} diff --git a/packages/core/executor/src/index.js b/packages/core/executor/src/index.js deleted file mode 100644 index a700df17..00000000 --- a/packages/core/executor/src/index.js +++ /dev/null @@ -1,182 +0,0 @@ -import { Certd } from '@certd/certd' -import { pluginRegistry, util } from '@certd/api' -import _ from 'lodash-es' -import dayjs from 'dayjs' -import { Trace } from './trace.js' -const logger = util.logger - -function createDefaultOptions () { - return { - args: { - forceCert: false, - forceDeploy: true, - forceRedeploy: false, - doNotThrowError: false // 部署流程执行有错误时,不抛异常,此时整个任务执行完毕后,可以返回结果,你可以在返回结果中处理 - } - } -} -export class Executor { - constructor () { - this.trace = new Trace() - } - - async run (options) { - logger.info('------------------- Cert-D ---------------------') - try { - this.transfer(options) - options = _.merge(createDefaultOptions(), options) - return await this.doRun(options) - } catch (e) { - logger.error('任务执行出错', e) - throw e - } - } - - transfer (options) { - const providers = options.accessProviders - if (_.isArray(providers)) { - const map = {} - for (const provider of providers) { - if (provider.key) { - map[provider.key] = provider - } - } - options.accessProviders = map - } - } - - async doRun (options) { - // 申请证书 - logger.info('任务开始') - const certd = new Certd(options) - const cert = await this.runCertd(certd) - if (cert == null) { - throw new Error('申请证书失败') - } - logger.info('证书保存路径:', cert.certDir) - - logger.info('----------------------') - if (!cert.isNew) { - // 如果没有更新 - if (options.args.forceRedeploy) { - // 强制重新部署,清空保存的状态 - await certd.certStore.setCurrentFile('context.json', '{}') - } else if (!options.args.forceDeploy) { - // 且不需要强制deploy - logger.info('证书无更新,无需重新部署') - logger.info('任务完成') - return { cert } - } - } - // 读取上次执行进度 - let context = {} - const contextJson = await certd.certStore.getCurrentFile('context.json') - if (contextJson) { - context = JSON.parse(contextJson) - } - - context.certIsNew = !!cert.isNew - - const trace = new Trace(context) - const resultTrace = trace.getInstance({ type: 'result' }) - // 运行部署任务 - try { - await this.runDeploys({ options, cert, context, trace }) - } finally { - await certd.certStore.setCurrentFile('context.json', JSON.stringify(context)) - } - logger.info('任务完成') - trace.print() - const result = resultTrace.get({ }) - if (result) { - if (result.status === 'error' && options.args.doNotThrowError === false) { - throw new Error(result.remark) - } - } - return { - cert, - context, - result - } - } - - async runCertd (certd) { - logger.info(`证书任务 ${JSON.stringify(certd.options.cert.domains)} 开始`) - const cert = await certd.certApply() - logger.info(`证书任务 ${JSON.stringify(certd.options.cert.domains)} 完成`) - return cert - } - - async runDeploys ({ options, cert, context, trace }) { - if (cert == null) { - const certd = new Certd(options) - cert = await certd.readCurrentCert() - } - logger.info('部署任务开始') - for (const deploy of options.deploy) { - const deployName = deploy.deployName - logger.info(`------------【${deployName}】-----------`) - - const deployTrace = trace.getInstance({ type: 'deploy', deployName }) - if (deploy.disabled === true) { - logger.info('此流程已被禁用,跳过') - logger.info('') - deployTrace.set({ value: { current: 'skip', status: 'disabled', remark: '流程禁用' } }) - deployTrace.set({ tasks: null }) - continue - } - try { - for (const task of deploy.tasks) { - if (context[deployName] == null) { - context[deployName] = {} - } - const taskContext = context[deployName] - // 开始执行任务列表 - await this.runTask({ options, cert, task, context: taskContext, deploy, trace }) - } - - deployTrace.set({ value: { status: 'success', remark: '执行成功' } }) - trace.set({ type: 'result', value: { status: 'success', remark: '执行成功' } }) - } catch (e) { - deployTrace.set({ value: { status: 'error', remark: '执行失败:' + e.message } }) - trace.set({ type: 'result', value: { status: 'error', remark: deployName + '执行失败:' + e.message } }) - logger.error('流程执行失败', e) - } - - logger.info('') - } - } - - async runTask ({ options, task, cert, context, deploy, trace }) { - const taskType = task.type - const Plugin = pluginRegistry.get(taskType) - const deployName = deploy.deployName - const taskName = task.taskName - if (Plugin == null) { - throw new Error(`插件:${taskType}还未安装`) - } - - let instance = Plugin - if (Plugin instanceof Function) { - instance = new Plugin({ accessProviders: options.accessProviders }) - } - const taskTrace = trace.getInstance({ type: 'deploy', deployName, taskName }) - const traceStatus = taskTrace.get({}) - if (traceStatus && traceStatus.status === 'success' && !options.args.forceRedeploy) { - logger.info(`----【${taskName}】已经执行完成,跳过此任务`) - taskTrace.set({ value: { current: 'skip', status: 'success', remark: '已执行成功过,本次跳过' } }) - return - } - logger.info(`----【${taskName}】开始执行`) - try { - // 执行任务 - await instance.execute({ cert, props: task.props, context }) - taskTrace.set({ value: { current: 'success', status: 'success', remark: '执行成功', time: dayjs().format() } }) - } catch (e) { - taskTrace.set({ value: { current: 'error', status: 'error', remark: e.message, time: dayjs().format() } }) - throw e - } - logger.info(`----任务【${taskName}】执行完成`) - logger.info('') - } -} diff --git a/packages/core/executor/src/trace.js b/packages/core/executor/src/trace.js deleted file mode 100644 index 209f89d4..00000000 --- a/packages/core/executor/src/trace.js +++ /dev/null @@ -1,96 +0,0 @@ -import { util } from '@certd/api' -import _ from 'lodash-es' -const logger = util.logger -export class Trace { - constructor (context) { - this.context = context - } - - getInstance ({ type, deployName, taskName }) { - return { - get: ({ prop }) => { - return this.get({ type, deployName, taskName, prop }) - }, - set: ({ prop, value }) => { - this.set({ type, deployName, taskName, prop, value }) - } - } - } - - set ({ type, deployName, taskName, prop, value }) { - const key = this.buildTraceKey({ type, deployName, taskName, prop }) - const oldValue = _.get(this.context, key) || {} - _.merge(oldValue, value) - _.set(this.context, key, oldValue) - } - - get ({ type, deployName, taskName, prop }) { - return _.get(this.context, this.buildTraceKey({ type, deployName, taskName, prop })) - } - - buildTraceKey ({ type = 'default', deployName, taskName, prop }) { - let key = '__trace__.' + type - if (deployName) { - key += '.' - key += deployName.replace(/\./g, '_') - } - if (taskName) { - key += '.tasks.' - key += taskName.replace(/\./g, '_') - } - if (prop) { - key += '.' + prop - } - return key - } - - getStringLength (str) { - const enLength = str.replace(/[\u0391-\uFFE5]/g, '').length // 先把中文替换成两个字节的英文,再计算长度 - return Math.floor((str.length - enLength) * 1.5) + enLength - } - - print () { - const context = this.context - logger.info('---------------------------任务结果总览--------------------------') - if (context.certIsNew) { - this.printTraceLine({ current: 'success', remark: '证书更新成功' }, '更新证书') - } else { - this.printTraceLine({ current: 'skip', remark: '还未到过期时间,跳过' }, '更新证书') - } - const trace = this.get({ type: 'deploy' }) - // logger.info('trace', trace) - for (const deployName in trace) { - if (trace[deployName] == null) { - trace[deployName] = {} - } - const traceStatus = this.printTraceLine(trace[deployName], deployName) - - const tasks = traceStatus.tasks - if (tasks) { - for (const taskName in tasks) { - if (tasks[taskName] == null) { - tasks[taskName] = {} - } - this.printTraceLine(tasks[taskName], taskName, ' └') - } - } - } - const result = this.get({ type: 'result' }) - if (result) { - this.printTraceLine(result, 'result', '') - } - const mainContext = {} - _.merge(mainContext, context) - delete mainContext.__trace__ - logger.info('【context】', JSON.stringify(mainContext)) - } - - printTraceLine (traceStatus, name, prefix = '') { - const length = this.getStringLength(name) - const endPad = _.repeat('-', 45 - prefix.length - length) + '\t' - const status = traceStatus.current || traceStatus.status || '' - const remark = traceStatus.remark || '' - logger.info(`${prefix}【${name}】${endPad}[${status}] \t${remark}`) - return traceStatus - } -} diff --git a/packages/core/executor/test/index.test.js b/packages/core/executor/test/index.test.js deleted file mode 100644 index 90cfb228..00000000 --- a/packages/core/executor/test/index.test.js +++ /dev/null @@ -1,42 +0,0 @@ -import pkg from 'chai' -import { Executor } from '../src/index.js' -import { createOptions } from '../../../../test/options.js' -import PluginAliyun from '@certd/plugin-aliyun' -import PluginTencent from '@certd/plugin-tencent' -import PluginHost from '@certd/plugin-host' -const { expect } = pkg - -// 安装默认插件和授权提供者 -PluginAliyun.install() -PluginTencent.install() -PluginHost.install() - -describe('AutoDeploy', function () { - it('#run', async function () { - this.timeout(120000) - const options = createOptions() - const executor = new Executor() - const ret = await executor.run(options) - expect(ret).ok - expect(ret.cert).ok - }) - it('#forceCert', async function () { - this.timeout(120000) - const executor = new Executor() - const options = createOptions() - options.args.forceCert = true - options.args.forceDeploy = true - - const ret = await executor.run(options) - expect(ret).ok - expect(ret.cert).ok - }) - it('#forceDeploy', async function () { - this.timeout(120000) - const executor = new Executor() - const options = createOptions() - const ret = await executor.run(options, { forceCert: false, forceDeploy: true, forceRedeploy: true }) - expect(ret).ok - expect(ret.cert).ok - }) -}) diff --git a/packages/core/executor/webpack.config.cjs b/packages/core/executor/webpack.config.cjs deleted file mode 100644 index a8297e77..00000000 --- a/packages/core/executor/webpack.config.cjs +++ /dev/null @@ -1,23 +0,0 @@ -const path = require('path') -const { CleanWebpackPlugin } = require('clean-webpack-plugin') -console.log(CleanWebpackPlugin) - -module.exports = { - devtool: 'source-map', - target: 'node', - entry: './src/index.js', - output: { - filename: 'executor.js', - path: path.resolve(__dirname, 'dist'), - library: 'certdExecutor', - libraryTarget: 'umd' - }, - plugins: [ - new CleanWebpackPlugin() - ], - mode: 'production' - // mode: 'development', - // optimization: { - // usedExports: true - // } -} diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index 08417fc8..1fb81fc1 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -18,7 +18,6 @@ }, "devDependencies": { "@types/lodash": "^4.14.186", - "@fast-crud/fast-crud": "^1.5.0", "vue-tsc": "^0.38.9", "@alicloud/cs20151215": "^3.0.3", "@alicloud/openapi-client": "^0.4.0", diff --git a/packages/core/pipeline/src/access/api.ts b/packages/core/pipeline/src/access/api.ts index c9be5456..0964ab29 100644 --- a/packages/core/pipeline/src/access/api.ts +++ b/packages/core/pipeline/src/access/api.ts @@ -1,10 +1,14 @@ import { Registrable } from "../registry"; -import { FormItemProps } from "@fast-crud/fast-crud"; import { accessRegistry } from "./registry"; +import { FormItemProps } from "../d.ts"; +export type AccessInput = FormItemProps & { + title: string; + required?: boolean; +}; export type AccessDefine = Registrable & { input: { - [key: string]: FormItemProps; + [key: string]: AccessInput; }; }; export function IsAccess(define: AccessDefine) { diff --git a/packages/core/pipeline/src/access/impl/aliyun-access.ts b/packages/core/pipeline/src/access/impl/aliyun-access.ts index 2fe53505..c770c778 100644 --- a/packages/core/pipeline/src/access/impl/aliyun-access.ts +++ b/packages/core/pipeline/src/access/impl/aliyun-access.ts @@ -7,11 +7,18 @@ import { AbstractAccess } from "../abstract-access"; desc: "", input: { accessKeyId: { + title: "accessKeyId", component: { placeholder: "accessKeyId", }, - //required: true, - //rules: [{ required: true, message: "必填项" }], + required: true, + }, + accessKeySecret: { + title: "accessKeySecret", + component: { + placeholder: "accessKeySecret", + }, + required: true, }, }, }) diff --git a/packages/core/pipeline/src/d.ts/fast-crud.ts b/packages/core/pipeline/src/d.ts/fast-crud.ts new file mode 100644 index 00000000..91515a61 --- /dev/null +++ b/packages/core/pipeline/src/d.ts/fast-crud.ts @@ -0,0 +1,115 @@ +/** + * [x]-col的配置 + */ +export type ColProps = { + span?: number; + [props: string]: any; +}; + +export type FormItemProps = { + /** + * 字段label + */ + title?: string; + /** + * 表单字段组件配置 + */ + component?: ComponentProps; + /** + * 表单字段 [a|el|n]-col的配置 + * 一般用来配置跨列:{span:24} 占满一行 + */ + col?: ColProps; + /** + * 默认值 + */ + value?: any; + /** + * 帮助提示配置 + */ + helper?: string | FormItemHelperProps; + /** + * 排序号 + */ + order?: number; + /** + * 是否显示此字段 + */ + show?: boolean; + /** + * 是否是空白占位栏 + */ + blank?: boolean; + + [key: string]: any; +}; + +/** + * 表单字段帮助说明配置 + */ +export type FormItemHelperProps = { + /** + * 自定义渲染帮助说明 + * @param scope + */ + render?: (scope: any) => any; + /** + * 帮助文本 + */ + text?: string; + /** + * 帮助说明所在的位置,[ undefined | label] + */ + position?: string; + /** + * [a|el|n]-tooltip配置 + */ + tooltip?: object; + + [key: string]: any; +}; + +/** + * 组件配置 + */ +export type ComponentProps = { + /** + * 组件的名称 + */ + name?: string | object; + /** + * vmodel绑定的目标属性名 + */ + vModel?: string; + + /** + * 当原始组件名的参数被以上属性名占用时,可以配置在这里 + * 例如:原始组件有一个叫name的属性,你想要配置它,则可以按如下配置 + * ``` + * component:{ + * name:"组件的名称" + * props:{ + * name:"组件的name属性" <----------- + * } + * } + * ``` + */ + props?: { + [key: string]: any; + }; + + /** + * 组件事件监听 + */ + on?: { + [key: string]: (context?: any) => void; + }; + + /** + * 组件其他参数 + * 事件:onXxx:(event)=>void 组件原始事件监听 + * on.onXxx:(context)=>void 组件事件监听(对原始事件包装) + * 样式:style、class等 + */ + [key: string]: any; +}; diff --git a/packages/core/pipeline/src/d.ts/index.ts b/packages/core/pipeline/src/d.ts/index.ts index 18b29ab6..785c7619 100644 --- a/packages/core/pipeline/src/d.ts/index.ts +++ b/packages/core/pipeline/src/d.ts/index.ts @@ -1 +1,2 @@ export * from "./pipeline"; +export * from "./fast-crud"; diff --git a/packages/core/pipeline/src/plugin/api.ts b/packages/core/pipeline/src/plugin/api.ts index 3b33a9b1..6d9ef563 100644 --- a/packages/core/pipeline/src/plugin/api.ts +++ b/packages/core/pipeline/src/plugin/api.ts @@ -1,6 +1,6 @@ -import { FormItemProps } from "@fast-crud/fast-crud"; import { Registrable } from "../registry"; import { pluginRegistry } from "./registry"; +import { FormItemProps } from "../d.ts"; export type TaskInput = { [key: string]: any; }; diff --git a/packages/core/pipeline/src/plugin/plugins/cert-plugin/index.ts b/packages/core/pipeline/src/plugin/plugins/cert-plugin/index.ts index 24e2e0f2..16d8038a 100644 --- a/packages/core/pipeline/src/plugin/plugins/cert-plugin/index.ts +++ b/packages/core/pipeline/src/plugin/plugins/cert-plugin/index.ts @@ -5,7 +5,7 @@ import dayjs from "dayjs"; import { dnsProviderRegistry } from "../../../dns-provider"; import { AbstractDnsProvider } from "../../../dns-provider/abstract-dns-provider"; import { AcmeService } from "./acme"; - +import _ from "lodash"; export type CertInfo = { crt: string; key: string; @@ -15,6 +15,7 @@ export type CertInfo = { return { name: "CertApply", title: "证书申请", + desc: "免费通配符域名证书申请,支持多个域名打到同一个证书上", input: { domains: { title: "域名", @@ -22,12 +23,17 @@ export type CertInfo = { name: "a-select", vModel: "value", mode: "tags", + open: false, }, required: true, col: { span: 24, }, - helper: "请输入域名", + helper: + "支持通配符域名,例如: *.foo.com 、 *.test.handsfree.work\n" + + "支持多个域名、多个子域名、多个通配符域名打到一个证书上(域名必须是在同一个DNS提供商解析)\n" + + "多级子域名要分成多个域名输入(*.foo.com的证书不能用于xxx.yyy.foo.com)\n" + + "输入一个回车之后,再输入下一个", }, email: { title: "邮箱", @@ -138,7 +144,17 @@ export class CertApplyPlugin extends AbstractPlugin implements TaskPlugin { const domains = input["domains"]; const dnsProviderType = input["dnsProviderType"]; const dnsProviderAccessId = input["dnsProviderAccess"]; - const csrInfo = input["csrInfo"]; + const csrInfo = _.merge( + { + country: "CN", + state: "GuangDong", + locality: "ShengZhen", + organization: "CertD Org.", + organizationUnit: "IT Department", + emailAddress: email, + }, + input["csrInfo"] + ); this.logger.info("开始申请证书,", email, domains); const dnsProviderClass = dnsProviderRegistry.get(dnsProviderType); diff --git a/packages/core/pipeline/src/registry/registry.ts b/packages/core/pipeline/src/registry/registry.ts index 23448ab4..aea7a778 100644 --- a/packages/core/pipeline/src/registry/registry.ts +++ b/packages/core/pipeline/src/registry/registry.ts @@ -59,11 +59,21 @@ export class Registry { getDefineList() { const list = []; for (const key in this.storage) { - const PluginClass = this.storage[key]; - // @ts-ignore - const plugin = new PluginClass(); - list.push({ ...plugin.define, key }); + const define = this.getDefine(key); + if (define) { + list.push({ ...define, key }); + } } return list; } + + getDefine(key: string) { + const PluginClass = this.storage[key]; + if (!PluginClass) { + return; + } + // @ts-ignore + const plugin = new PluginClass(); + return plugin.define; + } } diff --git a/packages/core/pipeline/test/pipeline/pipeline.define.ts b/packages/core/pipeline/test/pipeline/pipeline.define.ts index 649f4229..1369d482 100644 --- a/packages/core/pipeline/test/pipeline/pipeline.define.ts +++ b/packages/core/pipeline/test/pipeline/pipeline.define.ts @@ -9,6 +9,7 @@ export const pipeline: Pipeline = { version: 1, id: generateId(), title: "测试管道", + userId: 1, triggers: [], stages: [ { diff --git a/packages/core/pipeline/vite.config.ts b/packages/core/pipeline/vite.config.ts index 1323c432..c758c7c0 100644 --- a/packages/core/pipeline/vite.config.ts +++ b/packages/core/pipeline/vite.config.ts @@ -7,5 +7,18 @@ export default defineConfig({ entry: "src/index.ts", name: "pipeline", }, + rollupOptions: { + external: ["vue", "lodash-es", "dayjs", "@fast-crud/fast-crud"], + output: { + // Provide global variables to use in the UMD build + // for externalized deps + globals: { + vue: "Vue", + "lodash-es": "_", + dayjs: "dayjs", + "@fast-crud/fast-crud": "FastCrud", + }, + }, + }, }, }); diff --git a/packages/server/certd-client b/packages/server/certd-client index f7d9e45c..70f49940 160000 --- a/packages/server/certd-client +++ b/packages/server/certd-client @@ -1 +1 @@ -Subproject commit f7d9e45c8abb051e8cd8388618e694f8757cb15e +Subproject commit 70f49940d71f5c74087ecd9038881291f250f7d6 diff --git a/packages/server/certd-server b/packages/server/certd-server index 60695c23..a0366be6 160000 --- a/packages/server/certd-server +++ b/packages/server/certd-server @@ -1 +1 @@ -Subproject commit 60695c23553c28a4bb710f55e1a56e623d7fafd3 +Subproject commit a0366be6aeda29aa55d3c5b9f775fa3a27a322a3 diff --git a/packages/ui/certd-server/.eslintrc.cjs b/packages/ui/certd-server/.eslintrc.cjs deleted file mode 100644 index 7186b43a..00000000 --- a/packages/ui/certd-server/.eslintrc.cjs +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module', - ecmaVersion: '2020' - }, - parser: 'babel-eslint', - extends: ['standard'], - env: { - node: true - }, - rules: { - 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' - } -} diff --git a/packages/ui/certd-server/.gitignore b/packages/ui/certd-server/.gitignore deleted file mode 100644 index cbb386fa..00000000 --- a/packages/ui/certd-server/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.vscode/ -node_modules/ -npm-debug.log -yarn-error.log -yarn.lock -package-lock.json -/.idea/ diff --git a/packages/ui/certd-server/Dockerfile b/packages/ui/certd-server/Dockerfile deleted file mode 100644 index 4eca4002..00000000 --- a/packages/ui/certd-server/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM registry.cn-shenzhen.aliyuncs.com/greper/node:15.8.0-alpine -ENV TZ=Asia/Shanghai -EXPOSE 3000 -ADD ./ /app/ -RUN cd /app/ && ls -ENTRYPOINT node /app/bin/www.js diff --git a/packages/ui/certd-server/app.js b/packages/ui/certd-server/app.js deleted file mode 100644 index 6fd34a48..00000000 --- a/packages/ui/certd-server/app.js +++ /dev/null @@ -1,59 +0,0 @@ -import Koa from 'koa' -import json from 'koa-json' -import onerror from 'koa-onerror' -import bodyparser from 'koa-bodyparser' -import logger from 'koa-logger' -import Static from 'koa-static' -import fs from 'fs' -import _ from 'lodash-es' -import './install.js' -import pathUtil from './utils/util.path.js' -import compress from 'koa-compress' -const app = new Koa() - -// error handler -onerror(app) - -// middlewares -app.use(bodyparser({ - enableTypes: ['json', 'form', 'text'] -})) -app.use(json()) -app.use(logger()) -// gzip -// app.use(compress({ threshold: 5120 })) - -const staticPlugin = Static(pathUtil.join('public'), { - maxage: 30 * 24 * 60 * 3600, - gzip: true -}) -app.use(staticPlugin) - -// logger -app.use(async (ctx, next) => { - const start = new Date() - await next() - const ms = new Date() - start - console.log(`${ctx.method} ${ctx.url} - ${ms}ms`) -}) - -// routes -const files = fs.readdirSync(new URL('controllers/', import.meta.url)) -// 过滤出.js文件: -const jsFiles = files.filter((f) => { - return f.endsWith('.js') -}) - -_.forEach(jsFiles, async item => { - let mapping = await import(new URL('controllers/' + item, import.meta.url)) - mapping = mapping.default - app.use(mapping.routes(), mapping.allowedMethods()) -}) - -// error-handling -app.on('error', (err, ctx) => { - console.error('server error', err, ctx) -}) - -console.log('http://localhost:3000/') -export default app diff --git a/packages/ui/certd-server/bin/www.js b/packages/ui/certd-server/bin/www.js deleted file mode 100644 index 21950092..00000000 --- a/packages/ui/certd-server/bin/www.js +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -import app from '../app.js'; -import debuger from 'debug' -const debug = debuger('demo:serer') -// require('debug')('demo:server'); -import http from 'http'; - -/** - * Get port from environment and store in Express. - */ - -var port = normalizePort(process.env.PORT || '3000'); -// app.set('port', port); - -/** - * Create HTTP server. - */ - -var server = http.createServer(app.callback()); - -/** - * Listen on provided port, on all network interfaces. - */ - -server.listen(port); -server.on('error', onError); -server.on('listening', onListening); - -/** - * Normalize a port into a number, string, or false. - */ - -function normalizePort(val) { - var port = parseInt(val, 10); - - if (isNaN(port)) { - // named pipe - return val; - } - - if (port >= 0) { - // port number - return port; - } - - return false; -} - -/** - * Event listener for HTTP server "error" event. - */ - -function onError(error) { - if (error.syscall !== 'listen') { - throw error; - } - - var bind = typeof port === 'string' - ? 'Pipe ' + port - : 'Port ' + port; - - // handle specific listen errors with friendly messages - switch (error.code) { - case 'EACCES': - console.error(bind + ' requires elevated privileges'); - process.exit(1); - break; - case 'EADDRINUSE': - console.error(bind + ' is already in use'); - process.exit(1); - break; - default: - throw error; - } -} - -/** - * Event listener for HTTP server "listening" event. - */ - -function onListening() { - var addr = server.address(); - var bind = typeof addr === 'string' - ? 'pipe ' + addr - : 'port ' + addr.port; - debug('Listening on ' + bind); -} - diff --git a/packages/ui/certd-server/controllers/access-providers.js b/packages/ui/certd-server/controllers/access-providers.js deleted file mode 100644 index 03de8dde..00000000 --- a/packages/ui/certd-server/controllers/access-providers.js +++ /dev/null @@ -1,16 +0,0 @@ -import Router from 'koa-router' -import { accessProviderRegistry } from '@certd/api' -import _ from 'lodash-es' -import { Ret } from '../models/Ret.js' -const router = Router() -router.prefix('/api/access-providers') - -router.get('/list', function (ctx, next) { - const list = [] - _.forEach(accessProviderRegistry.collection, item => { - list.push(item.define()) - }) - ctx.body = Ret.success(list) -}) - -export default router diff --git a/packages/ui/certd-server/controllers/dns-providers.js b/packages/ui/certd-server/controllers/dns-providers.js deleted file mode 100644 index c71807cb..00000000 --- a/packages/ui/certd-server/controllers/dns-providers.js +++ /dev/null @@ -1,16 +0,0 @@ -import Router from 'koa-router' -import { dnsProviderRegistry } from '@certd/api' -import _ from 'lodash-es' -import { Ret } from '../models/Ret.js' -const router = Router() -router.prefix('/api/dns-providers') - -router.get('/list', function (ctx, next) { - const list = [] - _.forEach(dnsProviderRegistry.collection, item => { - list.push(item.define()) - }) - ctx.body = Ret.success(list) -}) - -export default router diff --git a/packages/ui/certd-server/controllers/exports.js b/packages/ui/certd-server/controllers/exports.js deleted file mode 100644 index 79c4b478..00000000 --- a/packages/ui/certd-server/controllers/exports.js +++ /dev/null @@ -1,23 +0,0 @@ -import Router from 'koa-router' -import fs from 'fs' -import exportsService from '../service/exports-service.js' - -const router = Router() -router.prefix('/api/exports') - -router.post('/toZip', async function (ctx, next) { - // const request = ctx.request - // const query = request.query - const body = ctx.request.body - // const req_queryString = request.queryString - const { zipPath, fileName } = await exportsService.exportsToZip(body.options, 'certd-run') - - console.log('zipFile', zipPath) - ctx.set('Content-disposition', 'attachment;filename=' + fileName) - ctx.set('Content-Type', 'application/zip') - ctx.body = fs.createReadStream(zipPath) - // - // // ctx.body = Ret.success(zipPath) -}) - -export default router diff --git a/packages/ui/certd-server/controllers/index.js b/packages/ui/certd-server/controllers/index.js deleted file mode 100644 index 3f87eca9..00000000 --- a/packages/ui/certd-server/controllers/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import Router from 'koa-router' -const router = Router() - -router.get('/api/', async (ctx, next) => { - await ctx.render('index', { - title: 'Hello CertD!' - }) -}) - -export default router diff --git a/packages/ui/certd-server/controllers/plugins.js b/packages/ui/certd-server/controllers/plugins.js deleted file mode 100644 index f6242b32..00000000 --- a/packages/ui/certd-server/controllers/plugins.js +++ /dev/null @@ -1,16 +0,0 @@ -import Router from 'koa-router' -import { pluginRegistry } from '@certd/api' -import _ from 'lodash-es' -import { Ret } from '../models/Ret.js' -const router = Router() -router.prefix('/api/plugins') - -router.get('/list', function (ctx, next) { - const list = [] - _.forEach(pluginRegistry.collection, item => { - list.push(item.define()) - }) - ctx.body = Ret.success(list) -}) - -export default router diff --git a/packages/ui/certd-server/install.js b/packages/ui/certd-server/install.js deleted file mode 100644 index c104766b..00000000 --- a/packages/ui/certd-server/install.js +++ /dev/null @@ -1,8 +0,0 @@ -import PluginAliyun from '@certd/plugin-aliyun' -import PluginTencent from '@certd/plugin-tencent' -import PluginHost from '@certd/plugin-host' - -// 安装默认插件和授权提供者 -PluginAliyun.install() -PluginTencent.install() -PluginHost.install() diff --git a/packages/ui/certd-server/models/Ret.js b/packages/ui/certd-server/models/Ret.js deleted file mode 100644 index 9b40174c..00000000 --- a/packages/ui/certd-server/models/Ret.js +++ /dev/null @@ -1,15 +0,0 @@ -export class Ret { - constructor (code = 0, msg, data) { - this.code = code - this.msg = msg - this.data = data - } - - static success (data) { - return new Ret(0, '', data) - } - - static error (msg) { - return new Ret(1, msg) - } -} diff --git a/packages/ui/certd-server/package.json b/packages/ui/certd-server/package.json deleted file mode 100644 index 4ab36c58..00000000 --- a/packages/ui/certd-server/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@certd/server", - "version": "0.2.2", - "private": false, - "type": "module", - "scripts": { - "start": "node bin/www.js", - "dev": "./node_modules/.bin/nodemon bin/www.js", - "prd": "pm2 start bin/www.js", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "dependencies": { - "@certd/api": "^0.3.0", - "@certd/executor": "^0.3.0", - "@certd/plugin-aliyun": "^0.3.0", - "@certd/plugin-host": "^0.3.0", - "@certd/plugin-tencent": "^0.3.0", - "compressing": "^1.5.1", - "debug": "^4.1.1", - "fs-extra": "^9.1.0", - "koa": "^2.7.0", - "koa-bodyparser": "^4.2.1", - "koa-compress": "^5.0.1", - "koa-convert": "^1.2.0", - "koa-json": "^2.0.2", - "koa-logger": "^3.2.0", - "koa-onerror": "^4.1.0", - "koa-router": "^7.4.0", - "koa-static": "^5.0.0", - "koa-views": "^6.2.0", - "lodash-es": "^4.17.20" - }, - "devDependencies": { - "babel-eslint": "^10.1.0", - "eslint": "^7.19.0", - "eslint-config-standard": "^16.0.2", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.2.1", - "nodemon": "^1.19.1" - }, - "gitHead": "5fbd7742665c0a949333d805153e9b6af91c0a71" -} diff --git a/packages/ui/certd-server/public/favicon.ico b/packages/ui/certd-server/public/favicon.ico deleted file mode 100644 index b34e3e8081b839fe28fba43084cceff5badae27c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16958 zcmeI2UuYav6vih>Nu`t~lu$yECQl_WgGebN;%q`FB0iWr6dy!Hd?=+95fLdtbbSyJ zA4Eh-A4Eh%iii{`A|kFxABs<*1PKz1ND&b+eGnsQvi`o=xszjijk5U*wGeFR3{4hr@NYJf4g1H3;EJE&bdDf zo}LT+?~r-NPiHRMZRIcTa{lA<8DO3B%!^I%oatvt>Kve-pXK}8T<7<_2z;P>?_VYYcyG z=i&d#ydF)shyEn`dDqEm;!~Wz#&A}C`((mh^Su^mjjM)N-gb)fSAK8fa*MTXIN={g zxsgqOf69vUzh>hP_wxz&TA;J7KW+MPna&2j1e}5S4$JYBGol`A1VQew}ZO=v<V)fi zZ38uj{Ih!^l^xMt|jh!OWA^*26{KY59>$uh)d?Q2O#6WRcVPE(bsd#h? z&YOMZ*v5XlEU^E@{jYbM?Y7$Q?@*rPHeB;;mw8@dv*)I)IDhr&GD!7{eNuU1G;Afg z*O`8vd5~(;)?T5qg8bt#px@}&d==M6&AjDWIrx=~IyQUdmvzT~3@+*KR$8&qJHE+X zF;MqS(ku`niIk4t}e*2W3m#6t#_V?ZMKLWQrJZ{2w+>C=b zc1QS5??!$D)%E$#wz}jW^Ek^sn`d2HMlZ<=Of2Aj2%IHn(0aLq&K*$A{3wS%c~-_b zM-uaBFMbW4hYkOol6{{w($_oDQJ~*WxyF&5?H9d<|2_DsF`jcAM{`EMmvH+0UzAUg zdaP-BE?CMRgD6%yNB;omIq?M8^LbPeUtQI~|4GiYR**TzL7Se|5XD39l)nbooFfe0 zEjt#>-+S@f_Iy+%Hg4*au>N(5AM3Z)txtd(zss`gh`(Y2cjdb}E6U0d_b)~c`I~V8 z|4HyE$de;f8;c6~M`I!MH6HXXOy|Mr&*No{>%4X<;%~-66pLD*^-=G|Zjd)*oejDj z5BtF1#DX<)kep!*`8a##8%Vt?xdmcnlj*}SXpA=hHrh-E#N5|nSna@{-FY&NEw>#BoX8=z(6>QGBIMph&J#zZ}m_2~8b zbhG|2x76`2#WHTsYssyF$UqZ0f+1vMB9cSc=Cc*cyF>L?b>EVW=``8WZ%kunTK=`{ zNv=lzZ+WY`{D}Rk8yWjspJ?edMjBke^Pn6?iZ`FNIP~k@M06j8lX4TUrmAz_Y{YUk Qmg}*M6ew@1K(f&1Kc1*M8UO$Q diff --git a/packages/ui/certd-server/public/logo/logo-lang.png b/packages/ui/certd-server/public/logo/logo-lang.png deleted file mode 100644 index df2e39c44dbe73d9894b6718def543a4b8332b96..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12326 zcmd6Ni#OB%|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#T8llRX&iU;jM&mSa9IaeR)C%>bYAQ4~Sx1FNrUUsHI-Ey@$sT+{2CnN3J5 zlzHBWt3!mWg%rE3Bn4GA_a**4Q@A@av}|=-3r;G4hj%`oOx`8mfd?q$!A`q~ba*TOGBKVKR_gC*I9#unFQD z)oY^v8D3gT*;T*O@Y~0$z^$s_gUc|NI4_q$k--h>LD-<;QC6s>!nBQKd!Na} zNH(ODSo&=Xr=DO?`)M#M4h3hKkN~_Xz!{(F0G<5u{KiKWDql!GcKcD88QEzx_r)H> zcEzYtwYc!xOJjNL`f$GFGB8a}pCS0R<-bFv=yq~ufZ0_WbH&~ru!^6a`*K>5QGfOH z%-wE}9h}K_iDPHr$zxbVmWkYW^hWUvm%o8Au=l?<7tFT$d_>C)pnGXD4*!vhSS9OrwL?vU%Ohx zrycgTCzoG}QEU9n3y1~|-;z0$s|kr*R^0YSjl++a?+KI#?gNPGd$LSF%O8}|E)4a| zRS5DRFn7;Ran?)9!4DY{SAk1A@7|Go6PCfbxXq`Uwk7;mCJQ5XV`4TyEA7%8x=QXe z^P74VGUqqjRtAT5zzk+gb5vZ}@tsI#XJSrtlNyI-jr#eak9+Jm#j9ctm8#44uE$dH zaJb83(0&NF$1~++-Og!gi6v9Rwt|B8apx6r=t?=R7890pFKn{)H65QFitDQ88T5k@ zqr>objem;!Azqk>Xd={YbM*si- diff --git a/packages/ui/certd-server/public/logo/logo-svg.png b/packages/ui/certd-server/public/logo/logo-svg.png deleted file mode 100644 index 5bc5dc18440a64fdba5b6fee0beecbaf1e2a1d54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7542 zcmeHMXH-)`l%^?4ReA?SP(eC^^d=DLO?pv~CMA>r0w#1&YLI4V5eOZF(gL9gC`bzs zdX01g0@9=z*x>H(J^N$-?ap~~-nnzjcjwN#cV^CeYh<8JOT|G&LPA3O1n}5|goO0q zvR@-7j{LnQ)<}Gj`kQF0lTP~mz|U(JC}`wgp6RMXQoMHK2SFL z|L6Z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O1Wr$^gh0Jxb((5f_D88#|q25LN*6a;G#*$!amefr#k#LG*pB?SFw71-G5ek@NTc3Ql>IvBiFvcRIsh9yqBj-DR%w4P(FH(3Ek*r z=r0cjfAobB5TXskrPqj;q5JRD^tQDylFjJ`Dt;~x@4er}e$|5Co|<`oBg+OPRAWrk zuM`?%8U1mO6D*pNq^t>BLDsQf_@z&mAFxo>f0KT7YZF-#PGqoqmVTd_bD(PP*mMmP zvXfRAbcfpdR=mwn*2Jrf+PTXtV7b#KJ{}~T)PIv{{Hk8s|Ge0c{WboRH1&j24LSpJ z%q{Fays7wc0@*M-UDvQL zqqLZYhWdVUxMSn*$3evbXB~bn>sXXjSi^OWxlgl*(WUcQrwN^)Vv!2>hqeBAIoVW& z(PP@}TZZAXTkV<~*?-k^{D8uDQZy#N|FRD;z|`i>e5Fk;&br7s#0ho1UHm!sz7Gt{CaU7*q529SaU3a#}jByHeYO%4fqi zJ=-^=Hf+`Qu{+r zbV|Pwg1QqA`5kbwZa=rh0`p{!C{DKYMNURMs5#e@ z8w2;pg*|k6kG@9Vz1Nz4^0ciNyvn+)40N1$mQ~nk+#CejIVPNZyec#>--svv&-~wS b=e)netp4VUk;9PGm)4(X8azg-Ka2bicCg4i diff --git a/packages/ui/certd-server/public/logo/logo.svg b/packages/ui/certd-server/public/logo/logo.svg deleted file mode 100644 index 227548cc..00000000 --- a/packages/ui/certd-server/public/logo/logo.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/packages/ui/certd-server/service/exports-service.js b/packages/ui/certd-server/service/exports-service.js deleted file mode 100644 index b01fc4b8..00000000 --- a/packages/ui/certd-server/service/exports-service.js +++ /dev/null @@ -1,55 +0,0 @@ -import os from 'os' -import fs from 'fs-extra' -import pathUtil from '../utils/util.path.js' -import cryptoRandomString from 'crypto-random-string' -import zipUtil from '../utils/util.zip.js' -import path from 'path' - -import { createRequire } from 'module' -const require = createRequire(import.meta.url) - -export default { - async exportsToZip (options, dirName) { - const tempDir = os.tmpdir() - const targetDir = path.join(tempDir, 'certd-server', cryptoRandomString(10)) - const projectName = dirName - const targetProjectDir = path.join(targetDir, projectName) - const templateDir = pathUtil.join('templates/' + projectName) - - console.log('targetDir', targetDir) - console.log('projectName', projectName) - console.log('tempalteDir', templateDir) - console.log('targetProjectDir', targetProjectDir) - fs.copySync(templateDir, targetProjectDir) - - // options - const optionsFilePath = path.join(targetProjectDir, 'options.json') - fs.writeJsonSync(optionsFilePath, options) - - // 依赖版本 - const exePkgJson = fs.readFileSync(pathUtil.join('node_modules/@certd/executor/package.json')) - const executorPkg = JSON.parse(exePkgJson) - const currentVersion = executorPkg.version - - const templatePkgJson = fs.readFileSync(pathUtil.join('templates/certd-run/package.json')) - const templatePkg = JSON.parse(templatePkgJson) - 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) - - const zipName = dirName + '.zip' - const outputFilePath = path.join(targetDir, zipName) - - console.log('outputFilePath', outputFilePath) - await zipUtil.compress({ dir: targetProjectDir, output: outputFilePath }) - return { - dir: targetDir, - fileName: zipName, - zipPath: outputFilePath - } - } - -} diff --git a/packages/ui/certd-server/templates/certd-run/index.js b/packages/ui/certd-server/templates/certd-run/index.js deleted file mode 100644 index 2d5c8500..00000000 --- a/packages/ui/certd-server/templates/certd-run/index.js +++ /dev/null @@ -1,18 +0,0 @@ -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 -import { createRequire } from 'module' - -// 安装默认插件和授权提供者 -PluginAliyun.install() -PluginTencent.install() -PluginHost.install() -const require = createRequire(import.meta.url) -const options = require('./options.json') - -// 开始执行 -const executor = new Executor() -await executor.run(options) diff --git a/packages/ui/certd-server/templates/certd-run/options.json b/packages/ui/certd-server/templates/certd-run/options.json deleted file mode 100644 index 9e26dfee..00000000 --- a/packages/ui/certd-server/templates/certd-run/options.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/packages/ui/certd-server/templates/certd-run/package.json b/packages/ui/certd-server/templates/certd-run/package.json deleted file mode 100644 index 9600504c..00000000 --- a/packages/ui/certd-server/templates/certd-run/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "certd-run", - "version": "1.0.0", - "description": "certd run", - "main": "index.js", - "scripts": { - "certd": "node index.js" - }, - "type": "module", - "repository": { - "type": "git", - "url": "https://github.com/certd/certd" - }, - "author": "greper", - "license": "MIT", - "dependencies": { - "@certd/executor": "^0.3.0", - "@certd/plugin-aliyun": "^0.3.0", - "@certd/plugin-host": "^0.3.0", - "@certd/plugin-tencent": "^0.3.0" - } -} diff --git a/packages/ui/certd-server/utils/util.path.js b/packages/ui/certd-server/utils/util.path.js deleted file mode 100644 index 69d5e93c..00000000 --- a/packages/ui/certd-server/utils/util.path.js +++ /dev/null @@ -1,11 +0,0 @@ -import os from 'os' -export default { - join (...dirs) { - const url = new URL('../' + dirs.join('/'), import.meta.url) - let path = url.pathname - if (os.type() === 'Windows_NT') { - path = path.substring(1) - } - return path - } -} diff --git a/packages/ui/certd-server/utils/util.zip.js b/packages/ui/certd-server/utils/util.zip.js deleted file mode 100644 index 9f1fb38c..00000000 --- a/packages/ui/certd-server/utils/util.zip.js +++ /dev/null @@ -1,8 +0,0 @@ -import compressing from 'compressing' -export default { - compress ({ - dir, output - }) { - return compressing.zip.compressDir(dir, output) - } -} diff --git a/packages/ui/certd-ui/.browserslistrc b/packages/ui/certd-ui/.browserslistrc deleted file mode 100644 index 214388fe..00000000 --- a/packages/ui/certd-ui/.browserslistrc +++ /dev/null @@ -1,3 +0,0 @@ -> 1% -last 2 versions -not dead diff --git a/packages/ui/certd-ui/.editorconfig b/packages/ui/certd-ui/.editorconfig deleted file mode 100644 index 7053c49a..00000000 --- a/packages/ui/certd-ui/.editorconfig +++ /dev/null @@ -1,5 +0,0 @@ -[*.{js,jsx,ts,tsx,vue}] -indent_style = space -indent_size = 2 -trim_trailing_whitespace = true -insert_final_newline = true diff --git a/packages/ui/certd-ui/.env b/packages/ui/certd-ui/.env deleted file mode 100644 index 67f85a03..00000000 --- a/packages/ui/certd-ui/.env +++ /dev/null @@ -1 +0,0 @@ -VITE_APP_API=/api diff --git a/packages/ui/certd-ui/.eslintignore b/packages/ui/certd-ui/.eslintignore deleted file mode 100644 index eb79dd5f..00000000 --- a/packages/ui/certd-ui/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.idea diff --git a/packages/ui/certd-ui/.eslintrc.js b/packages/ui/certd-ui/.eslintrc.js deleted file mode 100644 index a10cc42d..00000000 --- a/packages/ui/certd-ui/.eslintrc.js +++ /dev/null @@ -1,76 +0,0 @@ -module.exports = { - root: true, - env: { - browser: true, - node: true, - es6: true - }, - parser: "vue-eslint-parser", - parserOptions: { - parser: "@typescript-eslint/parser", - ecmaVersion: 2020, - sourceType: "module", - jsxPragma: "React", - ecmaFeatures: { - jsx: true, - tsx: true - } - }, - extends: [ - "plugin:vue/vue3-recommended", - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended", - "prettier" - ], - rules: { - //"max-len": [0, 200, 2, { ignoreUrls: true }], - "@typescript-eslint/ban-ts-ignore": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-use-before-define": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/explicit-module-boundary-types": "off" - // "@typescript-eslint/no-unused-vars": [ - // "error", - // { - // argsIgnorePattern: "^h$", - // varsIgnorePattern: "^h$", - // }, - // ], - // "no-unused-vars": [ - // "error", - // { - // argsIgnorePattern: "^h$", - // varsIgnorePattern: "^h$", - // }, - // ], - // "vue/custom-event-name-casing": "off", - // "no-use-before-define": "off", - // "space-before-function-paren": "off", - - // "vue/attributes-order": "off", - // "vue/one-component-per-file": "off", - // "vue/html-closing-bracket-newline": "off", - // "vue/max-attributes-per-line": "off", - // "vue/multiline-html-element-content-newline": "off", - // "vue/singleline-html-element-content-newline": "off", - // "vue/attribute-hyphenation": "off", - // "vue/require-default-prop": "off", - // "vue/html-self-closing": [ - // "error", - // { - // html: { - // void: "always", - // normal: "never", - // component: "always", - // }, - // svg: "always", - // math: "always", - // }, - // ], - } -}; diff --git a/packages/ui/certd-ui/.gitignore b/packages/ui/certd-ui/.gitignore deleted file mode 100644 index 980be95d..00000000 --- a/packages/ui/certd-ui/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -node_modules -.DS_Store -dist -dist-ssr -*.local -/stats.html -yarn.lock -.idea -/.idea/ -yarn-error.log -vite-profile.cpuprofile diff --git a/packages/ui/certd-ui/.npmignore b/packages/ui/certd-ui/.npmignore deleted file mode 100644 index b6c09bbd..00000000 --- a/packages/ui/certd-ui/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -/stats.html diff --git a/packages/ui/certd-ui/.prettierrc b/packages/ui/certd-ui/.prettierrc deleted file mode 100644 index 7944aa9b..00000000 --- a/packages/ui/certd-ui/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - - "trailingComma": "none", - "printWidth": 120 -} diff --git a/packages/ui/certd-ui/README.md b/packages/ui/certd-ui/README.md deleted file mode 100644 index 1f0919a1..00000000 --- a/packages/ui/certd-ui/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# certd-ui - -## Project setup -``` -npm install -``` - -### Compiles and hot-reloads for development -``` -npm run serve -``` - -### Compiles and minifies for production -``` -npm run build -``` - -### Run your unit tests -``` -npm run test:unit -``` - -### Lints and fixes files -``` -npm run lint -``` - -### Customize configuration -See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/packages/ui/certd-ui/babel.config.js b/packages/ui/certd-ui/babel.config.js deleted file mode 100644 index d656ee15..00000000 --- a/packages/ui/certd-ui/babel.config.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - presets: [ - '@vue/cli-plugin-babel/preset' - ] - // plugins: [['import', { - // libraryName: 'ant-design-vue', - // style: true // or 'css' - // }]] -} diff --git a/packages/ui/certd-ui/index.html b/packages/ui/certd-ui/index.html deleted file mode 100644 index e4e27302..00000000 --- a/packages/ui/certd-ui/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - certd - - - -
-
-
-
-
-
- -
- - - diff --git a/packages/ui/certd-ui/package.json b/packages/ui/certd-ui/package.json deleted file mode 100644 index fcc46085..00000000 --- a/packages/ui/certd-ui/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "@certd/certd-ui", - "version": "0.2.1", - "private": true, - "scripts": { - "dev": "vite", - "dev:pm": "vite --mode pm", - "dev:force": "vite --force", - "debug": "vite --mode debug", - "debug:pm": "vite --mode debugpm", - "debug:force": "vite --force --mode debug", - "build": "vite build ", - "serve": "vite preview", - "preview": "vite preview", - "pretty-quick": "pretty-quick", - "lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/", - "upgrade": "yarn upgrade-interactive --latest" - }, - "author": "Greper", - "license": "MIT", - "dependencies": { - "@ant-design/colors": "^6.0.0", - "@ant-design/icons-vue": "^6.0.1", - "ant-design-vue": "^3.2.12", - "axios": "^0.27.2", - "core-js": "^3.25.4", - "dayjs": "^1.11.5", - "lodash-es": "^4.17.15", - "mitt": "^3.0.0", - "vue": "^3.2.40", - "vue-i18n": "^9.2.2", - "vue-router": "^4.1.5" - }, - "devDependencies": { - "@rollup/plugin-commonjs": "^22.0.2", - "@rollup/plugin-node-resolve": "^14.1.0", - "@types/chai": "^4.3.3", - "@types/mocha": "^10.0.0", - "@types/node": "^18.8.0", - "@typescript-eslint/eslint-plugin": "^5.38.1", - "@typescript-eslint/parser": "^5.38.1", - "@vitejs/plugin-legacy": "^2.2.0", - "@vitejs/plugin-vue": "^3.1.2", - "@vitejs/plugin-vue-jsx": "^2.0.1", - "@vue/compiler-sfc": "^3.2.40", - "@vue/eslint-config-typescript": "^11.0.2", - "@vue/test-utils": "^2.1.0", - "autoprefixer": "^10.4.12", - "caller-path": "^4.0.0", - "chai": "^4.1.2", - "eslint": "^8.24.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-promise": "^6.0.1", - "eslint-plugin-vue": "^9.5.1", - "less": "^4.1.3", - "less-loader": "^11.0.0", - "lint-staged": "^13.0.3", - "postcss": "^8.4.17", - "prettier": "2.7.1", - "rimraf": "^3.0.2", - "rollup": "^2.79.1", - "rollup-plugin-visualizer": "^5.8.2", - "stylelint": "^14.13.0", - "stylelint-config-prettier": "^9.0.3", - "stylelint-order": "^5.0.0", - "vite": "^3.1.4", - "vite-plugin-compression": "^0.5.1", - "vite-plugin-optimize-persist": "^0.1.2", - "vite-plugin-package-config": "^0.1.1", - "vue-eslint-parser": "^9.1.0" - }, - "husky": { - "hooks": { - "pre-commit": "pretty-quick --staged" - } - }, - "gitHead": "9c2162697f3affea22c9a8cbc0ca74f4034ab27e", - "vite": { - "optimizeDeps": { - "include": [ - "@iconify/iconify" - ] - } - } -} diff --git a/packages/ui/certd-ui/public/favicon.ico b/packages/ui/certd-ui/public/favicon.ico deleted file mode 100644 index b34e3e8081b839fe28fba43084cceff5badae27c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16958 zcmeI2UuYav6vih>Nu`t~lu$yECQl_WgGebN;%q`FB0iWr6dy!Hd?=+95fLdtbbSyJ zA4Eh-A4Eh%iii{`A|kFxABs<*1PKz1ND&b+eGnsQvi`o=xszjijk5U*wGeFR3{4hr@NYJf4g1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Q diff --git a/packages/ui/certd-ui/public/images/plugin.png b/packages/ui/certd-ui/public/images/plugin.png deleted file mode 100644 index 23fa727cdc423af592fb70789db57f602c17f5c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7742 zcmZvBWn7bQ)c*}4AfRlBgyh(yd$cqIHc)V*1Ox?%A0^U_69tAy=V(DtKtfU_1(fb) zgi1a6h7!tP%zp$>6EtHL zLzhByB^7c!3Ae+%>;$N`dd*P%VwADXg+HQZ;HbQR3j$5TMdMcGKQf**43tS@>R3SC{IGS}Z>-bsK%iP2H7T@5*lC4SXd!q&7eL8q8ERbuWP$(6kl(2~k-Pal^`(=} zvqQS2#>E^`GBV!E$fn!Pn@p^Czqhxu6&shFXvD@W{rw3Qr??Vhl!M?A9UCrOrh?3O z>j>;9Zk?#+S3GsgnBV(#kqR82?o~P6WogjjWdZ+)N3Y3mIg^wzF*miZF;L>ogXWm6 zA8@{}3Ri8gR52k8DT}e@%u_0De36OfFj(3GZAGkHCGf9N5cL}1s=Zre_@$+#X(Ex> zd*x2iVt2|`h2O3nEMg+a9beil((Nd9Gm4Zj!M<1l*Mty<&6B;XeO{b4{=IE?G1Sx3 zFl&W=}R8M)}-uX9dki)pZvW)A;Y2(pTZ&hM@BCeDZ z%Sl%}*Kw{w4p)PaYV@h_4*4Tr$*%s@v}SgZ}e=Uwvb zJf?sSCPAHfnY`HTHJQy1w4t>e^I3@`B)$t`nR6)ln5ptGAJtVKO)2s2u0m{_-kc zr1@mUMsYZiiwf`w49s}tPWe-=PiX%?22ZpAi!?7E9~-lU=OFyb$0D0;9fmfyj54H0 zQ(>%dn=4Ky;tnkkZMF26>`@Af$eEjx<1|yA^O7ceyS(Q0MFQ~HXVqa`8|hPILn){Y zK_&iqO@HV}1*ndDEnhyCkFJzO$|mA=y+55)EqkT0JQUCfxE=l2DVL5eG0`C(l0W!g zU>@CmS8KZ<1Ijx7+A5`MU|?WvjzH`+;lw&-B^A5mhh`}R(e6CAp(?1v$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-={Bmw=Vmem^e>kB#{G{aK&HHGYodA9YC>9f-L7Wv|9Y5 zd2&e=f1a@@Tvb!JS2n(;4XV0L7Pakkm%)`KifOcJTHQ_Sd9W?hh1)RWbRdGQ7 znhNZ@1_eG{D0Mdc`%2iAdMM9pZ^nTYOL;z|)4AoCi)yq;(SE0j`uvo)&DWkTARfCw z0{$4;WetBOUl2(QF53%!PSA_6dN-g+r*`4FA|5-(MzZ zesNb{e@j7DHr!vKdIkvRv|2hP%W-X~iA_2df^IP2Y7DKzxXF5}|Me?2K`lL7*C0u! zBT?Ji+uw_fiZ8@JSmFr`Z-nx`H|yH=oMAJa*89{VzG;l)Rixy<-3;S~`Qr(4(HTIY0UtH4=1> zrHuTth%Gh4N2|RXMnvzcfiD>Wgh<@lmnS~_TByhu-`4g|ii74-p!0jcx5HJZjv0NT zi%0>IQ-JV!J7h_$V4us_?l$ERv4B!ufpvB-GFj#g#`@ee zI7N8cSzD`*u~w_;5Rcu6C%wJB(o?mUUSz}`RVy7#%s&F;Qi+R81@-;Gw7|5ayu4qx zCbPvJIySoKYz~4@(;ZvezqEIZxkoqrSaQRx{E^yx3$56hE_s6cvhCNSqff0pl8)<4 zIl7#fB>u&&3|+)mQ9Vdb`F0-AO9~vi3hWSBpe)f zqM8Zr4#lHp<6EZTW+mPbAcG!IGw*Sa9UsX1z6F01-NqF!0sKM{2nybb{+U7Qh9K;l>w158Yl~3;7|(%g;`K4a zMNPiXKV`+fl43151$IHOa&)?&0t>=!5wB9?xCB5PQ>*CnUE4g+Foqiva24D?_|niL zy-Q0I1R@2kwSwP*$R=yyl1x(6D-anpYQXI$o}sn>QN3k*SA7{F-i Kp-R;sh5Qd%W|YeS diff --git a/packages/ui/certd-ui/public/images/provider.png b/packages/ui/certd-ui/public/images/provider.png deleted file mode 100644 index c3b95886f1f11d055935ff4cc1227bae74467685..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8704 zcmb7qc{tQ>^!5i+Mxhx?DP)W#Tak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J=9N=S5Mv$!a+YJB_+`guK9KebKCmFoRc`wabYGUbHqI)f%@oS5D*X3 zr+N2AY{xNch2gMKl+vrv=);Nf+l9ir^pI~229o0_dwVgXjMtOeRoOqHchy`jI$Nw&nd)>e!rwyT5b* zS%DZ2yzJ)DKdm(ROvJjL;uU(^nUDG%Virdd;x51Dl1{6SB-8D0ng_^|_If3?92iwVw zK_WzhBjD=D{wq8x^iy32s#gVZjxq^W^ z6a{qApD#6)Sv+_jZ=MMg20%I4=SchD#U(>wLT3LerR>u>^h?3Z)y9v&&UTs@C_+7q=r{J zPNe3giimW;9@i32n$halY>GEHB@OP>p99Jh5fv*gF=NMLI}oB&dM9Bs?c&+G$%ic2 ziv4O+R)s~jP5=DCV-6R3f4UhtXGbLktSqkeB@21)GG1VdpEi#}FHUlJxr$Vjnl1~^ z zi(VPBM9c*eF-A=!d2cE}1uIgcJk$($)OL*ep#>scUV&t}uw^Xz&&X8ho~M9Eqkrx0^ICyM^g{rdDyckkS= zefNYss@X&D8bv8t+5PBb-}ERMqfzam4xe~@Zu2FoPuk=`+E7itS+x=lW;b|_%KK&LcVrZrmzL|fK(ytZ zU%oDl(~=Ma$H;4P90N~#Chf=RC2kL|?P*^+R$D!WAV=E(N$?wW6 zn^xu$3(<#l;8C}dgtGEewR~fy?0Tg<{w$O39wwC2-3FT($^S;@%Ax35PL%iNo<_9+ zca&GW$E~ENFY)PF0jv4?V6%MUVcro*LVp4evF*rFFYK#v#ODHT*~(u>GJy}RK4@GALKVwZM;khP@7tL=w zOzW^A`*x<=dpde^3<&y6rYnV6E5U7Tj5dhb>!y#vv4i ztajQoKEZQGj~9xt65xFXk4<1Cs1!s_(CJ@yGO(zMw*#T&)8=#BT H>~Q}F@+@p6 diff --git a/packages/ui/certd-ui/public/index.html b/packages/ui/certd-ui/public/index.html deleted file mode 100644 index 3e5a1396..00000000 --- a/packages/ui/certd-ui/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - -
- - - diff --git a/packages/ui/certd-ui/public/public/favicon.ico b/packages/ui/certd-ui/public/public/favicon.ico deleted file mode 100644 index df36fcfb72584e00488330b560ebcf34a41c64c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S diff --git a/packages/ui/certd-ui/public/public/images/logo-certd/logo.svg b/packages/ui/certd-ui/public/public/images/logo-certd/logo.svg deleted file mode 100644 index edcdefbe..00000000 --- a/packages/ui/certd-ui/public/public/images/logo-certd/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/packages/ui/certd-ui/public/public/images/logo-certd/rect-black.svg b/packages/ui/certd-ui/public/public/images/logo-certd/rect-black.svg deleted file mode 100644 index 19bf439f..00000000 --- a/packages/ui/certd-ui/public/public/images/logo-certd/rect-black.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 让你的证书永不过期 - - - diff --git a/packages/ui/certd-ui/public/public/images/logo-certd/rect.svg b/packages/ui/certd-ui/public/public/images/logo-certd/rect.svg deleted file mode 100644 index acc2f41c..00000000 --- a/packages/ui/certd-ui/public/public/images/logo-certd/rect.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 让你的证书永不过期 - - - diff --git a/packages/ui/certd-ui/public/public/images/logo-certd/square.svg b/packages/ui/certd-ui/public/public/images/logo-certd/square.svg deleted file mode 100644 index 026dd978..00000000 --- a/packages/ui/certd-ui/public/public/images/logo-certd/square.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - diff --git a/packages/ui/certd-ui/public/public/images/logo/logo.svg b/packages/ui/certd-ui/public/public/images/logo/logo.svg deleted file mode 100644 index edcdefbe..00000000 --- a/packages/ui/certd-ui/public/public/images/logo/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/packages/ui/certd-ui/public/public/images/logo/rect-black.svg b/packages/ui/certd-ui/public/public/images/logo/rect-black.svg deleted file mode 100644 index a57352ec..00000000 --- a/packages/ui/certd-ui/public/public/images/logo/rect-black.svg +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ui/certd-ui/public/public/images/logo/rect.svg b/packages/ui/certd-ui/public/public/images/logo/rect.svg deleted file mode 100644 index acc2f41c..00000000 --- a/packages/ui/certd-ui/public/public/images/logo/rect.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 让你的证书永不过期 - - - diff --git a/packages/ui/certd-ui/public/public/images/logo/square.svg b/packages/ui/certd-ui/public/public/images/logo/square.svg deleted file mode 100644 index 1b1395a1..00000000 --- a/packages/ui/certd-ui/public/public/images/logo/square.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ui/certd-ui/public/public/index.css b/packages/ui/certd-ui/public/public/index.css deleted file mode 100644 index 0950b050..00000000 --- a/packages/ui/certd-ui/public/public/index.css +++ /dev/null @@ -1,12 +0,0 @@ -html, body, #app { height: 100%; margin: 0; padding: 0; width: 100%;} -.fs-bootstrap { background-color: #474949; height: 100%; display: flex; flex-direction: column;position: fixed;width: 100% } -.fs-bootstrap__main {flex:1; user-select: none; width: 100%; flex-grow: 1; display: flex; justify-content: center; align-items: center; flex-direction: column; } -.fs-bootstrap__footer { width: 100%; flex-grow: 0; text-align: center; padding: 10px 0; } -.fs-bootstrap__footer > a { font-size: 12px; color: #ABABAB; text-decoration: none; } -.fs-bootstrap__loading {box-sizing: border-box; height: 50px; width: 50px; margin-bottom: 5px;border:5px solid #333333;border-bottom:#aaa 5px solid; - border-radius:1000px; animation:load 1.1s infinite linear;-webkit-animation:load 1.1s infinite linear;-moz-animation:load 1.1s infinite linear; -o-animation:load 1.1s infinite linear; -} -@keyframes load {from {transform:rotate(0deg);-ms-transform:rotate(0deg);}to { transform:rotate(360deg);-ms-transform:rotate(360deg); } -}@-webkit-keyframes load {from {-webkit-transform:rotate(0deg); }to { -webkit-transform:rotate(360deg);} - }@-moz-keyframes load { from { -moz-transform:rotate(0deg); } to { -moz-transform:rotate(360deg);} - }@-o-keyframes load { from { -o-transform:rotate(0deg);} to { -o-transform:rotate(360deg);}} diff --git a/packages/ui/certd-ui/public/public/index.html b/packages/ui/certd-ui/public/public/index.html deleted file mode 100644 index 3e5a1396..00000000 --- a/packages/ui/certd-ui/public/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - -
- - - diff --git a/packages/ui/certd-ui/public/public/logo.svg b/packages/ui/certd-ui/public/public/logo.svg deleted file mode 100644 index 1b1395a1..00000000 --- a/packages/ui/certd-ui/public/public/logo.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ui/certd-ui/src/App.vue b/packages/ui/certd-ui/src/App.vue deleted file mode 100644 index 577d0083..00000000 --- a/packages/ui/certd-ui/src/App.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/packages/ui/certd-ui/src/antdv.js b/packages/ui/certd-ui/src/antdv.js deleted file mode 100644 index 4226d294..00000000 --- a/packages/ui/certd-ui/src/antdv.js +++ /dev/null @@ -1,86 +0,0 @@ -import _ from 'lodash' -import { - AutoComplete, - Alert, - Avatar, - Badge, - Button, - Calendar, - Card, - Cascader, - Checkbox, - Col, - DatePicker, - Divider, - Dropdown, - Form, - Input, - InputNumber, - Layout, - List, - LocaleProvider, - Modal, - Radio, - Row, - Select, - Switch, - Tabs, - Tag, - TimePicker, - Tooltip, - Drawer, - // ColorPicker, - ConfigProvider, - Descriptions, - Space -} from 'ant-design-vue' - -const list = { - AutoComplete, - Alert, - Avatar, - Badge, - Button, - Calendar, - Card, - Cascader, - Checkbox, - Col, - DatePicker, - Divider, - Dropdown, - Form, - Input, - InputNumber, - Layout, - List, - LocaleProvider, - TimePicker, - Modal, - Radio, - Row, - Select, - Switch, - Tabs, - Tag, - Tooltip, - Drawer, - // ColorPicker, - ConfigProvider, - Descriptions, - Space -} -export default function (app) { - _.forEach(list, item => { - app.use(item) - // - // app.config.globalProperties.$message = message - // app.config.globalProperties.$notification = notification - app.config.globalProperties.$info = Modal.info - app.config.globalProperties.$success = Modal.success - app.config.globalProperties.$error = Modal.error - app.config.globalProperties.$warning = Modal.warning - app.config.globalProperties.$confirm = Modal.confirm - app.config.globalProperties.$destroyAll = Modal.destroyAll - }) -} diff --git a/packages/ui/certd-ui/src/api/api.access-providers.js b/packages/ui/certd-ui/src/api/api.access-providers.js deleted file mode 100644 index ab0092ff..00000000 --- a/packages/ui/certd-ui/src/api/api.access-providers.js +++ /dev/null @@ -1,14 +0,0 @@ -import { request } from "./service"; -import inputHandler from "./util.input.handler"; - -export default { - async list() { - const ret = await request({ - url: "/access-providers/list" - }); - - inputHandler.handle(ret); - - return ret; - } -}; diff --git a/packages/ui/certd-ui/src/api/api.dns-providers.js b/packages/ui/certd-ui/src/api/api.dns-providers.js deleted file mode 100644 index c7787f7e..00000000 --- a/packages/ui/certd-ui/src/api/api.dns-providers.js +++ /dev/null @@ -1,14 +0,0 @@ -import { request } from "./service"; -import inputHandler from "./util.input.handler"; - -export default { - async list() { - const ret = await request({ - url: "/dns-providers/list" - }); - - inputHandler.handle(ret); - - return ret; - } -}; diff --git a/packages/ui/certd-ui/src/api/api.exports.js b/packages/ui/certd-ui/src/api/api.exports.js deleted file mode 100644 index 46f969de..00000000 --- a/packages/ui/certd-ui/src/api/api.exports.js +++ /dev/null @@ -1,40 +0,0 @@ -import { request } from "./service"; -import _ from "lodash-es"; -function arrayToMap(arr) { - if (arr && arr instanceof Array) { - const map = {}; - _.forEach(arr, (item) => { - map[item.key] = item; - }); - return map; - } - return arr; -} - -function transfer(options) { - options.accessProviders = arrayToMap(options.accessProviders); -} -export default { - exportsToZip(options) { - transfer(options); - return request({ - url: "/exports/toZip", - data: { options }, - method: "post", - responseType: "blob" // 重点在于配置responseType: 'blob' - }).then((res) => { - console.log("res", res); - const filename = decodeURI(res.headers["content-disposition"].replace("attachment;filename=", "")); // 由后端设置下载文件名 - const blob = new Blob([res.data], { type: "application/zip" }); - const a = document.createElement("a"); - const url = window.URL.createObjectURL(blob); - a.href = url; - a.download = filename; - const body = document.getElementsByTagName("body")[0]; - body.appendChild(a); - a.click(); - body.removeChild(a); - window.URL.revokeObjectURL(url); - }); - } -}; diff --git a/packages/ui/certd-ui/src/api/api.plugins.js b/packages/ui/certd-ui/src/api/api.plugins.js deleted file mode 100644 index 202e875d..00000000 --- a/packages/ui/certd-ui/src/api/api.plugins.js +++ /dev/null @@ -1,14 +0,0 @@ -import { request } from "./service"; -import inputHandler from "./util.input.handler"; -export default { - async list() { - const ret = await request({ - url: "/plugins/list" - }); - - inputHandler.handle(ret); - - console.log("plugins", ret); - return ret; - } -}; diff --git a/packages/ui/certd-ui/src/api/index.js b/packages/ui/certd-ui/src/api/index.js deleted file mode 100644 index 21852c05..00000000 --- a/packages/ui/certd-ui/src/api/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import { assign, map } from "lodash"; -import { service, request } from "./service"; - -const files = require.context("./modules", false, /\.js$/); -const generators = files.keys().map((key) => files(key).default); - -export default assign( - {}, - ...map(generators, (generator) => - generator({ - service, - request - }) - ) -); diff --git a/packages/ui/certd-ui/src/api/service.js b/packages/ui/certd-ui/src/api/service.js deleted file mode 100644 index 162ab4bd..00000000 --- a/packages/ui/certd-ui/src/api/service.js +++ /dev/null @@ -1,117 +0,0 @@ -import axios from "axios"; -import { get } from "lodash-es"; -import { errorLog, errorCreate } from "./tools"; -import { env } from "/src/utils/util.env"; -/** - * @description 创建请求实例 - */ -function createService() { - // 创建一个 axios 实例 - const service = axios.create(); - // 请求拦截 - service.interceptors.request.use( - (config) => config, - (error) => { - // 发送失败 - console.log(error); - return Promise.reject(error); - } - ); - // 响应拦截 - service.interceptors.response.use( - (response) => { - console.log("response.config", response.config); - if (response.config.responseType === "blob") { - return response; - } - // dataAxios 是 axios 返回数据中的 data - const dataAxios = response.data; - // 这个状态码是和后端约定的 - const { code } = dataAxios; - // 根据 code 进行判断 - if (code === undefined) { - // 如果没有 code 代表这不是项目后端开发的接口 比如可能是 D2Admin 请求最新版本 - if (response.config.unpack) { - return dataAxios; - } - return dataAxios.data; - } else { - // 有 code 代表这是一个后端接口 可以进行进一步的判断 - switch (code) { - case 0: - // [ 示例 ] code === 0 代表没有错误 - return dataAxios.data; - default: - // 不是正确的 code - errorCreate(`${dataAxios.msg}: ${response.config.url}`); - return dataAxios; - } - } - }, - (error) => { - const status = get(error, "response.status"); - switch (status) { - case 400: - error.message = "请求错误"; - break; - case 401: - error.message = "未授权,请登录"; - break; - case 403: - error.message = "拒绝访问"; - break; - case 404: - error.message = `请求地址出错: ${error.response.config.url}`; - break; - case 408: - error.message = "请求超时"; - break; - case 500: - error.message = "服务器内部错误"; - break; - case 501: - error.message = "服务未实现"; - break; - case 502: - error.message = "网关错误"; - break; - case 503: - error.message = "服务不可用"; - break; - case 504: - error.message = "网关超时"; - break; - case 505: - error.message = "HTTP版本不受支持"; - break; - default: - break; - } - errorLog(error); - return Promise.reject(error); - } - ); - return service; -} - -/** - * @description 创建请求方法 - * @param {Object} service axios 实例 - */ -function createRequestFunction(service) { - return function (config) { - const configDefault = { - headers: { - "Content-Type": get(config, "headers.Content-Type", "application/json") - }, - timeout: 5000, - baseURL: env.API, - data: {} - }; - return service(Object.assign(configDefault, config)); - }; -} - -// 用于真实网络请求的实例和请求方法 -export const service = createService(); -export const request = createRequestFunction(service); diff --git a/packages/ui/certd-ui/src/api/tools.js b/packages/ui/certd-ui/src/api/tools.js deleted file mode 100644 index d35f5064..00000000 --- a/packages/ui/certd-ui/src/api/tools.js +++ /dev/null @@ -1,68 +0,0 @@ -import { notification } from "ant-design-vue"; - -/** - * @description 安全地解析 json 字符串 - * @param {String} jsonString 需要解析的 json 字符串 - * @param {String} defaultValue 默认值 - */ -export function parse(jsonString = "{}", defaultValue = {}) { - let result = defaultValue; - try { - result = JSON.parse(jsonString); - } catch (error) { - console.log(error); - } - return result; -} - -/** - * @description 接口请求返回 - * @param {Any} data 返回值 - * @param {String} msg 状态信息 - * @param {Number} code 状态码 - */ -export function response(data = {}, msg = "", code = 0) { - return [200, { code, msg, data }]; -} - -/** - * @description 接口请求返回 正确返回 - * @param {Any} data 返回值 - * @param {String} msg 状态信息 - */ -export function responseSuccess(data = {}, msg = "成功") { - return response(data, msg); -} - -/** - * @description 接口请求返回 错误返回 - * @param {Any} data 返回值 - * @param {String} msg 状态信息 - * @param {Number} code 状态码 - */ -export function responseError(data = {}, msg = "请求失败", code = 500) { - return response(data, msg, code); -} - -/** - * @description 记录和显示错误 - * @param {Error} error 错误对象 - */ -export function errorLog(error) { - // 打印到控制台 - console.log(error); - // 显示提示 - notification.error({ - message: error.message - }); -} - -/** - * @description 创建一个错误 - * @param {String} msg 错误信息 - */ -export function errorCreate(msg) { - const error = new Error(msg); - errorLog(error); - throw error; -} diff --git a/packages/ui/certd-ui/src/api/util.input.handler.js b/packages/ui/certd-ui/src/api/util.input.handler.js deleted file mode 100644 index fc1b79e7..00000000 --- a/packages/ui/certd-ui/src/api/util.input.handler.js +++ /dev/null @@ -1,35 +0,0 @@ -import _ from "lodash-es"; - -function handleInputs(inputs) { - if (inputs == null) { - return; - } - _.forEach(inputs, (item, key) => { - if (item.required === true) { - if (item.component == null) { - item.component = {}; - } - let rules = item.component.rules; - if (rules == null) { - item.component.rules = rules = []; - } - if (rules.length > 0) { - const hasRequired = rules.filter((rule) => { - return rule.required === true; - }); - if (hasRequired.length > 0) { - return; - } - } - rules.push({ required: true, message: "该项必填" }); - delete item.required; - } - }); -} -export default { - handle(list) { - _.forEach(list, (item) => { - handleInputs(item.input); - }); - } -}; diff --git a/packages/ui/certd-ui/src/assets/favicon.ico b/packages/ui/certd-ui/src/assets/favicon.ico deleted file mode 100644 index b34e3e8081b839fe28fba43084cceff5badae27c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16958 zcmeI2UuYav6vih>Nu`t~lu$yECQl_WgGebN;%q`FB0iWr6dy!Hd?=+95fLdtbbSyJ zA4Eh-A4Eh%iii{`A|kFxABs<*1PKz1ND&b+eGnsQvi`o=xszjijk5U*wGeFR3{4hr@NYJf4g1H3;EJE&bdDf zo}LT+?~r-NPiHRMZRIcTa{lA<8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ui/certd-ui/src/assets/logo-svg.png deleted file mode 100644 index 5bc5dc18440a64fdba5b6fee0beecbaf1e2a1d54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7542 zcmeHMXH-)`l%^?4ReA?SP(eC^^d=DLO?pv~CMA>r0w#1&YLI4V5eOZF(gL9gC`bzs zdX01g0@9=z*x>H(J^N$-?ap~~-nnzjcjwN#cV^CeYh<8JOT|G&LPA3O1n}5|goO0q zvR@-7j{LnQ)<}Gj`kQF0lTP~mz|U(JC}`wgp6RMXQoMHK2SFL z|L6ZB@P9A@3CFJmhzW23GBGeExgqyFGC8~WbIbQJ+~%K)cCN=>8EtEHI!V2I+7VyF z8&4^W^M9$Q%t;P%`?N}IX(4Qy7%%}#dY$~Rb)IyjJEVMrFtD)F{7zMjx93sr&+1od zR8w(eAX8t5GQdfK(A$qAcC-!jGSO8-)5}NtluBSYTb)PPFq3or_LJLpcgQo3?XmJK z!P56kZeE`h*>_a9!+G%9Fm|B|G=F!QYpeuj9(I|>SGopSUeUD>y~_9OK4VcWbw%MUN;%7VoCE(M@GuV;_31~c z)P!4~S;?F8YcIYfzGr2Tz{`lh63=HI& zT)0fqbPJ7}Sgvc_oG(kK$#@4qm^_h4mnf!&=?J-FquJ4H^CO39ilap(v+p;`^YinA zmDWMS(`Tr55AdW{H8>x)PS~inKRdI-)h}Rx7Z8u?`alCZ;tKrlv`MoH+f`^q(|E;X z8O)+GFptlD4}7H3UuIJciPE?b@g0P2zl}}e;GOtdyDiD5bd!UHYhetv0gnK!OFy`$ zxCFrEYp9}avYENZ=TOTueDeY#)(v|ikLUnFTAQ6RZCebgXwGEsGiuyRcfR>6Th=UR zEW%{itt6<+y&%Q^`8hU?(ien!Cy3gC zn_rOQGu=WXff=v)=BcjS&yVk=z={lSJ;rg2hlBj%O-_h~8Nq4#bGASd>J7-+Zey+> z$Gey{ru;GCn|~93G-6MM;553aGNT&-0t>BZhu()G_33fjbrB#tgT0RiynsnWq<&{i zI7kVyY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8dfQhV|V{!$ln&AyOwzz-uD0`j1a3Oa_37{-ds) zE#3uwV%SPuev}ay+2;YHlKo}Gwzsk#mt;CxI!ISz)M$#=b}NPCZ0wJ=WS0AM(Zv)9 zCPeWkn$nk;P!45J<}I7aA4b~k1SJ4diFiF z`pv3>;eAr?MEw8?U30R~@=cqvxdPAzMO3)&7Y@P*?5KUuO=zOU@D@@qfhJk@?`L~e zmj!n}vlR%JPFPySnRam1j}NzE1BAwiGLP3cSW?n^59OULAy-4;s4b0{>gcHA8k?vZ=I z*kU_AMU**6k^|OB2j;mwO1Wr$^gh0Jxb((5f_D88#|q25LN*6a;G#*$!amefr#k#LG*pB?SFw71-G5ek@NTc3Ql>IvBiFvcRIsh9yqBj-DR%w4P(FH(3Ek*r z=r0cjfAobB5TXskrPqj;q5JRD^tQDylFjJ`Dt;~x@4er}e$|5Co|<`oBg+OPRAWrk zuM`?%8U1mO6D*pNq^t>BLDsQf_@z&mAFxo>f0KT7YZF-#PGqoqmVTd_bD(PP*mMmP zvXfRAbcfpdR=mwn*2Jrf+PTXtV7b#KJ{}~T)PIv{{Hk8s|Ge0c{WboRH1&j24LSpJ z%q{Fays7wc0@*M-UDvQL zqqLZYhWdVUxMSn*$3evbXB~bn>sXXjSi^OWxlgl*(WUcQrwN^)Vv!2>hqeBAIoVW& z(PP@}TZZAXTkV<~*?-k^{D8uDQZy#N|FRD;z|`i>e5Fk;&br7s#0ho1UHm!sz7Gt{CaU7*q529SaU3a#}jByHeYO%4fqi zJ=-^=Hf+`Qu{+r zbV|Pwg1QqA`5kbwZa=rh0`p{!C{DKYMNURMs5#e@ z8w2;pg*|k6kG@9Vz1Nz4^0ciNyvn+)40N1$mQ~nk+#CejIVPNZyec#>--svv&-~wS b=e)netp4VUk;9PGm)4(X8azg-Ka2bicCg4i diff --git a/packages/ui/certd-ui/src/assets/logo.svg b/packages/ui/certd-ui/src/assets/logo.svg deleted file mode 100644 index 227548cc..00000000 --- a/packages/ui/certd-ui/src/assets/logo.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/packages/ui/certd-ui/src/components/access-provider-selector/access-provider-manager.vue b/packages/ui/certd-ui/src/components/access-provider-selector/access-provider-manager.vue deleted file mode 100644 index 51c2c56e..00000000 --- a/packages/ui/certd-ui/src/components/access-provider-selector/access-provider-manager.vue +++ /dev/null @@ -1,295 +0,0 @@ - - - - - diff --git a/packages/ui/certd-ui/src/components/access-provider-selector/access-provider-selector.vue b/packages/ui/certd-ui/src/components/access-provider-selector/access-provider-selector.vue deleted file mode 100644 index e0e28b86..00000000 --- a/packages/ui/certd-ui/src/components/access-provider-selector/access-provider-selector.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - diff --git a/packages/ui/certd-ui/src/components/component-render.vue b/packages/ui/certd-ui/src/components/component-render.vue deleted file mode 100644 index 890348bb..00000000 --- a/packages/ui/certd-ui/src/components/component-render.vue +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/packages/ui/certd-ui/src/components/d-container.vue b/packages/ui/certd-ui/src/components/d-container.vue deleted file mode 100644 index 75fc5056..00000000 --- a/packages/ui/certd-ui/src/components/d-container.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - - - diff --git a/packages/ui/certd-ui/src/components/index.js b/packages/ui/certd-ui/src/components/index.js deleted file mode 100644 index 0b99f8f3..00000000 --- a/packages/ui/certd-ui/src/components/index.js +++ /dev/null @@ -1,16 +0,0 @@ -import DContainer from './d-container.vue' -import ComponentRender from './component-render.vue' -import AccessProviderSelector from './access-provider-selector/access-provider-selector.vue' - -const list = [ - DContainer, - ComponentRender, - AccessProviderSelector -] -export default { - install (app) { - for (const item of list) { - app.component(item.name, item) - } - } -} diff --git a/packages/ui/certd-ui/src/i18n.js b/packages/ui/certd-ui/src/i18n.js deleted file mode 100644 index 593762fb..00000000 --- a/packages/ui/certd-ui/src/i18n.js +++ /dev/null @@ -1,11 +0,0 @@ -import { createI18n } from 'vue-i18n' -import zh from './locales/zh.json' -import en from './locales/en.json' -export const i18n = createI18n({ - // something vue-i18n options here ... - locale: 'zh', // set current locale - messages: { - en, - zh - } -}) diff --git a/packages/ui/certd-ui/src/icons.js b/packages/ui/certd-ui/src/icons.js deleted file mode 100644 index 70b38c39..00000000 --- a/packages/ui/certd-ui/src/icons.js +++ /dev/null @@ -1,26 +0,0 @@ -import _ from 'lodash' -import { - PlusCircleOutlined, - PlusOutlined, - CheckOutlined, EditOutlined, - ArrowRightOutlined, - NodeIndexOutlined, - ThunderboltOutlined, - DeleteOutlined -} from '@ant-design/icons-vue' - -const icons = { - PlusCircleOutlined, - PlusOutlined, - CheckOutlined, - EditOutlined, - ArrowRightOutlined, - NodeIndexOutlined, - ThunderboltOutlined, - DeleteOutlined -} -export default function (app) { - _.forEach(icons, (item, key) => { - app.component(key, item) - }) -} diff --git a/packages/ui/certd-ui/src/locales/en.json b/packages/ui/certd-ui/src/locales/en.json deleted file mode 100644 index 077404aa..00000000 --- a/packages/ui/certd-ui/src/locales/en.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - -} \ No newline at end of file diff --git a/packages/ui/certd-ui/src/locales/zh.json b/packages/ui/certd-ui/src/locales/zh.json deleted file mode 100644 index 22f15c34..00000000 --- a/packages/ui/certd-ui/src/locales/zh.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "hello": "你好", - "domain": "域名", - "next": "下一步", - "submit": "提交", - "reset": "重置", - "please.input.domain": "请输入域名", - "email": "邮箱" -} diff --git a/packages/ui/certd-ui/src/main.ts b/packages/ui/certd-ui/src/main.ts deleted file mode 100644 index 6696cb1b..00000000 --- a/packages/ui/certd-ui/src/main.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { createApp } from 'vue' -import router from './router' -import App from './App.vue' -import Antd from 'ant-design-vue' -import 'ant-design-vue/dist/antd.css' -import './style/common.less' -import icons from './icons' -import components from './components' -const app = createApp(App) -icons(app) -app.use(Antd) -app.use(components) -app.use(router).mount('#app') diff --git a/packages/ui/certd-ui/src/router/index.js b/packages/ui/certd-ui/src/router/index.js deleted file mode 100644 index ff25ddde..00000000 --- a/packages/ui/certd-ui/src/router/index.js +++ /dev/null @@ -1,24 +0,0 @@ -import { createRouter, createWebHashHistory } from 'vue-router' -import Home from '../views/Home.vue' -import Detail from '../views/detail/index.vue' - -const routes = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/detail', - name: 'detail', - component: Detail - // component: () => import(/* webpackChunkName: "about" */ '../views/About.vue' - } -] - -const router = createRouter({ - history: createWebHashHistory(), - routes -}) - -export default router diff --git a/packages/ui/certd-ui/src/style/common.less b/packages/ui/certd-ui/src/style/common.less deleted file mode 100644 index 7a004381..00000000 --- a/packages/ui/certd-ui/src/style/common.less +++ /dev/null @@ -1,97 +0,0 @@ -div#app { - height: 100% -} - -h1, h2, h3, h4, h5, h6 { - margin-bottom: 0; -} - -.flex-center { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; -} - -.flex-row { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; -} - -.ml-10{ - margin-left:10px; -} -.mt-10{ - margin-top:10px; -} -.mr-10{ - margin-right:10px; -} -.mb-10{ - margin-bottom:10px; -} -.ant-layout { - height: 100% -} - -.ant-form{ - .ant-form-item-children { - &>{ - min-height: 40px; - display: flex; - flex-direction: column; - justify-content: center; - } - } - - .ant-form-explain, .ant-form-extra{ - font-size:12px; - line-height: 1.4; - min-height: 20px; - margin:0px; - padding:0px; - } -} - - -.ant-drawer-body{ - padding:0px; -} -.ant-drawer-content { - - .ant-drawer-wrapper-body{ - display: flex; - flex-direction: column; - } - .ant-drawer-body { - position: relative; - flex:1; - } - -} - - -.d-dialog{ - .ant-modal-body{ - max-height: 60vh; - overflow-y: auto; - } - - @media(min-height:600px) and (max-height:700px){ - .ant-modal-body { - max-height: 50vh - } - } - - @media (max-height:600px) { - .ant-modal-body { - max-height: 40vh - } - } - - - - -} diff --git a/packages/ui/certd-ui/src/utils/util.common.js b/packages/ui/certd-ui/src/utils/util.common.js deleted file mode 100644 index 47e6b51a..00000000 --- a/packages/ui/certd-ui/src/utils/util.common.js +++ /dev/null @@ -1,33 +0,0 @@ -import _ from 'lodash-es' -export default { - arrayToMap (array) { - if (!array) { - return {} - } - if (!_.isArray(array)) { - return array - } - const map = {} - for (const item of array) { - if (item.key) { - map[item.key] = item - } - } - return map - }, - mapToArray (map) { - if (!map) { - return [] - } - if (_.isArray(map)) { - return map - } - const array = [] - for (const key in map) { - const item = map[key] - item.key = key - array.push(item) - } - return array - } -} diff --git a/packages/ui/certd-ui/src/utils/util.env.ts b/packages/ui/certd-ui/src/utils/util.env.ts deleted file mode 100644 index d87db909..00000000 --- a/packages/ui/certd-ui/src/utils/util.env.ts +++ /dev/null @@ -1,40 +0,0 @@ -import _ from "lodash-es"; -export function getEnvValue(key) { - // @ts-ignore - return import.meta.env["VITE_APP_" + key]; -} - -export class EnvConfig { - API; - MODE; - STORAGE; - TITLE; - PM_ENABLED; - constructor() { - this.init(); - } - - init() { - // @ts-ignore - _.forEach(import.meta.env, (value, key) => { - if (key.startsWith("VITE_APP")) { - key = key.replace("VITE_APP_", ""); - this[key] = value; - } - }); - // @ts-ignore - this.MODE = import.meta.env.MODE; - } - - get(key, defaultValue) { - return this[key] ?? defaultValue; - } - isDev() { - return this.MODE === "development" || this.MODE === "debug"; - } - isProd() { - return this.MODE === "production"; - } -} - -export const env = new EnvConfig(); diff --git a/packages/ui/certd-ui/src/views/Home.vue b/packages/ui/certd-ui/src/views/Home.vue deleted file mode 100644 index 131fa026..00000000 --- a/packages/ui/certd-ui/src/views/Home.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - diff --git a/packages/ui/certd-ui/src/views/detail/components/cert-form.vue b/packages/ui/certd-ui/src/views/detail/components/cert-form.vue deleted file mode 100644 index a05d8a2f..00000000 --- a/packages/ui/certd-ui/src/views/detail/components/cert-form.vue +++ /dev/null @@ -1,261 +0,0 @@ - - - diff --git a/packages/ui/certd-ui/src/views/detail/components/task-form.vue b/packages/ui/certd-ui/src/views/detail/components/task-form.vue deleted file mode 100644 index dbbb613b..00000000 --- a/packages/ui/certd-ui/src/views/detail/components/task-form.vue +++ /dev/null @@ -1,314 +0,0 @@ - - - - - diff --git a/packages/ui/certd-ui/src/views/detail/index.vue b/packages/ui/certd-ui/src/views/detail/index.vue deleted file mode 100644 index cefce70d..00000000 --- a/packages/ui/certd-ui/src/views/detail/index.vue +++ /dev/null @@ -1,502 +0,0 @@ - - - diff --git a/packages/ui/certd-ui/tests/unit/example.spec.js b/packages/ui/certd-ui/tests/unit/example.spec.js deleted file mode 100644 index bc9939b6..00000000 --- a/packages/ui/certd-ui/tests/unit/example.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -import { expect } from 'chai' -import { shallowMount } from '@vue/test-utils' -import HelloWorld from '@/components/HelloWorld.vue' - -describe('HelloWorld.vue', () => { - it('renders props.msg when passed', () => { - const msg = 'new message' - const wrapper = shallowMount(HelloWorld, { - props: { msg } - }) - expect(wrapper.text()).to.include(msg) - }) -}) diff --git a/packages/ui/certd-ui/tsconfig.json b/packages/ui/certd-ui/tsconfig.json deleted file mode 100644 index bdb44e0f..00000000 --- a/packages/ui/certd-ui/tsconfig.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "compilerOptions": { - // 这样就可以对 `this` 上的数据属性进行更严格的推断` - "noImplicitAny": false, - "target": "esnext", - "module": "esnext", - "strict": true, - "jsx": "preserve", - "importHelpers": true, - "moduleResolution": "node", - "experimentalDecorators": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "sourceMap": true, - "baseUrl": ".", - "outDir": "./dist/ts", - "types": [ - "mocha", - "chai", - "node" - ], - "paths": { - "/@/*": ["src/*"], - "/src/*": ["src/*"], - "/#/*": ["types/*"] - }, - "lib": [ - "esnext", - "dom", - "dom.iterable", - "scripthost" - ] - }, - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - "src/**/*.vue", - "tests/**/*.ts", - "tests/**/*.tsx" - ], - "exclude": [ - "node_modules" - ] -} diff --git a/packages/ui/certd-ui/vite.config.ts b/packages/ui/certd-ui/vite.config.ts deleted file mode 100644 index 4737cca7..00000000 --- a/packages/ui/certd-ui/vite.config.ts +++ /dev/null @@ -1,66 +0,0 @@ -import vue from "@vitejs/plugin-vue"; -import vueJsx from "@vitejs/plugin-vue-jsx"; -import visualizer from "rollup-plugin-visualizer"; -import viteCompression from "vite-plugin-compression"; -import * as path from "path"; -// import { generateModifyVars } from "./build/modify-vars"; -// import { configThemePlugin } from "./build/theme-plugin"; -// import OptimizationPersist from "vite-plugin-optimize-persist"; -// import PkgConfig from "vite-plugin-package-config"; -// https://vitejs.dev/config/ -// 增加环境变量 _ -process.env.VITE_APP_VERSION = require("./package.json").version; -process.env.VITE_APP_BUILD_TIME = require("dayjs")().format("YYYY-M-D HH:mm:ss"); - -export default ({ command, mode }) => { - console.log("args", command, mode); - - const devServerFs: any = {}; - const devAlias: any[] = []; - return { - base: "/", - plugins: [ - vueJsx(), - vue(), - // 压缩build后的代码 - viteCompression() - ], - esbuild: { - // pure: ["console.log", "debugger"], - jsxFactory: "h", - jsxFragment: "Fragment" - }, - resolve: { - alias: [ - ...devAlias, - { find: "/@", replacement: path.resolve("./src") }, - { find: "/#", replacement: path.resolve("./types") } - ], - dedupe: ["vue"] - }, - build: { - rollupOptions: { - plugins: [visualizer()] - } - }, - css: { - preprocessorOptions: { - less: { - // 修改默认主题颜色,配置less变量 - // modifyVars: generateModifyVars(), - javascriptEnabled: true - } - } - }, - server: { - fs: devServerFs, - proxy: { - // with options - "/api": { - //配套后端 https://github.com/fast-crud/fs-server-js - target: "http://127.0.0.1:3000" - } - } - } - }; -};