@nathapp/nestjs-logging 3.3.0 → 4.0.1

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @nathapp/nestjs-logging@3.3.0 build
2
+ > @nathapp/nestjs-logging@4.0.1 build
3
3
  > rimraf dist && tsc -p tsconfig.json
4
4
 
@@ -1,6 +1,6 @@
1
- import { ModuleMetadata, Type } from "@nestjs/common";
2
- import { MiddlewareConfigProxy } from "@nestjs/common/interfaces";
1
+ import { MiddlewareConsumer, ModuleMetadata, Type } from "@nestjs/common";
3
2
  import { FormatterFunction, SerializeFunction } from "../serialize";
3
+ type MiddlewareConfigProxy = ReturnType<MiddlewareConsumer['apply']>;
4
4
  export declare const LOGGING_MODULE_OPTIONS = "LOGGING_MODULE_OPTIONS";
5
5
  export type LoggerType = 'pino' | 'winston' | 'default';
6
6
  export type LoggerLevel = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'verbose';
@@ -76,3 +76,4 @@ export interface AdditionalFactoryOptions {
76
76
  autoLogging?: Pick<AutoLoggingOptions, 'serialize' | 'formatter'>;
77
77
  middleware?: Pick<MiddlewareOptions, 'requestIdGenerator' | 'exclude' | 'forRoutes'>;
78
78
  }
79
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"logging.interface.js","sourceRoot":"","sources":["../../lib/module/logging.interface.ts"],"names":[],"mappings":";;;AAIa,QAAA,sBAAsB,GAAG,wBAAwB,CAAC"}
1
+ {"version":3,"file":"logging.interface.js","sourceRoot":"","sources":["../../lib/module/logging.interface.ts"],"names":[],"mappings":";;;AAMa,QAAA,sBAAsB,GAAG,wBAAwB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PinoLoggerService = void 0;
4
- const load_package_util_1 = require("@nestjs/common/utils/load-package.util");
4
+ const nestjs_common_1 = require("@nathapp/nestjs-common");
5
5
  const logger_service_1 = require("./logger.service");
6
6
  const path = require("path");
7
7
  const util_1 = require("../util");
@@ -17,7 +17,7 @@ class PinoLoggerService extends logger_service_1.Logger {
17
17
  constructor(options, contextService) {
18
18
  var _a, _b, _c;
19
19
  super(contextService);
20
- const pino = (0, load_package_util_1.loadPackage)('pino', 'LoggingModule', () => require('pino'));
20
+ const pino = (0, nestjs_common_1.loadPackage)('pino', 'LoggingModule', () => require('pino'));
21
21
  const level = options.level || 'info';
22
22
  const transports = [];
23
23
  if ((_a = options.console) === null || _a === void 0 ? void 0 : _a.enabled) {
@@ -1 +1 @@
1
- {"version":3,"file":"pino-logger.service.js","sourceRoot":"","sources":["../../lib/provider/pino-logger.service.ts"],"names":[],"mappings":";;;AACA,8EAAqE;AACrE,qDAA0C;AAC1C,6BAA6B;AAC7B,kCAA+C;AAI/C,MAAM,gBAAgB,GAAgC;IACpD,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,OAAO;CACjB,CAAA;AAGD,MAAa,iBAAkB,SAAQ,uBAAM;IAI3C,YAAY,OAA8B,EAAE,cAAsC;;QAChF,KAAK,CAAC,cAAc,CAAC,CAAC;QACtB,MAAM,IAAI,GAAG,IAAA,+BAAW,EAAC,MAAM,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACzE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,MAAM,CAAC;QAEtC,MAAM,UAAU,GAAU,EAAE,CAAC;QAE7B,IAAI,MAAA,OAAO,CAAC,OAAO,0CAAE,OAAO,EAAE,CAAC;YAC7B,IAAI,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;gBAEhC,UAAU,CAAC,IAAI,CAAC;oBACd,MAAM,EAAE,aAAa;oBACrB,OAAO,EAAE;wBACP,QAAQ,E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I,EAAE,CAAC,CAAC;gBAC3B,CAAC;qBAAM,CAAC;oBACN,IAAI,EAAE,CAAC;gBACT,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAzID,8CAyIC"}
1
+ {"version":3,"file":"pino-logger.service.js","sourceRoot":"","sources":["../../lib/provider/pino-logger.service.ts"],"names":[],"mappings":";;;AACA,0DAAqD;AACrD,qDAA0C;AAC1C,6BAA6B;AAC7B,kCAA+C;AAI/C,MAAM,gBAAgB,GAAgC;IACpD,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,OAAO;CACjB,CAAA;AAGD,MAAa,iBAAkB,SAAQ,uBAAM;IAI3C,YAAY,OAA8B,EAAE,cAAsC;;QAChF,KAAK,CAAC,cAAc,CAAC,CAAC;QACtB,MAAM,IAAI,GAAG,IAAA,2BAAW,EAAC,MAAM,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACzE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,MAAM,CAAC;QAEtC,MAAM,UAAU,GAAU,EAAE,CAAC;QAE7B,IAAI,MAAA,OAAO,CAAC,OAAO,0CAAE,OAAO,EAAE,CAAC;YAC7B,IAAI,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;gBAEhC,UAAU,CAAC,IAAI,CAAC;oBACd,MAAM,EAAE,aAAa;oBACrB,OAAO,EAAE;wBACP,QAAQ,EAAE,IAAI;wBACd,KAAK;wBACL,aAAa,EAAE,cAAc;wBAC7B,MAAM,EAAE,cAAc;qBACvB;iBACF,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,UAAU,CAAC,IAAI,CAAC;oBACd,MAAM,EAAE,WAAW;oBACnB,OAAO,EAAE;wBAEP,WAAW,E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(exports, "__esModule", { value: true });
3
3
  exports.WinstonLoggerService = void 0;
4
- const load_package_util_1 = require("@nestjs/common/utils/load-package.util");
4
+ const nestjs_common_1 = require("@nathapp/nestjs-common");
5
5
  const logger_service_1 = require("./logger.service");
6
6
  const util_1 = require("../util");
7
7
  class WinstonLoggerService extends logger_service_1.Logger {
8
8
  constructor(options, contextService) {
9
9
  var _a, _b, _c, _d;
10
10
  super(contextService);
11
- const winston = (0, load_package_util_1.loadPackage)('winston', 'LoggingModule', () => require('winston'));
11
+ const winston = (0, nestjs_common_1.loadPackage)('winston', 'LoggingModule', () => require('winston'));
12
12
  const transports = [];
13
13
  const level = options.level || 'info';
14
14
  if ((_a = options.console) === null || _a === void 0 ? void 0 : _a.enabled) {
@@ -29,7 +29,7 @@ class WinstonLoggerService extends logger_service_1.Logger {
29
29
  transports.push(fileTransport);
30
30
  }
31
31
  if ((_d = options.centralized) === null || _d === void 0 ? void 0 : _d.enabled) {
32
- const LokiTransport = (0, load_package_util_1.loadPackage)('winston-loki', 'LoggingModule', () => require('winston-loki'));
32
+ const LokiTransport = (0, nestjs_common_1.loadPackage)('winston-loki', 'LoggingModule', () => require('winston-loki'));
33
33
  const centralized = options.centralized;
34
34
  let basicAuth = undefined;
35
35
  if (centralized.basicAuth) {
@@ -1 +1 @@
1
- {"version":3,"file":"winston-logger.service.js","sourceRoot":"","sources":["../../lib/provider/winston-logger.service.ts"],"names":[],"mappings":";;;AACA,8EAAqE;AACrE,qDAA0C;AAC1C,kCAAiE;AAIjE,MAAa,oBAAqB,SAAQ,uBAAM;IAK9C,YAAY,OAA8B,EAAE,cAAsC;;QAChF,KAAK,CAAC,cAAc,CAAC,CAAC;QACtB,MAAM,OAAO,GAAG,IAAA,+BAAW,EAAC,SAAS,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;QAClF,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,MAAM,KAAK,GAAG,OAAO,CAAC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O,EAAE,EAAE,sBAAsB,CAAC,CAAC;gBACzF,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACd,QAAQ,GAAG,IAAI,CAAC;oBAChB,YAAY,CAAC,OAAO,CAAC,CAAC;oBACtB,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;wBACpB,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;oBACxB,CAAC;oBACD,OAAO,EAAE,CAAC;gBACZ,CAAC;YACH,CAAC,CAAC;YAGF,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBAC9B,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACd,QAAQ,GAAG,IAAI,CAAC;oBAChB,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;oBACrD,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;oBACnD,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;wBACpB,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;oBACxB,CAAC;oBACD,OAAO,EAAE,CAAC;gBACZ,CAAC;YACH,CAAC,EAAE,IAAI,CAAC,CAAC;YAET,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;YAC3C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YAGzC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAvJD,oDAuJC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nathapp/nestjs-logging",
3
- "version": "3.3.0",
3
+ "version": "4.0.1",
4
4
  "description": "nestjs-logging",
5
5
  "scripts": {
6
6
  "clean": "rimraf dist/ .turbo/",
@@ -16,7 +16,7 @@
16
16
  "author": "William Khoo",
17
17
  "license": "ISC",
18
18
  "engines": {
19
- "node": ">=16"
19
+ "node": "^20.19.0 || >=22.12.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@nathapp/eslint-config": "1.0.1",
@@ -30,7 +30,7 @@
30
30
  "winston-loki": "^6.1.3"
31
31
  },
32
32
  "peerDependencies": {
33
- "@nathapp/nestjs-common": "^3.0.0",
33
+ "@nathapp/nestjs-common": "^4.0.0-rc.0",
34
34
  "fast-redact": "^3.0.0",
35
35
  "pino": "^7.5.0 || ^8.0.0 || ^9.0.0",
36
36
  "rotating-file-stream": "^3.0.0",
@@ -57,7 +57,7 @@
57
57
  "lib": "lib"
58
58
  },
59
59
  "dependencies": {
60
- "@nathapp/nestjs-common": "^3.3.0",
60
+ "@nathapp/nestjs-common": "^4.0.1",
61
61
  "fast-redact": "^3.0.0"
62
62
  }
63
63
  }
package/.eslintrc.js DELETED
@@ -1,24 +0,0 @@
1
- module.exports = {
2
- parser: '@typescript-eslint/parser',
3
- parserOptions: {
4
- project: 'tsconfig.json',
5
- sourceType: 'module',
6
- },
7
- plugins: ['@typescript-eslint/eslint-plugin'],
8
- extends: [
9
- 'plugin:@typescript-eslint/recommended',
10
- 'plugin:prettier/recommended',
11
- ],
12
- root: true,
13
- env: {
14
- node: true,
15
- jest: true,
16
- },
17
- ignorePatterns: ['.eslintrc.js'],
18
- rules: {
19
- '@typescript-eslint/interface-name-prefix': 'off',
20
- '@typescript-eslint/explicit-function-return-type': 'off',
21
- '@typescript-eslint/explicit-module-boundary-types': 'off',
22
- '@typescript-eslint/no-explicit-any': 'off',
23
- },
24
- };
package/CHANGELOG.md DELETED
@@ -1,364 +0,0 @@
1
- # @nathapp/nestjs-logging
2
-
3
- ## 3.3.0
4
-
5
- ### Patch Changes
6
-
7
- - @nathapp/nestjs-common@3.3.0
8
-
9
- ## 3.2.1
10
-
11
- ### Patch Changes
12
-
13
- - 0610b83: Fix Exception Bug on nestjs-common
14
- - Updated dependencies [0610b83]
15
- - @nathapp/nestjs-common@3.2.1
16
-
17
- ## 3.2.0
18
-
19
- ### Minor Changes
20
-
21
- - 1876b9a: ### nestjs-auth
22
-
23
- - Add JWKS support via `JwksJwtStrategyProvider` and `createJwksStrategyProvider` factory — enables remote key resolution through `jwks-rsa` (optional peer dep)
24
- - Add `validateJwksOptions` security guard and `JwksOptions` interface
25
- - Export `JwksJwtStrategyProvider` and `JwksOptions` from the public API
26
- - Fix permission guard and JWT module immutability issues from code review
27
-
28
- ### nestjs-typeorm
29
-
30
- - Add `AbstractTypeOrmRepository<TDomain, TEntity, TId>` — portable `IRepository` implementation decoupled from TypeORM internals
31
- - Add `TYPEORM_TRANSACTION_ALS` DI token and publish it from `forRoot`/`forRootAsync`
32
- - `forCustomRepository` now instantiates `AbstractTypeOrmRepository` subclasses with the correct per-DataSource tx manager token
33
- - Add `getTypeOrmTransactionManagerToken(name?)` helper for multi-DataSource wiring
34
- - Named DataSource tx tokens no longer collide; default DataSource still aliases the global `TRANSACTION_MANAGER` symbol
35
-
36
- ### nestjs-prisma
37
-
38
- - Add `getPrismaTransactionManagerToken(name?)` helper for multi-DataSource wiring
39
- - `forRoot` / `forRootAsync` register named tx manager token + default-only guard to prevent collision
40
-
41
- ### nestjs-data
42
-
43
- - Add `IRepository<TDomain, TId>` portable repository contract
44
- - Fix missing `@nathapp/nestjs-common` peer dep for turborepo build resolution
45
-
46
- ### nestjs-common
47
-
48
- - Add `request-ip` utility for extracting client IP across Express and Fastify adapters
49
-
50
- ### nestjs-cache
51
-
52
- - Fix cache interceptor, cache manager, and cache tag registry immutability and type issues
53
-
54
- ### nestjs-app
55
-
56
- - Fix `nathapp.ts` and `app-factory.ts` code review findings (immutability, error handling)
57
-
58
- ### nestjs-queue
59
-
60
- - Upgrade `uuid` dependency from `^9.0.0` to `^11.1.1` (security)
61
- - Fix BullMQ health check to use `IRedisClient.info()` (aligned with BullMQ interface)
62
-
63
- ### nestjs-notification
64
-
65
- - Upgrade `nodemailer` dev dep from `^7` to `^8` — resolves SMTP command injection CVEs (GHSA-c7w3-x93f-qmm8, GHSA-vvjj-xcjg-gr5g)
66
-
67
- ### nestjs-storage
68
-
69
- - Fix code review findings (immutability, validation)
70
-
71
- ### nestjs-throttler
72
-
73
- - Fix code review findings
74
-
75
- ### All packages
76
-
77
- - Upgrade AJV to v8 (removes root override that broke `@fastify/ajv-compiler`)
78
- - Align all package versions to 3.1.3 as baseline for this minor release
79
-
80
- ### Patch Changes
81
-
82
- - Updated dependencies [1876b9a]
83
- - @nathapp/nestjs-common@3.2.0
84
-
85
- ## 3.0.0
86
-
87
- ### Major Changes
88
-
89
- - 86a36b8: # 🚀 v3.0.0 Monorepo Enterprise Upgrade
90
-
91
- This release brings significant security hardening, strict typing, improved observability, and comprehensive documentation across the entire Nathapp NestJS ecosystem.
92
-
93
- ## ⚠️ Breaking Changes
94
-
95
- ### nestjs-common
96
-
97
- - **Trust Proxy (Fail-Closed)**: Trust proxy is now disabled by default. Production deployments behind a reverse proxy MUST configure `trustedProxies` or use a preset (`cloudflare`, `aws-alb`, `nginx-local`, etc.). See `docs/trust-proxy-security.md`.
98
- - **SerializableInterceptor**: Now uses pure transformation — original response objects are no longer mutated. Primitives in arrays are preserved correctly.
99
- - **AppException**: Now generic `AppException<T>` for strict argument typing.
100
-
101
- ### nestjs-logging
102
-
103
- - **Redaction**: Default redact paths are now constrained to 3 levels deep (`*.*.key`).
104
- - **Structured Logs**: Standardized field names for ELK/Loki/Datadog compatibility.
105
- - **Graceful Drain**: Logger now implements `OnModuleDestroy` to flush pending writes on shutdown.
106
-
107
- ### nestjs-typeorm
108
-
109
- - **Connection Validation**: `TypeOrmExModule.forRoot()` now throws `"Connection Not Supported"` when no valid connection type is provided (previously defaulted silently to MySQL).
110
-
111
- ## 🔒 Security
112
-
113
- - **nestjs-common**: Trust proxy fail-closed default prevents IP spoofing when misconfigured. Comprehensive security documentation with provider presets.
114
- - **nestjs-storage**: GDrive refreshToken security best practices documented. Provider capability matrix added.
115
- - **nestjs-throttler**: Documented that `getTracker()` executes synchronously — no async TOCTOU race condition in rate limiting.
116
- - **nestjs-typeorm**: Stored procedure name validation with whitelist pattern (`/^[a-zA-Z_][a-zA-Z0-9_.]*$/`) prevents SQL injection.
117
- - **nestjs-cache**: Tag registry now receives TTL for proper expiration of tag-to-key mappings.
118
- - **nestjs-microservices**: Fixed gRPC Bearer token extraction whitespace bug. Full test coverage for all guards.
119
- - **nestjs-auth-2fa**: Timing-safe TOTP verification prevents timing attacks.
120
-
121
- ## ✨ Features & Improvements
122
-
123
- - **nestjs-storage**: Added native support for **Azure Blob Storage** and **Google Cloud Storage**. Provider capability matrix documents supported methods per provider.
124
- - **nestjs-microservices**: Full guard coverage (100%), Service Identity JWT + HMAC authentication, `ServicePermissionRegistry` for fine-grained access control.
125
- - **nestjs-typeorm**: Automatic mapping of database errors to `AppException` via `TypeOrmExceptionFilter`.
126
- - **nestjs-auth-2fa**: `BaseTwoFactorGuard` with flexible policy engine. DI-aware provider factory with comprehensive architectural documentation.
127
- - **nestjs-cache**: Deep-cloning of cached objects to prevent cross-request state leakage. Touch fallback avoided for distributed strategies (race condition prevention).
128
- - **nestjs-queue**: Race-condition fixes in BullMQ/RabbitMQ batch accumulators.
129
- - **nestjs-prisma**: `PrismaExceptionFilter` and transaction helper. Parallel query execution validated.
130
- - **nestjs-auth**: Comprehensive JSDoc on all public APIs. All TODO comments resolved.
131
- - **nestjs-common**: `ConfigurableModuleBuilder` with `externallyConfigured()` support.
132
- - **Global**: 2,500+ tests across all 13 packages. Comprehensive JSDoc for all public APIs.
133
-
134
- ## 📚 Documentation
135
-
136
- - `nestjs-common/docs/trust-proxy-security.md` — IP spoofing risks, preset configurations, verification steps
137
- - `nestjs-storage/docs/gdrive-security.md` — refreshToken security best practices
138
- - `nestjs-storage/docs/provider-capabilities.md` — method support matrix per provider
139
- - All packages: JSDoc on public APIs, MIGRATION.md guides where applicable
140
-
141
- ### Patch Changes
142
-
143
- - Updated dependencies [86a36b8]
144
- - @nathapp/nestjs-common@3.0.0
145
-
146
- ## 3.0.0-rc.0
147
-
148
- ### Major Changes
149
-
150
- - # 🚀 v3.0.0-rc Monorepo Enterprise Upgrade
151
-
152
- This release brings significant security, reliability, and observability improvements across the entire Nathapp ecosystem.
153
-
154
- ## ⚠️ [BREAKING CHANGES]
155
-
156
- ### nestjs-common
157
-
158
- - **Trust Proxy (Fail-Closed)**: Trust proxy is now disabled by default. Production deployments MUST configure `trustedProxies` or use a preset (`cloudflare`, `aws-alb`, etc.).
159
- - **SerializableInterceptor**: Now uses pure transformation. Original response objects are no longer mutated.
160
- - **AppException**: Now generic `AppException<T>` for strict argument typing.
161
-
162
- ### nestjs-logging
163
-
164
- - **Redaction**: Default redact paths are now constrained to 3 levels deep (`*.*.key`).
165
- - **Structured Logs**: Standardized field names for ELK/Loki/Datadog compatibility.
166
-
167
- ## ✨ Features & Improvements
168
-
169
- - **nestjs-storage**: Added native support for **Azure Blob Storage** and **Google Cloud Storage**.
170
- - **nestjs-microservices**: Full guard coverage and secured gRPC Bearer token extraction.
171
- - **nestjs-typeorm**: Automatic mapping of database errors to `AppException`.
172
- - **nestjs-auth-2fa**: Timing-safe TOTP verification and flexible policy engine.
173
- - **nestjs-cache**: Deep-cloning of cached objects to prevent cross-request state leakage.
174
- - **nestjs-queue**: Race-condition fixes in BullMQ/RabbitMQ batch accumulators.
175
- - **nestjs-throttler**: Added async trust proxy support.
176
- - **Global**: Comprehensive JSDoc for all public APIs across all packages.
177
-
178
- ### Patch Changes
179
-
180
- - Updated dependencies
181
- - @nathapp/nestjs-common@3.0.0-rc.0
182
-
183
- ## 2.1.5
184
-
185
- ### Patch Changes
186
-
187
- - # @nathapp/nestjs-notification v2.2.0 - Enterprise-Grade Upgrade
188
-
189
- Major enterprise enhancements to the notification system with 9 phases of improvements:
190
-
191
- ## New Features
192
-
193
- ### Phase 1: Pluggable Template Engine
194
-
195
- - `TemplateEngine` interface for custom template rendering
196
- - `StringFormatEngine` as default (backwards compatible)
197
- - Apps can now inject Handlebars, EJS, or custom engines
198
-
199
- ### Phase 2: Configurable Strict Mode
200
-
201
- - `strict: true` (default) throws errors when services aren't configured
202
- - `strict: false` for graceful degradation (returns `{ success: false }`)
203
- - Clear error messages via `NotificationConfigError`
204
-
205
- ### Phase 3: Unified `send()` Method
206
-
207
- - Single method dispatches to multiple channels
208
- - `NotificationPayload` with `channels: ['email', 'push', 'sms']`
209
- - Aggregated results across all channels
210
-
211
- ### Phase 4: Platform Alias
212
-
213
- - Added `platform` field (deprecated `paltform` typo)
214
- - Backwards compatible with fallback
215
-
216
- ### Phase 5: SMS Integration
217
-
218
- - `SmsService` wired into `NotificationModule`
219
- - `sendSms()` with full template support
220
- - Ready for provider packages (Twilio, SNS)
221
-
222
- ### Phase 6: Interceptors & Hooks
223
-
224
- - `NotificationInterceptor` interface
225
- - `beforeSend`, `afterSend`, `onError` hooks
226
- - Global logging, auditing, message modification
227
-
228
- ### Phase 7: WhatsApp Channel
229
-
230
- - `WhatsAppService` abstract class
231
- - `WhatsAppMessage` interface with Meta Business API support
232
- - Template-based WhatsApp notifications
233
-
234
- ### Phase 8: Channel Fallback
235
-
236
- - `fallback: ['sms']` on `NotificationPayload`
237
- - Auto-retry through fallback channels when primary fails
238
- - Interceptors receive `isFallback` + `failedChannel` context
239
-
240
- ### Phase 9: Unified Provider Registry (⚠️ Breaking)
241
-
242
- - Replaced per-channel modules with unified `providers` array
243
- - `NotificationProviderFactory` validates provider ↔ channel match
244
- - `NotificationModuleOptionsFactory` for async configuration
245
- - Simplified API: `NotificationModule.forRoot({ providers: [...] })`
246
-
247
- ## Breaking Changes (Phase 9)
248
-
249
- - `emailOptions` → removed (use `providers` array)
250
- - `pushNotificationOptions` → removed (use `providers` array)
251
- - `smsService` → removed (use `providers` array)
252
- - `whatsAppService` → removed (use `providers` array)
253
- - `EmailModule`, `PushNotificationModule` no longer exported from main index
254
-
255
- ## Migration Guide
256
-
257
- ### Before
258
-
259
- ```typescript
260
- NotificationModule.forRoot({
261
- emailOptions: EmailModule.forRoot({ option: { type: 'smtp', options: {...} } }),
262
- templateLoader: MyLoader,
263
- })
264
- ```
265
-
266
- ### After
267
-
268
- ```typescript
269
- NotificationModule.forRoot({
270
- providers: [
271
- {
272
- channel: "email",
273
- provider: SmtpEmailProvider,
274
- options: { url: "...", from: "..." },
275
- },
276
- ],
277
- templateLoader: MyLoader,
278
- });
279
- ```
280
-
281
- ## Stats
282
-
283
- - **159 tests** (all passing)
284
- - **88.5% code coverage**
285
- - Fully backwards compatible (except Phase 9 breaking changes)
286
-
287
- - Updated dependencies
288
- - @nathapp/nestjs-common@2.1.5
289
-
290
- ## 2.1.1
291
-
292
- ### Patch Changes
293
-
294
- - 1244520: fix: correct main/types paths to dist/ directory
295
- - Updated dependencies [1244520]
296
- - @nathapp/nestjs-common@2.1.1
297
-
298
- ## 3.0.0-rc.4
299
-
300
- ### Minor Changes
301
-
302
- - de7078f: bump version
303
-
304
- ### Patch Changes
305
-
306
- - Updated dependencies [de7078f]
307
- - @nathapp/nestjs-common@3.0.0-rc.4
308
-
309
- ## 2.0.4
310
-
311
- ### Patch Changes
312
-
313
- - 65148c4: security patch
314
- - Updated dependencies [65148c4]
315
- - @nathapp/nestjs-common@2.0.4
316
-
317
- ## 2.0.3
318
-
319
- ### Patch Changes
320
-
321
- - ac0012d: LoggingInterceptor bug fix
322
- - Updated dependencies [9da9d5a]
323
- - @nathapp/nestjs-common@2.0.3
324
-
325
- ## 2.0.3-rc.0
326
-
327
- ### Patch Changes
328
-
329
- - ac0012d: LoggingInterceptor bug fix
330
- - Updated dependencies [9da9d5a]
331
- - @nathapp/nestjs-common@2.0.3-rc.0
332
-
333
- ## 2.0.2
334
-
335
- ### Patch Changes
336
-
337
- - 5b4c986: add @nathapp/nestjs-logging and depreciated @nathapp/nestjs-common logging
338
- - 184e23b: refactory LoggerFactory and add FlushLogs on nathapp
339
- - e493769: implement additionalFactoryOptions and bug fix
340
- - a9cfacb: release nestjs-logging and add logErrorResponse
341
-
342
- ## 2.0.1-rc.5
343
-
344
- ### Patch Changes
345
-
346
- - e493769: implement additionalFactoryOptions and bug fix
347
-
348
- ## 2.0.1-rc.4
349
-
350
- ### Patch Changes
351
-
352
- - 5b4c986: add @nathapp/nestjs-logging and depreciated @nathapp/nestjs-common logging
353
-
354
- ## 2.0.1-rc.3
355
-
356
- ### Patch Changes
357
-
358
- - 184e23b: refactory LoggerFactory and add FlushLogs on nathapp
359
-
360
- ## 2.0.1-rc.2
361
-
362
- ### Patch Changes
363
-
364
- - a9cfacb: release nestjs-logging and add logErrorResponse