mirror of
https://github.com/certd/certd.git
synced 2026-07-18 20:17:34 +08:00
fix: 修复上传到cos报runtimeDepsService未初始化的问题
This commit is contained in:
@@ -10,12 +10,15 @@ export class VolcengineCdnClient {
|
||||
this.opts = opts;
|
||||
}
|
||||
|
||||
async importRuntime(packageName: string) {
|
||||
return this.opts.access.importRuntime(packageName);
|
||||
}
|
||||
|
||||
async getCdnClient() {
|
||||
if (this.service) {
|
||||
return this.service;
|
||||
}
|
||||
const importRuntime = this.opts.importRuntime || this.opts.access.importRuntime.bind(this.opts.access);
|
||||
const { cdn } = await importRuntime("@volcengine/openapi");
|
||||
const { cdn } = await this.importRuntime("@volcengine/openapi");
|
||||
const service = new cdn.CdnService();
|
||||
// 设置ak、sk
|
||||
service.setAccessKeyId(this.opts.access.accessKeyId);
|
||||
|
||||
Reference in New Issue
Block a user