diff --git a/.gitignore b/.gitignore index b512c09..3689cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +*.swp +templates/ diff --git a/.gitignore b/.gitignore index b512c09..3689cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +*.swp +templates/ diff --git a/default_templates/invitation_created.json b/default_templates/invitation_created.json new file mode 100644 index 0000000..0760ec5 --- /dev/null +++ b/default_templates/invitation_created.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Created", + "message": "Invite {{code}} created" +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index b512c09..3689cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +*.swp +templates/ diff --git a/default_templates/invitation_created.json b/default_templates/invitation_created.json new file mode 100644 index 0000000..0760ec5 --- /dev/null +++ b/default_templates/invitation_created.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Created", + "message": "Invite {{code}} created" +} \ No newline at end of file diff --git a/default_templates/invitation_deleted.json b/default_templates/invitation_deleted.json new file mode 100644 index 0000000..2e3f3ca --- /dev/null +++ b/default_templates/invitation_deleted.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Deleted", + "message": "Invite {{code}} deleted" +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index b512c09..3689cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +*.swp +templates/ diff --git a/default_templates/invitation_created.json b/default_templates/invitation_created.json new file mode 100644 index 0000000..0760ec5 --- /dev/null +++ b/default_templates/invitation_created.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Created", + "message": "Invite {{code}} created" +} \ No newline at end of file diff --git a/default_templates/invitation_deleted.json b/default_templates/invitation_deleted.json new file mode 100644 index 0000000..2e3f3ca --- /dev/null +++ b/default_templates/invitation_deleted.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Deleted", + "message": "Invite {{code}} deleted" +} \ No newline at end of file diff --git a/default_templates/user_deleted.json b/default_templates/user_deleted.json new file mode 100644 index 0000000..bef021a --- /dev/null +++ b/default_templates/user_deleted.json @@ -0,0 +1,4 @@ +{ + "title": "User Deleted", + "message": "User {{user}} deleted from server" +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index b512c09..3689cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +*.swp +templates/ diff --git a/default_templates/invitation_created.json b/default_templates/invitation_created.json new file mode 100644 index 0000000..0760ec5 --- /dev/null +++ b/default_templates/invitation_created.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Created", + "message": "Invite {{code}} created" +} \ No newline at end of file diff --git a/default_templates/invitation_deleted.json b/default_templates/invitation_deleted.json new file mode 100644 index 0000000..2e3f3ca --- /dev/null +++ b/default_templates/invitation_deleted.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Deleted", + "message": "Invite {{code}} deleted" +} \ No newline at end of file diff --git a/default_templates/user_deleted.json b/default_templates/user_deleted.json new file mode 100644 index 0000000..bef021a --- /dev/null +++ b/default_templates/user_deleted.json @@ -0,0 +1,4 @@ +{ + "title": "User Deleted", + "message": "User {{user}} deleted from server" +} \ No newline at end of file diff --git a/default_templates/user_invited.json b/default_templates/user_invited.json new file mode 100644 index 0000000..bca7ba6 --- /dev/null +++ b/default_templates/user_invited.json @@ -0,0 +1,4 @@ +{ + "title": "User Invited", + "message": "User {{user}} accepted invit from code {{code}}" +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index b512c09..3689cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +*.swp +templates/ diff --git a/default_templates/invitation_created.json b/default_templates/invitation_created.json new file mode 100644 index 0000000..0760ec5 --- /dev/null +++ b/default_templates/invitation_created.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Created", + "message": "Invite {{code}} created" +} \ No newline at end of file diff --git a/default_templates/invitation_deleted.json b/default_templates/invitation_deleted.json new file mode 100644 index 0000000..2e3f3ca --- /dev/null +++ b/default_templates/invitation_deleted.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Deleted", + "message": "Invite {{code}} deleted" +} \ No newline at end of file diff --git a/default_templates/user_deleted.json b/default_templates/user_deleted.json new file mode 100644 index 0000000..bef021a --- /dev/null +++ b/default_templates/user_deleted.json @@ -0,0 +1,4 @@ +{ + "title": "User Deleted", + "message": "User {{user}} deleted from server" +} \ No newline at end of file diff --git a/default_templates/user_invited.json b/default_templates/user_invited.json new file mode 100644 index 0000000..bca7ba6 --- /dev/null +++ b/default_templates/user_invited.json @@ -0,0 +1,4 @@ +{ + "title": "User Invited", + "message": "User {{user}} accepted invit from code {{code}}" +} \ No newline at end of file diff --git a/docker_run_temp.sh b/docker_run_temp.sh new file mode 100755 index 0000000..2ca9841 --- /dev/null +++ b/docker_run_temp.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +docker run --name wizarr-notify -d --rm -it -v $(pwd):/opt/wizarr_notify -p:9991:80 "$@" node:latest sleep infinity diff --git a/.gitignore b/.gitignore index b512c09..3689cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +*.swp +templates/ diff --git a/default_templates/invitation_created.json b/default_templates/invitation_created.json new file mode 100644 index 0000000..0760ec5 --- /dev/null +++ b/default_templates/invitation_created.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Created", + "message": "Invite {{code}} created" +} \ No newline at end of file diff --git a/default_templates/invitation_deleted.json b/default_templates/invitation_deleted.json new file mode 100644 index 0000000..2e3f3ca --- /dev/null +++ b/default_templates/invitation_deleted.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Deleted", + "message": "Invite {{code}} deleted" +} \ No newline at end of file diff --git a/default_templates/user_deleted.json b/default_templates/user_deleted.json new file mode 100644 index 0000000..bef021a --- /dev/null +++ b/default_templates/user_deleted.json @@ -0,0 +1,4 @@ +{ + "title": "User Deleted", + "message": "User {{user}} deleted from server" +} \ No newline at end of file diff --git a/default_templates/user_invited.json b/default_templates/user_invited.json new file mode 100644 index 0000000..bca7ba6 --- /dev/null +++ b/default_templates/user_invited.json @@ -0,0 +1,4 @@ +{ + "title": "User Invited", + "message": "User {{user}} accepted invit from code {{code}}" +} \ No newline at end of file diff --git a/docker_run_temp.sh b/docker_run_temp.sh new file mode 100755 index 0000000..2ca9841 --- /dev/null +++ b/docker_run_temp.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +docker run --name wizarr-notify -d --rm -it -v $(pwd):/opt/wizarr_notify -p:9991:80 "$@" node:latest sleep infinity diff --git a/index.js b/index.js new file mode 100644 index 0000000..ad9ac94 --- /dev/null +++ b/index.js @@ -0,0 +1,80 @@ +const express = require('express'); +const Pushover = require('pushover-notifications'); +const mustache = require('mustache'); +const fs = require('node:fs'); +const path = require('node:path'); + +/* +{"event":"user_invited","data":{"auth":"WHo3P_ZCFdnPyWFKJvKR","code":"RLMUQK","created":"2024-11-21 21:30:24.728194","email":"bavis.mark+plex2@gmail.com","expires":null,"id":3,"token":"449061671","username":"bavis.ma"}} +{"event":"user_deleted","data":{"auth":"WHo3P_ZCFdnPyWFKJvKR","code":"RLMUQK","created":"2024-11-21 21:30:24.728194","email":"bavis.mark+plex2@gmail.com","expires":null,"id":3,"token":"449061671","username":"bavis.ma"}} +{"event":"invitation_created","data":{"allow_download":true,"code":"RLMUQK","created":"2024-11-21 21:11:29.928042","duration":null,"expires":"2024-11-22 21:11:29.928034","hide_user":true,"id":1,"live_tv":true,"plex_allow_sync":false,"sessions":0,"specific_libraries":[""],"unlimited":false,"used":false,"used_at":null,"used_by":null}} +{"event":"invitation_deleted","data":{"allow_download":true,"code":"RLMUQK","created":"2024-11-21 21:11:29.928042","duration":null,"expires":"2024-11-22 21:11:29.928034","hide_user":true,"id":1,"live_tv":true,"plex_allow_sync":false,"sessions":"0","specific_libraries":"","unlimited":false,"used":true,"used_at":"2024-11-21 13:30:35.743697","used_by":null}} +*/ + +const pushover = new Pushover( + { + user: process.env['PUSHOVER_USER'], + token: process.env['PUSHOVER_TOKEN'], + } +); + +const notify_templates = new Map(); + +const templatesStat = fs.statSync("templates", {throwIfNoEntry: false}); +if (!templatesStat) +{ + fs.mkdirSync("templates"); + for (let filename of fs.readdirSync("default_templates", {encoding:'utf8'})) + { + fs.copyFileSync(path.join("default_templates", filename), path.join("templates", filename)); + } +} + +for (let filename of fs.readdirSync("templates", {encoding:'utf8'})) +{ + const is_comment = l => l.trim().startsWith("//"); + if (path.extname(filename) != '.json') continue; + + let lines = fs.readFileSync(path.join("templates", filename), {'encoding':'utf8'}).split(/[\r\n]/); + if (lines.some(l => is_comment(l) && l.indexOf(":ignore") != -1)) continue; + lines = lines.filter(l => !is_comment(l)); + + notify_templates.set(path.parse(filename).name, lines.join("\n")); +} + +console.log("Listening for: " + Array.from(notify_templates.keys()).join(",")); + +const app = express(); + + + +app.use(express.json()); + +app.post('/', (req, res) => +{ + if ('event' in req.body) + { + console.log(JSON.stringify(req.body)); + + if (notify_templates.has(req.body.event)) + { + const template_output = JSON.parse(mustache.render(notify_templates.get(req.body.event), { + ...req.body.data, + user: `${req.body.data.username} (${req.body.data.email})` + })); + + if ('title' in template_output && 'message' in template_output) + { + pushover.send({ + title: template_output.title, + message: template_output.message + }); + } + } + } + res.end(); +}) + +app.use((req, res) => res.status(404).end()); + +app.listen(80); \ No newline at end of file diff --git a/.gitignore b/.gitignore index b512c09..3689cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +*.swp +templates/ diff --git a/default_templates/invitation_created.json b/default_templates/invitation_created.json new file mode 100644 index 0000000..0760ec5 --- /dev/null +++ b/default_templates/invitation_created.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Created", + "message": "Invite {{code}} created" +} \ No newline at end of file diff --git a/default_templates/invitation_deleted.json b/default_templates/invitation_deleted.json new file mode 100644 index 0000000..2e3f3ca --- /dev/null +++ b/default_templates/invitation_deleted.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Deleted", + "message": "Invite {{code}} deleted" +} \ No newline at end of file diff --git a/default_templates/user_deleted.json b/default_templates/user_deleted.json new file mode 100644 index 0000000..bef021a --- /dev/null +++ b/default_templates/user_deleted.json @@ -0,0 +1,4 @@ +{ + "title": "User Deleted", + "message": "User {{user}} deleted from server" +} \ No newline at end of file diff --git a/default_templates/user_invited.json b/default_templates/user_invited.json new file mode 100644 index 0000000..bca7ba6 --- /dev/null +++ b/default_templates/user_invited.json @@ -0,0 +1,4 @@ +{ + "title": "User Invited", + "message": "User {{user}} accepted invit from code {{code}}" +} \ No newline at end of file diff --git a/docker_run_temp.sh b/docker_run_temp.sh new file mode 100755 index 0000000..2ca9841 --- /dev/null +++ b/docker_run_temp.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +docker run --name wizarr-notify -d --rm -it -v $(pwd):/opt/wizarr_notify -p:9991:80 "$@" node:latest sleep infinity diff --git a/index.js b/index.js new file mode 100644 index 0000000..ad9ac94 --- /dev/null +++ b/index.js @@ -0,0 +1,80 @@ +const express = require('express'); +const Pushover = require('pushover-notifications'); +const mustache = require('mustache'); +const fs = require('node:fs'); +const path = require('node:path'); + +/* +{"event":"user_invited","data":{"auth":"WHo3P_ZCFdnPyWFKJvKR","code":"RLMUQK","created":"2024-11-21 21:30:24.728194","email":"bavis.mark+plex2@gmail.com","expires":null,"id":3,"token":"449061671","username":"bavis.ma"}} +{"event":"user_deleted","data":{"auth":"WHo3P_ZCFdnPyWFKJvKR","code":"RLMUQK","created":"2024-11-21 21:30:24.728194","email":"bavis.mark+plex2@gmail.com","expires":null,"id":3,"token":"449061671","username":"bavis.ma"}} +{"event":"invitation_created","data":{"allow_download":true,"code":"RLMUQK","created":"2024-11-21 21:11:29.928042","duration":null,"expires":"2024-11-22 21:11:29.928034","hide_user":true,"id":1,"live_tv":true,"plex_allow_sync":false,"sessions":0,"specific_libraries":[""],"unlimited":false,"used":false,"used_at":null,"used_by":null}} +{"event":"invitation_deleted","data":{"allow_download":true,"code":"RLMUQK","created":"2024-11-21 21:11:29.928042","duration":null,"expires":"2024-11-22 21:11:29.928034","hide_user":true,"id":1,"live_tv":true,"plex_allow_sync":false,"sessions":"0","specific_libraries":"","unlimited":false,"used":true,"used_at":"2024-11-21 13:30:35.743697","used_by":null}} +*/ + +const pushover = new Pushover( + { + user: process.env['PUSHOVER_USER'], + token: process.env['PUSHOVER_TOKEN'], + } +); + +const notify_templates = new Map(); + +const templatesStat = fs.statSync("templates", {throwIfNoEntry: false}); +if (!templatesStat) +{ + fs.mkdirSync("templates"); + for (let filename of fs.readdirSync("default_templates", {encoding:'utf8'})) + { + fs.copyFileSync(path.join("default_templates", filename), path.join("templates", filename)); + } +} + +for (let filename of fs.readdirSync("templates", {encoding:'utf8'})) +{ + const is_comment = l => l.trim().startsWith("//"); + if (path.extname(filename) != '.json') continue; + + let lines = fs.readFileSync(path.join("templates", filename), {'encoding':'utf8'}).split(/[\r\n]/); + if (lines.some(l => is_comment(l) && l.indexOf(":ignore") != -1)) continue; + lines = lines.filter(l => !is_comment(l)); + + notify_templates.set(path.parse(filename).name, lines.join("\n")); +} + +console.log("Listening for: " + Array.from(notify_templates.keys()).join(",")); + +const app = express(); + + + +app.use(express.json()); + +app.post('/', (req, res) => +{ + if ('event' in req.body) + { + console.log(JSON.stringify(req.body)); + + if (notify_templates.has(req.body.event)) + { + const template_output = JSON.parse(mustache.render(notify_templates.get(req.body.event), { + ...req.body.data, + user: `${req.body.data.username} (${req.body.data.email})` + })); + + if ('title' in template_output && 'message' in template_output) + { + pushover.send({ + title: template_output.title, + message: template_output.message + }); + } + } + } + res.end(); +}) + +app.use((req, res) => res.status(404).end()); + +app.listen(80); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3eddf9c..e8d4840 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,9 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "express": "^4.21.1" + "express": "^4.21.1", + "mustache": "^4.2.0", + "pushover-notifications": "^1.2.3" } }, "node_modules/accepts": { @@ -449,6 +451,14 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "bin": { + "mustache": "bin/mustache" + } + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -504,6 +514,14 @@ "node": ">= 0.10" } }, + "node_modules/pushover-notifications": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/pushover-notifications/-/pushover-notifications-1.2.3.tgz", + "integrity": "sha512-jVfniktfi8nYS5f1QsHs/fFAkzSaHYUcmn4CFOMMsv2wvvxvMgSJdjkdoRR0BqQU6uYs2QJs41PQhbqa1TkAIg==", + "engines": { + "node": "*" + } + }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", diff --git a/.gitignore b/.gitignore index b512c09..3689cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +*.swp +templates/ diff --git a/default_templates/invitation_created.json b/default_templates/invitation_created.json new file mode 100644 index 0000000..0760ec5 --- /dev/null +++ b/default_templates/invitation_created.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Created", + "message": "Invite {{code}} created" +} \ No newline at end of file diff --git a/default_templates/invitation_deleted.json b/default_templates/invitation_deleted.json new file mode 100644 index 0000000..2e3f3ca --- /dev/null +++ b/default_templates/invitation_deleted.json @@ -0,0 +1,5 @@ +// :ignore +{ + "title": "Invite Deleted", + "message": "Invite {{code}} deleted" +} \ No newline at end of file diff --git a/default_templates/user_deleted.json b/default_templates/user_deleted.json new file mode 100644 index 0000000..bef021a --- /dev/null +++ b/default_templates/user_deleted.json @@ -0,0 +1,4 @@ +{ + "title": "User Deleted", + "message": "User {{user}} deleted from server" +} \ No newline at end of file diff --git a/default_templates/user_invited.json b/default_templates/user_invited.json new file mode 100644 index 0000000..bca7ba6 --- /dev/null +++ b/default_templates/user_invited.json @@ -0,0 +1,4 @@ +{ + "title": "User Invited", + "message": "User {{user}} accepted invit from code {{code}}" +} \ No newline at end of file diff --git a/docker_run_temp.sh b/docker_run_temp.sh new file mode 100755 index 0000000..2ca9841 --- /dev/null +++ b/docker_run_temp.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +docker run --name wizarr-notify -d --rm -it -v $(pwd):/opt/wizarr_notify -p:9991:80 "$@" node:latest sleep infinity diff --git a/index.js b/index.js new file mode 100644 index 0000000..ad9ac94 --- /dev/null +++ b/index.js @@ -0,0 +1,80 @@ +const express = require('express'); +const Pushover = require('pushover-notifications'); +const mustache = require('mustache'); +const fs = require('node:fs'); +const path = require('node:path'); + +/* +{"event":"user_invited","data":{"auth":"WHo3P_ZCFdnPyWFKJvKR","code":"RLMUQK","created":"2024-11-21 21:30:24.728194","email":"bavis.mark+plex2@gmail.com","expires":null,"id":3,"token":"449061671","username":"bavis.ma"}} +{"event":"user_deleted","data":{"auth":"WHo3P_ZCFdnPyWFKJvKR","code":"RLMUQK","created":"2024-11-21 21:30:24.728194","email":"bavis.mark+plex2@gmail.com","expires":null,"id":3,"token":"449061671","username":"bavis.ma"}} +{"event":"invitation_created","data":{"allow_download":true,"code":"RLMUQK","created":"2024-11-21 21:11:29.928042","duration":null,"expires":"2024-11-22 21:11:29.928034","hide_user":true,"id":1,"live_tv":true,"plex_allow_sync":false,"sessions":0,"specific_libraries":[""],"unlimited":false,"used":false,"used_at":null,"used_by":null}} +{"event":"invitation_deleted","data":{"allow_download":true,"code":"RLMUQK","created":"2024-11-21 21:11:29.928042","duration":null,"expires":"2024-11-22 21:11:29.928034","hide_user":true,"id":1,"live_tv":true,"plex_allow_sync":false,"sessions":"0","specific_libraries":"","unlimited":false,"used":true,"used_at":"2024-11-21 13:30:35.743697","used_by":null}} +*/ + +const pushover = new Pushover( + { + user: process.env['PUSHOVER_USER'], + token: process.env['PUSHOVER_TOKEN'], + } +); + +const notify_templates = new Map(); + +const templatesStat = fs.statSync("templates", {throwIfNoEntry: false}); +if (!templatesStat) +{ + fs.mkdirSync("templates"); + for (let filename of fs.readdirSync("default_templates", {encoding:'utf8'})) + { + fs.copyFileSync(path.join("default_templates", filename), path.join("templates", filename)); + } +} + +for (let filename of fs.readdirSync("templates", {encoding:'utf8'})) +{ + const is_comment = l => l.trim().startsWith("//"); + if (path.extname(filename) != '.json') continue; + + let lines = fs.readFileSync(path.join("templates", filename), {'encoding':'utf8'}).split(/[\r\n]/); + if (lines.some(l => is_comment(l) && l.indexOf(":ignore") != -1)) continue; + lines = lines.filter(l => !is_comment(l)); + + notify_templates.set(path.parse(filename).name, lines.join("\n")); +} + +console.log("Listening for: " + Array.from(notify_templates.keys()).join(",")); + +const app = express(); + + + +app.use(express.json()); + +app.post('/', (req, res) => +{ + if ('event' in req.body) + { + console.log(JSON.stringify(req.body)); + + if (notify_templates.has(req.body.event)) + { + const template_output = JSON.parse(mustache.render(notify_templates.get(req.body.event), { + ...req.body.data, + user: `${req.body.data.username} (${req.body.data.email})` + })); + + if ('title' in template_output && 'message' in template_output) + { + pushover.send({ + title: template_output.title, + message: template_output.message + }); + } + } + } + res.end(); +}) + +app.use((req, res) => res.status(404).end()); + +app.listen(80); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3eddf9c..e8d4840 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,9 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "express": "^4.21.1" + "express": "^4.21.1", + "mustache": "^4.2.0", + "pushover-notifications": "^1.2.3" } }, "node_modules/accepts": { @@ -449,6 +451,14 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "bin": { + "mustache": "bin/mustache" + } + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -504,6 +514,14 @@ "node": ">= 0.10" } }, + "node_modules/pushover-notifications": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/pushover-notifications/-/pushover-notifications-1.2.3.tgz", + "integrity": "sha512-jVfniktfi8nYS5f1QsHs/fFAkzSaHYUcmn4CFOMMsv2wvvxvMgSJdjkdoRR0BqQU6uYs2QJs41PQhbqa1TkAIg==", + "engines": { + "node": "*" + } + }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", diff --git a/package.json b/package.json index 8bd52d6..3b990ba 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,8 @@ "author": "Mark Bavis", "license": "ISC", "dependencies": { - "express": "^4.21.1" + "express": "^4.21.1", + "mustache": "^4.2.0", + "pushover-notifications": "^1.2.3" } }