🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

serverless-spa-apig

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-spa-apig - npm Package Compare versions

Comparing version

to
1.0.4

16

index.js

@@ -45,2 +45,3 @@ const path = require('path');

this.prepareApiGateway(resources);
this.prepareVpcEndpoint(resources);
}

@@ -116,4 +117,19 @@

}
prepareVpcEndpoint(resources) {
const vpcEndpointId = this.serverless.service.custom.apig.vpcEndpointId;
const policy = this.serverless.service.custom.apig.policy;
if (vpcEndpointId) {
resources.Resources.SpaServer.Properties.EndpointConfiguration.Types[0] = 'PRIVATE';
if (policy) {
resources.Resources.SpaServer.Properties.Policy = policy;
}
} else {
delete resources.Resources.SpaServer.Properties.EndpointConfiguration.VpcEndpointIds;
delete resources.Resources.SpaServer.Properties.Policy;
}
}
}
module.exports = Plugin;

2

package.json
{
"name": "serverless-spa-apig",
"version": "1.0.3",
"version": "1.0.4",
"description": "Serverless plugin to configure S3, API Gateway and Route53 for a SPA or JAMStack site.",

@@ -5,0 +5,0 @@ "author": "John Gilbert <john.gilbert@danteinc.com> (danteinc.com)",

@@ -35,2 +35,4 @@ # serverless-spa-apig

# webACLId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# vpcEndpointId: xxxxxx
# policy:
```

Sorry, the diff of this file is not supported yet