File tree Expand file tree Collapse file tree 7 files changed +22
-5
lines changed Expand file tree Collapse file tree 7 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,11 @@ export default class Apigw {
80
80
}
81
81
82
82
/** 部署 API 网关 */
83
- async deploy ( inputs : ApigwDeployInputs ) {
83
+ async deploy ( inputs : ApigwDeployInputs ) : Promise < ApigwDeployOutputs | undefined > {
84
+ if ( inputs . ignoreUpdate ) {
85
+ console . log ( 'API Gateway update ignored' ) ;
86
+ return ;
87
+ }
84
88
const {
85
89
environment = 'release' as const ,
86
90
oldState = { } ,
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ export interface ApiDeployInputs {
181
181
}
182
182
183
183
export interface ApigwDeployInputs extends ApigwCreateServiceInputs , ApigwBindCustomDomainInputs {
184
+ ignoreUpdate ?: boolean ;
184
185
region ?: RegionType ;
185
186
oldState ?: any ;
186
187
environment ?: EnviromentType ;
Original file line number Diff line number Diff line change @@ -65,7 +65,11 @@ export default class Cdn {
65
65
}
66
66
67
67
/** 部署 CDN */
68
- async deploy ( inputs : CdnDeployInputs ) {
68
+ async deploy ( inputs : CdnDeployInputs ) : Promise < CdnOutputs | undefined > {
69
+ if ( inputs . ignoreUpdate ) {
70
+ console . log ( 'CDN update ignored' ) ;
71
+ return ;
72
+ }
69
73
await openCdnService ( this . capi ) ;
70
74
const { oldState = { } } = inputs ;
71
75
delete inputs . oldState ;
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ export interface CertInfo {
10
10
export interface CdnDeployInputs {
11
11
oldState ?: any ;
12
12
13
+ ignoreUpdate ?: boolean ;
14
+
13
15
area : string ;
14
16
15
17
/** 是否等待 CDN 部署完毕 */
@@ -102,8 +104,9 @@ export interface CdnOutputs {
102
104
domain : string ;
103
105
origins : string [ ] ;
104
106
cname : string ;
105
- inputCache : string ;
107
+ inputCache ? : string ;
106
108
resourceId ?: string ;
107
109
108
110
tags ?: TagInput [ ] ;
111
+ refreshUrls ?: string [ ] ;
109
112
}
Original file line number Diff line number Diff line change @@ -628,7 +628,11 @@ export default class Cos {
628
628
return `${ inputs . bucket } .cos-website.${ this . region } .myqcloud.com` ;
629
629
}
630
630
631
- async deploy ( inputs : CosDeployInputs = { } ) {
631
+ async deploy ( inputs : CosDeployInputs = { } ) : Promise < CosDeployInputs | undefined > {
632
+ if ( inputs . ignoreUpdate ) {
633
+ console . log ( 'COS update ignored' ) ;
634
+ return ;
635
+ }
632
636
await this . createBucket ( inputs ) ;
633
637
if ( inputs . acl ) {
634
638
await this . setAcl ( inputs ) ;
Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ export interface CosDeployInputs
192
192
CosSetLifecycleInputs ,
193
193
CosSetVersioningInputs ,
194
194
CosWebsiteInputs {
195
+ ignoreUpdate ?: boolean ;
195
196
keyPrefix ?: string ;
196
197
rules ?: {
197
198
status ?: string ;
Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ export class TriggerManager {
384
384
netTypes : parameters ?. netTypes ,
385
385
} ) ;
386
386
outputs . created = true ;
387
- outputs . serviceId = res . serviceId ;
387
+ outputs . serviceId = res ? .serviceId ;
388
388
}
389
389
return outputs ;
390
390
}
You can’t perform that action at this time.
0 commit comments