@agility-luhn/cli 1.7.0 ā 1.8.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 +2 -0
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +203 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/index.js +13 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
## [1.8.0](https://github.com/flaviorafaelo-agility/luhn-workspace/compare/cli-v1.7.0...cli-v1.8.0) (2026-07-08)
|
|
2
|
+
|
|
1
3
|
## [1.7.0](https://github.com/flaviorafaelo-agility/luhn-workspace/compare/cli-v1.6.0...cli-v1.7.0) (2026-07-08)
|
|
2
4
|
|
|
3
5
|
## [1.6.0](https://github.com/flaviorafaelo-agility/luhn-workspace/compare/cli-v1.5.6...cli-v1.6.0) (2026-07-08)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4IpC,wBAAgB,WAAW,IAAI,OAAO,CAiHrC"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.listCommand = listCommand;
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
const fs_1 = require("fs");
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
function parseLuhnFile(filePath) {
|
|
11
|
+
try {
|
|
12
|
+
const content = (0, fs_1.readFileSync)(filePath, 'utf8');
|
|
13
|
+
const entities = [];
|
|
14
|
+
// Match business, entity, or service blocks
|
|
15
|
+
const entityRegex = /(business|entity|service)\s+"?([A-Za-z_][A-Za-z0-9_]*)"?\s*(?:"([^"]*)")?\s*{([^}]*)}/g;
|
|
16
|
+
let match;
|
|
17
|
+
while ((match = entityRegex.exec(content)) !== null) {
|
|
18
|
+
const type = match[1];
|
|
19
|
+
const name = match[2];
|
|
20
|
+
const title = match[3];
|
|
21
|
+
const body = match[4];
|
|
22
|
+
if (!type || !name || body === undefined)
|
|
23
|
+
continue;
|
|
24
|
+
const attributes = parseAttributes(body);
|
|
25
|
+
entities.push({
|
|
26
|
+
type: type,
|
|
27
|
+
name,
|
|
28
|
+
title: title ? title.trim() : undefined,
|
|
29
|
+
attributes,
|
|
30
|
+
description: title ? title.trim() : undefined
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return entities;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function parseAttributes(body) {
|
|
40
|
+
const attributes = [];
|
|
41
|
+
const lines = body.split('\n');
|
|
42
|
+
for (const line of lines) {
|
|
43
|
+
const trimmed = line.trim();
|
|
44
|
+
if (!trimmed || trimmed.startsWith('//') || trimmed.startsWith('ui'))
|
|
45
|
+
continue;
|
|
46
|
+
// Match: name: type or name: type?
|
|
47
|
+
const attrRegex = /^\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*(\?)?/;
|
|
48
|
+
const attrMatch = attrRegex.exec(line);
|
|
49
|
+
if (attrMatch) {
|
|
50
|
+
const name = attrMatch[1];
|
|
51
|
+
const type = attrMatch[2];
|
|
52
|
+
const optional = attrMatch[3];
|
|
53
|
+
if (name && type) {
|
|
54
|
+
attributes.push({
|
|
55
|
+
name,
|
|
56
|
+
type,
|
|
57
|
+
required: !optional
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return attributes;
|
|
63
|
+
}
|
|
64
|
+
function scanLuhnModules(luhnDir) {
|
|
65
|
+
const modules = [];
|
|
66
|
+
try {
|
|
67
|
+
const entries = (0, fs_1.readdirSync)(luhnDir, { withFileTypes: true });
|
|
68
|
+
for (const entry of entries) {
|
|
69
|
+
if (entry.isDirectory()) {
|
|
70
|
+
const moduleName = entry.name;
|
|
71
|
+
const moduleEntities = [];
|
|
72
|
+
// Look for .luhn files in the module directory
|
|
73
|
+
try {
|
|
74
|
+
const moduleFiles = (0, fs_1.readdirSync)(path_1.default.join(luhnDir, moduleName));
|
|
75
|
+
for (const file of moduleFiles) {
|
|
76
|
+
if (file.endsWith('.luhn')) {
|
|
77
|
+
const filePath = path_1.default.join(luhnDir, moduleName, file);
|
|
78
|
+
const entities = parseLuhnFile(filePath);
|
|
79
|
+
moduleEntities.push(...entities);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// Continue if module directory is not readable
|
|
85
|
+
}
|
|
86
|
+
if (moduleEntities.length > 0) {
|
|
87
|
+
modules.push({
|
|
88
|
+
name: moduleName,
|
|
89
|
+
entities: moduleEntities
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else if (entry.name.endsWith('.luhn')) {
|
|
94
|
+
// Root level .luhn files
|
|
95
|
+
const filePath = path_1.default.join(luhnDir, entry.name);
|
|
96
|
+
const entities = parseLuhnFile(filePath);
|
|
97
|
+
if (entities.length > 0) {
|
|
98
|
+
modules.push({
|
|
99
|
+
name: entry.name.replace('.luhn', ''),
|
|
100
|
+
entities
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
// Directory may not exist
|
|
108
|
+
}
|
|
109
|
+
return modules;
|
|
110
|
+
}
|
|
111
|
+
function listCommand() {
|
|
112
|
+
return new commander_1.Command('list')
|
|
113
|
+
.alias('ls')
|
|
114
|
+
.description('List LUHN modules, entities, classes and their attributes')
|
|
115
|
+
.option('-m, --module <name>', 'Filter by specific module name')
|
|
116
|
+
.option('-e, --entity <name>', 'Filter by specific entity/class name')
|
|
117
|
+
.option('-f, --full', 'Show full details including attributes')
|
|
118
|
+
.option('--json', 'Output as JSON')
|
|
119
|
+
.action(async (options) => {
|
|
120
|
+
try {
|
|
121
|
+
const luhnDir = path_1.default.join(process.cwd(), 'luhn');
|
|
122
|
+
const modules = scanLuhnModules(luhnDir);
|
|
123
|
+
if (modules.length === 0) {
|
|
124
|
+
console.log('ā No LUHN modules found in ./luhn directory');
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
let filteredModules = modules;
|
|
128
|
+
// Apply filters
|
|
129
|
+
if (options.module) {
|
|
130
|
+
filteredModules = modules.filter(m => m.name.toLowerCase().includes(options.module.toLowerCase()));
|
|
131
|
+
}
|
|
132
|
+
let totalEntities = 0;
|
|
133
|
+
let totalAttributes = 0;
|
|
134
|
+
for (const module of filteredModules) {
|
|
135
|
+
let moduleEntities = module.entities;
|
|
136
|
+
if (options.entity) {
|
|
137
|
+
moduleEntities = moduleEntities.filter(e => e.name.toLowerCase().includes(options.entity.toLowerCase()));
|
|
138
|
+
}
|
|
139
|
+
totalEntities += moduleEntities.length;
|
|
140
|
+
totalAttributes += moduleEntities.reduce((sum, e) => sum + e.attributes.length, 0);
|
|
141
|
+
}
|
|
142
|
+
if (options.json) {
|
|
143
|
+
const output = filteredModules.map(m => {
|
|
144
|
+
let entities = m.entities;
|
|
145
|
+
if (options.entity) {
|
|
146
|
+
entities = entities.filter(e => e.name.toLowerCase().includes(options.entity.toLowerCase()));
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
module: m.name,
|
|
150
|
+
entities: entities.map(e => ({
|
|
151
|
+
name: e.name,
|
|
152
|
+
type: e.type,
|
|
153
|
+
title: e.title,
|
|
154
|
+
attributes: options.full ? e.attributes : undefined,
|
|
155
|
+
attributeCount: e.attributes.length
|
|
156
|
+
}))
|
|
157
|
+
};
|
|
158
|
+
});
|
|
159
|
+
console.log(JSON.stringify(output, null, 2));
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
// Pretty print output
|
|
163
|
+
console.log('\nš¦ LUHN Project Structure\n');
|
|
164
|
+
for (const module of filteredModules) {
|
|
165
|
+
let moduleEntities = module.entities;
|
|
166
|
+
if (options.entity) {
|
|
167
|
+
moduleEntities = moduleEntities.filter(e => e.name.toLowerCase().includes(options.entity.toLowerCase()));
|
|
168
|
+
}
|
|
169
|
+
if (moduleEntities.length === 0)
|
|
170
|
+
continue;
|
|
171
|
+
console.log(` š Module: ${module.name}`);
|
|
172
|
+
for (const entity of moduleEntities) {
|
|
173
|
+
const typeIcon = entity.type === 'business' ? 'šÆ' : entity.type === 'entity' ? 'š' : 'āļø';
|
|
174
|
+
console.log(` ${typeIcon} ${entity.type.toUpperCase()}: ${entity.name}${entity.title ? ` ("${entity.title}")` : ''}`);
|
|
175
|
+
if (options.full && entity.attributes.length > 0) {
|
|
176
|
+
for (const attr of entity.attributes) {
|
|
177
|
+
const reqIcon = attr.required ? 'ā' : 'ā';
|
|
178
|
+
console.log(` ${reqIcon} ${attr.name}: ${attr.type}`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
else if (entity.attributes.length > 0) {
|
|
182
|
+
console.log(` āā ${entity.attributes.length} attribute(s)`);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
console.log('');
|
|
186
|
+
}
|
|
187
|
+
// Summary
|
|
188
|
+
console.log(` ā
Summary:`);
|
|
189
|
+
console.log(` Modules: ${filteredModules.length}`);
|
|
190
|
+
console.log(` Entities: ${totalEntities}`);
|
|
191
|
+
console.log(` Attributes: ${totalAttributes}\n`);
|
|
192
|
+
if (!options.full && totalEntities > 0) {
|
|
193
|
+
console.log(` š” Tip: Use --full flag to see all attributes\n`);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
catch (error) {
|
|
197
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
198
|
+
console.error(`ā Error listing modules: ${message}`);
|
|
199
|
+
process.exitCode = 1;
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":";;;;;AA4IA,kCAiHC;AA7PD,yCAAoC;AACpC,2BAA+C;AAC/C,gDAAwB;AAsBxB,SAAS,aAAa,CAAC,QAAgB;IACrC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAiB,EAAE,CAAC;QAElC,4CAA4C;QAC5C,MAAM,WAAW,GAAG,wFAAwF,CAAC;QAC7G,IAAI,KAAK,CAAC;QAEV,OAAO,CAAC,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACpD,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YAEtB,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,SAAS;gBAAE,SAAS;YAEnD,MAAM,UAAU,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;YAEzC,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,IAAyC;gBAC/C,IAAI;gBACJ,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS;gBACvC,UAA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CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,OAAO,CAAC,KAAK,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAC;YACrD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ const init_1 = require("./commands/init");
|
|
|
10
10
|
const compile_1 = require("./commands/compile");
|
|
11
11
|
const db_1 = require("./commands/db");
|
|
12
12
|
const serve_1 = require("./commands/serve");
|
|
13
|
+
const list_1 = require("./commands/list");
|
|
13
14
|
function loadVersion() {
|
|
14
15
|
try {
|
|
15
16
|
const packageJsonPath = path_1.default.join(__dirname, '..', 'package.json');
|
|
@@ -22,15 +23,17 @@ function loadVersion() {
|
|
|
22
23
|
}
|
|
23
24
|
function showBanner() {
|
|
24
25
|
console.log(`
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
27
|
+
ā ā
|
|
28
|
+
ā āāā ā ā āā ā ā ā ā ā
|
|
29
|
+
ā āā āā āā ā ā ā ā āā ā ā
|
|
30
|
+
ā āāāāāā ā ā ā ā āā ā ā ā ā ā ā
|
|
31
|
+
ā āā ā ā ā ā ā ā āā ā āā ā
|
|
32
|
+
ā āāāāāā ā āā ā ā ā ā ā ā
|
|
33
|
+
ā ā
|
|
34
|
+
ā Official LUHN Framework CLI v${loadVersion()} ā
|
|
35
|
+
ā ā
|
|
36
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
34
37
|
`);
|
|
35
38
|
}
|
|
36
39
|
const version = loadVersion();
|
|
@@ -46,6 +49,7 @@ commander_1.program
|
|
|
46
49
|
.enablePositionalOptions();
|
|
47
50
|
commander_1.program.addCommand((0, init_1.initCommand)());
|
|
48
51
|
commander_1.program.addCommand((0, compile_1.compileCommand)());
|
|
52
|
+
commander_1.program.addCommand((0, list_1.listCommand)());
|
|
49
53
|
commander_1.program.addCommand((0, db_1.dbCommand)());
|
|
50
54
|
commander_1.program.addCommand((0, serve_1.serveCommand)());
|
|
51
55
|
commander_1.program.parseAsync(process.argv).catch((error) => {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,yCAAoC;AACpC,2BAAkC;AAClC,gDAAwB;AACxB,0CAA8C;AAC9C,gDAAoD;AACpD,sCAA0C;AAC1C,4CAAgD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,yCAAoC;AACpC,2BAAkC;AAClC,gDAAwB;AACxB,0CAA8C;AAC9C,gDAAoD;AACpD,sCAA0C;AAC1C,4CAAgD;AAChD,0CAA8C;AAE9C,SAAS,WAAW;IAClB,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACnE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;QACtE,OAAO,WAAW,CAAC,OAAO,IAAI,OAAO,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;wCAS0B,WAAW,EAAE;;;CAGpD,CAAC,CAAC;AACH,CAAC;AAED,MAAM,OAAO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