@lenne.tech/cli 1.5.0 → 1.6.1

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 (73) hide show
  1. package/README.md +30 -0
  2. package/bin/postinstall.js +156 -0
  3. package/build/cli.js +11 -1
  4. package/build/commands/blocks/add.js +28 -306
  5. package/build/commands/blocks/blocks.js +2 -2
  6. package/build/commands/claude/claude.js +2 -2
  7. package/build/commands/cli/cli.js +2 -2
  8. package/build/commands/cli/create.js +69 -21
  9. package/build/commands/cli/rename.js +11 -5
  10. package/build/commands/completion.js +311 -0
  11. package/build/commands/components/add.js +25 -219
  12. package/build/commands/components/components.js +2 -2
  13. package/build/commands/config/help.js +5 -2
  14. package/build/commands/config/init.js +20 -5
  15. package/build/commands/config/show.js +4 -1
  16. package/build/commands/config/validate.js +27 -2
  17. package/build/commands/deployment/create.js +18 -5
  18. package/build/commands/deployment/deployment.js +2 -2
  19. package/build/commands/docs/open.js +4 -1
  20. package/build/commands/doctor.js +285 -0
  21. package/build/commands/frontend/angular.js +88 -28
  22. package/build/commands/frontend/nuxt.js +2 -1
  23. package/build/commands/fullstack/init.js +58 -19
  24. package/build/commands/git/clean.js +60 -11
  25. package/build/commands/git/clear.js +17 -11
  26. package/build/commands/git/create.js +51 -10
  27. package/build/commands/git/force-pull.js +42 -15
  28. package/build/commands/git/get.js +14 -15
  29. package/build/commands/git/install-scripts.js +6 -6
  30. package/build/commands/git/rebase.js +40 -12
  31. package/build/commands/git/rename.js +33 -13
  32. package/build/commands/git/reset.js +48 -13
  33. package/build/commands/git/squash.js +67 -26
  34. package/build/commands/git/undo.js +33 -13
  35. package/build/commands/git/update.js +59 -6
  36. package/build/commands/history.js +75 -0
  37. package/build/commands/mongodb/collection-export.js +2 -2
  38. package/build/commands/mongodb/mongodb.js +2 -2
  39. package/build/commands/mongodb/s3-restore.js +2 -2
  40. package/build/commands/npm/reinit.js +11 -12
  41. package/build/commands/npm/update.js +6 -2
  42. package/build/commands/qdrant/delete.js +6 -2
  43. package/build/commands/qdrant/qdrant.js +2 -2
  44. package/build/commands/qdrant/stats.js +5 -2
  45. package/build/commands/redis/redis.js +2 -2
  46. package/build/commands/server/add-property.js +8 -12
  47. package/build/commands/server/create-secret.js +6 -3
  48. package/build/commands/server/create.js +39 -21
  49. package/build/commands/server/module.js +22 -16
  50. package/build/commands/server/object.js +7 -11
  51. package/build/commands/server/set-secrets.js +6 -3
  52. package/build/commands/server/test.js +3 -3
  53. package/build/commands/starter/chrome-extension.js +3 -3
  54. package/build/commands/status.js +198 -0
  55. package/build/commands/templates/list.js +107 -0
  56. package/build/commands/templates/llm.js +8 -3
  57. package/build/commands/templates/templates.js +2 -2
  58. package/build/commands/tools/jwt-read.js +2 -2
  59. package/build/commands/tools/regex.js +5 -2
  60. package/build/commands/typescript/create.js +84 -21
  61. package/build/commands/typescript/playground.js +5 -2
  62. package/build/extensions/config.js +37 -1
  63. package/build/extensions/git.js +57 -2
  64. package/build/extensions/history.js +118 -0
  65. package/build/extensions/logger.js +189 -0
  66. package/build/lib/nuxt-base-components.js +249 -0
  67. package/build/lib/validation.js +204 -0
  68. package/build/templates/completion/bash.sh.ejs +92 -0
  69. package/build/templates/completion/fish.sh.ejs +77 -0
  70. package/build/templates/completion/zsh.sh.ejs +119 -0
  71. package/docs/commands.md +464 -14
  72. package/docs/lt.config.md +138 -8
  73. package/package.json +16 -14
@@ -0,0 +1,119 @@
1
+ #compdef lt
2
+
3
+ # lt completion for Zsh shell
4
+ # Auto-generated by lt CLI - supports arbitrary nesting depth
5
+
6
+ <%
7
+ // Helper to generate safe variable name from path
8
+ function varName(path) {
9
+ return path.replace(/-/g, '_') + '_cmds';
10
+ }
11
+
12
+ // Recursively collect all nodes that have children (need completion arrays)
13
+ function collectNodesWithChildren(nodes, result = []) {
14
+ for (const node of nodes) {
15
+ if (node.children.length > 0) {
16
+ result.push(node);
17
+ collectNodesWithChildren(node.children, result);
18
+ }
19
+ }
20
+ return result;
21
+ }
22
+
23
+ // Generate completion entries for a node's children
24
+ function generateEntries(children) {
25
+ return children.map(c => `'${c.name}:${c.description.replace(/'/g, "''")}'`).join('\n ');
26
+ }
27
+
28
+ const nodesWithChildren = collectNodesWithChildren(props.commandTree);
29
+ -%>
30
+ _lt() {
31
+ local curcontext="$curcontext" state state_descr line
32
+ typeset -A opt_args
33
+
34
+ # Root level commands
35
+ local -a root_cmds
36
+ root_cmds=(
37
+ <%- generateEntries(props.commandTree) %>
38
+ )
39
+
40
+ <% for (const node of nodesWithChildren) { -%>
41
+ # <%- node.path %> subcommands
42
+ local -a <%- varName(node.path) %>
43
+ <%- varName(node.path) %>=(
44
+ <%- generateEntries(node.children) %>
45
+ )
46
+
47
+ <% } -%>
48
+ # Build arguments spec dynamically based on max depth
49
+ _arguments -C \
50
+ '1: :->cmd1' \
51
+ <% for (let i = 2; i <= props.maxDepth; i++) { -%>
52
+ '<%- i %>: :->cmd<%- i %>' \
53
+ <% } -%>
54
+ '*::arg:->args'
55
+
56
+ case "$state" in
57
+ cmd1)
58
+ _describe -t commands 'lt commands' root_cmds
59
+ ;;
60
+ <% for (let depth = 2; depth <= props.maxDepth; depth++) { -%>
61
+ cmd<%- depth %>)
62
+ # Determine parent path from words[2..<%- depth %>]
63
+ <%
64
+ // Generate nested case statements for this depth
65
+ function generateCasesForDepth(nodes, currentDepth, targetDepth, wordIndices) {
66
+ let output = '';
67
+ const indent = ' ' + ' '.repeat(currentDepth - 2);
68
+
69
+ if (currentDepth === targetDepth) {
70
+ // We're at the target depth, list completions
71
+ for (const node of nodes) {
72
+ if (node.children.length > 0) {
73
+ output += `${indent}${node.name})\n`;
74
+ output += `${indent} _describe -t commands '${node.name} commands' ${varName(node.path)}\n`;
75
+ output += `${indent} ;;\n`;
76
+ }
77
+ }
78
+ } else {
79
+ // Need to go deeper
80
+ for (const node of nodes) {
81
+ if (node.children.length > 0) {
82
+ const hasGrandchildren = node.children.some(c => c.children.length > 0);
83
+ if (hasGrandchildren || currentDepth + 1 === targetDepth) {
84
+ output += `${indent}${node.name})\n`;
85
+ if (currentDepth + 1 === targetDepth) {
86
+ // Next level is target
87
+ output += `${indent} case "$words[${currentDepth + 1}]" in\n`;
88
+ output += generateCasesForDepth(node.children, currentDepth + 1, targetDepth, wordIndices);
89
+ output += `${indent} esac\n`;
90
+ } else {
91
+ output += `${indent} case "$words[${currentDepth + 1}]" in\n`;
92
+ output += generateCasesForDepth(node.children, currentDepth + 1, targetDepth, wordIndices);
93
+ output += `${indent} esac\n`;
94
+ }
95
+ output += `${indent} ;;\n`;
96
+ }
97
+ }
98
+ }
99
+ }
100
+ return output;
101
+ }
102
+ -%>
103
+ case "$words[2]" in
104
+ <%- generateCasesForDepth(props.commandTree, 2, depth, []) -%>
105
+ esac
106
+ ;;
107
+ <% } -%>
108
+ args)
109
+ _arguments \
110
+ '--help[Show help]' \
111
+ '--version[Show version]' \
112
+ '--noConfirm[Skip confirmations]' \
113
+ '--dry-run[Show what would be done]'
114
+ ;;
115
+ esac
116
+ }
117
+
118
+ # Register completion function
119
+ (( $+functions[compdef] )) && compdef _lt lt || true