@bymax-one/nest-core 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 +77 -0
- package/LICENSE +21 -0
- package/README.md +716 -0
- package/dist/health/index.cjs +2 -0
- package/dist/health/index.d.cts +64 -0
- package/dist/health/index.d.ts +64 -0
- package/dist/health/index.mjs +1 -0
- package/dist/index.cjs +984 -0
- package/dist/index.d.cts +550 -0
- package/dist/index.d.ts +550 -0
- package/dist/index.mjs +960 -0
- package/dist/pagination/index.cjs +112 -0
- package/dist/pagination/index.d.cts +146 -0
- package/dist/pagination/index.d.ts +146 -0
- package/dist/pagination/index.mjs +105 -0
- package/package.json +169 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@bymax-one/nest-core` 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-08-03
|
|
15
|
+
|
|
16
|
+
First published release. Everything below ships in it.
|
|
17
|
+
|
|
18
|
+
The `Fixed` and `Security` entries record defects found and corrected before
|
|
19
|
+
publication, not regressions any consumer saw — there is no earlier release to
|
|
20
|
+
have regressed from. They are kept because the reasoning is worth having.
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Repository scaffold: `package.json` with the three-subpath exports map (`.`, `./pagination`, `./health`), zero direct dependencies, and the required peer set
|
|
25
|
+
- Strict TypeScript configuration (base, build, jest, e2e variants) and a three-entry tsup build producing ESM + CJS + `.d.ts`
|
|
26
|
+
- Flat ESLint config, Prettier, and local commit governance (husky, commitlint, lint-staged)
|
|
27
|
+
- Jest unit and aggregated coverage configurations enforcing a 100% threshold on every axis, plus the Stryker mutation-testing configuration for the pre-release gate
|
|
28
|
+
- CI, CodeQL, OpenSSF Scorecard, and tag-driven release workflows, Dependabot, and issue templates
|
|
29
|
+
- Zero-dependency bundle-size and dogfood smoke-test guard scripts
|
|
30
|
+
- `BymaxCoreModule` with `forRoot` and `forRootAsync`, conditional registration per feature, and an `isGlobal` extra
|
|
31
|
+
- Error envelope: a stable, versioned JSON contract with a `BYMAX_` error-code catalog and custom-code pass-through
|
|
32
|
+
- Request timing interceptor: one sample per request to a pluggable `ITimingSink`, with a configurable slow-request flag
|
|
33
|
+
- Pagination subpath (`./pagination`): offset and cursor helpers, with an opaque, validated cursor codec
|
|
34
|
+
- Health subpath (`./health`): a pluggable indicator contract behind liveness and readiness endpoints
|
|
35
|
+
- Optional Prometheus metrics endpoint: a lazily-loaded optional peer, with default HTTP request-count and duration metrics
|
|
36
|
+
- An end-to-end test suite proving both registration paths, all features together, and every feature disabled
|
|
37
|
+
- The complete public README: feature tour, configuration reference, and integration examples
|
|
38
|
+
- Mutation-testing gate at the family threshold (score at least 95, `break: 95`), with the surviving mutants documented as genuine equivalents
|
|
39
|
+
- Bundle-size budgets calibrated to the real release artifacts (KiB brotli per subpath, headroom below 2x)
|
|
40
|
+
|
|
41
|
+
- **`pnpm check:exports`** runs `attw --pack . --profile strict` against the packed
|
|
42
|
+
tarball. Its absence is why both defects above went unnoticed: a source-level
|
|
43
|
+
typecheck compiles `src` and never resolves through the `exports` map.
|
|
44
|
+
- **`pnpm check:runtime`** packs the tarball, lays it out the way npm would, and
|
|
45
|
+
loads every subpath from it in ESM _and_ CommonJS, asserting the expected values
|
|
46
|
+
are really exported. `attw` proves the declarations resolve; it never runs the
|
|
47
|
+
JavaScript. Both gates run in CI.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- **CommonJS consumers resolved ESM type declarations.** The `exports` map
|
|
52
|
+
declared a single `types` condition, so `require()` landed on `.d.ts` instead of
|
|
53
|
+
`.d.cts` — `attw --profile strict` reports it as _Masquerading as ESM_ on every
|
|
54
|
+
subpath. Types are now declared per condition.
|
|
55
|
+
|
|
56
|
+
- **`node10` type resolution failed outright**: the manifest carried no complete
|
|
57
|
+
set of `main`, `module`, `types` and `typesVersions`. All four are now present.
|
|
58
|
+
|
|
59
|
+
### Security
|
|
60
|
+
|
|
61
|
+
- **Peer floors raised to exclude known-vulnerable NestJS versions.** The declared
|
|
62
|
+
ranges were `@nestjs/common ^11.0.0` and `@nestjs/core ^11.0.0`, and both
|
|
63
|
+
admitted versions carrying published advisories:
|
|
64
|
+
|
|
65
|
+
| Peer | Advisory | Vulnerable | New floor |
|
|
66
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | ---------- |
|
|
67
|
+
| `@nestjs/common` | [GHSA-cj7v-w2c7-cp7c](https://github.com/advisories/GHSA-cj7v-w2c7-cp7c) — remote code execution via the `Content-Type` header | `>= 11.0.0-next.1, < 11.0.16` | `^11.0.16` |
|
|
68
|
+
| `@nestjs/core` | [GHSA-36xv-jgw5-4q75](https://github.com/advisories/GHSA-36xv-jgw5-4q75) — improper neutralization of special elements in downstream output | `<= 11.1.17` | `^11.1.18` |
|
|
69
|
+
|
|
70
|
+
A peer range is a statement about which versions this library supports. A floor
|
|
71
|
+
below a published advisory tells a consumer that a vulnerable install is a
|
|
72
|
+
supported one, and nothing in their tooling contradicts it — the install resolves
|
|
73
|
+
cleanly and silently. Corrected before the first publish, so no released version
|
|
74
|
+
ever carried the permissive range. No runtime behaviour changed.
|
|
75
|
+
|
|
76
|
+
[1.0.0]: https://github.com/bymaxone/nest-core/releases/tag/v1.0.0
|
|
77
|
+
[Unreleased]: https://github.com/bymaxone/nest-core/compare/v1.0.0...HEAD
|
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.
|