Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arnie

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arnie - npm Package Compare versions

Comparing version 0.2.7 to 0.2.8

14

lib/adapters/serverless.js

@@ -11,2 +11,6 @@ 'use strict';

var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -19,6 +23,12 @@

module.exports = function (options) {
// TODO: Allow passing additional providers and options
var providers = [HttpResponseProvider(), ServerlessRequestProvider()];
if (Array.isArray(options.providers)) {
providers.push.apply(providers, (0, _toConsumableArray3.default)(options.providers));
}
var arnie = A({
providers: [HttpResponseProvider(), ServerlessRequestProvider()]
providers: providers
});
return function (task) {

@@ -25,0 +35,0 @@ return function (event, context, cb) {

2

package.json
{
"name": "arnie",
"version": "0.2.7",
"version": "0.2.8",
"description": "Action hero for backends",

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

@@ -6,9 +6,15 @@ const A = require('../')

module.exports = (options) => {
// TODO: Allow passing additional providers and options
const providers = [
HttpResponseProvider(),
ServerlessRequestProvider()
]
if (Array.isArray(options.providers)) {
providers.push(...options.providers)
}
const arnie = A({
providers: [
HttpResponseProvider(),
ServerlessRequestProvider()
]
providers
})
return (task) => {

@@ -15,0 +21,0 @@ return (event, context, cb) => {

const test = require('tape')
const {setupServerless} = require('../utils/serverless')
const A = require('../../src/adapters/serverless')
const arnie = A()
test('Adapter: Serverless', (t) => {
t.plan(9)
t.plan(10)
const arnie = A({providers: [
(context) => {
context.anotherProvider = 'test'
return context
}
]})
const actionNum = {

@@ -20,2 +26,3 @@ taskA: 0,

(ctx) => {
t.equal(ctx.anotherProvider, 'test', 'should pass additional providers to function-tree')
testExecutionOrder('taskA', 1)

@@ -22,0 +29,0 @@ throw expectedError

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