@storyshelf/notify-email 0.7.0 → 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/dist/email.d.mts CHANGED
@@ -3,7 +3,6 @@ import __tsdown_shims_url from 'node:url';
3
3
  import { EmailSender } from "@storyshelf/core/adapter/email-sender";
4
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;
@@ -18,6 +17,5 @@ declare function createEmailNotifier(sender: EmailSender, defaults?: EmailNotifi
18
17
  }): MessageNotifierProvider;
19
18
  /** Describe the email provider (name, version, config schema). */
20
19
  declare function getMetadata(): MessageNotifierProvider["metadata"];
21
- //#endregion
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
- //#region src/email.ts
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: "0.7.0",
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/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
- //#region src/http.ts
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
- //#region src/log.ts
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
@@ -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
- //#region src/mailpit.ts
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
- //#region src/smtp.ts
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
- //#region src/types.ts
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
- //#region src/version.ts
4
+ // src/version.ts
5
5
  /** Package version injected at build via __PKG_VERSION__. */
6
6
  function version() {
7
- return "0.7.0";
7
+ return "0.8.0";
8
8
  }
9
- //#endregion
10
9
  export { version };
11
10
 
12
11
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyshelf/notify-email",
3
- "version": "0.7.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",
@@ -77,23 +77,23 @@
77
77
  "prepublishOnly": "nub run build"
78
78
  },
79
79
  "dependencies": {
80
- "@storyshelf/core": "0.7.0",
81
- "zod": "^4.2.0"
80
+ "@storyshelf/core": "0.8.0",
81
+ "zod": "^4.6.7"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@types/node": "^26.0.0",
85
85
  "@types/nodemailer": "^8.0.2",
86
86
  "@vitest/coverage-v8": "^4.0.0",
87
- "nodemailer": "^10.0.12",
87
+ "nodemailer": "^10.2.1",
88
88
  "oxfmt": "^0.65.0",
89
89
  "oxlint": "^1.80.0",
90
90
  "oxlint-tsgolint": "^7.0.2001",
91
91
  "tsdown": "^0.22.14",
92
92
  "typescript": "^7.0.2",
93
- "vitest": "^5.0.0"
93
+ "vitest": "^5.0.5"
94
94
  },
95
95
  "peerDependencies": {
96
- "nodemailer": "^10.0.12"
96
+ "nodemailer": "^10.2.1"
97
97
  },
98
98
  "peerDependenciesMeta": {
99
99
  "nodemailer": {
@@ -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":""}