Socket
Socket
Sign inDemoInstall

@serverless/domain

Package Overview
Dependencies
80
Maintainers
5
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.1 to 4.0.3

2

package.json
{
"name": "@serverless/domain",
"version": "4.0.1",
"version": "4.0.3",
"main": "./serverless.js",

@@ -5,0 +5,0 @@ "publishConfig": {

@@ -20,3 +20,4 @@ const { Component } = require('@serverless/core')

removeCloudFrontDomainDnsRecords,
addDomainToCloudfrontDistribution
addDomainToCloudfrontDistribution,
removeDomainFromCloudFrontDistribution
} = require('./utils')

@@ -248,2 +249,6 @@

} else if (domainState.type === 'awsCloudFront') {
this.context.debug(`Removing domain ${domainState.domain} from CloudFront.`)
await removeDomainFromCloudFrontDistribution(clients.cf, subdomain)
this.context.debug(`Removing CloudFront DNS records for domain ${domainState.domain}`)
await removeCloudFrontDomainDnsRecords(

@@ -250,0 +255,0 @@ clients.route53,

@@ -834,2 +834,27 @@ const aws = require('aws-sdk')

const removeDomainFromCloudFrontDistribution = async (cf, subdomain) => {
const params = await cf.getDistributionConfig({ Id: subdomain.distributionId }).promise()
params.IfMatch = params.ETag
delete params.ETag
params.Id = subdomain.distributionId
params.DistributionConfig.Aliases = {
Quantity: 0,
Items: []
}
params.DistributionConfig.ViewerCertificate = {}
const res = await cf.updateDistribution(params).promise()
return {
id: res.Distribution.Id,
arn: res.Distribution.ARN,
url: res.Distribution.DomainName
}
}
/**

@@ -861,3 +886,4 @@ * Exports

removeCloudFrontDomainDnsRecords,
addDomainToCloudfrontDistribution
addDomainToCloudfrontDistribution,
removeDomainFromCloudFrontDistribution
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc