Comparing version 0.0.5 to 0.0.6
@@ -0,1 +1,7 @@ | ||
## 11 December 2019 | ||
### [0.0.6](https://github.com/artdecocode/pompeii/compare/v0.0.5...v0.0.6) | ||
- [package] Publish `build`. | ||
## 29 March 2019 | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "pompeii", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "A lambda function to notify of npm releases.", | ||
@@ -11,2 +11,3 @@ "main": "src/index.js", | ||
"lint": "eslint .", | ||
"b": "alamode src -o build -s", | ||
"e": "node example", | ||
@@ -37,9 +38,9 @@ "example/": "yarn e example/example" | ||
"eslint-config-artdeco": "1.0.1", | ||
"yarn-s": "1.1.0", | ||
"zoroaster": "3.11.2" | ||
"yarn-s": "1.2.1", | ||
"zoroaster": "4.1.2" | ||
}, | ||
"dependencies": { | ||
"alamode": "1.8.6", | ||
"aws-sdk": "2.431.0" | ||
"alamode": "3.2.0", | ||
"aws-sdk": "2.587.0" | ||
} | ||
} |
@@ -0,5 +1,7 @@ | ||
import { request } from 'https' | ||
import AWS from 'aws-sdk' | ||
import { stringify } from 'querystring' | ||
const sns = new AWS.SNS() | ||
const { env: { TOPIC_ARN: TopicArn } } = process | ||
const { env: { TOPIC_ARN: TopicArn, SERVER: server, KEY: key = 'super-secret-key' } } = process | ||
@@ -15,7 +17,21 @@ const NPM_FROM = /support@npmjs\.com/ | ||
} | ||
console.log('publishing %s', subject) | ||
await publish(subject) | ||
if (server) { | ||
console.log('pinging server') | ||
notify(server, subject) | ||
} | ||
if (TopicArn) { | ||
console.log('publishing %s', subject) | ||
await publish(subject) | ||
} | ||
} | ||
const notify = (ser, Message) => { | ||
const q = stringify({ 'secret-key': key, subject: Message }) | ||
const req = request(`${ser}?${q}`, (res) => { | ||
console.log('Server responded with', res.statusCode) | ||
}) | ||
req.end() | ||
} | ||
const publish = async (Message) => { | ||
@@ -22,0 +38,0 @@ await sns.publish({ |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
5000
8
82
2
+ Addedalamode@3.2.0(transitive)
+ Addedaws-sdk@2.587.0(transitive)
+ Addedieee754@1.1.13(transitive)
- Removed@a-la/detect-jsx@1.0.1(transitive)
- Removed@a-la/export@1.3.1(transitive)
- Removed@a-la/import@1.7.0(transitive)
- Removed@a-la/jsx@1.4.5(transitive)
- Removed@a-la/markers@1.0.3(transitive)
- Removed@artdeco/clean-stack@1.0.1(transitive)
- Removed@wrote/clone@1.1.0(transitive)
- Removed@wrote/ensure-path@1.0.31.0.5(transitive)
- Removed@wrote/exists@1.0.1(transitive)
- Removed@wrote/read@1.0.2(transitive)
- Removed@wrote/read-dir-structure@1.0.11.0.2(transitive)
- Removed@wrote/rm@1.1.2(transitive)
- Removed@wrote/write@1.0.2(transitive)
- Removed@wrote/wrote@1.2.1(transitive)
- Removedalamode@1.8.6(transitive)
- Removedargufy@1.3.2(transitive)
- Removedaws-sdk@2.431.0(transitive)
- Removedcatchment@3.0.13.2.13.2.2(transitive)
- Removedclean-stack@1.3.0(transitive)
- Removeddiff@4.0.1(transitive)
- Removederotic@1.0.11.2.12.0.2(transitive)
- Removederte@1.1.7(transitive)
- Removedieee754@1.1.8(transitive)
- Removedmakepromise@2.0.03.0.13.0.2(transitive)
- Removednode-modules-regexp@1.0.0(transitive)
- Removedpirates@4.0.1(transitive)
- Removedrestream@3.1.13.5.0(transitive)
- Removedsource-map@0.7.3(transitive)
- Removedusually@1.1.0(transitive)
- Removedwhich-stream@1.0.1(transitive)
Updatedalamode@3.2.0
Updatedaws-sdk@2.587.0