@bymax-one/nest-logger 1.0.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/CHANGELOG.md +74 -0
- package/LICENSE +21 -0
- package/README.md +797 -0
- package/dist/server/index.cjs +1470 -0
- package/dist/server/index.d.cts +953 -0
- package/dist/server/index.d.ts +953 -0
- package/dist/server/index.mjs +1452 -0
- package/dist/shared/index.cjs +27 -0
- package/dist/shared/index.d.cts +120 -0
- package/dist/shared/index.d.ts +120 -0
- package/dist/shared/index.mjs +24 -0
- package/package.json +141 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@bymax-one/nest-logger` are documented here.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
The `release.yml` workflow extracts the section matching the pushed `vX.Y.Z` tag
|
|
9
|
+
as the GitHub Release body, so each released version needs a matching `## [X.Y.Z]`
|
|
10
|
+
heading here.
|
|
11
|
+
|
|
12
|
+
## [Unreleased]
|
|
13
|
+
|
|
14
|
+
## [1.0.0] - 2026-06-18
|
|
15
|
+
|
|
16
|
+
### Security
|
|
17
|
+
|
|
18
|
+
- Pin `esbuild` to `^0.28.1` (via `pnpm.overrides`) to clear CVE alerts in the
|
|
19
|
+
transitive dependency brought in by `tsup`
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Benchmark harness (`bench/throughput.bench.ts`) migrated to the tinybench v6 API:
|
|
24
|
+
result access changed from the `result.hz` scalar to `result.throughput.mean`
|
|
25
|
+
(Statistics object); `.run()` is now async
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- Mutation score improved from 95.93 % → **97.42 %** (theoretical maximum); all 7
|
|
30
|
+
previously-unresolved `perTest` attribution survivors eliminated via targeted test
|
|
31
|
+
assertions — see [`docs/mutation_testing_results.md`](docs/mutation_testing_results.md)
|
|
32
|
+
- Dev dependencies bumped: commitlint 21, lint-staged 17, `@types/node` 25,
|
|
33
|
+
TypeScript 5.9, Jest 30, and the full dev-dependencies group
|
|
34
|
+
|
|
35
|
+
## [0.1.0] - 2026-05-30
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- `PinoLoggerService` — NestJS `LoggerService` interface compatibility plus
|
|
40
|
+
structured API following the `MODULE_ACTION_RESULT` convention
|
|
41
|
+
(`info`, `warnStructured`, `errorStructured`)
|
|
42
|
+
- Optional OpenTelemetry trace context injection (`traceId`, `spanId`,
|
|
43
|
+
`traceFlags`) via Pino `mixin` with `camelCase` / `snake_case` field format
|
|
44
|
+
shortcut
|
|
45
|
+
- `AsyncLocalStorage` context propagation — `requestId`, `tenantId`, `userId`
|
|
46
|
+
automatically included in every log entry within a request scope
|
|
47
|
+
- HTTP logging interceptor (`HttpLoggingInterceptor`) + global exception filter
|
|
48
|
+
(`HttpExceptionFilter`) + `RequestIdMiddleware` with `x-request-id` header
|
|
49
|
+
support
|
|
50
|
+
- `PrettyDevDestination` — colorized human-readable output for development,
|
|
51
|
+
auto-disabled in production
|
|
52
|
+
- `DefaultStdoutDestination` — JSON output to `process.stdout`
|
|
53
|
+
- `DestinationRegistry` — lifecycle-aware fan-out to multiple pluggable
|
|
54
|
+
destinations via `ILogDestination`; destinations that throw never crash the app
|
|
55
|
+
- Decorators: `@InjectLogger(context?)`, `@LogContext`, `@LogPerformance`
|
|
56
|
+
- `BymaxLoggerModule.useNestLogger(app)` convenience helper
|
|
57
|
+
- `forRootAsync` support via `ConfigurableModuleBuilder` (standard NestJS
|
|
58
|
+
async dynamic module pattern)
|
|
59
|
+
- PII redaction: 97-path default set covering passwords, tokens, MFA,
|
|
60
|
+
payment card data, Brazilian documents (CPF/CNPJ/RG), and HTTP headers;
|
|
61
|
+
consumer-extensible via `redactPaths`
|
|
62
|
+
- Size-bounded entry truncation at `maxEntrySizeBytes` (default 64 KiB) with
|
|
63
|
+
`LOGGER_ENTRY_TRUNCATED` meta-log
|
|
64
|
+
- `sanitizeError` utility for safe Error serialization before logging
|
|
65
|
+
- E2E test suite (`test/e2e/`) exercising the full NestJS module lifecycle
|
|
66
|
+
- Throughput/allocation benchmark (`pnpm bench`) with CI budget gate
|
|
67
|
+
- Mutation-testing baseline (Stryker, `break: 95`) and
|
|
68
|
+
`docs/mutation_testing_results.md`
|
|
69
|
+
- Professional CI suite: `ci.yml`, `bench.yml`, `codeql.yml`, `scorecard.yml`,
|
|
70
|
+
`release.yml`, Dependabot, and issue templates
|
|
71
|
+
|
|
72
|
+
[Unreleased]: https://github.com/bymaxone/nest-logger/compare/v1.0.0...HEAD
|
|
73
|
+
[1.0.0]: https://github.com/bymaxone/nest-logger/compare/v0.1.0...v1.0.0
|
|
74
|
+
[0.1.0]: https://github.com/bymaxone/nest-logger/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bymax One
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|