Socket
Socket
Sign inDemoInstall

serverless-leo

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-leo - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

README.md

16

lib/leo.js

@@ -10,11 +10,15 @@ 'use strict';

const stage = this.serverless.service.custom.stage;
const custom = this.serverless.service.custom[stage] ? this.serverless.service.custom[stage] : this.serverless.service.custom
const cloudformation = this.serverless.service.provider.compiledCloudFormationTemplate
const customInstall = {
"Type": "Custom::Install",
"Properties": {
"ServiceToken": {
"Fn::ImportValue": {
"Fn::Sub": `${this.serverless.service.custom[stage].leoStack || this.serverless.service.custom.leoStack}-Register`
}
},
"Properties": {}
}
if (custom.leoRegister) {
customInstall.Properties.ServiceToken = custom.leoRegister
} else {
customInstall.Properties.ServiceToken = {
"Fn::ImportValue": {
"Fn::Sub": `${custom.leoStack}-Register`
}
}

@@ -21,0 +25,0 @@ }

@@ -9,2 +9,3 @@ 'use strict';

const stage = this.provider.getStage()
const custom = this.serverless.service.custom[stage] ? this.serverless.service.custom[stage] : this.serverless.service.custom

@@ -20,6 +21,17 @@ _.forEach(this.serverless.service.functions, (functionObject, functionName) => {

if (streams.length && (!this.serverless.service.custom || (!this.serverless.service.custom.leoStack && !this.serverless.service.custom[stage].leoStack))) {
throw new Error(`Leo streams require the custom "leoStack" variable in the serverless yml. Optionally under custom[stage]`)
if (!streams.length) {
return {
streams,
}
}
if (!this.serverless.service.custom) {
throw new Error(`Leo streams require custom variables. Please verify your serverless.yml.`)
}
if (!custom.leoStack && !custom.leoRegister) {
throw new Error(`Leo streams require the custom "leoStack" or "leoRegister" variable. Optionally under custom[stage]. Please verify your serverless.yml.`)
}
return {

@@ -26,0 +38,0 @@ streams,

{
"name": "serverless-leo",
"version": "1.0.0",
"version": "1.0.1",
"description": "Serverless plugin for leo microservices",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc