@storyshelf/notify-email 0.6.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/email.d.mts +3 -5
- package/dist/email.mjs +2 -3
- package/dist/email.mjs.map +1 -1
- package/dist/http.d.mts +0 -2
- package/dist/http.mjs +1 -2
- package/dist/index.mjs +0 -9
- package/dist/log.d.mts +0 -2
- package/dist/log.mjs +1 -2
- package/dist/mailpit.d.mts +0 -2
- package/dist/mailpit.mjs +1 -2
- package/dist/smtp.d.mts +0 -2
- package/dist/smtp.mjs +1 -2
- package/dist/types.d.mts +0 -2
- package/dist/types.mjs +1 -2
- package/dist/version.mjs +2 -3
- package/dist/version.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/index.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -19,13 +19,22 @@ const sender = smtpPreset({ host: "mail.example.com", port: 587, from: "shelf@ex
|
|
|
19
19
|
const app = createShelfApp({
|
|
20
20
|
database,
|
|
21
21
|
storage,
|
|
22
|
-
notifiers: [createEmailNotifier(sender, { from: "shelf@example.com" })],
|
|
22
|
+
notifications: { notifiers: [createEmailNotifier(sender, { from: "shelf@example.com" })] },
|
|
23
23
|
// Optional: invites and password resets share the same transport.
|
|
24
24
|
// auth: createShelfAuth({ db, secret, baseURL, emailSender: sender }),
|
|
25
25
|
});
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Presets
|
|
28
|
+
## Presets
|
|
29
|
+
|
|
30
|
+
| Preset | Use for |
|
|
31
|
+
| --------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
32
|
+
| `smtpPreset` | A corporate relay, Postfix, or SES over SMTP. `smtpPresetFromEnv` reads the settings from environment variables. |
|
|
33
|
+
| `mailpitPreset` | Local development against Mailpit (`localhost:1025`). |
|
|
34
|
+
| `httpPreset` | A Resend- or Postmark-style JSON HTTP endpoint. |
|
|
35
|
+
| `logPreset` | Tests and unconfigured setups — messages are written to the log. |
|
|
36
|
+
|
|
37
|
+
See [Notifications](https://storyshelf.js.org/guides/notifications/) for how email channels, subscriptions, and auth mail fit together.
|
|
29
38
|
|
|
30
39
|
## Install notes
|
|
31
40
|
|
package/dist/email.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { EmailSender } from "@storyshelf/core/adapter/email-sender";
|
|
4
|
-
import {
|
|
4
|
+
import { MessageNotifierProvider } from "@storyshelf/core/adapter/notifier";
|
|
5
5
|
import { Logger } from "@storyshelf/core/logger";
|
|
6
|
-
//#region src/email.d.ts
|
|
7
6
|
/** Defaults applied when a channel omits sender identity. */
|
|
8
7
|
interface EmailNotifierDefaults {
|
|
9
8
|
from?: string;
|
|
@@ -15,9 +14,8 @@ interface EmailNotifierDefaults {
|
|
|
15
14
|
*/
|
|
16
15
|
declare function createEmailNotifier(sender: EmailSender, defaults?: EmailNotifierDefaults & {
|
|
17
16
|
logger?: Logger;
|
|
18
|
-
}):
|
|
17
|
+
}): MessageNotifierProvider;
|
|
19
18
|
/** Describe the email provider (name, version, config schema). */
|
|
20
|
-
declare function getMetadata():
|
|
21
|
-
//#endregion
|
|
19
|
+
declare function getMetadata(): MessageNotifierProvider["metadata"];
|
|
22
20
|
export { EmailNotifierDefaults, createEmailNotifier, getMetadata };
|
|
23
21
|
//# sourceMappingURL=email.d.mts.map
|
package/dist/email.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { emailChannelConfigSchema } from "./types.mjs";
|
|
5
|
-
|
|
5
|
+
// src/email.ts
|
|
6
6
|
/**
|
|
7
7
|
* Create the `email` channel provider over a shared transport.
|
|
8
8
|
* The same {@link EmailSender} can also serve auth mail (invites, resets).
|
|
@@ -38,14 +38,13 @@ function createEmailNotifier(sender, defaults = {}) {
|
|
|
38
38
|
function getMetadata() {
|
|
39
39
|
return {
|
|
40
40
|
name: "Email",
|
|
41
|
-
version:
|
|
41
|
+
version: "0.8.0",
|
|
42
42
|
description: "Email notifications over a shared SMTP/HTTP transport",
|
|
43
43
|
kind: "email",
|
|
44
44
|
category: "notifier",
|
|
45
45
|
schema: emailChannelConfigSchema
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
//#endregion
|
|
49
48
|
export { createEmailNotifier, getMetadata };
|
|
50
49
|
|
|
51
50
|
//# sourceMappingURL=email.mjs.map
|
package/dist/email.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.mjs","names":[],"sources":["../src/email.ts"],"sourcesContent":["import type { EmailSender } from \"@storyshelf/core/adapter/email-sender\";\nimport type {
|
|
1
|
+
{"version":3,"file":"email.mjs","names":[],"sources":["../src/email.ts"],"sourcesContent":["import type { EmailSender } from \"@storyshelf/core/adapter/email-sender\";\nimport type {\n MessageNotifierAdapter,\n MessageNotifierProvider,\n} from \"@storyshelf/core/adapter/notifier\";\nimport type { Logger } from \"@storyshelf/core/logger\";\nimport { emailChannelConfigSchema } from \"./types.ts\";\n\ndeclare const __PKG_VERSION__: string | undefined;\n\n/** Defaults applied when a channel omits sender identity. */\nexport interface EmailNotifierDefaults {\n from?: string;\n replyTo?: string;\n}\n\n/**\n * Create the `email` channel provider over a shared transport.\n * The same {@link EmailSender} can also serve auth mail (invites, resets).\n */\nexport function createEmailNotifier(\n sender: EmailSender,\n defaults: EmailNotifierDefaults & { logger?: Logger } = {},\n): MessageNotifierProvider {\n return {\n metadata: getMetadata(),\n create(opts: { config: unknown; secret?: string; logger?: Logger }): MessageNotifierAdapter {\n const config = emailChannelConfigSchema.parse(opts.config);\n const logger = (opts.logger ?? defaults.logger)?.child({ component: \"notify-email\" });\n return {\n metadata: getMetadata(),\n async send(input): Promise<void> {\n logger?.debug({ channelId: input.channel.id }, \"sending email notification\");\n await sender.send({\n to: config.to,\n subject: input.formatted.subject,\n text: input.formatted.text,\n html: input.formatted.html,\n from: config.from ?? defaults.from,\n replyTo: config.replyTo ?? defaults.replyTo,\n });\n logger?.info({ channelId: input.channel.id, to: config.to }, \"email sent\");\n },\n };\n },\n };\n}\n\n/** Describe the email provider (name, version, config schema). */\nexport function getMetadata(): MessageNotifierProvider[\"metadata\"] {\n return {\n name: \"Email\",\n version: typeof __PKG_VERSION__ === \"string\" ? __PKG_VERSION__ : \"0.0.0\",\n description: \"Email notifications over a shared SMTP/HTTP transport\",\n kind: \"email\",\n category: \"notifier\",\n schema: emailChannelConfigSchema,\n };\n}\n"],"mappings":";;;;;;;;;AAoBA,SAAgB,oBACd,QACA,WAAwD,CAAC,GAChC;CACzB,OAAO;EACL,UAAU,YAAY;EACtB,OAAO,MAAqF;GAC1F,MAAM,SAAS,yBAAyB,MAAM,KAAK,MAAM;GACzD,MAAM,UAAU,KAAK,UAAU,SAAS,OAAA,EAAS,MAAM,EAAE,WAAW,eAAe,CAAC;GACpF,OAAO;IACL,UAAU,YAAY;IACtB,MAAM,KAAK,OAAsB;KAC/B,QAAQ,MAAM,EAAE,WAAW,MAAM,QAAQ,GAAG,GAAG,4BAA4B;KAC3E,MAAM,OAAO,KAAK;MAChB,IAAI,OAAO;MACX,SAAS,MAAM,UAAU;MACzB,MAAM,MAAM,UAAU;MACtB,MAAM,MAAM,UAAU;MACtB,MAAM,OAAO,QAAQ,SAAS;MAC9B,SAAS,OAAO,WAAW,SAAS;KACtC,CAAC;KACD,QAAQ,KAAK;MAAE,WAAW,MAAM,QAAQ;MAAI,IAAI,OAAO;KAAG,GAAG,YAAY;IAC3E;GACF;EACF;CACF;AACF;;AAGA,SAAgB,cAAmD;CACjE,OAAO;EACL,MAAM;EACN,SAAA;EACA,aAAa;EACb,MAAM;EACN,UAAU;EACV,QAAQ;CACV;AACF"}
|
package/dist/http.d.mts
CHANGED
|
@@ -3,11 +3,9 @@ import __tsdown_shims_url from 'node:url';
|
|
|
3
3
|
import { HttpPresetOptions } from "./types.mjs";
|
|
4
4
|
import { EmailSender } from "@storyshelf/core/adapter/email-sender";
|
|
5
5
|
import { Logger } from "@storyshelf/core/logger";
|
|
6
|
-
//#region src/http.d.ts
|
|
7
6
|
/** HTTP email-API preset (Resend/Postmark-style JSON endpoint). */
|
|
8
7
|
declare function httpPreset(options: HttpPresetOptions & {
|
|
9
8
|
logger?: Logger;
|
|
10
9
|
}): EmailSender;
|
|
11
|
-
//#endregion
|
|
12
10
|
export { httpPreset };
|
|
13
11
|
//# sourceMappingURL=http.d.mts.map
|
package/dist/http.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { version } from "./version.mjs";
|
|
5
5
|
import { httpText } from "@storyshelf/core/utils";
|
|
6
|
-
|
|
6
|
+
// src/http.ts
|
|
7
7
|
/** HTTP email-API preset (Resend/Postmark-style JSON endpoint). */
|
|
8
8
|
function httpPreset(options) {
|
|
9
9
|
let logger = options.logger?.child({ component: "notify-email-http" });
|
|
@@ -38,7 +38,6 @@ function httpPreset(options) {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { httpPreset };
|
|
43
42
|
|
|
44
43
|
//# sourceMappingURL=http.mjs.map
|
package/dist/index.mjs
CHANGED
|
@@ -7,13 +7,4 @@ import { httpPreset } from "./http.mjs";
|
|
|
7
7
|
import { logPreset } from "./log.mjs";
|
|
8
8
|
import { smtpPreset, smtpPresetFromEnv } from "./smtp.mjs";
|
|
9
9
|
import { mailpitPreset } from "./mailpit.mjs";
|
|
10
|
-
//#region src/index.ts
|
|
11
|
-
/**
|
|
12
|
-
* Email notification transport: SMTP/Mailpit/log/HTTP presets plus the
|
|
13
|
-
* `email` channel provider. One transport serves notification channels
|
|
14
|
-
* and (optionally) auth mail — wire the same sender into both.
|
|
15
|
-
*/
|
|
16
|
-
//#endregion
|
|
17
10
|
export { createEmailNotifier, emailChannelConfigSchema, httpPreset, logPreset, mailpitPreset, smtpPreset, smtpPresetFromEnv };
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/log.d.mts
CHANGED
|
@@ -2,11 +2,9 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { EmailSender } from "@storyshelf/core/adapter/email-sender";
|
|
4
4
|
import { Logger } from "@storyshelf/core/logger";
|
|
5
|
-
//#region src/log.d.ts
|
|
6
5
|
/** Log-only preset for tests and unconfigured servers (no delivery). */
|
|
7
6
|
declare function logPreset(options?: {
|
|
8
7
|
logger?: Logger;
|
|
9
8
|
}): EmailSender;
|
|
10
|
-
//#endregion
|
|
11
9
|
export { logPreset };
|
|
12
10
|
//# sourceMappingURL=log.d.mts.map
|
package/dist/log.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { version } from "./version.mjs";
|
|
5
|
-
|
|
5
|
+
// src/log.ts
|
|
6
6
|
/** Log-only preset for tests and unconfigured servers (no delivery). */
|
|
7
7
|
function logPreset(options = {}) {
|
|
8
8
|
let logger = options.logger?.child({ component: "notify-email-log" });
|
|
@@ -24,7 +24,6 @@ function logPreset(options = {}) {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { logPreset };
|
|
29
28
|
|
|
30
29
|
//# sourceMappingURL=log.mjs.map
|
package/dist/mailpit.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { EmailSender } from "@storyshelf/core/adapter/email-sender";
|
|
4
4
|
import { Logger } from "@storyshelf/core/logger";
|
|
5
|
-
//#region src/mailpit.d.ts
|
|
6
5
|
/** Mailpit/Mailhog preset for local development (no real delivery). */
|
|
7
6
|
declare function mailpitPreset(options?: {
|
|
8
7
|
from?: string;
|
|
@@ -10,6 +9,5 @@ declare function mailpitPreset(options?: {
|
|
|
10
9
|
port?: number;
|
|
11
10
|
logger?: Logger;
|
|
12
11
|
}): EmailSender;
|
|
13
|
-
//#endregion
|
|
14
12
|
export { mailpitPreset };
|
|
15
13
|
//# sourceMappingURL=mailpit.d.mts.map
|
package/dist/mailpit.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { smtpPreset } from "./smtp.mjs";
|
|
5
|
-
|
|
5
|
+
// src/mailpit.ts
|
|
6
6
|
/** Mailpit/Mailhog preset for local development (no real delivery). */
|
|
7
7
|
function mailpitPreset(options = {}) {
|
|
8
8
|
return smtpPreset({
|
|
@@ -12,7 +12,6 @@ function mailpitPreset(options = {}) {
|
|
|
12
12
|
logger: options.logger
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
//#endregion
|
|
16
15
|
export { mailpitPreset };
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=mailpit.mjs.map
|
package/dist/smtp.d.mts
CHANGED
|
@@ -3,7 +3,6 @@ import __tsdown_shims_url from 'node:url';
|
|
|
3
3
|
import { SmtpPresetOptions } from "./types.mjs";
|
|
4
4
|
import { EmailSender } from "@storyshelf/core/adapter/email-sender";
|
|
5
5
|
import { Logger } from "@storyshelf/core/logger";
|
|
6
|
-
//#region src/smtp.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* SMTP transport preset (corporate relay, Postfix, SES-over-SMTP).
|
|
9
8
|
*
|
|
@@ -20,6 +19,5 @@ declare function smtpPreset(options: SmtpPresetOptions & {
|
|
|
20
19
|
* Requires the optional `nodemailer` peer when a sender is built.
|
|
21
20
|
*/
|
|
22
21
|
declare function smtpPresetFromEnv(env?: Record<string, string | undefined>, logger?: Logger): EmailSender | undefined;
|
|
23
|
-
//#endregion
|
|
24
22
|
export { smtpPreset, smtpPresetFromEnv };
|
|
25
23
|
//# sourceMappingURL=smtp.d.mts.map
|
package/dist/smtp.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { version } from "./version.mjs";
|
|
5
5
|
import nodemailer from "nodemailer";
|
|
6
|
-
|
|
6
|
+
// src/smtp.ts
|
|
7
7
|
/**
|
|
8
8
|
* SMTP transport preset (corporate relay, Postfix, SES-over-SMTP).
|
|
9
9
|
*
|
|
@@ -70,7 +70,6 @@ function smtpPresetFromEnv(env = process.env, logger) {
|
|
|
70
70
|
logger
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
//#endregion
|
|
74
73
|
export { smtpPreset, smtpPresetFromEnv };
|
|
75
74
|
|
|
76
75
|
//# sourceMappingURL=smtp.mjs.map
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
//#region src/types.d.ts
|
|
5
4
|
/** Display toggles plus addressing for email channels. */
|
|
6
5
|
declare const emailChannelConfigSchema: z.ZodObject<{
|
|
7
6
|
to: z.ZodString;
|
|
@@ -33,6 +32,5 @@ interface HttpPresetOptions {
|
|
|
33
32
|
headers?: Record<string, string>;
|
|
34
33
|
from: string;
|
|
35
34
|
}
|
|
36
|
-
//#endregion
|
|
37
35
|
export { EmailChannelConfig, HttpPresetOptions, SmtpPresetOptions, emailChannelConfigSchema };
|
|
38
36
|
//# sourceMappingURL=types.d.mts.map
|
package/dist/types.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
// src/types.ts
|
|
6
6
|
/** Display toggles plus addressing for email channels. */
|
|
7
7
|
const emailChannelConfigSchema = z.object({
|
|
8
8
|
to: z.string().min(1),
|
|
@@ -14,7 +14,6 @@ const emailChannelConfigSchema = z.object({
|
|
|
14
14
|
includeMessage: z.boolean().optional(),
|
|
15
15
|
includeCounts: z.boolean().optional()
|
|
16
16
|
});
|
|
17
|
-
//#endregion
|
|
18
17
|
export { emailChannelConfigSchema };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=types.mjs.map
|
package/dist/version.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/version.ts
|
|
5
5
|
/** Package version injected at build via __PKG_VERSION__. */
|
|
6
6
|
function version() {
|
|
7
|
-
return
|
|
7
|
+
return "0.8.0";
|
|
8
8
|
}
|
|
9
|
-
//#endregion
|
|
10
9
|
export { version };
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=version.mjs.map
|
package/dist/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["declare const __PKG_VERSION__: string | undefined;\n\n/** Package version injected at build via __PKG_VERSION__. */\nexport function version(): string {\n return
|
|
1
|
+
{"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["declare const __PKG_VERSION__: string | undefined;\n\n/** Package version injected at build via __PKG_VERSION__. */\nexport function version(): string {\n return typeof __PKG_VERSION__ === \"string\" ? __PKG_VERSION__ : \"0.0.0\";\n}\n"],"mappings":";;;;;AAGA,SAAgB,UAAkB;CAChC,OAAA;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyshelf/notify-email",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Email notification transport for StoryShelf (SMTP, Mailpit, log, HTTP APIs).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -27,9 +27,6 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"type": "module",
|
|
30
|
-
"engines": {
|
|
31
|
-
"node": ">=24"
|
|
32
|
-
},
|
|
33
30
|
"sideEffects": false,
|
|
34
31
|
"types": "./dist/index.d.mts",
|
|
35
32
|
"exports": {
|
|
@@ -80,29 +77,32 @@
|
|
|
80
77
|
"prepublishOnly": "nub run build"
|
|
81
78
|
},
|
|
82
79
|
"dependencies": {
|
|
83
|
-
"@storyshelf/core": "0.
|
|
84
|
-
"zod": "^4.
|
|
80
|
+
"@storyshelf/core": "0.8.0",
|
|
81
|
+
"zod": "^4.6.7"
|
|
85
82
|
},
|
|
86
83
|
"devDependencies": {
|
|
87
84
|
"@types/node": "^26.0.0",
|
|
88
85
|
"@types/nodemailer": "^8.0.2",
|
|
89
86
|
"@vitest/coverage-v8": "^4.0.0",
|
|
90
|
-
"nodemailer": "^10.
|
|
87
|
+
"nodemailer": "^10.2.1",
|
|
91
88
|
"oxfmt": "^0.65.0",
|
|
92
89
|
"oxlint": "^1.80.0",
|
|
93
90
|
"oxlint-tsgolint": "^7.0.2001",
|
|
94
91
|
"tsdown": "^0.22.14",
|
|
95
92
|
"typescript": "^7.0.2",
|
|
96
|
-
"vitest": "^5.0.
|
|
93
|
+
"vitest": "^5.0.5"
|
|
97
94
|
},
|
|
98
95
|
"peerDependencies": {
|
|
99
|
-
"nodemailer": "^10.
|
|
96
|
+
"nodemailer": "^10.2.1"
|
|
100
97
|
},
|
|
101
98
|
"peerDependenciesMeta": {
|
|
102
99
|
"nodemailer": {
|
|
103
100
|
"optional": true
|
|
104
101
|
}
|
|
105
102
|
},
|
|
103
|
+
"engines": {
|
|
104
|
+
"node": ">=24"
|
|
105
|
+
},
|
|
106
106
|
"jsr": {
|
|
107
107
|
"runtimeCompat": {
|
|
108
108
|
"node": true,
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { createEmailNotifier } from \"./email.ts\";\n/**\n * Email notification transport: SMTP/Mailpit/log/HTTP presets plus the\n * `email` channel provider. One transport serves notification channels\n * and (optionally) auth mail — wire the same sender into both.\n */\nimport { httpPreset } from \"./http.ts\";\nimport { logPreset } from \"./log.ts\";\nimport { mailpitPreset } from \"./mailpit.ts\";\nimport { smtpPreset, smtpPresetFromEnv } from \"./smtp.ts\";\n\n/** SMTP transport preset (corporate relay, Postfix, SES-over-SMTP). */\nexport { smtpPreset };\n/** SMTP sender from `SMTP_*` environment (undefined unless configured). */\nexport { smtpPresetFromEnv };\n/** Mailpit/Mailhog preset for local development (no real delivery). */\nexport { mailpitPreset };\n/** Log-only preset for tests and unconfigured servers (no delivery). */\nexport { logPreset };\n/** HTTP email-API preset (Resend/Postmark-style JSON endpoint). */\nexport { httpPreset };\n/** `email` channel provider over a shared transport. */\nexport { createEmailNotifier };\n\nexport type { EmailNotifierDefaults } from \"./email.ts\";\nexport type { EmailChannelConfig, HttpPresetOptions, SmtpPresetOptions } from \"./types.ts\";\nexport { emailChannelConfigSchema } from \"./types.ts\";\n"],"mappings":""}
|