Fork anchor, strip all push notification code (APNs, FCM, WebPush), rename from anchor to mailship, add new database schema for subscriptions + events tables, and add HTTP API for email notification registration and NIP-9a relay push callbacks. - POST /subscription/email — register for email digests - DELETE /subscription/:key — unsubscribe - POST /notify/:id — NIP-9a relay push callback - GET /confirm?token=... — confirm email - GET /unsubscribe?token=... — unsubscribe Co-authored-by: mplorentz
20 lines
581 B
JavaScript
20 lines
581 B
JavaScript
// This script is necessary for installing stuff on a host, since our links don't exist there.
|
|
|
|
import fs from "fs"
|
|
|
|
const pkgName = process.argv[2]
|
|
|
|
if (!pkgName?.endsWith('package.json')) {
|
|
console.log("File passed was not a package.json file")
|
|
process.exit(1)
|
|
}
|
|
|
|
const pkg = JSON.parse(fs.readFileSync(pkgName, "utf8"))
|
|
|
|
if (pkg.pnpm && pkg.pnpm.overrides) {
|
|
delete pkg.pnpm.overrides
|
|
fs.writeFileSync(pkgName, JSON.stringify(pkg, null, 2) + "\n")
|
|
console.log(`Removed pnpm.overrides from ${pkgName}`)
|
|
} else {
|
|
console.log(`No pnpm.overrides found in ${pkgName}`)
|
|
}
|