@@ -49,7 +49,7 @@ class Cdn {
49
49
const { oldState = { } } = inputs
50
50
delete inputs . oldState
51
51
const {
52
- SyncFlow = true ,
52
+ Async = false ,
53
53
Domain,
54
54
Origin,
55
55
ServiceType = 'web' ,
@@ -111,7 +111,16 @@ class Cdn {
111
111
OriginPullTimeout
112
112
} )
113
113
114
+ const outputs = {
115
+ https : false ,
116
+ domain : Domain ,
117
+ origins : cdnInputs . Origin . Origins ,
118
+ cname : `${ Domain } .cdn.dnsv1.com` ,
119
+ inputCache : JSON . stringify ( cdnInputs )
120
+ }
121
+
114
122
if ( Https ) {
123
+ outputs . https = true
115
124
cdnInputs . Https = {
116
125
Switch : Https . Switch ,
117
126
Http2 : Https . Http2 || 'off' ,
@@ -131,12 +140,6 @@ class Cdn {
131
140
const cdnInfo = await getCdnByDomain ( this . capi , Domain )
132
141
133
142
const sourceInputs = JSON . parse ( JSON . stringify ( cdnInputs ) )
134
- const outputs = {
135
- domain : Domain ,
136
- origins : cdnInputs . Origin . Origins ,
137
- cname : `${ Domain } .cdn.dnsv1.com` ,
138
- inputCache : JSON . stringify ( cdnInputs )
139
- }
140
143
141
144
const createOrUpdateCdn = async ( ) => {
142
145
if ( cdnInfo ) {
@@ -166,7 +169,7 @@ class Cdn {
166
169
167
170
console . log ( 'Waiting for CDN deploy success, it maybe cost 5 minutes....' )
168
171
// When set syncFlow false, just continue, do not wait for online status.
169
- if ( SyncFlow ) {
172
+ if ( Async === false ) {
170
173
await waitResponse ( {
171
174
callback : async ( ) => getCdnByDomain ( this . capi , Domain ) ,
172
175
targetProp : 'Status' ,
0 commit comments