Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"release": "s registry publish"
},
"dependencies": {
"@alicloud/cdn20180510": "^7.0.2",
"@alicloud/openapi-client": "^0.4.15",
"@alicloud/cdn20180510": "^8.0.0",
"@serverless-devs/core": "^0.1.66"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/refresher/aliyun-cdn-cache-refresher.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AbstractCdnCacheRefresher } from './abstract-cdn-cache-refresher';
import { Config } from '@alicloud/openapi-client';
import { RuntimeOptions } from '@alicloud/tea-util';
import { $OpenApiUtil } from '@alicloud/openapi-core';
import * as $dara from '@darabonba/typescript';
import Client, { RefreshObjectCachesRequest } from '@alicloud/cdn20180510';
import { decryptCredential } from '@serverless-devs/core';
import { Credential } from '../credential';
Expand Down Expand Up @@ -43,7 +43,7 @@ export class AliyunCdnCacheRefresher extends AbstractCdnCacheRefresher {
return previousValue + '\r\n' + currentValue;
});
request.objectType = type;
let options = new RuntimeOptions();
let options = new $dara.RuntimeOptions();
options.autoretry = true;
let response = await this.client.refreshObjectCachesWithOptions(
request,
Expand Down Expand Up @@ -86,7 +86,7 @@ export class AliyunCdnCacheRefresher extends AbstractCdnCacheRefresher {
// https://next.api.aliyun.com/api-tools/sdk/Cdn?version=2018-05-10&language=nodejs-tea

this.client = new Client(
new Config({
new $OpenApiUtil.Config({
accessKeyId,
accessKeySecret,
endpoint: 'cdn.aliyuncs.com',
Expand Down
Loading
Loading