@agility-luhn/cli 1.9.0 → 1.11.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 +4 -0
- package/README.md +157 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +105 -85
- package/dist/commands/list.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [1.11.0](https://github.com/flaviorafaelo-agility/luhn-workspace/compare/cli-v1.10.0...cli-v1.11.0) (2026-07-08)
|
|
2
|
+
|
|
3
|
+
## [1.10.0](https://github.com/flaviorafaelo-agility/luhn-workspace/compare/cli-v1.9.0...cli-v1.10.0) (2026-07-08)
|
|
4
|
+
|
|
1
5
|
## [1.9.0](https://github.com/flaviorafaelo-agility/luhn-workspace/compare/cli-v1.8.0...cli-v1.9.0) (2026-07-08)
|
|
2
6
|
|
|
3
7
|
## [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,157 @@
|
|
|
1
|
+
# LUHN CLI
|
|
2
|
+
|
|
3
|
+
Official Command-Line Interface for the LUHN Framework - A modern framework for building scalable applications with type-safe database operations and automatic code generation.
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/js/%40agility-luhn%2Fcli)
|
|
6
|
+
[](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 and database schemas
|
|
12
|
+
- 📦 **Module Discovery** - List all modules, entities, and their attributes
|
|
13
|
+
- 🗄️ **Database Management** - Migrate, sync, and introspect databases
|
|
14
|
+
- 🚀 **Development Server** - Start your application server with hot-reload support
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
Install LUHN CLI globally:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install -g @agility-luhn/cli
|
|
22
|
+
pnpm add -g @agility-luhn/cli
|
|
23
|
+
yarn global add @agility-luhn/cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or use it directly with `npx`:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx @agility-luhn/cli --version
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Quick Start
|
|
33
|
+
|
|
34
|
+
### 1. Create a New Project
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
luhn init
|
|
38
|
+
# or
|
|
39
|
+
luhn create
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The CLI will guide you through an interactive setup asking for project name, description, and package manager.
|
|
43
|
+
|
|
44
|
+
### 2. Define Your Business Logic
|
|
45
|
+
|
|
46
|
+
Create `.luhn` files in the `luhn/` directory to define your entities and services.
|
|
47
|
+
|
|
48
|
+
### 3. Compile Your Project
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
luhn compile
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Generates TypeScript types, database migrations, and schema files.
|
|
55
|
+
|
|
56
|
+
### 4. Manage Your Database
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
luhn db migrate # Apply pending migrations
|
|
60
|
+
luhn db sync # Sync schema with database
|
|
61
|
+
luhn db introspect # Inspect existing database
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 5. Start Development Server
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
luhn serve # Start development server
|
|
68
|
+
luhn serve --watch # With file watching
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Commands
|
|
72
|
+
|
|
73
|
+
### `luhn init` / `luhn create`
|
|
74
|
+
|
|
75
|
+
Initialize a new LUHN project.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
luhn init [targetDir]
|
|
79
|
+
luhn create my-project
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Options:**
|
|
83
|
+
- `--template <name>` - Use specific template (default, minimal, advanced)
|
|
84
|
+
- `--no-install` - Skip dependency installation
|
|
85
|
+
- `--force` - Overwrite existing directory
|
|
86
|
+
|
|
87
|
+
### `luhn compile`
|
|
88
|
+
|
|
89
|
+
Compile LUHN DSL files to artifacts (TypeScript, schemas, migrations).
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
luhn compile [sourceDir]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Options:**
|
|
96
|
+
- `--output <dir>` - Output directory (default: `./src/generated`)
|
|
97
|
+
- `--watch` - Watch for changes and recompile
|
|
98
|
+
- `--strict` - Strict validation mode
|
|
99
|
+
|
|
100
|
+
### `luhn list` / `luhn ls`
|
|
101
|
+
|
|
102
|
+
Discover and list all modules, entities, and their attributes.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
luhn list # List all modules
|
|
106
|
+
luhn list --full # Show all attributes
|
|
107
|
+
luhn list -m auth # Filter by module
|
|
108
|
+
luhn list -e User # Filter by entity
|
|
109
|
+
luhn list --json # JSON output
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Options:**
|
|
113
|
+
- `-m, --module <name>` - Filter by module name
|
|
114
|
+
- `-e, --entity <name>` - Filter by entity name
|
|
115
|
+
- `-f, --full` - Show complete attribute details
|
|
116
|
+
- `--json` - Output as JSON
|
|
117
|
+
|
|
118
|
+
### `luhn db`
|
|
119
|
+
|
|
120
|
+
Manage database operations.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
luhn db migrate # Apply pending migrations
|
|
124
|
+
luhn db sync # Sync schema with database
|
|
125
|
+
luhn db introspect # Inspect existing database
|
|
126
|
+
luhn db create # Create database
|
|
127
|
+
luhn db reset # Reset database (development only)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Options:**
|
|
131
|
+
- `--connection <string>` - Database connection string
|
|
132
|
+
- `--force` - Force operation without confirmation
|
|
133
|
+
- `--dry-run` - Show what would be done
|
|
134
|
+
|
|
135
|
+
### `luhn serve`
|
|
136
|
+
|
|
137
|
+
Start the development server.
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
luhn serve
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Options:**
|
|
144
|
+
- `-p, --port <number>` - Server port (default: 3000)
|
|
145
|
+
- `-w, --watch` - Watch for file changes
|
|
146
|
+
- `--debug` - Run with debug logging
|
|
147
|
+
- `--no-reload` - Disable hot-reload
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
MIT © [Agility Solutions](https://github.com/flaviorafaelo-agility)
|
|
152
|
+
|
|
153
|
+
## Support
|
|
154
|
+
|
|
155
|
+
- 📖 [Documentation](https://github.com/flaviorafaelo-agility/luhn-workspace)
|
|
156
|
+
- 🐛 [Issues](https://github.com/flaviorafaelo-agility/luhn-workspace/issues)
|
|
157
|
+
- 💬 [Discussions](https://github.com/flaviorafaelo-agility/luhn-workspace/discussions)
|
|
@@ -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;
|
|
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"}
|
package/dist/commands/list.js
CHANGED
|
@@ -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
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
58
|
-
|
|
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
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
|
|
106
|
-
|
|
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 (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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
|
-
|
|
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 =
|
|
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":";;;;;
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":";;;;;AAsLA,kCA0HC;AAhTD,yCAAoC;AACpC,2BAA2D;AAC3D,gDAAwB;AACxB,qDAAuE;AAsBvE,SAAS,WAAW;IAClB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1B,kCAAkC;IAClC,IAAI,IAAA,eAAU,EAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;QACvC,OAAO,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,uCAAuC;IACvC,IAAI,IAAA,eAAU,EAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;QAC9C,OAAO,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,8BAA8B;IAC9B,MAAM,MAAM,GAAG,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,MAAM,KAAK,GAAG,IAAI,IAAA,eAAU,EAAC,cAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;QAC5D,OAAO,cAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,mDAAmD;IACnD,MAAM,WAAW,GAAG,cAAI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