Socket
Socket
Sign inDemoInstall

@serverless/event-mocks

Package Overview
Dependencies
2
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 1.0.0

dist/events/aws/api-gateway-event-template.json

24

dist/index.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var lodash_1 = require("lodash");
var sns_template_json_1 = __importDefault(require("./events/aws/sns-template.json"));
var sqs_template_json_1 = __importDefault(require("./events/aws/sqs-template.json"));
var api_gateway_event_template_json_1 = __importDefault(require("./events/aws/api-gateway-event-template.json"));
var scheduled_template_json_1 = __importDefault(require("./events/aws/scheduled-template.json"));
var s3_template_json_1 = __importDefault(require("./events/aws/s3-template.json"));
var kinesis_template_json_1 = __importDefault(require("./events/aws/kinesis-template.json"));
var dynamo_stream_event_template_json_1 = __importDefault(require("./events/aws/dynamo-stream-event-template.json"));
var dictionary = {
'aws:sns': require('./events/aws/sns-template.json'),
'aws:sqs': require('./events/aws/sqs-template.json'),
'aws:apiGateway': require('./events/aws/api-gateway-event-template.json'),
'aws:scheduled': require('./events/aws/scheduled-template.json'),
'aws:s3': require('./events/aws/s3-template.json'),
'aws:kinesis': require('./events/aws/kinesis-template.json'),
'aws:dynamo': require('./events/aws/dynamo-stream-event-template.json'),
'aws:sns': sns_template_json_1.default,
'aws:sqs': sqs_template_json_1.default,
'aws:apiGateway': api_gateway_event_template_json_1.default,
'aws:scheduled': scheduled_template_json_1.default,
'aws:s3': s3_template_json_1.default,
'aws:kinesis': kinesis_template_json_1.default,
'aws:dynamo': dynamo_stream_event_template_json_1.default,
};

@@ -13,0 +23,0 @@ function createEvent(eventType, body) {

@@ -110,9 +110,9 @@ "use strict";

kinesis: {
data: new Buffer('kinesis test').toString('base64'),
data: Buffer.from('kinesis test').toString('base64'),
},
}],
});
chai_1.expect(new Buffer(event.Records[0].kinesis.data, 'base64').toString('ascii')).to.equal('kinesis test');
chai_1.expect(Buffer.from(event.Records[0].kinesis.data, 'base64').toString('ascii')).to.equal('kinesis test');
});
});
//# sourceMappingURL=index.spec.js.map
{
"name": "@serverless/event-mocks",
"version": "0.1.0",
"version": "1.0.0",
"description": "Event Mocks is a simple library designed to generate simple AWS events for testing and automation purposes.",

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

@@ -12,3 +12,4 @@ {

"esModuleInterop": true,
"resolveJsonModule": true,
},
}

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc