@shrkcrft/presets 0.1.0-alpha.6 → 0.1.0-alpha.7

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 +1 @@
1
- {"version":3,"file":"builtin-presets.d.ts","sourceRoot":"","sources":["../../src/builtin/builtin-presets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AA4jBlD,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,EA+B5C,CAAC"}
1
+ {"version":3,"file":"builtin-presets.d.ts","sourceRoot":"","sources":["../../src/builtin/builtin-presets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AA8jBlD,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,EA4C5C,CAAC"}
@@ -5,6 +5,8 @@ import { R26_PRESETS } from "./r26-presets.js";
5
5
  import { R45_PRESETS } from "./r45-presets.js";
6
6
  import { R47_PRESETS } from "./r47-presets.js";
7
7
  import { ANGULAR_21_PRESETS } from "./angular21-presets.js";
8
+ import { NEST_11_PRESETS } from "./nest11-presets.js";
9
+ import { REACT_19_PRESETS } from "./react19-presets.js";
8
10
  const GENERIC = definePreset({
9
11
  id: 'generic',
10
12
  title: 'Generic SharkCraft setup',
@@ -523,4 +525,17 @@ export const BUILTIN_PRESETS = Object.freeze([
523
525
  // NgModules. Weight 11-12 so the recommender prefers these over
524
526
  // R26 `modern-angular` (weight 9) when the workspace is Angular.
525
527
  ...ANGULAR_21_PRESETS,
528
+ // NestJS 11+ — thin controllers, global ValidationPipe + class-validator,
529
+ // async lifecycle, Fastify + cache + throttler, helmet + JWT guards,
530
+ // structured logging + terminus health, TestingModule + supertest e2e.
531
+ // Weight 11-12 so the recommender prefers these over R26 `nestjs-service`
532
+ // (weight 7) and R47 `nest-service` (weight 9) when the workspace is Nest.
533
+ ...NEST_11_PRESETS,
534
+ // React 19+ — function components + ref-as-prop, hooks discipline,
535
+ // Actions / useActionState / useOptimistic, TanStack Query for server
536
+ // state, React Compiler + lazy + virtualization, useTransition /
537
+ // Suspense, Vitest + RTL + userEvent + MSW, RSC + 'use client' +
538
+ // Server Actions. Weight 11-12 so the recommender prefers these over
539
+ // the legacy `frontend-app` (weight 6) when the workspace is React.
540
+ ...REACT_19_PRESETS,
526
541
  ]);
@@ -0,0 +1,11 @@
1
+ import type { IPreset } from '../model/preset.js';
2
+ export declare const NEST_11_ARCHITECTURE: IPreset;
3
+ export declare const NEST_11_VALIDATION: IPreset;
4
+ export declare const NEST_11_ASYNC_LIFECYCLE: IPreset;
5
+ export declare const NEST_11_PERFORMANCE: IPreset;
6
+ export declare const NEST_11_SECURITY: IPreset;
7
+ export declare const NEST_11_OBSERVABILITY: IPreset;
8
+ export declare const NEST_11_TESTING: IPreset;
9
+ export declare const NEST_11_MODERN: IPreset;
10
+ export declare const NEST_11_PRESETS: readonly IPreset[];
11
+ //# sourceMappingURL=nest11-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest11-presets.d.ts","sourceRoot":"","sources":["../../src/builtin/nest11-presets.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAsDlD,eAAO,MAAM,oBAAoB,EAAE,OA+BjC,CAAC;AAIH,eAAO,MAAM,kBAAkB,EAAE,OA6B/B,CAAC;AAIH,eAAO,MAAM,uBAAuB,EAAE,OA2BpC,CAAC;AAIH,eAAO,MAAM,mBAAmB,EAAE,OA4BhC,CAAC;AAIH,eAAO,MAAM,gBAAgB,EAAE,OA8B7B,CAAC;AAIH,eAAO,MAAM,qBAAqB,EAAE,OA4BlC,CAAC;AAIH,eAAO,MAAM,eAAe,EAAE,OA2B5B,CAAC;AAIH,eAAO,MAAM,cAAc,EAAE,OA4C3B,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,EAS5C,CAAC"}
@@ -0,0 +1,257 @@
1
+ // NestJS 11+ preset family.
2
+ //
3
+ // Seven focused presets covering modern Nest practice — architecture,
4
+ // validation, async lifecycle, performance, security, observability,
5
+ // testing — plus one comprehensive `nest-11-modern` that composes them.
6
+ // Targets HasNestJS workspaces with weight set above the legacy R26
7
+ // `nestjs-service` (weight 7) and R47 `nest-service` canonical alias
8
+ // (weight 9), so the recommender prefers these when the workspace
9
+ // declares HasNestJS.
10
+ import { WorkspaceProfile } from '@shrkcrft/workspace';
11
+ import { definePreset } from "../define/define-preset.js";
12
+ import { COMMON_AGENT_BRIEFING, COMMON_PIPELINE_CONTEXT_ONLY, COMMON_PIPELINE_FEATURE_DEV, COMMON_PIPELINE_UNIT_TEST, COMMON_SAFETY_RULE, NEST_PATH_E2E, NEST_PATH_SRC, OVERVIEW_DOC, } from "./shared-snippets.js";
13
+ import { NEST11_API_VERSIONING, NEST11_ASYNC_PROVIDERS, NEST11_CACHE_MANAGER, NEST11_CLASS_VALIDATOR_DTO, NEST11_DTO_AT_BOUNDARY, NEST11_E2E_SUPERTEST, NEST11_ENABLE_SHUTDOWN_HOOKS, NEST11_EXPLICIT_CORS, NEST11_FASTIFY_ADAPTER, NEST11_GLOBAL_VALIDATION_PIPE, NEST11_HELMET, NEST11_JWT_GUARDS, NEST11_LIFECYCLE_HOOKS, NEST11_LOGGER_WITH_CONTEXT, NEST11_MODULE_PER_FEATURE, NEST11_MODULE_PUBLIC_API, NEST11_NO_CIRCULAR_MODULES, NEST11_NO_LOG_SECRETS, NEST11_NO_QUERY_IN_CONTROLLER, NEST11_NO_SECRETS_IN_CODE, NEST11_PAGINATION_BY_DEFAULT, NEST11_REQUEST_RESPONSE_DTOS, NEST11_SERVICE_OWNS_DOMAIN, NEST11_STRUCTURED_LOGS, NEST11_SWAGGER_DECORATORS, NEST11_TERMINUS_HEALTH, NEST11_TEST_FILE_LAYOUT, NEST11_TESTING_MODULE, NEST11_THIN_CONTROLLERS, NEST11_THROTTLER, NEST11_TRUST_PROXY_AWARE, } from "./nest11-snippets.js";
14
+ const NEST11_TAGS = ['nestjs', 'nest-11', 'backend'];
15
+ const NEST11_NEXT_COMMANDS = [
16
+ 'shrk doctor',
17
+ 'shrk task "<task>"',
18
+ 'shrk ci scaffold github-actions --quickstart',
19
+ ];
20
+ // ─── 1) Architecture — modules, controllers, services, repos ─────────────
21
+ export const NEST_11_ARCHITECTURE = definePreset({
22
+ id: 'nest-11-architecture',
23
+ title: 'NestJS 11 — module + controller + service architecture',
24
+ description: 'Module-per-feature, thin controllers (validate + delegate, nothing more), services own domain logic, repositories abstract data access, DTOs at every HTTP boundary, no circular module dependencies. The structural backbone of a maintainable Nest service.',
25
+ tags: [...NEST11_TAGS, 'architecture'],
26
+ appliesTo: [WorkspaceProfile.HasNestJS, WorkspaceProfile.IsBackend],
27
+ weight: 11,
28
+ includes: {
29
+ knowledge: [COMMON_AGENT_BRIEFING],
30
+ rules: [
31
+ COMMON_SAFETY_RULE,
32
+ NEST11_THIN_CONTROLLERS,
33
+ NEST11_SERVICE_OWNS_DOMAIN,
34
+ NEST11_MODULE_PER_FEATURE,
35
+ NEST11_MODULE_PUBLIC_API,
36
+ NEST11_NO_CIRCULAR_MODULES,
37
+ NEST11_DTO_AT_BOUNDARY,
38
+ NEST11_NO_QUERY_IN_CONTROLLER,
39
+ ],
40
+ paths: [NEST_PATH_SRC, NEST_PATH_E2E],
41
+ templates: [],
42
+ pipelines: [COMMON_PIPELINE_CONTEXT_ONLY, COMMON_PIPELINE_FEATURE_DEV],
43
+ docs: {
44
+ 'overview.md': OVERVIEW_DOC('NestJS 11 architecture', 'Module per feature under src/<feature>/. Controllers parse + delegate. Services own domain logic; data access goes through repositories. Modules export only their public providers. DTOs at every boundary; entities never leave the service layer.'),
45
+ },
46
+ },
47
+ recommendedNextCommands: NEST11_NEXT_COMMANDS,
48
+ });
49
+ // ─── 2) Validation — ValidationPipe + class-validator + DTOs ─────────────
50
+ export const NEST_11_VALIDATION = definePreset({
51
+ id: 'nest-11-validation',
52
+ title: 'NestJS 11 — strict validation at the boundary',
53
+ description: 'Global ValidationPipe with whitelist + forbidNonWhitelisted + transform, class-validator decorators on every DTO field, separated request and response DTOs, @ApiProperty annotations for the OpenAPI contract.',
54
+ tags: [...NEST11_TAGS, 'validation'],
55
+ appliesTo: [WorkspaceProfile.HasNestJS, WorkspaceProfile.IsBackend],
56
+ weight: 11,
57
+ includes: {
58
+ knowledge: [COMMON_AGENT_BRIEFING],
59
+ rules: [
60
+ COMMON_SAFETY_RULE,
61
+ NEST11_GLOBAL_VALIDATION_PIPE,
62
+ NEST11_CLASS_VALIDATOR_DTO,
63
+ NEST11_REQUEST_RESPONSE_DTOS,
64
+ NEST11_DTO_AT_BOUNDARY,
65
+ NEST11_SWAGGER_DECORATORS,
66
+ ],
67
+ paths: [NEST_PATH_SRC],
68
+ templates: [],
69
+ pipelines: [COMMON_PIPELINE_CONTEXT_ONLY, COMMON_PIPELINE_FEATURE_DEV],
70
+ docs: {
71
+ 'overview.md': OVERVIEW_DOC('NestJS 11 validation', 'ValidationPipe is registered globally with strict options. Every DTO is a class with class-validator decorators; @Type() wires nested objects through class-transformer. Request and response DTOs are separate classes — input is whitelisted, output is projected.'),
72
+ },
73
+ },
74
+ recommendedNextCommands: NEST11_NEXT_COMMANDS,
75
+ });
76
+ // ─── 3) Async lifecycle + graceful shutdown ──────────────────────────────
77
+ export const NEST_11_ASYNC_LIFECYCLE = definePreset({
78
+ id: 'nest-11-async-lifecycle',
79
+ title: 'NestJS 11 — async providers + graceful shutdown',
80
+ description: 'Async configuration providers via useFactory, OnModuleInit / OnApplicationBootstrap / OnModuleDestroy / OnApplicationShutdown lifecycle hooks, enableShutdownHooks() at bootstrap so SIGTERM cleanly tears down DB pools and message clients.',
81
+ tags: [...NEST11_TAGS, 'lifecycle'],
82
+ appliesTo: [WorkspaceProfile.HasNestJS, WorkspaceProfile.IsBackend],
83
+ weight: 11,
84
+ includes: {
85
+ knowledge: [COMMON_AGENT_BRIEFING],
86
+ rules: [
87
+ COMMON_SAFETY_RULE,
88
+ NEST11_LIFECYCLE_HOOKS,
89
+ NEST11_ENABLE_SHUTDOWN_HOOKS,
90
+ NEST11_ASYNC_PROVIDERS,
91
+ ],
92
+ paths: [NEST_PATH_SRC],
93
+ templates: [],
94
+ pipelines: [COMMON_PIPELINE_CONTEXT_ONLY, COMMON_PIPELINE_FEATURE_DEV],
95
+ docs: {
96
+ 'overview.md': OVERVIEW_DOC('NestJS 11 lifecycle', 'enableShutdownHooks() in main.ts so the OnModuleDestroy / OnApplicationShutdown hooks fire on SIGTERM. Configuration that must resolve at boot uses { useFactory } async providers — not lazy init from inside a service.'),
97
+ },
98
+ },
99
+ recommendedNextCommands: NEST11_NEXT_COMMANDS,
100
+ });
101
+ // ─── 4) Performance — Fastify, cache, throttler, pagination ──────────────
102
+ export const NEST_11_PERFORMANCE = definePreset({
103
+ id: 'nest-11-performance',
104
+ title: 'NestJS 11 — Fastify, caching, throttling, pagination',
105
+ description: 'NestFastifyApplication adapter for ~2× throughput vs. Express, @nestjs/cache-manager for hot reads, @nestjs/throttler for per-IP rate limiting, mandatory pagination on every list endpoint.',
106
+ tags: [...NEST11_TAGS, 'performance'],
107
+ appliesTo: [WorkspaceProfile.HasNestJS, WorkspaceProfile.IsBackend],
108
+ weight: 11,
109
+ includes: {
110
+ knowledge: [COMMON_AGENT_BRIEFING],
111
+ rules: [
112
+ COMMON_SAFETY_RULE,
113
+ NEST11_FASTIFY_ADAPTER,
114
+ NEST11_CACHE_MANAGER,
115
+ NEST11_THROTTLER,
116
+ NEST11_PAGINATION_BY_DEFAULT,
117
+ ],
118
+ paths: [NEST_PATH_SRC],
119
+ templates: [],
120
+ pipelines: [COMMON_PIPELINE_CONTEXT_ONLY, COMMON_PIPELINE_FEATURE_DEV],
121
+ docs: {
122
+ 'overview.md': OVERVIEW_DOC('NestJS 11 performance', 'Fastify adapter for high-throughput HTTP. Idempotent GETs cached via CacheInterceptor with explicit per-route TTLs. Global ThrottlerModule with sane defaults (60 req/min/IP); per-route overrides via @Throttle. List endpoints paginate by default; pageSize is capped server-side.'),
123
+ },
124
+ },
125
+ recommendedNextCommands: NEST11_NEXT_COMMANDS,
126
+ });
127
+ // ─── 5) Security — helmet, CORS, auth, secrets, trust-proxy ──────────────
128
+ export const NEST_11_SECURITY = definePreset({
129
+ id: 'nest-11-security',
130
+ title: 'NestJS 11 — security baseline',
131
+ description: 'helmet middleware for HTTP security headers, explicit CORS allowlist (never `origin: true`), JWT auth via @nestjs/passport guards, no-secrets-in-source enforcement, trust-proxy configured for load-balanced deployments, throttler for abuse protection.',
132
+ tags: [...NEST11_TAGS, 'security'],
133
+ appliesTo: [WorkspaceProfile.HasNestJS, WorkspaceProfile.IsBackend],
134
+ weight: 11,
135
+ includes: {
136
+ knowledge: [COMMON_AGENT_BRIEFING],
137
+ rules: [
138
+ COMMON_SAFETY_RULE,
139
+ NEST11_HELMET,
140
+ NEST11_EXPLICIT_CORS,
141
+ NEST11_JWT_GUARDS,
142
+ NEST11_NO_SECRETS_IN_CODE,
143
+ NEST11_TRUST_PROXY_AWARE,
144
+ NEST11_THROTTLER,
145
+ ],
146
+ paths: [NEST_PATH_SRC],
147
+ templates: [],
148
+ pipelines: [COMMON_PIPELINE_CONTEXT_ONLY, COMMON_PIPELINE_FEATURE_DEV],
149
+ docs: {
150
+ 'overview.md': OVERVIEW_DOC('NestJS 11 security', 'helmet registered before any route. CORS allowlist explicit. Authentication runs through Guards (JwtAuthGuard + @UseGuards), not middleware. Secrets come from ConfigService.get only. trust-proxy configured. Throttler in place.'),
151
+ },
152
+ },
153
+ recommendedNextCommands: NEST11_NEXT_COMMANDS,
154
+ });
155
+ // ─── 6) Observability — Logger, structured logs, terminus ────────────────
156
+ export const NEST_11_OBSERVABILITY = definePreset({
157
+ id: 'nest-11-observability',
158
+ title: 'NestJS 11 — structured logging + health checks',
159
+ description: 'Per-provider Logger instances with context names, structured JSON logs in production (pino / nest-winston), redact-list for secrets and PII, @nestjs/terminus health checks with separated liveness and readiness endpoints.',
160
+ tags: [...NEST11_TAGS, 'observability'],
161
+ appliesTo: [WorkspaceProfile.HasNestJS, WorkspaceProfile.IsBackend],
162
+ weight: 11,
163
+ includes: {
164
+ knowledge: [COMMON_AGENT_BRIEFING],
165
+ rules: [
166
+ COMMON_SAFETY_RULE,
167
+ NEST11_LOGGER_WITH_CONTEXT,
168
+ NEST11_STRUCTURED_LOGS,
169
+ NEST11_NO_LOG_SECRETS,
170
+ NEST11_TERMINUS_HEALTH,
171
+ ],
172
+ paths: [NEST_PATH_SRC],
173
+ templates: [],
174
+ pipelines: [COMMON_PIPELINE_CONTEXT_ONLY, COMMON_PIPELINE_FEATURE_DEV],
175
+ docs: {
176
+ 'overview.md': OVERVIEW_DOC('NestJS 11 observability', 'Each provider holds its own Logger(MyService.name). Production logger is structured JSON via pino or nest-winston with a redact list for tokens / passwords / PII. /health/liveness and /health/readiness are separate endpoints; readiness fails 503 when a critical dep is down.'),
177
+ },
178
+ },
179
+ recommendedNextCommands: NEST11_NEXT_COMMANDS,
180
+ });
181
+ // ─── 7) Testing — TestingModule + e2e ───────────────────────────────────
182
+ export const NEST_11_TESTING = definePreset({
183
+ id: 'nest-11-testing',
184
+ title: 'NestJS 11 — TestingModule + supertest e2e',
185
+ description: 'Unit tests via Test.createTestingModule + overrideProvider for slow deps, co-located *.spec.ts files; e2e under test/*.e2e-spec.ts driving the real AppModule through supertest with the validation pipeline live.',
186
+ tags: [...NEST11_TAGS, 'testing'],
187
+ appliesTo: [WorkspaceProfile.HasNestJS, WorkspaceProfile.IsBackend],
188
+ weight: 11,
189
+ includes: {
190
+ knowledge: [COMMON_AGENT_BRIEFING],
191
+ rules: [
192
+ COMMON_SAFETY_RULE,
193
+ NEST11_TESTING_MODULE,
194
+ NEST11_E2E_SUPERTEST,
195
+ NEST11_TEST_FILE_LAYOUT,
196
+ ],
197
+ paths: [NEST_PATH_SRC, NEST_PATH_E2E],
198
+ templates: [],
199
+ pipelines: [COMMON_PIPELINE_CONTEXT_ONLY, COMMON_PIPELINE_UNIT_TEST],
200
+ docs: {
201
+ 'overview.md': OVERVIEW_DOC('NestJS 11 testing', 'Unit specs are co-located beside their unit; they use Test.createTestingModule + overrideProvider to fake the expensive deps. E2E specs live under test/, drive AppModule through supertest, and keep the real validation pipeline + guards + interceptors active — that is the contract being tested.'),
202
+ },
203
+ },
204
+ recommendedNextCommands: NEST11_NEXT_COMMANDS,
205
+ });
206
+ // ─── 8) The whole stack — composes 1-7 ──────────────────────────────────
207
+ export const NEST_11_MODERN = definePreset({
208
+ id: 'nest-11-modern',
209
+ title: 'NestJS 11 — modern stack (architecture + validation + lifecycle + perf + security + obs + testing)',
210
+ description: 'The canonical preset for a new NestJS 11+ service. Composes the seven focused presets, then layers on API versioning. Use this unless you specifically want a narrower slice.',
211
+ tags: [...NEST11_TAGS, 'comprehensive'],
212
+ appliesTo: [WorkspaceProfile.HasNestJS, WorkspaceProfile.IsBackend, WorkspaceProfile.IsService],
213
+ weight: 12,
214
+ composes: [
215
+ 'nest-11-architecture',
216
+ 'nest-11-validation',
217
+ 'nest-11-async-lifecycle',
218
+ 'nest-11-performance',
219
+ 'nest-11-security',
220
+ 'nest-11-observability',
221
+ 'nest-11-testing',
222
+ ],
223
+ includes: {
224
+ knowledge: [COMMON_AGENT_BRIEFING],
225
+ rules: [
226
+ COMMON_SAFETY_RULE,
227
+ // Extras that don't fit any single focused preset:
228
+ NEST11_API_VERSIONING,
229
+ ],
230
+ paths: [NEST_PATH_SRC, NEST_PATH_E2E],
231
+ templates: [],
232
+ pipelines: [
233
+ COMMON_PIPELINE_CONTEXT_ONLY,
234
+ COMMON_PIPELINE_FEATURE_DEV,
235
+ COMMON_PIPELINE_UNIT_TEST,
236
+ ],
237
+ docs: {
238
+ 'overview.md': OVERVIEW_DOC('NestJS 11 modern stack', 'Module-per-feature architecture. Thin controllers, services own domain, repositories abstract data. Global ValidationPipe + class-validator. Fastify adapter, cache-manager, throttler, mandatory pagination. helmet + CORS allowlist + JWT guards + no-secrets. Per-provider Logger + structured JSON logs + terminus health. TestingModule unit specs + supertest e2e. URI versioning when the API has external consumers.'),
239
+ },
240
+ },
241
+ recommendedNextCommands: [
242
+ 'shrk doctor',
243
+ 'shrk task "<task>"',
244
+ 'shrk ci scaffold github-actions --quickstart',
245
+ 'nest g resource <feature>',
246
+ ],
247
+ });
248
+ export const NEST_11_PRESETS = Object.freeze([
249
+ NEST_11_ARCHITECTURE,
250
+ NEST_11_VALIDATION,
251
+ NEST_11_ASYNC_LIFECYCLE,
252
+ NEST_11_PERFORMANCE,
253
+ NEST_11_SECURITY,
254
+ NEST_11_OBSERVABILITY,
255
+ NEST_11_TESTING,
256
+ NEST_11_MODERN,
257
+ ]);
@@ -0,0 +1,32 @@
1
+ export declare const NEST11_THIN_CONTROLLERS: string;
2
+ export declare const NEST11_SERVICE_OWNS_DOMAIN: string;
3
+ export declare const NEST11_MODULE_PER_FEATURE: string;
4
+ export declare const NEST11_MODULE_PUBLIC_API: string;
5
+ export declare const NEST11_NO_CIRCULAR_MODULES: string;
6
+ export declare const NEST11_DTO_AT_BOUNDARY: string;
7
+ export declare const NEST11_GLOBAL_VALIDATION_PIPE: string;
8
+ export declare const NEST11_CLASS_VALIDATOR_DTO: string;
9
+ export declare const NEST11_REQUEST_RESPONSE_DTOS: string;
10
+ export declare const NEST11_SWAGGER_DECORATORS: string;
11
+ export declare const NEST11_LIFECYCLE_HOOKS: string;
12
+ export declare const NEST11_ENABLE_SHUTDOWN_HOOKS: string;
13
+ export declare const NEST11_ASYNC_PROVIDERS: string;
14
+ export declare const NEST11_FASTIFY_ADAPTER: string;
15
+ export declare const NEST11_CACHE_MANAGER: string;
16
+ export declare const NEST11_THROTTLER: string;
17
+ export declare const NEST11_PAGINATION_BY_DEFAULT: string;
18
+ export declare const NEST11_HELMET: string;
19
+ export declare const NEST11_EXPLICIT_CORS: string;
20
+ export declare const NEST11_JWT_GUARDS: string;
21
+ export declare const NEST11_NO_SECRETS_IN_CODE: string;
22
+ export declare const NEST11_TRUST_PROXY_AWARE: string;
23
+ export declare const NEST11_LOGGER_WITH_CONTEXT: string;
24
+ export declare const NEST11_STRUCTURED_LOGS: string;
25
+ export declare const NEST11_NO_LOG_SECRETS: string;
26
+ export declare const NEST11_TERMINUS_HEALTH: string;
27
+ export declare const NEST11_TESTING_MODULE: string;
28
+ export declare const NEST11_E2E_SUPERTEST: string;
29
+ export declare const NEST11_TEST_FILE_LAYOUT: string;
30
+ export declare const NEST11_API_VERSIONING: string;
31
+ export declare const NEST11_NO_QUERY_IN_CONTROLLER: string;
32
+ //# sourceMappingURL=nest11-snippets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest11-snippets.d.ts","sourceRoot":"","sources":["../../src/builtin/nest11-snippets.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,uBAAuB,QAQlC,CAAC;AAEH,eAAO,MAAM,0BAA0B,QAQrC,CAAC;AAEH,eAAO,MAAM,yBAAyB,QAQpC,CAAC;AAEH,eAAO,MAAM,wBAAwB,QAQnC,CAAC;AAEH,eAAO,MAAM,0BAA0B,QAQrC,CAAC;AAEH,eAAO,MAAM,sBAAsB,QAQjC,CAAC;AAIH,eAAO,MAAM,6BAA6B,QAQxC,CAAC;AAEH,eAAO,MAAM,0BAA0B,QAQrC,CAAC;AAEH,eAAO,MAAM,4BAA4B,QAQvC,CAAC;AAEH,eAAO,MAAM,yBAAyB,QAQpC,CAAC;AAIH,eAAO,MAAM,sBAAsB,QAQjC,CAAC;AAEH,eAAO,MAAM,4BAA4B,QAQvC,CAAC;AAEH,eAAO,MAAM,sBAAsB,QAQjC,CAAC;AAIH,eAAO,MAAM,sBAAsB,QAQjC,CAAC;AAEH,eAAO,MAAM,oBAAoB,QAQ/B,CAAC;AAEH,eAAO,MAAM,gBAAgB,QAQ3B,CAAC;AAEH,eAAO,MAAM,4BAA4B,QAQvC,CAAC;AAIH,eAAO,MAAM,aAAa,QAQxB,CAAC;AAEH,eAAO,MAAM,oBAAoB,QAQ/B,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAQ5B,CAAC;AAEH,eAAO,MAAM,yBAAyB,QAQpC,CAAC;AAEH,eAAO,MAAM,wBAAwB,QAQnC,CAAC;AAIH,eAAO,MAAM,0BAA0B,QAQrC,CAAC;AAEH,eAAO,MAAM,sBAAsB,QAQjC,CAAC;AAEH,eAAO,MAAM,qBAAqB,QAQhC,CAAC;AAEH,eAAO,MAAM,sBAAsB,QAQjC,CAAC;AAIH,eAAO,MAAM,qBAAqB,QAQhC,CAAC;AAEH,eAAO,MAAM,oBAAoB,QAQ/B,CAAC;AAEH,eAAO,MAAM,uBAAuB,QAQlC,CAAC;AAIH,eAAO,MAAM,qBAAqB,QAQhC,CAAC;AAEH,eAAO,MAAM,6BAA6B,QAQxC,CAAC"}
@@ -0,0 +1,270 @@
1
+ // NestJS 11+ rule snippets.
2
+ //
3
+ // Covers the modern Nest service surface: module structure, thin
4
+ // controllers, DTOs with class-validator, the global ValidationPipe with
5
+ // strict options, async providers + lifecycle hooks, graceful shutdown,
6
+ // the Fastify adapter, caching, throttling, helmet, explicit CORS, JWT
7
+ // auth, structured logging via the Nest Logger, @nestjs/terminus health
8
+ // checks, and the TestingModule patterns for unit + supertest e2e.
9
+ //
10
+ // Each snippet is a string injected verbatim into a generated
11
+ // `sharkcraft/*.ts` file; `defineKnowledgeEntry`, `KnowledgeType`, and
12
+ // `KnowledgePriority` are provided by the local-mirror preamble the
13
+ // synthesizer prepends to the file.
14
+ import { ruleSnippet } from "./r26-snippets.js";
15
+ // ─── Architecture: modules, controllers, services, repos ──────────────────
16
+ export const NEST11_THIN_CONTROLLERS = ruleSnippet({
17
+ id: 'nest11.thin-controllers',
18
+ title: 'Controllers are thin — no business logic',
19
+ priority: 'critical',
20
+ tags: ['nestjs', 'nest-11', 'architecture'],
21
+ appliesWhen: ['generate-controller', 'review'],
22
+ content: 'Controllers parse the request (params/query/body via DTOs), call ONE service method, and return the result. No conditionals over domain rules, no inline database access, no orchestration of multiple services. If a controller method body is more than a handful of lines or branches on domain state, the logic belongs in a service.',
23
+ });
24
+ export const NEST11_SERVICE_OWNS_DOMAIN = ruleSnippet({
25
+ id: 'nest11.service-owns-domain',
26
+ title: 'Services own domain logic; repositories own data access',
27
+ priority: 'high',
28
+ tags: ['nestjs', 'nest-11', 'architecture'],
29
+ appliesWhen: ['generate-service', 'review'],
30
+ content: 'Services express domain rules and orchestrate work. Data access lives behind a repository (TypeORM Repository, Prisma client, or a hand-rolled interface). Services depend on repository interfaces, not on the ORM directly — that boundary is what makes unit tests cheap.',
31
+ });
32
+ export const NEST11_MODULE_PER_FEATURE = ruleSnippet({
33
+ id: 'nest11.module-per-feature',
34
+ title: 'Module per feature, not per layer',
35
+ priority: 'high',
36
+ tags: ['nestjs', 'nest-11', 'architecture'],
37
+ appliesWhen: ['create-feature'],
38
+ content: 'Each feature gets its own module under src/<feature>/ owning controller(s), service(s), DTOs, and (optionally) entities. Top-level grab-bags like ControllersModule / ServicesModule are an anti-pattern — they couple every feature to every other.',
39
+ });
40
+ export const NEST11_MODULE_PUBLIC_API = ruleSnippet({
41
+ id: 'nest11.module-public-api',
42
+ title: 'Each module exports its public API only',
43
+ priority: 'high',
44
+ tags: ['nestjs', 'nest-11', 'architecture', 'boundaries'],
45
+ appliesWhen: ['generate-code', 'review'],
46
+ content: 'A module\'s `exports: [...]` lists exactly the providers other modules may inject. Internal services stay unexported. Avoid `exports: [SomeModule]` re-exports unless you intentionally want the entire surface to be transitive.',
47
+ });
48
+ export const NEST11_NO_CIRCULAR_MODULES = ruleSnippet({
49
+ id: 'nest11.no-circular-modules',
50
+ title: 'Avoid circular module dependencies',
51
+ priority: 'critical',
52
+ tags: ['nestjs', 'nest-11', 'architecture'],
53
+ appliesWhen: ['generate-code', 'review'],
54
+ content: 'If module A imports module B and B imports A, extract the shared piece into a third module that both depend on. `forwardRef()` exists to escape genuine cycles in the dependency graph, not to paper over a missing abstraction.',
55
+ });
56
+ export const NEST11_DTO_AT_BOUNDARY = ruleSnippet({
57
+ id: 'nest11.dto-at-boundary',
58
+ title: 'DTOs at the HTTP boundary; never expose entities',
59
+ priority: 'critical',
60
+ tags: ['nestjs', 'nest-11', 'dto', 'security'],
61
+ appliesWhen: ['generate-controller', 'generate-dto'],
62
+ content: 'Request shapes live in `<feature>.dto.ts`; response shapes either in a dedicated response DTO or as a serialized projection. Never return an ORM entity directly — that leaks internal columns (audit fields, soft-delete flags, foreign keys) and couples your HTTP contract to your schema.',
63
+ });
64
+ // ─── Validation: ValidationPipe + class-validator ─────────────────────────
65
+ export const NEST11_GLOBAL_VALIDATION_PIPE = ruleSnippet({
66
+ id: 'nest11.global-validation-pipe',
67
+ title: 'Global ValidationPipe with whitelist + forbidNonWhitelisted + transform',
68
+ priority: 'critical',
69
+ tags: ['nestjs', 'nest-11', 'validation', 'security'],
70
+ appliesWhen: ['bootstrap'],
71
+ content: 'main.ts registers a global ValidationPipe: `app.useGlobalPipes(new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, transform: true, transformOptions: { enableImplicitConversion: true } }))`. whitelist strips unknown properties, forbidNonWhitelisted rejects them, transform turns plain objects into the DTO class so class-validator + class-transformer decorators fire.',
72
+ });
73
+ export const NEST11_CLASS_VALIDATOR_DTO = ruleSnippet({
74
+ id: 'nest11.class-validator-dto',
75
+ title: 'DTOs are classes with class-validator decorators',
76
+ priority: 'critical',
77
+ tags: ['nestjs', 'nest-11', 'validation', 'dto'],
78
+ appliesWhen: ['generate-dto'],
79
+ content: 'Define DTOs as classes (not interfaces) so class-validator can attach metadata. Use @IsString, @IsInt, @IsEmail, @IsUUID, @Length, @Min, @Max, @IsOptional, @IsEnum, @IsArray + @ValidateNested + @Type(() => Inner). Mark optional fields with @IsOptional() + a `?` on the property; the ValidationPipe will skip them when absent.',
80
+ });
81
+ export const NEST11_REQUEST_RESPONSE_DTOS = ruleSnippet({
82
+ id: 'nest11.request-response-dtos',
83
+ title: 'Separate request DTOs from response DTOs',
84
+ priority: 'high',
85
+ tags: ['nestjs', 'nest-11', 'dto'],
86
+ appliesWhen: ['generate-dto', 'generate-controller'],
87
+ content: 'CreateXDto, UpdateXDto, and XResponseDto are distinct classes — even when fields overlap. PartialType(CreateXDto) and PickType / OmitType from @nestjs/mapped-types compose them without duplication. This keeps the input surface (validated) and output surface (serialized) under independent control.',
88
+ });
89
+ export const NEST11_SWAGGER_DECORATORS = ruleSnippet({
90
+ id: 'nest11.swagger-decorators',
91
+ title: 'Annotate DTOs with @ApiProperty for OpenAPI',
92
+ priority: 'medium',
93
+ tags: ['nestjs', 'nest-11', 'openapi', 'swagger'],
94
+ appliesWhen: ['generate-dto'],
95
+ content: 'Pair each class-validator decorator with @ApiProperty / @ApiPropertyOptional from @nestjs/swagger. Set example, description, enum, and type explicitly — Swagger UI is the canonical contract reference for clients.',
96
+ });
97
+ // ─── Async lifecycle + graceful shutdown ──────────────────────────────────
98
+ export const NEST11_LIFECYCLE_HOOKS = ruleSnippet({
99
+ id: 'nest11.lifecycle-hooks',
100
+ title: 'Use Nest lifecycle hooks, not raw process events',
101
+ priority: 'high',
102
+ tags: ['nestjs', 'nest-11', 'lifecycle'],
103
+ appliesWhen: ['generate-service'],
104
+ content: 'Implement OnModuleInit / OnApplicationBootstrap for warm-up, OnModuleDestroy / OnApplicationShutdown for teardown. They run in DI-resolution order, so dependencies of a provider are still live during its destroy hook. Don\'t hook process.on(\'SIGTERM\') directly — Nest already wires it via enableShutdownHooks().',
105
+ });
106
+ export const NEST11_ENABLE_SHUTDOWN_HOOKS = ruleSnippet({
107
+ id: 'nest11.enable-shutdown-hooks',
108
+ title: 'Call app.enableShutdownHooks() in main.ts',
109
+ priority: 'high',
110
+ tags: ['nestjs', 'nest-11', 'lifecycle'],
111
+ appliesWhen: ['bootstrap'],
112
+ content: 'Without enableShutdownHooks() the OnModuleDestroy / OnApplicationShutdown hooks never fire on SIGTERM, leaving connections (DB pools, Kafka clients, etc.) dangling. Call it before app.listen().',
113
+ });
114
+ export const NEST11_ASYNC_PROVIDERS = ruleSnippet({
115
+ id: 'nest11.async-providers',
116
+ title: 'Use useFactory for async configuration providers',
117
+ priority: 'medium',
118
+ tags: ['nestjs', 'nest-11', 'di'],
119
+ appliesWhen: ['generate-module'],
120
+ content: 'Configuration that must be resolved at boot (env, secrets vault, schema generation) goes through `{ provide: TOKEN, useFactory: async (cfg) => …, inject: [ConfigService] }`. Don\'t lazy-load it inside a service\'s onModuleInit — that delays the readiness signal.',
121
+ });
122
+ // ─── Performance: Fastify, cache, throttler, pagination ──────────────────
123
+ export const NEST11_FASTIFY_ADAPTER = ruleSnippet({
124
+ id: 'nest11.fastify-adapter',
125
+ title: 'Use the Fastify adapter for high-throughput services',
126
+ priority: 'high',
127
+ tags: ['nestjs', 'nest-11', 'performance'],
128
+ appliesWhen: ['bootstrap'],
129
+ content: 'NestFactory.create<NestFastifyApplication>(AppModule, new FastifyAdapter()) gives ~2× the RPS of the default Express adapter and matches Nest\'s typed-decorator surface. Only stay on Express if you need a middleware that isn\'t available for Fastify (rare).',
130
+ });
131
+ export const NEST11_CACHE_MANAGER = ruleSnippet({
132
+ id: 'nest11.cache-manager',
133
+ title: 'Cache idempotent GETs via @nestjs/cache-manager',
134
+ priority: 'medium',
135
+ tags: ['nestjs', 'nest-11', 'performance'],
136
+ appliesWhen: ['generate-controller', 'optimize'],
137
+ content: 'Register CacheModule with a TTL appropriate to the data (seconds for hot reads, minutes for slowly-changing references). Decorate idempotent GET endpoints with @UseInterceptors(CacheInterceptor) or inject CACHE_MANAGER for explicit key-based caches. Never cache user-private responses without a per-user key.',
138
+ });
139
+ export const NEST11_THROTTLER = ruleSnippet({
140
+ id: 'nest11.throttler',
141
+ title: 'Rate-limit with @nestjs/throttler',
142
+ priority: 'high',
143
+ tags: ['nestjs', 'nest-11', 'performance', 'security'],
144
+ appliesWhen: ['bootstrap', 'generate-controller'],
145
+ content: 'Register ThrottlerModule globally with sane defaults (e.g. 60 requests / minute / IP), then loosen or tighten per route via @Throttle({ default: { limit, ttl } }) or @SkipThrottle() for internal endpoints. Without throttler a single client can DOS your service trivially.',
146
+ });
147
+ export const NEST11_PAGINATION_BY_DEFAULT = ruleSnippet({
148
+ id: 'nest11.pagination-by-default',
149
+ title: 'List endpoints paginate by default',
150
+ priority: 'high',
151
+ tags: ['nestjs', 'nest-11', 'performance'],
152
+ appliesWhen: ['generate-controller'],
153
+ content: 'Every list endpoint accepts `?page=1&pageSize=20` (or cursor-based) and caps pageSize server-side (e.g. max 100). Returning an unbounded array works on day 1 and dies in week 3 — paginate from the start so the contract never has to break.',
154
+ });
155
+ // ─── Security: helmet, CORS, auth, secrets ────────────────────────────────
156
+ export const NEST11_HELMET = ruleSnippet({
157
+ id: 'nest11.helmet',
158
+ title: 'Register helmet for HTTP security headers',
159
+ priority: 'critical',
160
+ tags: ['nestjs', 'nest-11', 'security'],
161
+ appliesWhen: ['bootstrap'],
162
+ content: 'Add `app.register(helmet)` (Fastify) or `app.use(helmet())` (Express) before any route is mounted. helmet sets X-Content-Type-Options, X-Frame-Options, Strict-Transport-Security, and CSP defaults. Skipping it leaves you on every "missing security header" audit.',
163
+ });
164
+ export const NEST11_EXPLICIT_CORS = ruleSnippet({
165
+ id: 'nest11.explicit-cors',
166
+ title: 'CORS allowlist — never `origin: true` in production',
167
+ priority: 'critical',
168
+ tags: ['nestjs', 'nest-11', 'security'],
169
+ appliesWhen: ['bootstrap'],
170
+ content: 'Configure CORS with an explicit `origin: ["https://app.example.com"]` array (or a function that validates against an allowlist). `origin: true` reflects whatever the request sent — fine for local dev, catastrophic in prod for any cookie-/credential-bearing endpoint.',
171
+ });
172
+ export const NEST11_JWT_GUARDS = ruleSnippet({
173
+ id: 'nest11.jwt-guards',
174
+ title: 'Authentication via Guards, not middleware',
175
+ priority: 'high',
176
+ tags: ['nestjs', 'nest-11', 'security', 'auth'],
177
+ appliesWhen: ['generate-controller'],
178
+ content: 'Auth runs through @nestjs/passport + a JwtAuthGuard (or custom AuthGuard) applied via @UseGuards() at controller or method level. Guards see the full execution context (request, handler metadata) and integrate with @SetMetadata for role-based / permission-based checks. Middleware can\'t do that.',
179
+ });
180
+ export const NEST11_NO_SECRETS_IN_CODE = ruleSnippet({
181
+ id: 'nest11.no-secrets-in-code',
182
+ title: 'Secrets come from the env, never from source',
183
+ priority: 'critical',
184
+ tags: ['nestjs', 'nest-11', 'security'],
185
+ appliesWhen: ['generate-code', 'review'],
186
+ content: 'JWT signing keys, DB passwords, third-party API keys, encryption secrets — all loaded through @nestjs/config (ConfigService.get) from environment variables, .env (local only, in .gitignore), or a vault. A literal secret in a `.ts` file is a CVE waiting for a commit.',
187
+ });
188
+ export const NEST11_TRUST_PROXY_AWARE = ruleSnippet({
189
+ id: 'nest11.trust-proxy-aware',
190
+ title: 'Configure trust-proxy when behind a load balancer',
191
+ priority: 'medium',
192
+ tags: ['nestjs', 'nest-11', 'security'],
193
+ appliesWhen: ['bootstrap'],
194
+ content: 'When the service runs behind an ALB / Cloudflare / nginx, set the trust-proxy option on the adapter so req.ip + X-Forwarded-For resolve correctly. Otherwise throttler keys, audit logs, and rate-limiting all degenerate to the proxy\'s IP.',
195
+ });
196
+ // ─── Observability: Logger, structured logs, terminus ────────────────────
197
+ export const NEST11_LOGGER_WITH_CONTEXT = ruleSnippet({
198
+ id: 'nest11.logger-with-context',
199
+ title: 'Logger instances carry a context name',
200
+ priority: 'high',
201
+ tags: ['nestjs', 'nest-11', 'observability'],
202
+ appliesWhen: ['generate-service'],
203
+ content: 'In each provider, do `private readonly logger = new Logger(MyService.name)`. The context name appears in every log line so filtering by component is trivial. Don\'t share a single Logger instance across the app — you lose the grouping.',
204
+ });
205
+ export const NEST11_STRUCTURED_LOGS = ruleSnippet({
206
+ id: 'nest11.structured-logs',
207
+ title: 'JSON-structured logs in production (pino or nest-winston)',
208
+ priority: 'high',
209
+ tags: ['nestjs', 'nest-11', 'observability'],
210
+ appliesWhen: ['bootstrap', 'configure'],
211
+ content: 'Plug a structured logger (nestjs-pino or nest-winston) and route the Nest Logger through it. Production logs are JSON one-line records that ship cleanly into Loki / CloudWatch / Datadog. The default ConsoleLogger is fine for dev only.',
212
+ });
213
+ export const NEST11_NO_LOG_SECRETS = ruleSnippet({
214
+ id: 'nest11.no-log-secrets',
215
+ title: 'Never log secrets, tokens, PII, or full request bodies',
216
+ priority: 'critical',
217
+ tags: ['nestjs', 'nest-11', 'observability', 'security'],
218
+ appliesWhen: ['generate-code', 'review'],
219
+ content: 'Redact Authorization headers, JWTs, passwords, credit-card numbers, government IDs, and full request/response bodies that may contain user data. Configure the logger redact paths once (pino: redact: [\'req.headers.authorization\', \'body.password\']) so the discipline survives drive-by edits.',
220
+ });
221
+ export const NEST11_TERMINUS_HEALTH = ruleSnippet({
222
+ id: 'nest11.terminus-health',
223
+ title: 'Expose /health via @nestjs/terminus with liveness + readiness',
224
+ priority: 'high',
225
+ tags: ['nestjs', 'nest-11', 'observability'],
226
+ appliesWhen: ['generate-controller'],
227
+ content: 'Use @nestjs/terminus HealthCheckService to compose indicators (db.pingCheck, http.pingCheck, memory.heapCheck). Expose /health/liveness (process is up) AND /health/readiness (deps are reachable) separately — Kubernetes treats them differently. Don\'t return 200 from readiness when the DB is down.',
228
+ });
229
+ // ─── Testing: TestingModule + e2e ────────────────────────────────────────
230
+ export const NEST11_TESTING_MODULE = ruleSnippet({
231
+ id: 'nest11.testing-module',
232
+ title: 'Unit tests use Test.createTestingModule + overrideProvider',
233
+ priority: 'high',
234
+ tags: ['nestjs', 'nest-11', 'testing'],
235
+ appliesWhen: ['generate-test'],
236
+ content: 'Build a TestingModule that imports the module under test, then `overrideProvider(SlowDep).useValue(mock)` for whatever you want to fake. Resolve the unit under test with `module.get(MyService)`. Avoid `new MyService(...)` outside of testing the constructor itself — DI is part of the contract.',
237
+ });
238
+ export const NEST11_E2E_SUPERTEST = ruleSnippet({
239
+ id: 'nest11.e2e-supertest',
240
+ title: 'E2E with supertest against the real AppModule',
241
+ priority: 'high',
242
+ tags: ['nestjs', 'nest-11', 'testing'],
243
+ appliesWhen: ['generate-test'],
244
+ content: 'E2E tests bootstrap a TestingModule from AppModule, build a Nest application, and drive it with supertest (`request(app.getHttpServer()).get(...)`). Override only the truly slow/expensive deps (external HTTP, message brokers); keep the validation pipeline, guards, and interceptors live — that\'s the contract being tested.',
245
+ });
246
+ export const NEST11_TEST_FILE_LAYOUT = ruleSnippet({
247
+ id: 'nest11.test-file-layout',
248
+ title: 'Unit specs co-located; e2e under test/',
249
+ priority: 'medium',
250
+ tags: ['nestjs', 'nest-11', 'testing'],
251
+ appliesWhen: ['generate-test'],
252
+ content: 'Unit specs live next to the unit (`users.service.spec.ts` beside `users.service.ts`). E2E specs live under `test/*.e2e-spec.ts` — Nest\'s default jest-e2e.json glob matches that pattern. Don\'t mix the two; they have different setup costs and different debugging stories.',
253
+ });
254
+ // ─── API design ──────────────────────────────────────────────────────────
255
+ export const NEST11_API_VERSIONING = ruleSnippet({
256
+ id: 'nest11.api-versioning',
257
+ title: 'Enable versioning when the contract is consumed externally',
258
+ priority: 'medium',
259
+ tags: ['nestjs', 'nest-11', 'api'],
260
+ appliesWhen: ['bootstrap', 'generate-controller'],
261
+ content: 'For any service whose API has external consumers, call `app.enableVersioning({ type: VersioningType.URI, defaultVersion: \'1\' })` at bootstrap. Annotate controllers with @Controller({ path: \'users\', version: \'1\' }). Breaking changes ship as v2 alongside v1 — never as a silent overwrite.',
262
+ });
263
+ export const NEST11_NO_QUERY_IN_CONTROLLER = ruleSnippet({
264
+ id: 'nest11.no-query-in-controller',
265
+ title: 'Never query the database from a controller',
266
+ priority: 'high',
267
+ tags: ['nestjs', 'nest-11', 'architecture'],
268
+ appliesWhen: ['generate-controller', 'review'],
269
+ content: 'Repositories are injected into services, not controllers. A controller that imports `Repository<User>` or `prisma.user` directly is on the path to a 600-line "controller that does everything" — back it out into a service.',
270
+ });
@@ -0,0 +1,12 @@
1
+ import type { IPreset } from '../model/preset.js';
2
+ export declare const REACT_19_MODERN_COMPONENTS: IPreset;
3
+ export declare const REACT_19_HOOKS_DISCIPLINE: IPreset;
4
+ export declare const REACT_19_ACTIONS_FORMS: IPreset;
5
+ export declare const REACT_19_STATE: IPreset;
6
+ export declare const REACT_19_PERFORMANCE: IPreset;
7
+ export declare const REACT_19_CONCURRENT: IPreset;
8
+ export declare const REACT_19_TESTING: IPreset;
9
+ export declare const REACT_19_RSC: IPreset;
10
+ export declare const REACT_19_MODERN: IPreset;
11
+ export declare const REACT_19_PRESETS: readonly IPreset[];
12
+ //# sourceMappingURL=react19-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react19-presets.d.ts","sourceRoot":"","sources":["../../src/builtin/react19-presets.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAmElD,eAAO,MAAM,0BAA0B,EAAE,OAgCvC,CAAC;AAIH,eAAO,MAAM,yBAAyB,EAAE,OA+BtC,CAAC;AAIH,eAAO,MAAM,sBAAsB,EAAE,OA8BnC,CAAC;AAIH,eAAO,MAAM,cAAc,EAAE,OA6B3B,CAAC;AAIH,eAAO,MAAM,oBAAoB,EAAE,OA6BjC,CAAC;AAIH,eAAO,MAAM,mBAAmB,EAAE,OA6BhC,CAAC;AAIH,eAAO,MAAM,gBAAgB,EAAE,OA4B7B,CAAC;AAIH,eAAO,MAAM,YAAY,EAAE,OA6BzB,CAAC;AAIH,eAAO,MAAM,eAAe,EAAE,OA8C5B,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,SAAS,OAAO,EAU7C,CAAC"}