@lenne.tech/cli 1.27.0 → 1.29.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.
Files changed (40) hide show
  1. package/build/cli.js +7 -1
  2. package/build/commands/dev/doctor.js +27 -1
  3. package/build/commands/dev/down.js +22 -10
  4. package/build/commands/dev/status.js +4 -3
  5. package/build/commands/dev/test.js +12 -4
  6. package/build/commands/dev/up.js +90 -50
  7. package/build/commands/frontend/angular.js +48 -46
  8. package/build/commands/frontend/convert-mode.js +41 -39
  9. package/build/commands/frontend/nuxt.js +49 -47
  10. package/build/commands/fullstack/add-api.js +34 -32
  11. package/build/commands/fullstack/add-app.js +25 -23
  12. package/build/commands/fullstack/convert-mode.js +85 -65
  13. package/build/commands/fullstack/init.js +12 -0
  14. package/build/commands/fullstack/update.js +24 -0
  15. package/build/commands/server/add-property.js +42 -40
  16. package/build/commands/server/convert-mode.js +41 -39
  17. package/build/commands/server/create.js +65 -63
  18. package/build/commands/server/module.js +56 -54
  19. package/build/commands/server/object.js +42 -40
  20. package/build/commands/server/permissions.js +60 -58
  21. package/build/commands/ticket/list.js +78 -0
  22. package/build/commands/ticket/start.js +141 -0
  23. package/build/commands/ticket/stop.js +166 -0
  24. package/build/commands/ticket/switch.js +70 -0
  25. package/build/commands/ticket/test.js +80 -0
  26. package/build/commands/ticket/ticket.js +36 -0
  27. package/build/commands/tools/crawl.js +92 -90
  28. package/build/extensions/frontend-helper.js +8 -37
  29. package/build/extensions/server.js +8 -38
  30. package/build/lib/command-help.js +161 -0
  31. package/build/lib/dev-identity.js +18 -0
  32. package/build/lib/dev-patches.js +1 -1
  33. package/build/lib/dev-project.js +14 -0
  34. package/build/lib/dev-state.js +96 -0
  35. package/build/lib/dev-test-session.js +55 -35
  36. package/build/lib/dev-ticket.js +343 -0
  37. package/build/lib/vendor-claude-md.js +227 -0
  38. package/docs/lt-dev-ticket-workflow.html +603 -0
  39. package/docs/lt-dev-ticket-workflow.pdf +0 -0
  40. package/package.json +32 -1
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.help = void 0;
12
13
  const framework_detection_1 = require("../../lib/framework-detection");
13
14
  /**
14
15
  * Convert an existing API project between npm mode and vendor mode.
@@ -17,6 +18,45 @@ const framework_detection_1 = require("../../lib/framework-detection");
17
18
  * lt server convert-mode --to vendor [--upstream-branch 11.24.2]
18
19
  * lt server convert-mode --to npm [--version 11.24.2]
19
20
  */
21
+ exports.help = {
22
+ description: 'Convert API project between npm and vendor framework modes',
23
+ name: 'convert-mode',
24
+ options: [
25
+ {
26
+ description: 'Target mode',
27
+ flag: '--to',
28
+ required: true,
29
+ type: 'string',
30
+ values: ['vendor', 'npm'],
31
+ },
32
+ {
33
+ description: 'Upstream branch/tag to vendor from (only with --to vendor)',
34
+ flag: '--upstream-branch',
35
+ required: false,
36
+ type: 'string',
37
+ },
38
+ {
39
+ description: 'nest-server version to install (only with --to npm, default: from VENDOR.md baseline)',
40
+ flag: '--version',
41
+ required: false,
42
+ type: 'string',
43
+ },
44
+ {
45
+ default: false,
46
+ description: 'Skip confirmation prompt',
47
+ flag: '--noConfirm',
48
+ required: false,
49
+ type: 'boolean',
50
+ },
51
+ {
52
+ default: false,
53
+ description: 'Show the resolved plan without making any changes',
54
+ flag: '--dry-run',
55
+ required: false,
56
+ type: 'boolean',
57
+ },
58
+ ],
59
+ };
20
60
  const ConvertModeCommand = {
21
61
  description: 'Convert API project between npm and vendor framework modes',
22
62
  hidden: false,
@@ -24,45 +64,7 @@ const ConvertModeCommand = {
24
64
  run: (toolbox) => __awaiter(void 0, void 0, void 0, function* () {
25
65
  const { filesystem, parameters, print: { error, info, spin, success, warning }, prompt: { confirm }, server, } = toolbox;
26
66
  // Handle --help-json flag
27
- if (toolbox.tools.helpJson({
28
- description: 'Convert API project between npm and vendor framework modes',
29
- name: 'convert-mode',
30
- options: [
31
- {
32
- description: 'Target mode',
33
- flag: '--to',
34
- required: true,
35
- type: 'string',
36
- values: ['vendor', 'npm'],
37
- },
38
- {
39
- description: 'Upstream branch/tag to vendor from (only with --to vendor)',
40
- flag: '--upstream-branch',
41
- required: false,
42
- type: 'string',
43
- },
44
- {
45
- description: 'nest-server version to install (only with --to npm, default: from VENDOR.md baseline)',
46
- flag: '--version',
47
- required: false,
48
- type: 'string',
49
- },
50
- {
51
- default: false,
52
- description: 'Skip confirmation prompt',
53
- flag: '--noConfirm',
54
- required: false,
55
- type: 'boolean',
56
- },
57
- {
58
- default: false,
59
- description: 'Show the resolved plan without making any changes',
60
- flag: '--dry-run',
61
- required: false,
62
- type: 'boolean',
63
- },
64
- ],
65
- })) {
67
+ if (toolbox.tools.helpJson(exports.help)) {
66
68
  return;
67
69
  }
68
70
  const targetMode = parameters.options.to;
@@ -9,10 +9,74 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.help = void 0;
12
13
  const workspace_integration_1 = require("../../lib/workspace-integration");
13
14
  /**
14
15
  * Create a new server
15
16
  */
17
+ exports.help = {
18
+ aliases: ['c'],
19
+ configuration: 'commands.server.create.*',
20
+ description: 'Create new server',
21
+ name: 'create',
22
+ options: [
23
+ { description: 'Server name', flag: '--name', required: true, type: 'string' },
24
+ {
25
+ description: 'API mode',
26
+ flag: '--api-mode',
27
+ required: false,
28
+ type: 'string',
29
+ values: ['Rest', 'GraphQL', 'Both'],
30
+ },
31
+ { description: 'Project description', flag: '--description', required: false, type: 'string' },
32
+ { description: 'Project author', flag: '--author', required: false, type: 'string' },
33
+ { description: 'Initialize git repository', flag: '--git', required: false, type: 'boolean' },
34
+ { description: 'Git branch to clone from', flag: '--branch', required: false, type: 'string' },
35
+ { description: 'Copy from local path instead of cloning', flag: '--copy', required: false, type: 'string' },
36
+ { description: 'Symlink to local path instead of cloning', flag: '--link', required: false, type: 'string' },
37
+ {
38
+ description: 'Backend framework consumption mode',
39
+ flag: '--framework-mode',
40
+ required: false,
41
+ type: 'string',
42
+ values: ['npm', 'vendor'],
43
+ },
44
+ {
45
+ description: 'Upstream nest-server branch/tag to vendor (with --framework-mode vendor)',
46
+ flag: '--framework-upstream-branch',
47
+ required: false,
48
+ type: 'string',
49
+ },
50
+ {
51
+ default: false,
52
+ description: 'Use experimental nest-base template (Bun + Prisma + Postgres)',
53
+ flag: '--next',
54
+ required: false,
55
+ type: 'boolean',
56
+ },
57
+ {
58
+ default: false,
59
+ description: 'Print resolved plan and exit without making any changes',
60
+ flag: '--dry-run',
61
+ required: false,
62
+ type: 'boolean',
63
+ },
64
+ {
65
+ default: false,
66
+ description: 'Override the workspace-detection abort under --noConfirm',
67
+ flag: '--force',
68
+ required: false,
69
+ type: 'boolean',
70
+ },
71
+ {
72
+ default: false,
73
+ description: 'Skip all interactive prompts',
74
+ flag: '--noConfirm',
75
+ required: false,
76
+ type: 'boolean',
77
+ },
78
+ ],
79
+ };
16
80
  const NewCommand = {
17
81
  alias: ['c'],
18
82
  description: 'Create new server',
@@ -23,69 +87,7 @@ const NewCommand = {
23
87
  // Retrieve the tools we need
24
88
  const { config, filesystem, git, helper, meta, parameters, print: { error, info, spin, success }, prompt: { ask, confirm }, server, strings: { kebabCase }, system, } = toolbox;
25
89
  // Handle --help-json flag
26
- if (toolbox.tools.helpJson({
27
- aliases: ['c'],
28
- configuration: 'commands.server.create.*',
29
- description: 'Create new server',
30
- name: 'create',
31
- options: [
32
- { description: 'Server name', flag: '--name', required: true, type: 'string' },
33
- {
34
- description: 'API mode',
35
- flag: '--api-mode',
36
- required: false,
37
- type: 'string',
38
- values: ['Rest', 'GraphQL', 'Both'],
39
- },
40
- { description: 'Project description', flag: '--description', required: false, type: 'string' },
41
- { description: 'Project author', flag: '--author', required: false, type: 'string' },
42
- { description: 'Initialize git repository', flag: '--git', required: false, type: 'boolean' },
43
- { description: 'Git branch to clone from', flag: '--branch', required: false, type: 'string' },
44
- { description: 'Copy from local path instead of cloning', flag: '--copy', required: false, type: 'string' },
45
- { description: 'Symlink to local path instead of cloning', flag: '--link', required: false, type: 'string' },
46
- {
47
- description: 'Backend framework consumption mode',
48
- flag: '--framework-mode',
49
- required: false,
50
- type: 'string',
51
- values: ['npm', 'vendor'],
52
- },
53
- {
54
- description: 'Upstream nest-server branch/tag to vendor (with --framework-mode vendor)',
55
- flag: '--framework-upstream-branch',
56
- required: false,
57
- type: 'string',
58
- },
59
- {
60
- default: false,
61
- description: 'Use experimental nest-base template (Bun + Prisma + Postgres)',
62
- flag: '--next',
63
- required: false,
64
- type: 'boolean',
65
- },
66
- {
67
- default: false,
68
- description: 'Print resolved plan and exit without making any changes',
69
- flag: '--dry-run',
70
- required: false,
71
- type: 'boolean',
72
- },
73
- {
74
- default: false,
75
- description: 'Override the workspace-detection abort under --noConfirm',
76
- flag: '--force',
77
- required: false,
78
- type: 'boolean',
79
- },
80
- {
81
- default: false,
82
- description: 'Skip all interactive prompts',
83
- flag: '--noConfirm',
84
- required: false,
85
- type: 'boolean',
86
- },
87
- ],
88
- })) {
90
+ if (toolbox.tools.helpJson(exports.help)) {
89
91
  return;
90
92
  }
91
93
  // Load configuration
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.help = void 0;
15
16
  const path_1 = require("path");
16
17
  const framework_detection_1 = require("../../lib/framework-detection");
17
18
  const object_1 = __importDefault(require("./object"));
@@ -70,6 +71,60 @@ function detectControllerType(filesystem, path) {
70
71
  /**
71
72
  * Create a new server module
72
73
  */
74
+ exports.help = {
75
+ aliases: ['m'],
76
+ configuration: 'commands.server.module.*',
77
+ description: 'Create server module',
78
+ name: 'module',
79
+ options: [
80
+ { description: 'Module name', flag: '--name', required: true, type: 'string' },
81
+ {
82
+ description: 'Controller type',
83
+ flag: '--controller',
84
+ required: false,
85
+ type: 'string',
86
+ values: ['Rest', 'GraphQL', 'Both', 'auto'],
87
+ },
88
+ {
89
+ default: false,
90
+ description: 'Skip all interactive prompts',
91
+ flag: '--noConfirm',
92
+ required: false,
93
+ type: 'boolean',
94
+ },
95
+ {
96
+ default: false,
97
+ description: 'Skip lint fix after generation',
98
+ flag: '--skipLint',
99
+ required: false,
100
+ type: 'boolean',
101
+ },
102
+ {
103
+ default: false,
104
+ description: 'Preview what would be generated without creating files',
105
+ flag: '--dryRun',
106
+ required: false,
107
+ type: 'boolean',
108
+ },
109
+ ],
110
+ propertyFlags: {
111
+ attributes: [
112
+ { description: 'Property name', name: 'name', type: 'string' },
113
+ {
114
+ description: 'Property type',
115
+ name: 'type',
116
+ type: 'string',
117
+ values: ['string', 'number', 'boolean', 'bigint', 'Date', 'ObjectId', 'Json'],
118
+ },
119
+ { description: 'Optional field', name: 'nullable', type: 'boolean' },
120
+ { description: 'Array of this type', name: 'array', type: 'boolean' },
121
+ { description: 'Enum type reference', name: 'enum', type: 'string' },
122
+ { description: 'Embedded object/schema reference', name: 'schema', type: 'string' },
123
+ { description: 'Reference module for ObjectId fields', name: 'reference', type: 'string' },
124
+ ],
125
+ pattern: '--prop-<attribute>-<index>',
126
+ },
127
+ };
73
128
  const NewCommand = {
74
129
  alias: ['m'],
75
130
  description: 'Create server module',
@@ -83,60 +138,7 @@ const NewCommand = {
83
138
  // Retrieve the tools we need
84
139
  const { config, filesystem, helper, parameters, patching, print: { divider, error, info, spin, success }, prompt: { ask, confirm }, server, strings: { camelCase, kebabCase, pascalCase }, system, template, } = toolbox;
85
140
  // Handle --help-json flag
86
- if (toolbox.tools.helpJson({
87
- aliases: ['m'],
88
- configuration: 'commands.server.module.*',
89
- description: 'Create server module',
90
- name: 'module',
91
- options: [
92
- { description: 'Module name', flag: '--name', required: true, type: 'string' },
93
- {
94
- description: 'Controller type',
95
- flag: '--controller',
96
- required: false,
97
- type: 'string',
98
- values: ['Rest', 'GraphQL', 'Both', 'auto'],
99
- },
100
- {
101
- default: false,
102
- description: 'Skip all interactive prompts',
103
- flag: '--noConfirm',
104
- required: false,
105
- type: 'boolean',
106
- },
107
- {
108
- default: false,
109
- description: 'Skip lint fix after generation',
110
- flag: '--skipLint',
111
- required: false,
112
- type: 'boolean',
113
- },
114
- {
115
- default: false,
116
- description: 'Preview what would be generated without creating files',
117
- flag: '--dryRun',
118
- required: false,
119
- type: 'boolean',
120
- },
121
- ],
122
- propertyFlags: {
123
- attributes: [
124
- { description: 'Property name', name: 'name', type: 'string' },
125
- {
126
- description: 'Property type',
127
- name: 'type',
128
- type: 'string',
129
- values: ['string', 'number', 'boolean', 'bigint', 'Date', 'ObjectId', 'Json'],
130
- },
131
- { description: 'Optional field', name: 'nullable', type: 'boolean' },
132
- { description: 'Array of this type', name: 'array', type: 'boolean' },
133
- { description: 'Enum type reference', name: 'enum', type: 'string' },
134
- { description: 'Embedded object/schema reference', name: 'schema', type: 'string' },
135
- { description: 'Reference module for ObjectId fields', name: 'reference', type: 'string' },
136
- ],
137
- pattern: '--prop-<attribute>-<index>',
138
- },
139
- })) {
141
+ if (toolbox.tools.helpJson(exports.help)) {
140
142
  return;
141
143
  }
142
144
  // Start timer
@@ -12,12 +12,53 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.help = void 0;
15
16
  const path_1 = require("path");
16
17
  const framework_detection_1 = require("../../lib/framework-detection");
17
18
  const module_1 = __importDefault(require("./module"));
18
19
  /**
19
20
  * Create a new server object
20
21
  */
22
+ exports.help = {
23
+ aliases: ['o'],
24
+ configuration: 'commands.server.object.*',
25
+ description: 'Create embedded object',
26
+ name: 'object',
27
+ options: [
28
+ { description: 'Object name', flag: '--name', required: true, type: 'string' },
29
+ {
30
+ default: false,
31
+ description: 'Skip lint fix after generation',
32
+ flag: '--skipLint',
33
+ required: false,
34
+ type: 'boolean',
35
+ },
36
+ {
37
+ default: false,
38
+ description: 'Preview what would be generated without creating files',
39
+ flag: '--dryRun',
40
+ required: false,
41
+ type: 'boolean',
42
+ },
43
+ ],
44
+ propertyFlags: {
45
+ attributes: [
46
+ { description: 'Property name', name: 'name', type: 'string' },
47
+ {
48
+ description: 'Property type',
49
+ name: 'type',
50
+ type: 'string',
51
+ values: ['string', 'number', 'boolean', 'bigint', 'Date', 'ObjectId', 'Json'],
52
+ },
53
+ { description: 'Optional field', name: 'nullable', type: 'boolean' },
54
+ { description: 'Array of this type', name: 'array', type: 'boolean' },
55
+ { description: 'Enum type reference', name: 'enum', type: 'string' },
56
+ { description: 'Embedded object/schema reference', name: 'schema', type: 'string' },
57
+ { description: 'Reference module for ObjectId fields', name: 'reference', type: 'string' },
58
+ ],
59
+ pattern: '--prop-<attribute>-<index>',
60
+ },
61
+ };
21
62
  const NewCommand = {
22
63
  alias: ['o'],
23
64
  description: 'Create embedded object',
@@ -30,46 +71,7 @@ const NewCommand = {
30
71
  // Retrieve the tools we need
31
72
  const { config, filesystem, helper, parameters, print: { divider, error, info, spin, success }, prompt: { confirm }, server, strings: { camelCase, kebabCase, pascalCase }, system, template, } = toolbox;
32
73
  // Handle --help-json flag
33
- if (toolbox.tools.helpJson({
34
- aliases: ['o'],
35
- configuration: 'commands.server.object.*',
36
- description: 'Create embedded object',
37
- name: 'object',
38
- options: [
39
- { description: 'Object name', flag: '--name', required: true, type: 'string' },
40
- {
41
- default: false,
42
- description: 'Skip lint fix after generation',
43
- flag: '--skipLint',
44
- required: false,
45
- type: 'boolean',
46
- },
47
- {
48
- default: false,
49
- description: 'Preview what would be generated without creating files',
50
- flag: '--dryRun',
51
- required: false,
52
- type: 'boolean',
53
- },
54
- ],
55
- propertyFlags: {
56
- attributes: [
57
- { description: 'Property name', name: 'name', type: 'string' },
58
- {
59
- description: 'Property type',
60
- name: 'type',
61
- type: 'string',
62
- values: ['string', 'number', 'boolean', 'bigint', 'Date', 'ObjectId', 'Json'],
63
- },
64
- { description: 'Optional field', name: 'nullable', type: 'boolean' },
65
- { description: 'Array of this type', name: 'array', type: 'boolean' },
66
- { description: 'Enum type reference', name: 'enum', type: 'string' },
67
- { description: 'Embedded object/schema reference', name: 'schema', type: 'string' },
68
- { description: 'Reference module for ObjectId fields', name: 'reference', type: 'string' },
69
- ],
70
- pattern: '--prop-<attribute>-<index>',
71
- },
72
- })) {
74
+ if (toolbox.tools.helpJson(exports.help)) {
73
75
  return;
74
76
  }
75
77
  // Start timer
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.help = void 0;
12
13
  const child_process_1 = require("child_process");
13
14
  const fs_1 = require("fs");
14
15
  const path_1 = require("path");
@@ -179,6 +180,64 @@ function printConsoleSummary(print, report) {
179
180
  /**
180
181
  * Scan server permissions and generate report
181
182
  */
183
+ exports.help = {
184
+ aliases: ['p'],
185
+ configuration: 'commands.server.permissions.*',
186
+ description: 'Scan server permissions and generate report',
187
+ name: 'permissions',
188
+ options: [
189
+ {
190
+ description: 'Project path containing src/server/modules/',
191
+ flag: '--path',
192
+ required: false,
193
+ type: 'string',
194
+ },
195
+ {
196
+ default: 'html',
197
+ description: 'Report output format',
198
+ flag: '--format',
199
+ required: false,
200
+ type: 'string',
201
+ values: ['md', 'json', 'html'],
202
+ },
203
+ { description: 'Output file name', flag: '--output', required: false, type: 'string' },
204
+ {
205
+ default: true,
206
+ description: 'Open report in default application',
207
+ flag: '--open',
208
+ required: false,
209
+ type: 'boolean',
210
+ },
211
+ {
212
+ default: false,
213
+ description: 'Disable opening report',
214
+ flag: '--no-open',
215
+ required: false,
216
+ type: 'boolean',
217
+ },
218
+ {
219
+ default: false,
220
+ description: 'Print summary to console',
221
+ flag: '--console',
222
+ required: false,
223
+ type: 'boolean',
224
+ },
225
+ {
226
+ default: false,
227
+ description: 'Exit with code 1 if warnings found',
228
+ flag: '--fail-on-warnings',
229
+ required: false,
230
+ type: 'boolean',
231
+ },
232
+ {
233
+ default: false,
234
+ description: 'Skip all interactive prompts',
235
+ flag: '--noConfirm',
236
+ required: false,
237
+ type: 'boolean',
238
+ },
239
+ ],
240
+ };
182
241
  const PermissionsCommand = {
183
242
  alias: ['p'],
184
243
  description: 'Scan server permissions',
@@ -188,64 +247,7 @@ const PermissionsCommand = {
188
247
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
189
248
  const { config, filesystem, parameters, print, print: { error, info, spin, success }, template, } = toolbox;
190
249
  // Handle --help-json flag
191
- if (toolbox.tools.helpJson({
192
- aliases: ['p'],
193
- configuration: 'commands.server.permissions.*',
194
- description: 'Scan server permissions and generate report',
195
- name: 'permissions',
196
- options: [
197
- {
198
- description: 'Project path containing src/server/modules/',
199
- flag: '--path',
200
- required: false,
201
- type: 'string',
202
- },
203
- {
204
- default: 'html',
205
- description: 'Report output format',
206
- flag: '--format',
207
- required: false,
208
- type: 'string',
209
- values: ['md', 'json', 'html'],
210
- },
211
- { description: 'Output file name', flag: '--output', required: false, type: 'string' },
212
- {
213
- default: true,
214
- description: 'Open report in default application',
215
- flag: '--open',
216
- required: false,
217
- type: 'boolean',
218
- },
219
- {
220
- default: false,
221
- description: 'Disable opening report',
222
- flag: '--no-open',
223
- required: false,
224
- type: 'boolean',
225
- },
226
- {
227
- default: false,
228
- description: 'Print summary to console',
229
- flag: '--console',
230
- required: false,
231
- type: 'boolean',
232
- },
233
- {
234
- default: false,
235
- description: 'Exit with code 1 if warnings found',
236
- flag: '--fail-on-warnings',
237
- required: false,
238
- type: 'boolean',
239
- },
240
- {
241
- default: false,
242
- description: 'Skip all interactive prompts',
243
- flag: '--noConfirm',
244
- required: false,
245
- type: 'boolean',
246
- },
247
- ],
248
- })) {
250
+ if (toolbox.tools.helpJson(exports.help)) {
249
251
  return;
250
252
  }
251
253
  info('Scan server permissions');