New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@serverless/enterprise-plugin

Package Overview
Dependencies
Maintainers
2
Versions
497
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serverless/enterprise-plugin - npm Package Compare versions

Comparing version 0.1.4 to 0.2.0-2-ge229844

DEVELOPMENT.md

7

dist/lib/plugin.js

@@ -36,2 +36,4 @@ "use strict";

var _variables = require("./variables");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -113,5 +115,6 @@

enterprise: true
} // Set Plugin hooks for all Enteprise Plugin features here
}
};
(0, _variables.hookIntoVariableGetter)(sls); // Set Plugin hooks for all Enteprise Plugin features here
};
this.hooks = {

@@ -118,0 +121,0 @@ 'before:package:createDeploymentArtifacts': this.route('before:package:createDeploymentArtifacts').bind(this),

@@ -26,3 +26,3 @@ "use strict";

regeneratorRuntime.mark(function _callee(ctx) {
var accessKey, cfResources, accountId, cfnStack, apiId, deploymentData, serviceUrlData, serviceUrl;
var accessKey, cfResources, accountId, cfnStack, serviceEndpoint, apiId, deploymentData, serviceUrlData, serviceUrl;
return regeneratorRuntime.wrap(function _callee$(_context) {

@@ -63,6 +63,7 @@ while (1) {

cfnStack = _context.sent;
apiId = _lodash.default.find(cfnStack.Stacks[0].Outputs, function (_ref2) {
serviceEndpoint = _lodash.default.find(cfnStack.Stacks[0].Outputs, function (_ref2) {
var OutputKey = _ref2.OutputKey;
return OutputKey.match(ctx.provider.naming.getServiceEndpointRegex());
}).OutputValue.split('https://')[1].split('.')[0];
});
apiId = serviceEndpoint && serviceEndpoint.OutputValue.split('https://')[1].split('.')[0];
deploymentData = {

@@ -86,6 +87,6 @@ accessKey,

};
_context.next = 19;
_context.next = 20;
return (0, _platformSdk.updateDeployment)(deploymentData);
case 19:
case 20:
// TODO: Track Stat

@@ -103,3 +104,3 @@ serviceUrlData = {

case 23:
case 24:
case "end":

@@ -106,0 +107,0 @@ return _context.stop();

@@ -12,2 +12,4 @@ "use strict";

var _lodash = _interopRequireDefault(require("lodash"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -77,3 +79,3 @@

return _context.abrupt("return");
return _context.abrupt("continue", 4);

@@ -130,3 +132,3 @@ case 9:

if ((_context.t3 = _context.t2()).done) {
_context.next = 32;
_context.next = 33;
break;

@@ -150,6 +152,24 @@ }

ctx.sls.service.functions[fn].handler = `${_func.entryNew}.${_func.handlerNew}`;
if (_lodash.default.get(ctx.sls.service.functions[fn], 'package.individually', _lodash.default.get(ctx.sls.service, 'package.individually', false))) {
// add include directives for handler file & sdk lib
_lodash.default.set(ctx.sls.service.functions[fn], 'package.include', []);
ctx.sls.service.functions[fn].package.include.push(`${_func.entryNew}.js`);
ctx.sls.service.functions[fn].package.include.push('serverless-sdk');
}
_context.next = 23;
break;
case 32:
case 33:
// add include directives for handler file & sdk lib
if (!_lodash.default.get(ctx.sls.service, 'package.individually', false)) {
_lodash.default.set(ctx.sls.service, 'package.include', []);
ctx.sls.service.package.include.push('s-*.js');
ctx.sls.service.package.include.push('serverless-sdk');
}
case 34:
case "end":

@@ -156,0 +176,0 @@ return _context.stop();

{
"name": "@serverless/enterprise-plugin",
"version": "0.1.4",
"version": "0.2.0-2-ge229844",
"description": "The Serverless Enterprise plugin",

@@ -15,3 +15,3 @@ "main": "dist/index.js",

"@babel/polyfill": "^7.2.5",
"@serverless/platform-sdk": "^0.5.0",
"@serverless/platform-sdk": "next",
"flat": "^4.1.0",

@@ -43,3 +43,3 @@ "fs-extra": "^7.0.1",

"author": "",
"license": "ISC"
"license": "Apache-2.0"
}

@@ -1,51 +0,12 @@

# Serverless Enterprise Plugin
# Serverless Framework Enterprise Plugin
[![Build Status](https://travis-ci.com/serverless/enterprise-plugin.svg)](https://travis-ci.com/serverless/enterprise-plugin)
[![license](https://img.shields.io/npm/l/@serverless/enterprise-plugin.svg)](https://www.npmjs.com/package/@serverless/enterprise-plugin)
[![coverage](https://img.shields.io/codecov/c/github/serverless/enterprise-plugin.svg)](https://codecov.io/gh/serverless/enterprise-plugin)
[![Known Vulnerabilities](https://snyk.io/test/github/serverless/enterprise-plugin/badge.svg)](https://snyk.io/test/github/enterprise-plugin)
This is a Serverless Framework plugin which helps you use advanced monitoring, tracing and governance features via Serverless Enterprise.
To enable the various features of the [Serverless Framework Enterprise](https://github.com/serverless/enterprise) for a particular Service you must deploy or redeploy that Service, using Serverless Framework open-source CLI version 1.36.3 or later, with this Enterprise Plugin installed.
The Plugin automatically wraps your functions and instruments them with Serverless Enterprise's monitoring, alerting, logging and tracing features.
- If you are an existing Serverless Framework Enterprise dashboard user and have a previously deployed Service that you now want to configure to use Serverless Insights, Safeguards, Secrets or other Enteprise features, follow these steps to [update an existing Service](./update.md)
- If you are new to the Serverless Framework open source CLI or Serverless Framework Enterprise simply follow the steps in this [new user getting started guide](./getting-started.md#install-the-enterprise-plugin) to get up and running
## Quick-Start
Install the plugin & log into the Serverless Enterprise
```
sls plugin install -n @serverless/enterprise-plugin
sls login
```
### Safeguards
Serverless Enterprise ships with the following safeguards by default:
* no wildcard IAM role statments
* All functions with async events must be configured with a Dead Letter Queue
* Environment variables can not contain secrets
To disable Serverless Safeguards, add this to your configuration:
```yaml
custom:
safeguards: false
```
### Log Collection
Serverless Enterprise automatically aggregates logs. To disable them, set the following options:
```yaml
custom:
enterprise:
collectLambdaLogs: false
```
## Development Notes
You can install the latest versions from the master branch by installing the `next` tag:
```
npm install @serverless/enterprise-plugin@next
```
The project is transpiled with babel, so run `npm run build` before installing it
Currently, the `serverless-sdk` is within this project. On deployment, this plugin copies a
bundled and compressed version of the `serverless-sdk` into your Service package before it's
uploaded.
If you are updating the `serverless-sdk`, ensure you run `npm run build` to rebuild it too
On the next deployment, the new `sdk` will be included.
Upon deployment, the Serverless Framwork Enteprise Plugin will automatically wrap and instrument your functions to work with the Serverless Framework Enterprise dashboard.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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