@agility-luhn/cli 1.9.0 → 1.10.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 CHANGED
@@ -1,3 +1,5 @@
1
+ ## [1.10.0](https://github.com/flaviorafaelo-agility/luhn-workspace/compare/cli-v1.9.0...cli-v1.10.0) (2026-07-08)
2
+
1
3
  ## [1.9.0](https://github.com/flaviorafaelo-agility/luhn-workspace/compare/cli-v1.8.0...cli-v1.9.0) (2026-07-08)
2
4
 
3
5
  ## [1.8.0](https://github.com/flaviorafaelo-agility/luhn-workspace/compare/cli-v1.7.0...cli-v1.8.0) (2026-07-08)
package/README.md ADDED
@@ -0,0 +1,561 @@
1
+ # LUHN CLI
2
+
3
+ Official Command-Line Interface for the LUHN Framework - A modern, developer-friendly framework for building scalable applications with type-safe database operations, OData filtering, and automatic code generation.
4
+
5
+ [![npm version](https://badge.fury.io/js/%40agility-luhn%2Fcli.svg)](https://badge.fury.io/js/%40agility-luhn%2Fcli)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## Features
9
+
10
+ ✨ **Project Initialization** - Bootstrap a new LUHN project with interactive setup
11
+ 🏗️ **Compilation** - Transform DSL files into TypeScript, database schemas, and API definitions
12
+ 📦 **Module Discovery** - List all modules, entities, and their attributes
13
+ 🗄️ **Database Management** - Migrate, sync, and introspect databases
14
+ 🚀 **Runtime Server** - Start your application server with hot-reload support
15
+ 📝 **Type Safety** - Full TypeScript support with auto-generated types
16
+ 🔌 **OData Filtering** - Built-in OData v4 query support
17
+
18
+ ## Installation
19
+
20
+ Install LUHN CLI globally:
21
+
22
+ ```bash
23
+ npm install -g @agility-luhn/cli
24
+ # or
25
+ pnpm add -g @agility-luhn/cli
26
+ # or
27
+ yarn global add @agility-luhn/cli
28
+ ```
29
+
30
+ Or use it directly with `npx`:
31
+
32
+ ```bash
33
+ npx @agility-luhn/cli --version
34
+ ```
35
+
36
+ ## Quick Start
37
+
38
+ ### 1. Create a New Project
39
+
40
+ ```bash
41
+ luhn init
42
+ # or
43
+ luhn create
44
+ ```
45
+
46
+ This will guide you through an interactive setup:
47
+ - Project name
48
+ - Description
49
+ - Package manager selection
50
+ - Initial template selection
51
+
52
+ ```
53
+ $ luhn init
54
+
55
+ _ _ _ _ _ _
56
+ | | | | | | | | | | | |
57
+ | | _ _ ___| |_| | | |_| | | |
58
+ | | | | | |/ _ \ _ | | _ | | |
59
+ | |____| |_| | __/| | | | | | | | |_|
60
+ |_____|___/|_|___|_| |_| |_| |_| |_|_|
61
+
62
+ ? Project name: my-app
63
+ ? Description: My awesome LUHN application
64
+ ? Use TypeScript: Yes
65
+ ? Install dependencies: Yes
66
+
67
+ ✅ Project created successfully!
68
+ ```
69
+
70
+ ### 2. Define Your Business Logic
71
+
72
+ Create `.luhn` files in the `luhn/` directory:
73
+
74
+ ```luhn
75
+ # luhn/user/user.luhn
76
+ business "User" "User Management" {
77
+ id: uuid
78
+ name: string
79
+ email: string
80
+ createdAt: timestamp?
81
+ }
82
+
83
+ entity "UserProfile" "Extended user information" {
84
+ userId: uuid
85
+ bio: string
86
+ avatar: string?
87
+ }
88
+ ```
89
+
90
+ ### 3. Compile Your Project
91
+
92
+ ```bash
93
+ luhn compile
94
+ ```
95
+
96
+ This generates:
97
+ - TypeScript types and interfaces
98
+ - Database migration files
99
+ - OpenAPI/Swagger definitions
100
+ - SQL schemas
101
+ - Runtime handlers
102
+
103
+ ### 4. Manage Your Database
104
+
105
+ ```bash
106
+ # Create or update database
107
+ luhn db migrate
108
+
109
+ # Sync with current schema
110
+ luhn db sync
111
+
112
+ # Introspect existing database
113
+ luhn db introspect
114
+ ```
115
+
116
+ ### 5. Start Development Server
117
+
118
+ ```bash
119
+ luhn serve
120
+ # or with watch mode
121
+ luhn serve --watch
122
+ ```
123
+
124
+ Server runs on `http://localhost:3000` by default.
125
+
126
+ ## Commands
127
+
128
+ ### `luhn init` / `luhn create`
129
+
130
+ Initialize a new LUHN project with templates and dependencies.
131
+
132
+ ```bash
133
+ luhn init [targetDir]
134
+ luhn create my-project # Create in specific directory
135
+ ```
136
+
137
+ **Options:**
138
+ - `--template <name>` - Use specific template (default, minimal, advanced)
139
+ - `--no-install` - Skip dependency installation
140
+ - `--force` - Overwrite existing directory
141
+
142
+ ### `luhn compile`
143
+
144
+ Compile LUHN DSL files to artifacts.
145
+
146
+ ```bash
147
+ luhn compile [sourceDir]
148
+ luhn compile ./luhn # Compile from specific directory
149
+ ```
150
+
151
+ **Options:**
152
+ - `--output <dir>` - Output directory (default: `./src/generated`)
153
+ - `--watch` - Watch for changes and recompile
154
+ - `--strict` - Strict validation mode
155
+
156
+ **Generates:**
157
+ - TypeScript interfaces and types
158
+ - Database schemas
159
+ - API routes
160
+ - OpenAPI definitions
161
+
162
+ ### `luhn list` / `luhn ls`
163
+
164
+ Discover and list all modules, entities, and their attributes.
165
+
166
+ ```bash
167
+ luhn list
168
+ luhn ls --full # Show all attributes
169
+ luhn list -m auth # Filter by module
170
+ luhn list -e User # Filter by entity
171
+ luhn list --json # JSON output
172
+ ```
173
+
174
+ **Options:**
175
+ - `-m, --module <name>` - Filter by module name
176
+ - `-e, --entity <name>` - Filter by entity/class name
177
+ - `-f, --full` - Show complete attribute details
178
+ - `--json` - Output as JSON (useful for automation)
179
+
180
+ **Examples:**
181
+
182
+ ```bash
183
+ # List all modules in project
184
+ $ luhn list
185
+
186
+ _ _ _ _ _ _
187
+ | | | | | | | | | | | |
188
+ | | _ _ ___| |_| | | |_| | | |
189
+ | | | | | |/ _ \ _ | | _ | | |
190
+ | |____| |_| | __/| | | | | | | | |_|
191
+ |_____|___/|_|___|_| |_| |_| |_| |_|_|
192
+
193
+ LUHN CLI: 1.9.0
194
+ Node: v22.14.0
195
+ Package Manager: pnpm 10.20.0
196
+ OS: win32 x64
197
+
198
+ 📦 LUHN Project Structure
199
+
200
+ 📂 Module: user
201
+ 🎯 BUSINESS: User ("User Management")
202
+ └─ 5 attribute(s)
203
+
204
+ 📂 Module: auth
205
+ 🎯 BUSINESS: Session ("Session Management")
206
+ └─ 3 attribute(s)
207
+
208
+ ✅ Summary:
209
+ Modules: 2
210
+ Entities: 2
211
+ Attributes: 8
212
+
213
+ 💡 Tip: Use --full flag to see all attributes
214
+
215
+ # Show full details
216
+ $ luhn list --full
217
+
218
+ 📂 Module: user
219
+ 🎯 BUSINESS: User ("User Management")
220
+ ✓ id: uuid
221
+ ✓ name: string
222
+ ✓ email: string
223
+ ○ avatar: string
224
+ ✓ createdAt: timestamp
225
+
226
+ # Filter by module
227
+ $ luhn list -m auth
228
+
229
+ # JSON output for scripting
230
+ $ luhn list --json
231
+ [
232
+ {
233
+ "module": "user",
234
+ "entities": [
235
+ {
236
+ "name": "User",
237
+ "type": "business",
238
+ "title": "User Management",
239
+ "attributeCount": 5
240
+ }
241
+ ]
242
+ }
243
+ ]
244
+ ```
245
+
246
+ ### `luhn db`
247
+
248
+ Database management commands.
249
+
250
+ ```bash
251
+ luhn db migrate # Apply pending migrations
252
+ luhn db sync # Sync schema with database
253
+ luhn db introspect # Inspect existing database
254
+ luhn db create # Create database
255
+ luhn db reset # Reset database (development only)
256
+ ```
257
+
258
+ **Options:**
259
+ - `--connection <string>` - Database connection string
260
+ - `--force` - Force operation without confirmation
261
+ - `--dry-run` - Show what would be done
262
+
263
+ ### `luhn serve`
264
+
265
+ Start the development server.
266
+
267
+ ```bash
268
+ luhn serve [options]
269
+ ```
270
+
271
+ **Options:**
272
+ - `-p, --port <number>` - Server port (default: 3000)
273
+ - `-w, --watch` - Watch for file changes
274
+ - `--debug` - Run with debug logging
275
+ - `--no-reload` - Disable hot-reload
276
+
277
+ ## Project Structure
278
+
279
+ A typical LUHN project structure:
280
+
281
+ ```
282
+ my-project/
283
+ ├── luhn/ # DSL definitions
284
+ │ ├── user/
285
+ │ │ ├── user.luhn
286
+ │ │ └── profile.luhn
287
+ │ └── auth/
288
+ │ └── session.luhn
289
+ ├── src/
290
+ │ ├── generated/ # Auto-generated files
291
+ │ │ ├── types/
292
+ │ │ ├── schema/
293
+ │ │ └── routes/
294
+ │ ├── handlers/ # Business logic
295
+ │ ├── middleware/ # Express/Fastify middleware
296
+ │ └── server.ts # Main server entry
297
+ ├── db/ # Database files
298
+ │ ├── migrations/
299
+ │ └── seeds/
300
+ ├── .env # Environment variables
301
+ ├── package.json
302
+ ├── tsconfig.json
303
+ └── README.md
304
+ ```
305
+
306
+ ## Configuration
307
+
308
+ ### `.luhnrc.json` (Optional)
309
+
310
+ Configure LUHN behavior:
311
+
312
+ ```json
313
+ {
314
+ "compiler": {
315
+ "outputDir": "src/generated",
316
+ "strict": true,
317
+ "generateOpenAPI": true
318
+ },
319
+ "database": {
320
+ "engine": "postgres",
321
+ "migrations": "db/migrations"
322
+ },
323
+ "server": {
324
+ "port": 3000,
325
+ "host": "localhost"
326
+ }
327
+ }
328
+ ```
329
+
330
+ ### Environment Variables
331
+
332
+ Create a `.env` file:
333
+
334
+ ```env
335
+ # Database
336
+ DB_CONNECTION=postgresql://user:password@localhost:5432/myapp
337
+
338
+ # Server
339
+ PORT=3000
340
+ NODE_ENV=development
341
+
342
+ # Optional
343
+ DEBUG=luhn:*
344
+ LOG_LEVEL=info
345
+ ```
346
+
347
+ ## DSL Syntax
348
+
349
+ ### Business Entity
350
+
351
+ ```luhn
352
+ business "EntityName" "Description" {
353
+ fieldName: dataType
354
+ optionalField: dataType?
355
+ }
356
+ ```
357
+
358
+ ### Database Entity
359
+
360
+ ```luhn
361
+ entity "EntityName" "Description" {
362
+ fieldName: dataType
363
+ }
364
+ ```
365
+
366
+ ### Service (API Handlers)
367
+
368
+ ```luhn
369
+ service "ServiceName" "Description" {
370
+ methodName: dataType
371
+ }
372
+ ```
373
+
374
+ ### Supported Data Types
375
+
376
+ - `uuid` - UUID identifier
377
+ - `string` - Text
378
+ - `number` - Integer or decimal
379
+ - `boolean` - True/false
380
+ - `timestamp` - Date and time
381
+ - `json` - JSON object
382
+ - `text` - Long text
383
+
384
+ ## Examples
385
+
386
+ ### Create a User Management Module
387
+
388
+ **Step 1: Define the DSL**
389
+
390
+ ```luhn
391
+ # luhn/user/user.luhn
392
+ business "User" "User Management" {
393
+ id: uuid
394
+ email: string
395
+ name: string
396
+ role: string
397
+ isActive: boolean
398
+ createdAt: timestamp?
399
+ updatedAt: timestamp?
400
+ }
401
+
402
+ entity "UserPreferences" "User settings" {
403
+ userId: uuid
404
+ theme: string?
405
+ language: string?
406
+ notifications: boolean
407
+ }
408
+ ```
409
+
410
+ **Step 2: Compile**
411
+
412
+ ```bash
413
+ luhn compile
414
+ ```
415
+
416
+ **Step 3: Check generated files**
417
+
418
+ ```bash
419
+ luhn list -m user --full
420
+ ```
421
+
422
+ **Step 4: Create database migration**
423
+
424
+ ```bash
425
+ luhn db migrate --name "create_user_tables"
426
+ ```
427
+
428
+ **Step 5: Start development**
429
+
430
+ ```bash
431
+ luhn serve --watch
432
+ ```
433
+
434
+ ### Export Project Structure
435
+
436
+ ```bash
437
+ # Export to JSON file
438
+ luhn list --json > project-structure.json
439
+
440
+ # Filter specific module
441
+ luhn list -m auth --json > auth-module.json
442
+
443
+ # Use in documentation generation
444
+ luhn list --full --json | jq . > docs/structure.json
445
+ ```
446
+
447
+ ## Troubleshooting
448
+
449
+ ### `No LUHN directory found`
450
+
451
+ **Problem:** Getting error when running `luhn list` or `luhn compile`
452
+
453
+ **Solution:** Make sure you're in a LUHN project directory. The CLI looks for:
454
+ - `./luhn` - Main directory
455
+ - `./src/luhn` - Nested structure
456
+ - `../luhn` - Parent directory
457
+
458
+ ```bash
459
+ # Verify directory structure
460
+ ls -la luhn/
461
+
462
+ # Or create one
463
+ mkdir -p luhn
464
+ ```
465
+
466
+ ### `Failed to compile`
467
+
468
+ **Problem:** TypeScript compilation errors
469
+
470
+ **Solution:** Check your DSL syntax and try strict mode:
471
+
472
+ ```bash
473
+ luhn compile --strict
474
+ ```
475
+
476
+ ### `Database connection error`
477
+
478
+ **Problem:** Cannot connect to database
479
+
480
+ **Solution:** Verify `.env` file:
481
+
482
+ ```bash
483
+ # Check connection string
484
+ cat .env
485
+
486
+ # Test connection
487
+ luhn db migrate --dry-run
488
+ ```
489
+
490
+ ### Version mismatch
491
+
492
+ **Problem:** CLI version doesn't match package version
493
+
494
+ **Solution:** Update CLI:
495
+
496
+ ```bash
497
+ npm install -g @agility-luhn/cli@latest
498
+ # or
499
+ pnpm add -g @agility-luhn/cli@latest
500
+ ```
501
+
502
+ ## Debugging
503
+
504
+ Enable debug logging:
505
+
506
+ ```bash
507
+ DEBUG=luhn:* luhn compile
508
+ ```
509
+
510
+ Or set environment variable:
511
+
512
+ ```bash
513
+ export DEBUG=luhn:*
514
+ luhn serve
515
+ ```
516
+
517
+ ## Performance Tips
518
+
519
+ 1. **Incremental Compilation** - Use watch mode during development
520
+ ```bash
521
+ luhn compile --watch
522
+ ```
523
+
524
+ 2. **Database Caching** - Cache introspection results
525
+ ```bash
526
+ luhn db introspect --cache
527
+ ```
528
+
529
+ 3. **Parallel Processing** - Enable for large projects
530
+ ```bash
531
+ luhn compile --parallel
532
+ ```
533
+
534
+ ## Release Notes
535
+
536
+ See [CHANGELOG.md](./CHANGELOG.md) for version history and updates.
537
+
538
+ ## Contributing
539
+
540
+ We welcome contributions! Please see our [contribution guidelines](https://github.com/flaviorafaelo-agility/luhn-workspace).
541
+
542
+ ## Support
543
+
544
+ - 📖 [Documentation](https://github.com/flaviorafaelo-agility/luhn-workspace)
545
+ - 🐛 [Report Issues](https://github.com/flaviorafaelo-agility/luhn-workspace/issues)
546
+ - 💬 [Discussions](https://github.com/flaviorafaelo-agility/luhn-workspace/discussions)
547
+
548
+ ## License
549
+
550
+ MIT © [Agility Solutions](https://github.com/flaviorafaelo-agility)
551
+
552
+ ## Related Packages
553
+
554
+ - **[@agility-luhn/compiler](https://www.npmjs.com/package/@agility-luhn/compiler)** - LUHN compiler core
555
+ - **[@agility-luhn/runtime](https://www.npmjs.com/package/@agility-luhn/runtime)** - Runtime utilities
556
+ - **[@agility-luhn/database](https://www.npmjs.com/package/@agility-luhn/database)** - Database layer
557
+ - **[@agility-luhn/database-postgres](https://www.npmjs.com/package/@agility-luhn/database-postgres)** - PostgreSQL adapter
558
+
559
+ ---
560
+
561
+ **Made with ❤️ by [Agility Solutions](https://agilitysolutions.com.br)**
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwKpC,wBAAgB,WAAW,IAAI,OAAO,CA0HrC"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsLpC,wBAAgB,WAAW,IAAI,OAAO,CA0HrC"}
@@ -7,6 +7,7 @@ exports.listCommand = listCommand;
7
7
  const commander_1 = require("commander");
8
8
  const fs_1 = require("fs");
9
9
  const path_1 = __importDefault(require("path"));
10
+ const compiler_1 = require("@agility-luhn/compiler");
10
11
  function findLuhnDir() {
11
12
  const cwd = process.cwd();
12
13
  // Try ./luhn in current directory
@@ -29,104 +30,123 @@ function findLuhnDir() {
29
30
  }
30
31
  return null;
31
32
  }
32
- function parseLuhnFile(filePath) {
33
- try {
34
- const content = (0, fs_1.readFileSync)(filePath, 'utf8');
35
- const entities = [];
36
- // Match business, entity, or service blocks
37
- const entityRegex = /(business|entity|service)\s+"?([A-Za-z_][A-Za-z0-9_]*)"?\s*(?:"([^"]*)")?\s*{([^}]*)}/g;
38
- let match;
39
- while ((match = entityRegex.exec(content)) !== null) {
40
- const type = match[1];
41
- const name = match[2];
42
- const title = match[3];
43
- const body = match[4];
44
- if (!type || !name || body === undefined)
45
- continue;
46
- const attributes = parseAttributes(body);
47
- entities.push({
48
- type: type,
49
- name,
50
- title: title ? title.trim() : undefined,
51
- attributes,
52
- description: title ? title.trim() : undefined
53
- });
54
- }
55
- return entities;
33
+ function getTypeString(typeRef) {
34
+ if (typeRef.kind === 'PrimitiveTypeRef') {
35
+ return typeRef.name || 'unknown';
56
36
  }
57
- catch {
58
- return [];
37
+ if (typeRef.kind === 'NamedTypeRef') {
38
+ const name = typeRef.name;
39
+ return Array.isArray(name) ? name.join('.') : String(name || 'unknown');
59
40
  }
41
+ return 'unknown';
60
42
  }
61
- function parseAttributes(body) {
62
- const attributes = [];
63
- const lines = body.split('\n');
64
- for (const line of lines) {
65
- const trimmed = line.trim();
66
- if (!trimmed || trimmed.startsWith('//') || trimmed.startsWith('ui'))
67
- continue;
68
- // Match: name: type or name: type?
69
- const attrRegex = /^\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*(\?)?/;
70
- const attrMatch = attrRegex.exec(line);
71
- if (attrMatch) {
72
- const name = attrMatch[1];
73
- const type = attrMatch[2];
74
- const optional = attrMatch[3];
75
- if (name && type) {
76
- attributes.push({
77
- name,
78
- type,
79
- required: !optional
80
- });
81
- }
82
- }
83
- }
84
- return attributes;
85
- }
86
- function scanLuhnModules(luhnDir) {
43
+ function scanLuhnModulesWithAST(luhnDir) {
87
44
  const modules = [];
45
+ const moduleMap = {};
88
46
  try {
89
- const entries = (0, fs_1.readdirSync)(luhnDir, { withFileTypes: true });
90
- for (const entry of entries) {
91
- if (entry.isDirectory()) {
92
- const moduleName = entry.name;
93
- const moduleEntities = [];
94
- // Look for .luhn files in the module directory
95
- try {
96
- const moduleFiles = (0, fs_1.readdirSync)(path_1.default.join(luhnDir, moduleName));
97
- for (const file of moduleFiles) {
98
- if (file.endsWith('.luhn')) {
99
- const filePath = path_1.default.join(luhnDir, moduleName, file);
100
- const entities = parseLuhnFile(filePath);
101
- moduleEntities.push(...entities);
47
+ // Collect all .luhn files
48
+ const luhnFiles = [];
49
+ function scanDirectory(dir, prefix = '') {
50
+ try {
51
+ const entries = (0, fs_1.readdirSync)(dir, { withFileTypes: true });
52
+ for (const entry of entries) {
53
+ if (entry.isDirectory()) {
54
+ scanDirectory(path_1.default.join(dir, entry.name), entry.name);
55
+ }
56
+ else if (entry.name.endsWith('.luhn')) {
57
+ const filePath = path_1.default.join(dir, entry.name);
58
+ const content = (0, fs_1.readFileSync)(filePath, 'utf8');
59
+ const sourceInput = {
60
+ path: filePath,
61
+ text: content
62
+ };
63
+ if (prefix) {
64
+ sourceInput.moduleHint = [prefix];
102
65
  }
66
+ luhnFiles.push(sourceInput);
103
67
  }
104
68
  }
105
- catch {
106
- // Continue if module directory is not readable
69
+ }
70
+ catch {
71
+ // Continue if directory is not readable
72
+ }
73
+ }
74
+ scanDirectory(luhnDir);
75
+ if (luhnFiles.length === 0) {
76
+ return [];
77
+ }
78
+ // Parse all files using the compiler's parser
79
+ const parseResult = (0, compiler_1.parseProgram)(luhnFiles);
80
+ if (parseResult.diagnostics.some((d) => d.severity === 'error')) {
81
+ // Log errors but continue
82
+ parseResult.diagnostics.forEach((d) => {
83
+ if (d.severity === 'error') {
84
+ console.error(`Parse error in ${d.span?.filePath}: ${d.message}`);
85
+ }
86
+ });
87
+ }
88
+ // Extract entities from AST
89
+ for (const file of parseResult.program.files) {
90
+ for (const decl of file.declarations) {
91
+ const declAny = decl;
92
+ const moduleHint = declAny.module ? declAny.module.join('/') : 'default';
93
+ const moduleName = moduleHint;
94
+ if (!moduleMap[moduleName]) {
95
+ moduleMap[moduleName] = [];
107
96
  }
108
- if (moduleEntities.length > 0) {
109
- modules.push({
110
- name: moduleName,
111
- entities: moduleEntities
112
- });
97
+ if (declAny.kind === 'Business') {
98
+ const entity = {
99
+ type: 'business',
100
+ name: declAny.name,
101
+ title: declAny.label,
102
+ description: declAny.label,
103
+ attributes: (declAny.fields || []).map((field) => ({
104
+ name: field.name,
105
+ type: getTypeString(field.typeRef),
106
+ required: !field.optional
107
+ }))
108
+ };
109
+ moduleMap[moduleName].push(entity);
113
110
  }
114
- }
115
- else if (entry.name.endsWith('.luhn')) {
116
- // Root level .luhn files
117
- const filePath = path_1.default.join(luhnDir, entry.name);
118
- const entities = parseLuhnFile(filePath);
119
- if (entities.length > 0) {
120
- modules.push({
121
- name: entry.name.replace('.luhn', ''),
122
- entities
123
- });
111
+ else if (declAny.kind === 'Record') {
112
+ const entity = {
113
+ type: 'entity',
114
+ name: declAny.name,
115
+ title: declAny.label,
116
+ description: declAny.label,
117
+ attributes: (declAny.fields || []).map((field) => ({
118
+ name: field.name,
119
+ type: getTypeString(field.typeRef),
120
+ required: !field.optional
121
+ }))
122
+ };
123
+ moduleMap[moduleName].push(entity);
124
+ }
125
+ else if (declAny.kind === 'Service') {
126
+ const entity = {
127
+ type: 'service',
128
+ name: declAny.name,
129
+ title: declAny.label,
130
+ description: declAny.label,
131
+ attributes: [] // Services may have parameters
132
+ };
133
+ moduleMap[moduleName].push(entity);
124
134
  }
125
135
  }
126
136
  }
137
+ // Convert map to array
138
+ for (const [moduleName, entities] of Object.entries(moduleMap)) {
139
+ if (entities.length > 0) {
140
+ modules.push({
141
+ name: moduleName,
142
+ entities
143
+ });
144
+ }
145
+ }
127
146
  }
128
- catch {
129
- // Directory may not exist
147
+ catch (error) {
148
+ const message = error instanceof Error ? error.message : String(error);
149
+ console.error(`Error scanning LUHN modules: ${message}`);
130
150
  }
131
151
  return modules;
132
152
  }
@@ -147,7 +167,7 @@ function listCommand() {
147
167
  console.log(' Make sure you are in a LUHN project directory.\n');
148
168
  return;
149
169
  }
150
- const modules = scanLuhnModules(luhnDir);
170
+ const modules = scanLuhnModulesWithAST(luhnDir);
151
171
  if (modules.length === 0) {
152
172
  console.log(`❌ No LUHN modules found in ${luhnDir}`);
153
173
  console.log(' Make sure you have .luhn files in your modules.\n');
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":";;;;;AAwKA,kCA0HC;AAlSD,yCAAoC;AACpC,2BAA2D;AAC3D,gDAAwB;AAsBxB,SAAS,WAAW;IA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-luhn/cli",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "private": false,
5
5
  "description": "CLI oficial para inicializacao e compilacao de projetos LUHN.",
6
6
  "license": "MIT",