@bymax-one/nest-notification 1.4.3 → 1.4.4

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +14 -2
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.4.4] - 2026-11-01
11
+
12
+ Documentation only: `dist/` is byte-identical to 1.4.3.
13
+
14
+ ### Fixed
15
+
16
+ - **The development Quick Start now runs.** Step 2 registered `NoOpEmailProvider` and
17
+ `InMemoryOtpStorage` but no template renderer, and the OTP email is rendered from the `otp_code`
18
+ template, which the default renderer does not ship. The module booted, and the first
19
+ `generate()` threw `TEMPLATE_NOT_FOUND`. Step 2 now registers a `DefaultTemplateRenderer` with
20
+ the same `otp_code::en` template as step 3, and says why it is needed.
21
+
22
+ ### Tests
23
+
24
+ - The README development Quick Start is executed as written: the module and the service are
25
+ compiled from the README text and run against a Nest testing graph, with a stand-in email
26
+ provider. A second case fails if the `otp_code::en` template in steps 2 and 3 drifts apart.
27
+
10
28
  ## [1.4.3] - 2026-11-01
11
29
 
12
30
  ### ⚠️ Apply before upgrading
@@ -964,7 +982,8 @@ rejected at startup rather than failing on the first send.
964
982
 
965
983
  [1.0.4]: https://github.com/bymaxone/nest-notification/compare/v1.0.3...v1.0.4
966
984
  [1.0.3]: https://github.com/bymaxone/nest-notification/compare/v1.0.2...v1.0.3
967
- [Unreleased]: https://github.com/bymaxone/nest-notification/compare/v1.4.3...HEAD
985
+ [Unreleased]: https://github.com/bymaxone/nest-notification/compare/v1.4.4...HEAD
986
+ [1.4.4]: https://github.com/bymaxone/nest-notification/compare/v1.4.3...v1.4.4
968
987
  [1.4.3]: https://github.com/bymaxone/nest-notification/compare/v1.4.2...v1.4.3
969
988
  [1.4.2]: https://github.com/bymaxone/nest-notification/compare/v1.4.1...v1.4.2
970
989
  [1.4.1]: https://github.com/bymaxone/nest-notification/compare/v1.4.0...v1.4.1
package/README.md CHANGED
@@ -151,7 +151,8 @@ import { Module } from '@nestjs/common'
151
151
  import {
152
152
  BymaxNotificationModule,
153
153
  NoOpEmailProvider,
154
- InMemoryOtpStorage
154
+ InMemoryOtpStorage,
155
+ DefaultTemplateRenderer
155
156
  } from '@bymax-one/nest-notification'
156
157
 
157
158
  @Module({
@@ -159,7 +160,16 @@ import {
159
160
  BymaxNotificationModule.forRoot({
160
161
  email: {
161
162
  provider: new NoOpEmailProvider(),
162
- defaultFrom: 'no-reply@dev.local'
163
+ defaultFrom: 'no-reply@dev.local',
164
+ templateRenderer: new DefaultTemplateRenderer({
165
+ templates: {
166
+ 'otp_code::en': {
167
+ subject: 'Your Acme verification code',
168
+ html: '<p>Your code is <strong>{{code}}</strong>. It expires in {{expiresInMinutes}} minutes.</p>',
169
+ text: 'Your code is {{code}}. It expires in {{expiresInMinutes}} minutes.'
170
+ }
171
+ }
172
+ })
163
173
  },
164
174
  otp: {
165
175
  storage: new InMemoryOtpStorage(),
@@ -174,6 +184,8 @@ import {
174
184
  export class AppModule {}
175
185
  ```
176
186
 
187
+ The OTP email is rendered from the `otp_code` template, and the default renderer ships none, so register one as above (the same template as in step 3). Without it the first `generate()` throws `TEMPLATE_NOT_FOUND`.
188
+
177
189
  Inject `OtpService` anywhere and the two-step flow is complete:
178
190
 
179
191
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bymax-one/nest-notification",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Multi-channel notification library for NestJS — email, OTP, SMS, push — with pluggable providers and storage, multi-tenant by design, zero runtime dependencies.",
5
5
  "author": "Bymax One <support@bymax.one>",
6
6
  "license": "MIT",