@@ -49,7 +49,7 @@ class Cdn {
4949 const { oldState = { } } = inputs
5050 delete inputs . oldState
5151 const {
52- SyncFlow = true ,
52+ Async = false ,
5353 Domain,
5454 Origin,
5555 ServiceType = 'web' ,
@@ -111,7 +111,16 @@ class Cdn {
111111 OriginPullTimeout
112112 } )
113113
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+
114122 if ( Https ) {
123+ outputs . https = true
115124 cdnInputs . Https = {
116125 Switch : Https . Switch ,
117126 Http2 : Https . Http2 || 'off' ,
@@ -131,12 +140,6 @@ class Cdn {
131140 const cdnInfo = await getCdnByDomain ( this . capi , Domain )
132141
133142 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- }
140143
141144 const createOrUpdateCdn = async ( ) => {
142145 if ( cdnInfo ) {
@@ -166,7 +169,7 @@ class Cdn {
166169
167170 console . log ( 'Waiting for CDN deploy success, it maybe cost 5 minutes....' )
168171 // When set syncFlow false, just continue, do not wait for online status.
169- if ( SyncFlow ) {
172+ if ( Async === false ) {
170173 await waitResponse ( {
171174 callback : async ( ) => getCdnByDomain ( this . capi , Domain ) ,
172175 targetProp : 'Status' ,
0 commit comments