ReviewOS

also looking at this

mail-os/mail

feat: mailbox recovery addresses and password reset by email

#13
Merged chris wants to merge feat/mailbox-recovery into main
21 files +1503 -10
packages/webmail/build.test.tsmodified+10-2
Changes to packages/webmail/build.test.ts
@@ -9,13 +9,13 @@ test('deployments fingerprint styles so existing browsers fetch updated controls
99 expect(stylesheetUrl(first)).toBe(stylesheetUrl(first))
1010 expect(stylesheetUrl(first)).not.toBe(stylesheetUrl(second))
1111 await buildWebmail()
12 for (const page of ['index', 'login']) {
12 for (const page of ['index', 'login', 'recover']) {
1313 const html = await Bun.file(join(import.meta.dir, `../zig/src/api/webmail_dist/${page}.html`)).text()
1414 expect(html).toMatch(/href="\/styles\.css\?v=[0-9a-f]{16}"/)
1515 }
1616})
1717
18for (const page of ['login', 'index']) {
18for (const page of ['login', 'index', 'recover']) {
1919 test(`${page} compiles with STX bindings and a self-contained runtime`, async () => {
2020 const path = join(import.meta.dir, `pages/${page}.stx`)
2121 const source = await Bun.file(path).text()
@@ -31,6 +31,14 @@ for (const page of ['login', 'index']) {
3131 if (page === 'index') {
3232 expect(html).toContain('sandbox=""')
3333 expect(html).toContain('/webmail/auth/password')
34 expect(html).toContain('/webmail/auth/recovery')
35 }
36 if (page === 'login')
37 expect(html).toContain('href="/forgot"')
38 if (page === 'recover') {
39 expect(html).toContain('/webmail/auth/forgot')
40 expect(html).toContain('/webmail/auth/reset/verify')
41 expect(html).toContain('/webmail/auth/reset')
3442 }
3543 })
3644}