Skip to main content
在 Manus 中运行任何 Skill
一键导入
GitHub 仓库

nestjs-context

nestjs-context 收录了来自 DavideCarvalho 的 5 个 skills,并提供仓库级职业覆盖和站内 skill 详情页。

已收集 skills
5
Stars
0
更新
2026-06-25
Forks
0
职业覆盖
2 个职业分类 · 已分类 100%
仓库浏览

这个仓库中的 skills

context-setup
软件开发工程师

Wire @dudousxd/nestjs-context into a NestJS app. Covers ContextModule.forRoot and ContextModule.forRootAsync (useFactory/useClass/useExisting), the global module, the ContextMiddleware that seeds traceId/requestId from the W3C traceparent header via enterWith, and the autoMiddleware/forRoutes/exclude options. Load when setting up the module, choosing forRoot vs forRootAsync, reading Context.traceId/tenantId/userRef, or establishing context outside HTTP (GraphQL/gRPC/queue) with Context.run / Context.enterWith.

2026-06-25
cross-boundary
软件开发工程师

Carry @dudousxd/nestjs-context across boundaries AsyncLocalStorage does not follow: queues, durable workers, sub-processes, setTimeout, and EventEmitter callbacks. Covers Context.serialize/deserialize with the plain ContextCarrier, Context.bind for snapshot-and-re-enter, the carrier config option, W3C baggage via Context.toBaggage/fromBaggage with BaggageKeyMap, and the traceparent helpers parseTraceparent/extractTraceparent/toTraceparent/randomTraceId. Also covers the process-global config and Context.resetConfig. Load when propagating context to a BullMQ job, durable workflow, timer, or another service.

2026-06-25
custom-fields
软件开发工程师

Extend the @dudousxd/nestjs-context store with your own typed fields and populate them. Covers ContextStore module augmentation (declare module to add locale/impersonatorId/etc.), the forRoot initialize hook that merges fields at request start, eager enrichers (ContextEnricher) run by the middleware after entering the context plus Context.runEnrichers for non-HTTP entrypoints, and Context.lazy for memoized on-first-access derived values. Load when adding a custom field, deciding between initialize/enrichers/lazy, or typing a new store property so Context.get()/set() stay type-safe.

2026-06-25
reading-context
软件开发工程师

Read and mutate the per-request store of @dudousxd/nestjs-context. Covers Context.get/traceId/tenantId/userRef, Context.set to fill userRef/tenantId from an auth guard, the one-shot warning when Context.set runs outside an active context, the UserRef { type, id } shape, and how consumer libraries inject the read-only ContextAccessor via @Optional() @Inject(CONTEXT_ACCESSOR). Load when reading or writing context fields, wiring an auth guard, or building a library that degrades cleanly when nestjs-context is absent.

2026-06-25
context-testing
软件质量保证分析师与测试员

Test code that reads @dudousxd/nestjs-context by running it inside a fake store. Covers @dudousxd/nestjs-context-testing's runWithContext(partial, fn) which scopes a fake ContextStore around fn (auto-filling a random traceId), and enterContext(partial) which uses enterWith so the fake store survives past the setup call (for code that reads context after an await). Covers PartialContextStore and resetting the process-global singleton with Context.resetConfig between tests. Load when writing vitest/jest tests that assert on Context.traceId, tenantId, or userRef.

2026-06-25