@lumerahq/cli 0.10.1 → 0.11.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.
@@ -1,70 +0,0 @@
1
- import {
2
- listAllTemplates
3
- } from "./chunk-WTDV3MTG.js";
4
-
5
- // src/commands/templates.ts
6
- import pc from "picocolors";
7
- function showHelp() {
8
- console.log(`
9
- ${pc.dim("Usage:")}
10
- lumera templates [options]
11
-
12
- ${pc.dim("Description:")}
13
- List available project templates.
14
-
15
- ${pc.dim("Options:")}
16
- --verbose, -v Show full descriptions
17
- --help, -h Show this help
18
-
19
- ${pc.dim("Examples:")}
20
- lumera templates # List available templates
21
- lumera templates -v # Show with descriptions
22
- lumera init my-app -t invoice-processing # Use a template
23
- `);
24
- }
25
- async function templates(args) {
26
- if (args.includes("--help") || args.includes("-h")) {
27
- showHelp();
28
- return;
29
- }
30
- const verbose = args.includes("--verbose") || args.includes("-v");
31
- console.log();
32
- console.log(pc.cyan(pc.bold(" Available Templates")));
33
- console.log();
34
- try {
35
- const allTemplates = await listAllTemplates();
36
- if (allTemplates.length === 0) {
37
- console.log(pc.dim(" No templates available."));
38
- console.log();
39
- return;
40
- }
41
- const byCategory = /* @__PURE__ */ new Map();
42
- for (const t of allTemplates) {
43
- const cat = t.category || "General";
44
- if (!byCategory.has(cat)) byCategory.set(cat, []);
45
- byCategory.get(cat).push(t);
46
- }
47
- for (const [category, items] of byCategory) {
48
- console.log(pc.bold(` ${category}`));
49
- console.log();
50
- for (const t of items) {
51
- console.log(` ${pc.green(t.title)} ${pc.dim(`(${t.name})`)}`);
52
- if (verbose) {
53
- console.log(` ${pc.dim(t.description)}`);
54
- console.log();
55
- }
56
- }
57
- if (!verbose) console.log();
58
- }
59
- console.log(pc.dim(` ${allTemplates.length} template${allTemplates.length === 1 ? "" : "s"} available.`));
60
- console.log();
61
- console.log(pc.dim(" Usage:"), pc.cyan("lumera init <name> --template <template-name>"));
62
- console.log();
63
- } catch (err) {
64
- console.error(pc.red(` Error: ${err}`));
65
- process.exit(1);
66
- }
67
- }
68
- export {
69
- templates
70
- };