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 2.0.9 to 2.0.10

2

package.json
{
"name": "@serverless/domain",
"version": "2.0.9",
"version": "2.0.10",
"main": "./serverless.js",

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

@@ -15,2 +15,3 @@ # Domain

inputs:
privateZone: false
domain: mywebsite.com

@@ -17,0 +18,0 @@ subdomains:

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

inputs.region = inputs.region || 'us-east-1'
inputs.privateZone = inputs.privateZone || false

@@ -43,3 +44,3 @@ if (!inputs.domain) {

// Get AWS SDK Clients
const clients = getClients(this.context.credentials.aws)
const clients = getClients(this.context.credentials.aws, inputs.region)

@@ -49,2 +50,3 @@ this.context.debug(`Formatting domains and identifying cloud services being used.`)

this.state.region = inputs.region
this.state.privateZone = JSON.parse(inputs.privateZone)
this.state.domain = inputs.domain

@@ -55,3 +57,7 @@ this.state.subdomains = subdomains

this.context.debug(`Getting the Hosted Zone ID for the domain ${inputs.domain}.`)
const domainHostedZoneId = await getDomainHostedZoneId(clients.route53, inputs.domain)
const domainHostedZoneId = await getDomainHostedZoneId(
clients.route53,
inputs.domain,
inputs.privateZone
)

@@ -179,3 +185,7 @@ this.context.debug(

this.context.debug(`Getting the Hosted Zone ID for the domain ${this.state.domain}.`)
const domainHostedZoneId = await getDomainHostedZoneId(clients.route53, this.state.domain)
const domainHostedZoneId = await getDomainHostedZoneId(
clients.route53,
this.state.domain,
this.state.privateZone
)

@@ -182,0 +192,0 @@ for (const subdomain in this.state.subdomains) {

@@ -96,3 +96,3 @@ const aws = require('aws-sdk')

const getDomainHostedZoneId = async (route53, domain) => {
const getDomainHostedZoneId = async (route53, domain, privateZone) => {
const hostedZonesRes = await route53.listHostedZonesByName().promise()

@@ -102,3 +102,3 @@

// Name has a period at the end, so we're using includes rather than equals
(zone) => zone.Name.includes(domain)
(zone) => zone.Config.PrivateZone === privateZone && zone.Name.includes(domain)
)

@@ -609,2 +609,3 @@

// 5. then make our changes
// todo maybe we should add ALL error codes returned from CloudFront/S3?!
params.DistributionConfig.CustomErrorResponses = {

@@ -665,3 +666,3 @@ Quantity: 2,

Quantity: 1,
Items: ['/index.html']
Items: ['/*']
}

@@ -668,0 +669,0 @@ }

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