@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.
- package/dist/{chunk-WTDV3MTG.js → chunk-CHRKCAIZ.js} +54 -3
- package/dist/{chunk-WRAZC6SJ.js → chunk-HIYM7EM2.js} +17 -1
- package/dist/dev-2HVDP3NX.js +155 -0
- package/dist/index.js +164 -16
- package/dist/{init-OH433IPH.js → init-4JSHTLX2.js} +139 -77
- package/dist/{resources-PGBVCS2K.js → resources-ZRAW4EFI.js} +60 -41
- package/dist/{run-WIRQDYYX.js → run-47GF5VVS.js} +2 -4
- package/dist/templates-6KMZWOYH.js +194 -0
- package/package.json +1 -1
- package/dist/chunk-2CR762KB.js +0 -18
- package/dist/dev-BHBF4ECH.js +0 -87
- package/dist/templates-67O6PVFK.js +0 -70
|
@@ -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
|
-
};
|