mirror of
https://github.com/certd/certd.git
synced 2026-07-26 22:09:04 +08:00
fix: 修复上传到cos报runtimeDepsService未初始化的问题
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ILogger, utils } from "@certd/basic";
|
||||
import { ILogger, utils } from "@certd/basic";
|
||||
import { AliyunAccess } from "../access/index.js";
|
||||
import { AliyunClient } from "./index.js";
|
||||
import { CertInfo, CertReader, SimpleCertDetail } from "@certd/plugin-lib";
|
||||
@@ -12,6 +12,7 @@ export type AliyunSslClientOpts = {
|
||||
logger: ILogger;
|
||||
endpoint?: string;
|
||||
region?: string;
|
||||
|
||||
};
|
||||
|
||||
export type AliyunSslGetResourceListReq = {
|
||||
@@ -42,9 +43,11 @@ export type CasCertId = {
|
||||
export class AliyunSslClient {
|
||||
opts: AliyunSslClientOpts;
|
||||
logger: ILogger;
|
||||
|
||||
constructor(opts: AliyunSslClientOpts) {
|
||||
this.opts = opts;
|
||||
this.logger = opts.logger;
|
||||
|
||||
}
|
||||
|
||||
checkRet(ret: any) {
|
||||
@@ -55,7 +58,7 @@ export class AliyunSslClient {
|
||||
|
||||
async getClient() {
|
||||
const access = this.opts.access;
|
||||
const client = new AliyunClient({ logger: this.opts.logger, importRuntime: access.importRuntime.bind(access) });
|
||||
const client = new AliyunClient({ logger: this.opts.logger });
|
||||
|
||||
let endpoint = this.opts.endpoint || "cas.aliyuncs.com";
|
||||
if (this.opts.endpoint == null && this.opts.region) {
|
||||
@@ -251,3 +254,5 @@ export class AliyunSslClient {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user