serverless-certificate-creator
Advanced tools
Comparing version 1.5.2-rc-next.105 to 1.5.2-rc-next.109
17
index.js
@@ -133,4 +133,11 @@ 'use strict'; | ||
listCertificates() { | ||
return this.acm.listCertificates({}).promise(); | ||
listCertificates(NextToken) { | ||
return this.acm.listCertificates({ NextToken }).promise() | ||
.then(data => { | ||
if (data.NextToken) { | ||
return this.listCertificates(data.NextToken) | ||
.then(moreData => [...moreData, ...data.CertificateSummaryList]); | ||
} | ||
return Promise.resolve(data.CertificateSummaryList) | ||
}) | ||
} | ||
@@ -198,3 +205,3 @@ | ||
let existingCerts = data.CertificateSummaryList.filter(cert => cert.DomainName === this.domain); | ||
let existingCerts = data.filter(cert => cert.DomainName === this.domain); | ||
if (existingCerts.length > 0) { | ||
@@ -528,4 +535,4 @@ return existingCerts[0]; | ||
return this.listCertificates() | ||
.then(({ CertificateSummaryList }) => { | ||
let cert = CertificateSummaryList.filter(({ DomainName }) => DomainName == domainName)[0]; | ||
.then(certificates => { | ||
let cert = certificates.filter(({ DomainName }) => DomainName == domainName)[0]; | ||
if (cert && cert[property]) { | ||
@@ -532,0 +539,0 @@ return cert[property]; |
{ | ||
"name": "serverless-certificate-creator", | ||
"version": "1.5.2-rc-next.105", | ||
"version": "1.5.2-rc-next.109", | ||
"description": "creates a certificate that can be used for custom domains for your api gateway", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30552
475