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

pompeii

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pompeii - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

52

build/index.js

@@ -6,10 +6,48 @@ "use strict";

});
exports.default = pompeii;
exports.handler = void 0;
/**
* This is the main package file.
*/
async function pompeii() {
console.log('pompeii called');
}
var _awsSdk = _interopRequireDefault(require("aws-sdk"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const sns = new _awsSdk.default.SNS();
const {
env: {
TOPIC_ARN: TopicArn
}
} = process;
const NPM_FROM = /support@npmjs\.com/;
const handler = async ({
Records
}) => {
const [{
ses: {
mail
}
}] = Records;
const {
commonHeaders: {
from,
subject
}
} = mail;
if (!NPM_FROM.test(from)) {
console.log('not publishing');
return;
}
console.log('publishing %s', subject);
await publish(subject);
};
exports.handler = handler;
const publish = async Message => {
await sns.publish({
TopicArn,
Message
});
};
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "pompeii",
"version": "0.0.1",
"version": "0.0.2",
"description": "A lambda function to notify of npm releases.",

@@ -5,0 +5,0 @@ "main": "build",

@@ -1,6 +0,25 @@

/**
* This is the main package file.
*/
export default async function pompeii() {
console.log('pompeii called')
import AWS from 'aws-sdk'
const sns = new AWS.SNS()
const { env: { TOPIC_ARN: TopicArn } } = process
const NPM_FROM = /support@npmjs\.com/
export const handler = async ({ Records }) => {
const [{ ses: { mail } }] = Records
const { commonHeaders: { from, subject } } = mail
if (!NPM_FROM.test(from)) {
console.log('not publishing')
return
}
console.log('publishing %s', subject)
await publish(subject)
}
const publish = async (Message) => {
await sns.publish({
TopicArn,
Message,
})
}

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