aws-ses-v2-local
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -9,2 +9,3 @@ #!/usr/bin/env node | ||
(0, _1.default)(); | ||
// eslint-disable-next-line no-console | ||
console.log('aws-ses-v2-local: server up and running'); |
@@ -28,3 +28,14 @@ "use strict"; | ||
app.get('/store', (req, res) => { | ||
res.status(200).send(store_1.default); | ||
if (!req.query.since) { | ||
res.status(200).send(store_1.default); | ||
return; | ||
} | ||
if (typeof req.query.since !== 'string') { | ||
res.status(400).send({ message: 'Bad since query param, expected single value' }); | ||
} | ||
const since = parseInt(req.query.since, 10); | ||
if (Number.isNaN(since) || req.query.since !== String(since)) { | ||
res.status(400).send({ message: 'Bad since query param, expected integer representing epoch timestamp in seconds' }); | ||
} | ||
res.status(200).send({ ...store_1.default, emails: store_1.default.emails.filter((e) => e.at >= since) }); | ||
}); | ||
@@ -31,0 +42,0 @@ app.get('/health-check', (req, res) => { |
{ | ||
"name": "aws-ses-v2-local", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "A local version of Amazon Simple Email Service (AWS SES) supporting the V2 API", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -18,3 +18,3 @@ # aws-ses-v2-local | ||
- Accept and view attachments | ||
- Built in email web viewer | ||
- Built in web viewer, with live inbox, optional dark theme, and compatibility with all emails | ||
- API access to emails at `GET /store` | ||
@@ -21,0 +21,0 @@ - Health check endpoint at `GET /health-check` |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
167430
437
0