@gravito/scaffold 4.0.0 → 4.1.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/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@gravito/scaffold",
3
- "version": "4.0.0",
3
+ "sideEffects": false,
4
+ "version": "4.1.0",
4
5
  "description": "Project scaffolding engine for Gravito - Generate enterprise-grade architecture templates",
5
6
  "type": "module",
6
7
  "main": "dist/index.js",
@@ -15,6 +16,7 @@
15
16
  },
16
17
  "scripts": {
17
18
  "build": "bun run build.ts",
19
+ "build:dts": "bun run build.ts --dts-only",
18
20
  "dev": "bun run --watch src/index.ts",
19
21
  "test": "bun test --timeout=10000",
20
22
  "typecheck": "bun tsc -p tsconfig.json --noEmit --skipLibCheck",
@@ -35,12 +37,13 @@
35
37
  "handlebars": "^4.7.8"
36
38
  },
37
39
  "devDependencies": {
40
+ "@gravito/core": "workspace:*",
38
41
  "tsup": "^8.5.1",
39
42
  "typescript": "^5.9.3",
40
43
  "bun-types": "latest"
41
44
  },
42
45
  "peerDependencies": {
43
- "@gravito/core": "^1.6.1"
46
+ "@gravito/core": "^2.0.0"
44
47
  },
45
48
  "author": "Carl Lee <carllee0520@gmail.com>",
46
49
  "license": "MIT",
package/dist/index.d.cts DELETED
@@ -1,687 +0,0 @@
1
- import Handlebars from 'handlebars';
2
-
3
- /**
4
- * Supported project profiles defining the set of included orbits and default drivers.
5
- *
6
- * @public
7
- * @since 3.0.0
8
- */
9
- type ProfileType = 'core' | 'scale' | 'enterprise';
10
- /**
11
- * Resolved configuration for a project profile.
12
- *
13
- * @public
14
- * @since 3.0.0
15
- */
16
- interface ProfileConfig {
17
- /** Map of default service drivers. */
18
- drivers: {
19
- database: string;
20
- cache: string;
21
- queue: string;
22
- storage: string;
23
- session: string;
24
- };
25
- /** List of enabled features and orbits. */
26
- features: string[];
27
- }
28
- /**
29
- * ProfileResolver manages the resolution of project profiles and feature add-ons.
30
- *
31
- * It maps high-level profiles (Core, Scale, Enterprise) to specific sets of
32
- * service drivers and orbits, and handles the conditional inclusion of
33
- * additional features.
34
- *
35
- * @public
36
- * @since 3.0.0
37
- */
38
- declare class ProfileResolver {
39
- private static readonly DEFAULTS;
40
- resolve(profile?: ProfileType, withFeatures?: string[]): ProfileConfig;
41
- private applyFeature;
42
- /**
43
- * Validator for profile names
44
- */
45
- isValidProfile(profile: string): profile is ProfileType;
46
- /**
47
- * Validator for feature names
48
- */
49
- isValidFeature(feature: string): boolean;
50
- }
51
-
52
- /**
53
- * package.json 結構
54
- */
55
- interface PackageJson {
56
- name?: string;
57
- version?: string;
58
- dependencies?: Record<string, string>;
59
- devDependencies?: Record<string, string>;
60
- [key: string]: unknown;
61
- }
62
- /**
63
- * 驗證結果
64
- */
65
- interface ValidationResult {
66
- /** 是否通過驗證 */
67
- valid: boolean;
68
- /** 錯誤訊息列表 (阻塞性問題) */
69
- errors: string[];
70
- /** 警告訊息列表 (非阻塞性問題) */
71
- warnings: string[];
72
- }
73
- /**
74
- * 依賴驗證器
75
- *
76
- * 負責驗證 Profile 配置的依賴完整性,包括:
77
- * - Driver 必需的 packages
78
- * - Feature 之間的衝突
79
- * - Feature 的依賴關係
80
- *
81
- * @example
82
- * ```typescript
83
- * const validator = new DependencyValidator()
84
- * const result = validator.validate(profileConfig, packageJson)
85
- *
86
- * if (!result.valid) {
87
- * console.error('依賴驗證失敗:', result.errors)
88
- * }
89
- * ```
90
- *
91
- * @since 3.1.0
92
- * @public
93
- */
94
- declare class DependencyValidator {
95
- /**
96
- * Driver 到 Package 的映射規則
97
- */
98
- private static readonly DRIVER_DEPENDENCIES;
99
- /**
100
- * Feature 衝突規則
101
- */
102
- private static readonly CONFLICTS;
103
- /**
104
- * Feature 依賴映射
105
- */
106
- private static readonly FEATURE_DEPENDENCIES;
107
- /**
108
- * 驗證 Profile 配置
109
- *
110
- * @param config - Profile 配置
111
- * @param packageJson - 專案的 package.json 內容
112
- * @returns 驗證結果
113
- */
114
- validate(config: ProfileConfig, packageJson: PackageJson): ValidationResult;
115
- /**
116
- * 驗證 driver 依賴
117
- */
118
- private validateDriverDependencies;
119
- /**
120
- * 驗證 feature 衝突
121
- */
122
- private validateFeatureConflicts;
123
- /**
124
- * 驗證 feature 依賴
125
- */
126
- private validateFeatureDependencies;
127
- /**
128
- * 檢查 package.json 是否包含指定 package
129
- */
130
- private hasPackage;
131
- /**
132
- * 建議安裝缺失的依賴
133
- *
134
- * @param result - 驗證結果
135
- * @returns 安裝命令建議
136
- */
137
- static suggestInstallCommand(result: ValidationResult): string | null;
138
- }
139
-
140
- /**
141
- * Represents the results of an environment detection scan.
142
- *
143
- * @public
144
- * @since 3.0.0
145
- */
146
- interface DetectedEnvironment {
147
- /** The detected cloud or hosting platform. */
148
- platform: 'aws' | 'gcp' | 'azure' | 'k8s' | 'vercel' | 'netlify' | 'unknown';
149
- /** The project profile most suitable for this environment. */
150
- suggestedProfile: ProfileType;
151
- /** The degree of certainty in the detection. */
152
- confidence: 'high' | 'medium' | 'low';
153
- /** The reason or heuristic used for the detection. */
154
- reason: string;
155
- }
156
- /**
157
- * EnvironmentDetector inspects environment variables to identify the hosting platform.
158
- *
159
- * It uses these heuristics to suggest the most appropriate project profile
160
- * (Core, Scale, or Enterprise) for the current environment.
161
- *
162
- * @public
163
- * @since 3.0.0
164
- */
165
- declare class EnvironmentDetector {
166
- detect(): DetectedEnvironment;
167
- }
168
-
169
- /**
170
- * FileMerger handles the intelligent merging of file contents during scaffolding.
171
- *
172
- * It understands different file formats (JSON, ENV) and applies appropriate
173
- * merging strategies instead of simple overwriting.
174
- *
175
- * @public
176
- * @since 3.0.0
177
- */
178
- declare class FileMerger {
179
- /**
180
- * Merge content of two files based on their type.
181
- */
182
- merge(fileName: string, baseContent: string, overlayContent: string): string;
183
- private mergeJson;
184
- private mergeEnv;
185
- }
186
-
187
- /**
188
- * Architecture patterns supported by the scaffolding engine.
189
- *
190
- * @public
191
- * @since 3.0.0
192
- */
193
- type ArchitectureType = 'enterprise-mvc' | 'clean' | 'ddd' | 'satellite' | 'action-domain' | 'standalone-engine';
194
- /**
195
- * Configuration options for creating a new project via Scaffold.
196
- *
197
- * @public
198
- * @since 3.0.0
199
- */
200
- interface ScaffoldOptions {
201
- /** The name of the new project (e.g., 'my-api'). */
202
- name: string;
203
- /** Absolute path where the project files should be generated. */
204
- targetDir: string;
205
- /** The primary architectural pattern to apply. */
206
- architecture: ArchitectureType;
207
- /** Preferred package manager for dependency installation. @default 'bun' */
208
- packageManager?: 'bun' | 'npm' | 'yarn' | 'pnpm';
209
- /** Whether to run `git init` in the target directory. @default true */
210
- initGit?: boolean;
211
- /** Whether to automatically run `install` after file generation. @default true */
212
- installDeps?: boolean;
213
- /** If true, includes the Spectrum observability dashboard in the scaffolded app. */
214
- withSpectrum?: boolean;
215
- /** Internal flag for official Gravito satellite projects. */
216
- isInternal?: boolean;
217
- /** Selected project profile determining the set of included orbits/packages. */
218
- profile?: 'core' | 'scale' | 'enterprise';
219
- /** List of additional feature orbits to include (e.g., 'redis', 'queue', 'otel'). */
220
- features?: string[];
221
- /** Additional template variables to be used during file generation. */
222
- context?: Record<string, unknown>;
223
- }
224
- /**
225
- * The outcome of a scaffolding operation.
226
- *
227
- * @public
228
- * @since 3.0.0
229
- */
230
- interface ScaffoldResult {
231
- /** True if the operation completed without fatal errors. */
232
- success: boolean;
233
- /** The absolute path where the project was created. */
234
- targetDir: string;
235
- /** List of relative file paths that were successfully generated. */
236
- filesCreated: string[];
237
- /** Any non-fatal error messages encountered during generation. */
238
- errors?: string[];
239
- }
240
- /**
241
- * Represents a node in the project file structure blueprint.
242
- *
243
- * Used to define the skeleton of a new project before generation.
244
- *
245
- * @public
246
- * @since 3.0.0
247
- */
248
- interface DirectoryNode {
249
- /** The type of node (file vs folder). */
250
- type: 'file' | 'directory';
251
- /** The name of the file or directory. */
252
- name: string;
253
- /** Literal string content if this is a file node. */
254
- content?: string;
255
- /** The name or path of a template to use for this file's content. */
256
- template?: string;
257
- /** Nested nodes if this is a directory. */
258
- children?: DirectoryNode[];
259
- }
260
-
261
- declare class TemplateManager {
262
- private stubGenerator;
263
- constructor(templatesDir: string);
264
- render(template: string, context: Record<string, unknown>): string;
265
- applyOverlay(sourceDir: string, targetDir: string, context: Record<string, unknown>, fileMerger: FileMerger, log?: (msg: string) => void): Promise<string[]>;
266
- }
267
-
268
- /**
269
- * BaseGenerator - Abstract base class for architecture generators.
270
- */
271
-
272
- interface GeneratorContext {
273
- name: string;
274
- namePascalCase: string;
275
- nameCamelCase: string;
276
- nameSnakeCase: string;
277
- nameKebabCase: string;
278
- targetDir: string;
279
- architecture: ArchitectureType;
280
- packageManager: 'bun' | 'npm' | 'yarn' | 'pnpm';
281
- year: string;
282
- date: string;
283
- [key: string]: unknown;
284
- }
285
- interface GeneratorConfig {
286
- templatesDir: string;
287
- verbose?: boolean;
288
- }
289
- declare abstract class BaseGenerator {
290
- protected config: GeneratorConfig;
291
- protected templateManager: TemplateManager;
292
- protected fileMerger: FileMerger;
293
- protected filesCreated: string[];
294
- protected context: GeneratorContext | null;
295
- constructor(config: GeneratorConfig);
296
- abstract get architectureType(): ArchitectureType;
297
- abstract get displayName(): string;
298
- abstract get description(): string;
299
- abstract getDirectoryStructure(context: GeneratorContext): DirectoryNode[];
300
- generate(context: GeneratorContext): Promise<string[]>;
301
- protected createStructure(basePath: string, nodes: DirectoryNode[], context: GeneratorContext): Promise<void>;
302
- protected generateCommonFiles(context: GeneratorContext): Promise<void>;
303
- protected generateFileFromTemplate(tplDir: string, tplName: string, targetName: string, context: GeneratorContext): Promise<void>;
304
- protected generateSkills(context: GeneratorContext): Promise<void>;
305
- protected applyOverlays(context: GeneratorContext): Promise<void>;
306
- protected applyFeatureOverlays(context: GeneratorContext): Promise<void>;
307
- protected copyOverlayDirectory(sourceDir: string, context: GeneratorContext): Promise<void>;
308
- protected writeFile(basePath: string, relativePath: string, content: string): Promise<void>;
309
- protected generatePackageJson(context: GeneratorContext): string;
310
- protected abstract generateArchitectureDoc(context: GeneratorContext): string;
311
- protected generateCheckScripts(context: GeneratorContext): Promise<void>;
312
- protected log(message: string): void;
313
- static createContext(name: string, targetDir: string, architecture: ArchitectureType, packageManager?: 'bun' | 'npm' | 'yarn' | 'pnpm', extra?: Record<string, unknown>): GeneratorContext;
314
- }
315
-
316
- /**
317
- * CleanArchitectureGenerator - Clean Architecture Generator
318
- *
319
- * Generates a structure following Uncle Bob's Clean Architecture:
320
- * - Domain: Entities, Value Objects, Interfaces (pure business logic)
321
- * - Application: Use Cases, DTOs
322
- * - Infrastructure: Database, External Services
323
- * - Interface: HTTP Controllers, Presenters
324
- */
325
-
326
- /**
327
- * CleanArchitectureGenerator implements Uncle Bob's Clean Architecture pattern.
328
- *
329
- * It generates a strictly layered structure including Domain, Application,
330
- * Infrastructure, and Interface layers, ensuring business logic is isolated
331
- * from framework and external dependencies.
332
- *
333
- * @public
334
- * @since 3.0.0
335
- */
336
- declare class CleanArchitectureGenerator extends BaseGenerator {
337
- get architectureType(): "clean";
338
- get displayName(): string;
339
- get description(): string;
340
- getDirectoryStructure(context: GeneratorContext): DirectoryNode[];
341
- private generateAppConfig;
342
- private generateDatabaseConfig;
343
- private generateAuthConfig;
344
- private generateCacheConfig;
345
- private generateLoggingConfig;
346
- private generateUserEntity;
347
- private generateEmailValueObject;
348
- private generateUserRepositoryInterface;
349
- private generateCreateUserUseCase;
350
- private generateGetUserUseCase;
351
- private generateUserDTO;
352
- private generateMailServiceInterface;
353
- private generateUserRepository;
354
- private generateMailService;
355
- private generateAppServiceProvider;
356
- private generateRepositoryServiceProvider;
357
- private generateProvidersIndex;
358
- private generateMiddlewareProvider;
359
- private generateRouteProvider;
360
- private generateUserController;
361
- private generateApiRoutes;
362
- private generateUserPresenter;
363
- private generateBootstrap;
364
- protected generateArchitectureDoc(context: GeneratorContext): string;
365
- protected generatePackageJson(context: GeneratorContext): string;
366
- }
367
-
368
- /**
369
- * DddGenerator - Domain-Driven Design Architecture Generator
370
- *
371
- * Generates a DDD structure with:
372
- * - Bounded Contexts (e.g., Ordering, Catalog, Identity)
373
- * - Shared Kernel for cross-context concerns
374
- * - Each context has Domain, Application, Infrastructure, UserInterface layers
375
- */
376
-
377
- /**
378
- * DddGenerator implements the full Domain-Driven Design (DDD) architectural pattern.
379
- *
380
- * It generates a sophisticated structure including Bounded Contexts, Aggregates,
381
- * Value Objects, Domain Events, and a Shared Kernel. It is ideal for complex
382
- * enterprise applications with rich business logic.
383
- *
384
- * @public
385
- * @since 3.0.0
386
- */
387
- declare class DddGenerator extends BaseGenerator {
388
- private moduleGenerator;
389
- private sharedKernelGenerator;
390
- private bootstrapGenerator;
391
- constructor(config: GeneratorConfig);
392
- get architectureType(): "ddd";
393
- get displayName(): string;
394
- get description(): string;
395
- getDirectoryStructure(context: GeneratorContext): DirectoryNode[];
396
- /**
397
- * Override package.json for DDD architecture (uses main.ts instead of bootstrap.ts)
398
- */
399
- protected generatePackageJson(context: GeneratorContext): string;
400
- protected generateArchitectureDoc(context: GeneratorContext): string;
401
- }
402
-
403
- /**
404
- * EnterpriseMvcGenerator - Enterprise MVC Architecture Generator
405
- *
406
- * Generates a Laravel-inspired MVC structure with:
407
- * - Controllers for HTTP handling
408
- * - Services for business logic
409
- * - Repositories for data persistence
410
- * - Http/Kernel for middleware management
411
- */
412
-
413
- /**
414
- * EnterpriseMvcGenerator implements a Laravel-inspired MVC architectural pattern.
415
- *
416
- * It generates a pragmatic, robust structure with Controllers, Services,
417
- * Repositories, and Service Providers. It is the recommended architecture
418
- * for most web applications and APIs.
419
- *
420
- * @public
421
- * @since 3.0.0
422
- */
423
- declare class EnterpriseMvcGenerator extends BaseGenerator {
424
- get architectureType(): "enterprise-mvc";
425
- get displayName(): string;
426
- get description(): string;
427
- getDirectoryStructure(context: GeneratorContext): DirectoryNode[];
428
- private generateAppConfig;
429
- private generateDatabaseConfig;
430
- private generateAuthConfig;
431
- private generateCacheConfig;
432
- private generateLoggingConfig;
433
- private generateHttpKernel;
434
- private generateBaseController;
435
- private generateHomeController;
436
- private generateAuthMiddleware;
437
- private generateAppServiceProvider;
438
- private generateProvidersIndex;
439
- private generateDatabaseProvider;
440
- private generateMiddlewareProvider;
441
- private generateRouteProvider;
442
- private generateExceptionHandler;
443
- private generateBootstrap;
444
- private generateRoutes;
445
- protected generateArchitectureDoc(context: GeneratorContext): string;
446
- }
447
-
448
- /**
449
- * SatelliteGenerator - Scaffolds Gravito Satellites (Plugins)
450
- *
451
- * Implements DDD + Clean Architecture for plugins with built-in
452
- * Dogfooding support (pre-configured with Gravito modules).
453
- */
454
-
455
- /**
456
- * SatelliteGenerator scaffolds modular plug-and-play extensions for Gravito.
457
- *
458
- * It follows a strict DDD and Clean Architecture pattern to ensure that
459
- * satellites remain decoupled from the core framework and other satellites.
460
- *
461
- * @public
462
- * @since 3.0.0
463
- */
464
- declare class SatelliteGenerator extends BaseGenerator {
465
- get architectureType(): "satellite";
466
- get displayName(): string;
467
- get description(): string;
468
- getDirectoryStructure(context: GeneratorContext): DirectoryNode[];
469
- private generateEntity;
470
- private generateRepositoryInterface;
471
- private generateUseCase;
472
- private generateAtlasRepository;
473
- private generateEntryPoint;
474
- private generateManifest;
475
- protected generatePackageJson(context: GeneratorContext): string;
476
- protected generateArchitectureDoc(context: GeneratorContext): string;
477
- }
478
-
479
- /**
480
- * StubGenerator - Abstract template processor for generating code files.
481
- *
482
- * Provides a flexible system for processing stub templates with Handlebars,
483
- * enabling extensible code generation for any file type.
484
- *
485
- * @example
486
- * ```typescript
487
- * const generator = new StubGenerator({
488
- * stubsDir: './stubs',
489
- * outputDir: './src',
490
- * });
491
- *
492
- * await generator.generate('controller.stub', 'Controllers/UserController.ts', {
493
- * name: 'User',
494
- * namespace: 'App\\Controllers',
495
- * });
496
- * ```
497
- */
498
-
499
- /**
500
- * Variables passed to stub templates during processing.
501
- *
502
- * @public
503
- * @since 3.0.0
504
- */
505
- interface StubVariables {
506
- [key: string]: unknown;
507
- }
508
- /**
509
- * Configuration for the `StubGenerator`.
510
- *
511
- * @public
512
- * @since 3.0.0
513
- */
514
- interface StubConfig {
515
- /** Directory containing the raw stub templates. */
516
- stubsDir: string;
517
- /** Root directory for all generated files. */
518
- outputDir: string;
519
- /** Default variables available to all templates. */
520
- defaultVariables?: StubVariables;
521
- /** Optional custom Handlebars helper implementations. */
522
- helpers?: Record<string, Handlebars.HelperDelegate>;
523
- }
524
- /**
525
- * StubGenerator processes template stubs using the Handlebars engine.
526
- *
527
- * It provides a rich set of built-in helpers for string manipulation
528
- * (camelCase, PascalCase, etc.) and handles file reading and writing.
529
- *
530
- * @public
531
- * @since 3.0.0
532
- */
533
- declare class StubGenerator {
534
- private config;
535
- private handlebars;
536
- constructor(config: StubConfig);
537
- /**
538
- * Register built-in Handlebars helpers.
539
- */
540
- private registerBuiltinHelpers;
541
- /**
542
- * Generate a file from a stub template.
543
- *
544
- * @param stubName - Name of the stub file (relative to stubsDir)
545
- * @param outputPath - Output path (relative to outputDir)
546
- * @param variables - Template variables
547
- * @returns Path to the generated file
548
- */
549
- generate(stubName: string, outputPath: string, variables?: StubVariables): Promise<string>;
550
- /**
551
- * Generate multiple files from a stub template.
552
- *
553
- * @param stubName - Name of the stub file
554
- * @param outputs - Array of [outputPath, variables] tuples
555
- * @returns Array of generated file paths
556
- */
557
- generateMany(stubName: string, outputs: [string, StubVariables][]): Promise<string[]>;
558
- /**
559
- * Render a template string directly.
560
- *
561
- * @param template - Template string
562
- * @param variables - Template variables
563
- * @returns Rendered content
564
- */
565
- render(template: string, variables?: StubVariables): string;
566
- /**
567
- * Register a custom Handlebars helper.
568
- *
569
- * @param name - Helper name
570
- * @param helper - Helper function
571
- */
572
- registerHelper(name: string, helper: Handlebars.HelperDelegate): void;
573
- /**
574
- * Register a Handlebars partial.
575
- *
576
- * @param name - Partial name
577
- * @param partial - Partial template string
578
- */
579
- registerPartial(name: string, partial: string): void;
580
- }
581
-
582
- /**
583
- * Represents the structure of a `gravito.lock.json` file.
584
- *
585
- * @public
586
- * @since 3.0.0
587
- */
588
- interface LockFile {
589
- /** Information about the selected project profile. */
590
- profile: {
591
- name: ProfileType;
592
- version: string;
593
- };
594
- /** List of enabled features and orbits. */
595
- features: string[];
596
- /** Selected default drivers for various services. */
597
- drivers: {
598
- database: string;
599
- cache: string;
600
- queue: string;
601
- storage: string;
602
- session: string;
603
- };
604
- /** Metadata about the template used for generation. */
605
- manifest: {
606
- template: string;
607
- version: string;
608
- };
609
- /** ISO timestamp when the project was scaffolded. */
610
- createdAt: string;
611
- }
612
- /**
613
- * LockGenerator creates the `gravito.lock.json` file during scaffolding.
614
- *
615
- * This file records the architectural choices and feature set of the project,
616
- * allowing the CLI to perform consistent upgrades and feature injections later.
617
- *
618
- * @public
619
- * @since 3.0.0
620
- */
621
- declare class LockGenerator {
622
- generate(profileName: ProfileType, config: ProfileConfig, templateName?: string, templateVersion?: string): string;
623
- }
624
-
625
- /**
626
- * Scaffold is the primary engine for generating Gravito project structures.
627
- *
628
- * It orchestrates dynamic template generation, architecture patterns,
629
- * profile resolution, and environment setup.
630
- *
631
- * @example
632
- * ```typescript
633
- * const engine = new Scaffold();
634
- * const result = await engine.create({
635
- * name: 'new-app',
636
- * targetDir: '/path/to/app',
637
- * architecture: 'enterprise-mvc'
638
- * });
639
- * ```
640
- *
641
- * @public
642
- * @since 3.0.0
643
- */
644
- declare class Scaffold {
645
- private templatesDir;
646
- private verbose;
647
- constructor(options?: {
648
- templatesDir?: string;
649
- verbose?: boolean;
650
- });
651
- /**
652
- * Returns a list of all architectural patterns supported by the engine,
653
- * along with human-readable names and descriptions.
654
- *
655
- * @returns {Array<{type: ArchitectureType, name: string, description: string}>}
656
- */
657
- getArchitectureTypes(): Array<{
658
- type: ArchitectureType;
659
- name: string;
660
- description: string;
661
- }>;
662
- /**
663
- * Orchestrates the complete project generation lifecycle.
664
- * This includes directory creation, file layout, profile resolution,
665
- * dependency mapping, and optional post-install hooks.
666
- *
667
- * @param {ScaffoldOptions} options - Detailed configuration for the new project.
668
- * @returns {Promise<ScaffoldResult>}
669
- */
670
- create(options: ScaffoldOptions): Promise<ScaffoldResult>;
671
- /**
672
- * Create a generator for the specified architecture.
673
- */
674
- private createGenerator;
675
- /**
676
- * Generate a single module (for DDD bounded context).
677
- */
678
- generateModule(_targetDir: string, _moduleName: string, _options?: {
679
- architecture?: ArchitectureType;
680
- }): Promise<ScaffoldResult>;
681
- /**
682
- * Generate a service provider.
683
- */
684
- generateProvider(_targetDir: string, _providerName: string): Promise<ScaffoldResult>;
685
- }
686
-
687
- export { type ArchitectureType, BaseGenerator, CleanArchitectureGenerator, DddGenerator, DependencyValidator, type DetectedEnvironment, EnterpriseMvcGenerator, EnvironmentDetector, FileMerger, type GeneratorConfig, type GeneratorContext, type LockFile, LockGenerator, type PackageJson, type ProfileConfig, ProfileResolver, type ProfileType, SatelliteGenerator, Scaffold, type ScaffoldOptions, type StubConfig, StubGenerator, type StubVariables, type ValidationResult };