Skip to content

docs: add health readiness sample#75

Merged
rodrigobnogueira merged 1 commit into
mainfrom
samples/health-readiness
May 20, 2026
Merged

docs: add health readiness sample#75
rodrigobnogueira merged 1 commit into
mainfrom
samples/health-readiness

Conversation

@rodrigobnogueira

Copy link
Copy Markdown
Collaborator

Summary

  • add sample/18-health-readiness with separate /health/live and /health/ready endpoints
  • document readiness as a cheap Drizzle-backed repository check while keeping liveness process-only
  • add a deployment guide covering release flow, environment ownership, migrations before traffic, and health checks
  • link the new sample from the catalog, superpowers page, production patterns, sidebar, and README

Validation

  • npm run test --workspace nest-drizzle-native-sample-18-health-readiness
  • npm run release:check:sample-versions
  • npm --prefix website run build
  • npm run sample:focused
  • npm run security:audit:package

Security

  • No package runtime dependencies were added; the published library package remains dependency-free.
  • Health readiness uses a fixed Drizzle query over an app-owned marker table and does not introduce request-driven SQL.
  • npm run security:audit:package passes the high-severity gate. Existing moderate dev-tooling advisories from the drizzle-kit sample remain unchanged.

@github-actions

Copy link
Copy Markdown

📊 Coverage Coverage Report

Metric PR Base Diff
Statements ████████████████████ 428/428 (100%) 428/428 (100%) ⚪ 0%
Branches ████████████████████ 78/78 (100%) 78/78 (100%) ⚪ 0%
Functions ████████████████████ 39/39 (100%) 39/39 (100%) ⚪ 0%
Lines ████████████████████ 428/428 (100%) 428/428 (100%) ⚪ 0%

Updated for 2ee7abe | Compared against base branch

@github-actions

Copy link
Copy Markdown

⏱️ Performance Report

✅ Tests 35 passed, 0 failed, 0 skipped
🧪 Suites 6
⏱️ Total step time 13.00s ⚪ ~0
⚙️ Test execution 6.81s 🟢 -366ms
🐢 Slowest test suites
# Suite Tests Duration vs Base
1 Drizzle driver integration 4 148ms ⚪ ~0
2 Drizzle integration 2 37ms ⚪ ~0
3 DrizzleModule 7 15ms ⚪ ~0
4 decorators and tokens 12 6ms ⚪ ~0
5 Drizzle testing helpers 5 3ms ⚪ ~0
6 Drizzle error mapping helpers 5 2ms ⚪ ~0
🐌 Slowest individual tests
# Suite Test Duration vs Base
1 Drizzle driver integration Drizzle driver integration works with a real libSQL client 56ms ⚪ ~0
2 Drizzle driver integration Drizzle driver integration works with a real MySQL client 44ms ⚪ ~0
3 Drizzle driver integration Drizzle driver integration works with a real PostgreSQL client 35ms ⚪ ~0
4 Drizzle integration Drizzle integration executes repository queries against a real Drizzle libSQL client 20ms ⚪ ~0
5 Drizzle integration Drizzle integration uses the real CLS Drizzle transaction adapter for commit and rollback 17ms ⚪ ~0
6 Drizzle driver integration Drizzle driver integration works with a real better-sqlite3 client 14ms ⚪ ~0
7 DrizzleModule DrizzleModule provides the default Drizzle client and schema 3ms ⚪ ~0
8 DrizzleModule DrizzleModule resolves connection factories and calls shutdown hooks 3ms ⚪ ~0
9 DrizzleModule DrizzleModule supports named client injection 3ms ⚪ ~0
10 DrizzleModule DrizzleModule registers repository classes through forFeature 3ms ⚪ ~0
11 decorators and tokens decorators and tokens stores repository metadata with the default connection name 2ms ⚪ ~0
12 DrizzleModule DrizzleModule supports async module options 2ms ⚪ ~0
13 Drizzle testing helpers Drizzle testing helpers registers a test module with a client 2ms ⚪ ~0
14 Drizzle error mapping helpers Drizzle error mapping helpers maps known database failures to Nest exceptions 1ms ⚪ ~0
15 decorators and tokens decorators and tokens stores repository metadata with a named connection 0ms ⚪ ~0

Updated for 2ee7abe | Compared against base branch

@github-actions

Copy link
Copy Markdown

🧠 Cognitive Complexity Report

Metric PR Base Diff
Total complexity 21 21 ⚪ 0
Max function complexity 4 4 ⚪ 0
Functions measured 12 12 ⚪ 0
🧩 Most complex functions
Function Location Complexity Status
loadClsInjectTransaction packages/drizzle/decorators/inject-transaction.decorator.ts:18 4 🟢 OK
mapDrizzleError packages/drizzle/errors/drizzle-error.mapper.ts:14 4 🟢 OK
loadOptionalTransactionalPackage packages/drizzle/decorators/transactional.decorator.ts:21 3 🟢 OK
normalizeDrizzleConnectionName packages/drizzle/tokens.ts:10 2 🟢 OK
resolveDrizzleConnection packages/drizzle/client/connection.util.ts:3 1 🟢 OK
normalizeRepositoryOptions packages/drizzle/decorators/drizzle-repository.decorator.ts:31 1 🟢 OK
InjectTransaction packages/drizzle/decorators/inject-transaction.decorator.ts:6 1 🟢 OK
isModuleNotFoundError packages/drizzle/decorators/inject-transaction.decorator.ts:37 1 🟢 OK
loadTransactionalDecorator packages/drizzle/decorators/transactional.decorator.ts:8 1 🟢 OK
isModuleNotFoundError packages/drizzle/decorators/transactional.decorator.ts:33 1 🟢 OK

🧭 Cognitive complexity is reported as a review signal, not a merge gate. Prefer small, intention-revealing refactors when complexity rises.


Updated for 2ee7abe | Compared against base branch

@rodrigobnogueira rodrigobnogueira merged commit b2d2af7 into main May 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant