mirror of
https://github.com/certd/certd.git
synced 2026-04-24 20:57:26 +08:00
chore: basic 从pipeline中移除
This commit is contained in:
@@ -0,0 +1 @@
|
||||
LEGO_VERSION=4.19.2
|
||||
@@ -19,6 +19,5 @@ run/
|
||||
.clinic
|
||||
|
||||
.env.pgpl.yaml
|
||||
|
||||
tools/windows/*
|
||||
!tools/windows/*.zip
|
||||
tools/*
|
||||
!tools/lego/.keep
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
"@certd/plugin-cert": "^1.27.0",
|
||||
"@certd/plugin-plus": "^1.27.0",
|
||||
"@certd/plus-core": "^1.27.0",
|
||||
"@certd/basic": "^1.27.0",
|
||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
||||
"@koa/cors": "^5.0.0",
|
||||
|
||||
@@ -10,7 +10,7 @@ import { UserEntity } from '../modules/sys/authority/entity/user.js';
|
||||
import { PipelineEntity } from '../modules/pipeline/entity/pipeline.js';
|
||||
//import { logger } from '../utils/logger';
|
||||
// load .env file in process.cwd
|
||||
import { mergeConfig } from './loader.js';
|
||||
import { loadDotEnv, mergeConfig } from './loader.js';
|
||||
import { libServerEntities } from '@certd/lib-server';
|
||||
import { commercialEntities } from '@certd/commercial-core';
|
||||
import { tmpdir } from 'node:os';
|
||||
@@ -123,6 +123,8 @@ const development = {
|
||||
contactLink: '',
|
||||
},
|
||||
} as MidwayConfig;
|
||||
loadDotEnv();
|
||||
|
||||
mergeConfig(development, 'development');
|
||||
|
||||
mergeConfig(development, env);
|
||||
|
||||
@@ -46,3 +46,14 @@ export function mergeConfig(config: any, envType: string) {
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
export function loadDotEnv() {
|
||||
const envStr = fs.readFileSync('.env').toString();
|
||||
envStr.split('\n').forEach(line => {
|
||||
const [key, value] = line.split('=');
|
||||
const oldValue = process.env[key];
|
||||
if (!oldValue) {
|
||||
process.env[key] = value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ export class AsyncSsh2Client {
|
||||
sftp.fastPut(localPath, remotePath, (err: Error) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
this.logger.error('请确认路径是否包含文件名,路径本身不能是目录,路径不能有*?之类的特殊符号,要有写入权限');
|
||||
return;
|
||||
}
|
||||
this.logger.info(`上传文件成功:${localPath} => ${remotePath}`);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user