feat: add gmail-hook monorepo with watcher, api, and web

Ship the receipt pipeline (Livin/Grab/BRI), PocketBase spendings, PM2 ecosystem, and a proper .gitignore that excludes secrets, SQLite data, and media dumps.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-13 22:58:47 +07:00
co-authored by Cursor
parent 8fa9f4350e
commit 46a2e2a7b0
67 changed files with 12153 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import assert from "node:assert/strict";
import { describe, it } from "node:test";
import { formatReceiptAlert } from "../src/notify/ntfy.js";
describe("formatReceiptAlert", () => {
it("includes reason, messageId, and body", () => {
const text = formatReceiptAlert({
reason: "parse failed",
messageId: "abc#1",
kind: "grab.ereceipt.ride",
message: {
from: "Grab <no-reply@grab.com>",
subject: "Your Grab E-Receipt",
body: "Total Paid\nRp1.000",
html: "<b>x</b>",
},
});
assert.match(text, /reason: parse failed/);
assert.match(text, /messageId: abc#1/);
assert.match(text, /Total Paid/);
assert.match(text, /html \(length\)/);
});
});