@@ -150,14 +150,14 @@ class Apigw {
150
150
} )
151
151
if ( detail && detail . apiId ) {
152
152
exist = true
153
- console . debug ( `Updating api with api id ${ endpoint . apiId } .` )
153
+ console . log ( `Updating api with api id ${ endpoint . apiId } .` )
154
154
await this . request ( {
155
155
Action : 'ModifyApi' ,
156
156
apiId : endpoint . apiId ,
157
157
...apiInputs
158
158
} )
159
159
output . apiId = endpoint . apiId
160
- console . debug ( `Service with id ${ output . apiId } updated.` )
160
+ console . log ( `Service with id ${ output . apiId } updated.` )
161
161
}
162
162
} catch ( e ) { }
163
163
}
@@ -168,7 +168,7 @@ class Apigw {
168
168
} )
169
169
output . apiId = apiId
170
170
output . created = true
171
- console . debug ( `API with id ${ output . apiId } created.` )
171
+ console . log ( `API with id ${ output . apiId } created.` )
172
172
}
173
173
174
174
const { internalDomain } = await this . request ( {
@@ -188,13 +188,13 @@ class Apigw {
188
188
}
189
189
190
190
if ( secretIds . length === 0 ) {
191
- console . debug ( `Creating a new Secret key.` )
191
+ console . log ( `Creating a new Secret key.` )
192
192
const { secretId, secretKey } = await this . request ( {
193
193
Action : 'CreateApiKey' ,
194
194
secretName : secretName ,
195
195
type : 'auto'
196
196
} )
197
- console . debug ( `Secret key with ID ${ secretId } and key ${ secretKey } updated.` )
197
+ console . log ( `Secret key with ID ${ secretId } and key ${ secretKey } updated.` )
198
198
secretIdsOutput . secretIds = [ secretId ]
199
199
secretIdsOutput . created = true
200
200
} else {
@@ -219,14 +219,14 @@ class Apigw {
219
219
found = true
220
220
} else {
221
221
disable = true
222
- console . debug ( `There is a disabled secret key: ${ secretId } , cannot be bound` )
222
+ console . log ( `There is a disabled secret key: ${ secretId } , cannot be bound` )
223
223
}
224
224
break
225
225
}
226
226
}
227
227
if ( ! found ) {
228
228
if ( ! disable ) {
229
- console . debug ( `Secret key id ${ secretId } does't exist` )
229
+ console . log ( `Secret key id ${ secretId } does't exist` )
230
230
}
231
231
} else {
232
232
ids . push ( secretId )
@@ -258,9 +258,9 @@ class Apigw {
258
258
} )
259
259
usagePlanOutput . id = createUsagePlan . usagePlanId
260
260
usagePlanOutput . created = true
261
- console . debug ( `Usage plan with ID ${ usagePlanOutput . id } created.` )
261
+ console . log ( `Usage plan with ID ${ usagePlanOutput . id } created.` )
262
262
} else {
263
- console . debug ( `Updating usage plan with id ${ usagePlan . usagePlanId } .` )
263
+ console . log ( `Updating usage plan with id ${ usagePlan . usagePlanId } .` )
264
264
await this . request ( {
265
265
Action : 'ModifyUsagePlan' ,
266
266
usagePlanId : usagePlanOutput . id ,
@@ -320,7 +320,7 @@ class Apigw {
320
320
for ( let j = 0 ; j < stateDomains . length ; j ++ ) {
321
321
// only list subDomain and created in state
322
322
if ( stateDomains [ j ] . subDomain === domainItem . domainName ) {
323
- console . debug (
323
+ console . log (
324
324
`Start unbind previus domain ${ domainItem . domainName } for service ${ serviceId } `
325
325
)
326
326
await this . request ( {
@@ -335,7 +335,7 @@ class Apigw {
335
335
// 2. bind user config domain
336
336
const customDomainOutput = [ ]
337
337
if ( customDomains && customDomains . length > 0 ) {
338
- console . debug ( `Start bind custom domain for service ${ serviceId } ` )
338
+ console . log ( `Start bind custom domain for service ${ serviceId } ` )
339
339
for ( let i = 0 ; i < customDomains . length ; i ++ ) {
340
340
const domainItem = customDomains [ i ]
341
341
const domainProtocol = domainItem . protocols
@@ -358,8 +358,8 @@ class Apigw {
358
358
subDomain : domainItem . domain ,
359
359
cname : subDomain
360
360
} )
361
- console . debug ( `Custom domain for service ${ serviceId } created successfullly.` )
362
- console . debug ( `Please add CNAME record ${ subDomain } for ${ domainItem . domain } .` )
361
+ console . log ( `Custom domain for service ${ serviceId } created successfullly.` )
362
+ console . log ( `Please add CNAME record ${ subDomain } for ${ domainItem . domain } .` )
363
363
}
364
364
}
365
365
@@ -383,11 +383,11 @@ class Apigw {
383
383
384
384
const oldUsagePlan = usagePlanList . find ( ( item ) => item . usagePlanId === usagePlan . id )
385
385
if ( oldUsagePlan ) {
386
- console . debug (
386
+ console . log (
387
387
`Usage plan with id ${ usagePlan . id } already bind to api id ${ apiId } path ${ endpoint . method } ${ endpoint . path } .`
388
388
)
389
389
} else {
390
- console . debug (
390
+ console . log (
391
391
`Binding usage plan with id ${ usagePlan . id } to api id ${ apiId } path ${ endpoint . method } ${ endpoint . path } .`
392
392
)
393
393
await this . request ( {
@@ -398,7 +398,7 @@ class Apigw {
398
398
usagePlanIds : [ usagePlan . id ] ,
399
399
apiIds : [ apiId ]
400
400
} )
401
- console . debug ( 'Binding successed.' )
401
+ console . log ( 'Binding successed.' )
402
402
}
403
403
}
404
404
@@ -455,15 +455,15 @@ class Apigw {
455
455
secretIds : secrets . secretIds
456
456
} )
457
457
if ( unboundSecretIds . length > 0 ) {
458
- console . debug (
458
+ console . log (
459
459
`Binding secret key ${ unboundSecretIds } to usage plan with id ${ usagePlan . id } .`
460
460
)
461
461
await this . request ( {
462
462
Action : 'BindSecretIds' ,
463
463
usagePlanId : usagePlan . id ,
464
464
secretIds : unboundSecretIds
465
465
} )
466
- console . debug ( 'Binding secret key successed.' )
466
+ console . log ( 'Binding secret key successed.' )
467
467
}
468
468
// store in api list
469
469
curApi . usagePlan . secrets = secrets
@@ -480,12 +480,12 @@ class Apigw {
480
480
}
481
481
482
482
apiList . push ( curApi )
483
- console . debug (
483
+ console . log (
484
484
`Deployment successful for the api named ${ endpoint . apiName } in the ${ this . region } region.`
485
485
)
486
486
}
487
487
488
- console . debug ( `Deploying service with id ${ serviceId } .` )
488
+ console . log ( `Deploying service with id ${ serviceId } .` )
489
489
await this . request ( {
490
490
Action : 'ReleaseService' ,
491
491
serviceId : serviceId ,
@@ -532,7 +532,7 @@ class Apigw {
532
532
secretIds : secrets . secretIds ,
533
533
usagePlanId : curApi . usagePlan . id
534
534
} )
535
- console . debug ( `Unbinding secret key to usage plan with ID ${ curApi . usagePlan . id } .` )
535
+ console . log ( `Unbinding secret key to usage plan with ID ${ curApi . usagePlan . id } .` )
536
536
537
537
// delelet all created api key
538
538
if ( curApi . usagePlan . secrets . created === true ) {
@@ -546,7 +546,7 @@ class Apigw {
546
546
Action : 'DeleteApiKey' ,
547
547
secretId
548
548
} )
549
- console . debug ( `Removing any previously deployed secret key. ${ secretId } ` )
549
+ console . log ( `Removing any previously deployed secret key. ${ secretId } ` )
550
550
}
551
551
}
552
552
}
@@ -560,13 +560,13 @@ class Apigw {
560
560
bindType : curApi . bindType ,
561
561
apiIds : [ curApi . apiId ]
562
562
} )
563
- console . debug (
563
+ console . log (
564
564
`Unbinding usage plan with ID ${ curApi . usagePlan . id } to service with ID ${ serviceId } .`
565
565
)
566
566
567
567
// 1.3 delete created usage plan
568
568
if ( curApi . usagePlan . created === true ) {
569
- console . debug ( `Removing any previously deployed usage plan ids ${ curApi . usagePlan . id } ` )
569
+ console . log ( `Removing any previously deployed usage plan ids ${ curApi . usagePlan . id } ` )
570
570
await this . request ( {
571
571
Action : 'DeleteUsagePlan' ,
572
572
usagePlanId : curApi . usagePlan . id
@@ -576,7 +576,7 @@ class Apigw {
576
576
577
577
// 2. delete only apis created by serverless framework
578
578
if ( curApi . apiId && curApi . created === true ) {
579
- console . debug ( `Removing api: ${ curApi . apiId } ` )
579
+ console . log ( `Removing api: ${ curApi . apiId } ` )
580
580
await this . request ( {
581
581
Action : 'DeleteApi' ,
582
582
apiId : curApi . apiId ,
@@ -590,7 +590,7 @@ class Apigw {
590
590
for ( let i = 0 ; i < customDomains . length ; i ++ ) {
591
591
const curDomain = customDomains [ i ]
592
592
if ( curDomain . subDomain && curDomain . created === true ) {
593
- console . debug ( `Unbinding custom domain: ${ curDomain . subDomain } ` )
593
+ console . log ( `Unbinding custom domain: ${ curDomain . subDomain } ` )
594
594
await this . request ( {
595
595
Action : 'UnBindSubDomain' ,
596
596
serviceId,
@@ -601,7 +601,7 @@ class Apigw {
601
601
}
602
602
603
603
// 3. unrelease service
604
- console . debug ( `Unreleasing service: ${ serviceId } , environment: ${ environment } ` )
604
+ console . log ( `Unreleasing service: ${ serviceId } , environment: ${ environment } ` )
605
605
await this . request ( {
606
606
Action : 'UnReleaseService' ,
607
607
serviceId,
@@ -611,7 +611,7 @@ class Apigw {
611
611
612
612
if ( created === true ) {
613
613
// delete service
614
- console . debug ( `Removing service: ${ serviceId } ` )
614
+ console . log ( `Removing service: ${ serviceId } ` )
615
615
await this . request ( {
616
616
Action : 'DeleteService' ,
617
617
serviceId
0 commit comments