@baton-dx/cli 0.1.1 → 0.1.3
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/README.md +66 -0
- package/dist/agent-detection-BW5-jGuR.mjs +4 -0
- package/dist/agent-detection-C5gaTtah.mjs +501 -0
- package/dist/agent-detection-C5gaTtah.mjs.map +1 -0
- package/dist/chunk-BbwQpWto.mjs +33 -0
- package/dist/context-detection-mMNLg_4F.mjs +9841 -0
- package/dist/context-detection-mMNLg_4F.mjs.map +1 -0
- package/dist/{create-CqfUSGj7.mjs → create-Diqnd3ci.mjs} +15 -15
- package/dist/create-Diqnd3ci.mjs.map +1 -0
- package/dist/esm-BagM-kVd.mjs +4526 -0
- package/dist/esm-BagM-kVd.mjs.map +1 -0
- package/dist/esm-CuRZ1S4C.mjs +4 -0
- package/dist/execa-RdtdAT4S.mjs +6343 -0
- package/dist/execa-RdtdAT4S.mjs.map +1 -0
- package/dist/index.mjs +290 -291
- package/dist/index.mjs.map +1 -1
- package/dist/{list-o76RXPxE.mjs → list-B5xUVBTU.mjs} +9 -10
- package/dist/{list-o76RXPxE.mjs.map → list-B5xUVBTU.mjs.map} +1 -1
- package/dist/prompt-CPT4cDau.mjs +849 -0
- package/dist/prompt-CPT4cDau.mjs.map +1 -0
- package/dist/{remove-BB883RDx.mjs → remove-6S8F9xcE.mjs} +15 -17
- package/dist/remove-6S8F9xcE.mjs.map +1 -0
- package/dist/src-Dh0ZvHbV.mjs +14434 -0
- package/dist/src-Dh0ZvHbV.mjs.map +1 -0
- package/package.json +5 -3
- package/dist/context-detection-0m8_Fp0j.mjs +0 -45
- package/dist/context-detection-0m8_Fp0j.mjs.map +0 -1
- package/dist/create-CqfUSGj7.mjs.map +0 -1
- package/dist/remove-BB883RDx.mjs.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as isInSourceRepo } from "./context-detection-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import * as p from "@clack/prompts";
|
|
2
|
+
import { c as Ve, h as defineCommand, i as Le, l as We, n as isInSourceRepo } from "./context-detection-mMNLg_4F.mjs";
|
|
3
|
+
import { D as discoverProfilesInSourceRepo } from "./src-Dh0ZvHbV.mjs";
|
|
4
|
+
import "./esm-BagM-kVd.mjs";
|
|
6
5
|
|
|
7
6
|
//#region src/commands/profile/list.ts
|
|
8
7
|
const profileListCommand = defineCommand({
|
|
@@ -21,14 +20,14 @@ Examples:
|
|
|
21
20
|
Note: Must be run from a source repository (directory with baton.source.yaml)`
|
|
22
21
|
},
|
|
23
22
|
run: async () => {
|
|
24
|
-
|
|
23
|
+
We("List Profiles");
|
|
25
24
|
if (!await isInSourceRepo()) {
|
|
26
|
-
|
|
25
|
+
Le("Error: Not in a source repository. Run this command from a directory containing baton.source.yaml");
|
|
27
26
|
process.exit(1);
|
|
28
27
|
}
|
|
29
28
|
const profiles = await discoverProfilesInSourceRepo(process.cwd());
|
|
30
29
|
if (profiles.length === 0) {
|
|
31
|
-
|
|
30
|
+
Le("No profiles found.");
|
|
32
31
|
process.exit(0);
|
|
33
32
|
}
|
|
34
33
|
const lines = [];
|
|
@@ -45,12 +44,12 @@ Note: Must be run from a source repository (directory with baton.source.yaml)`
|
|
|
45
44
|
lines.push(`│ ${namePadded} │ ${versionPadded} │ ${descPadded} │`);
|
|
46
45
|
}
|
|
47
46
|
lines.push("└─────────────────────┴─────────┴────────────────────────────────────┘");
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
Ve(lines.join("\n"), "Profiles");
|
|
48
|
+
Le(`Found ${profiles.length} profile${profiles.length === 1 ? "" : "s"}`);
|
|
50
49
|
process.exit(0);
|
|
51
50
|
}
|
|
52
51
|
});
|
|
53
52
|
|
|
54
53
|
//#endregion
|
|
55
54
|
export { profileListCommand };
|
|
56
|
-
//# sourceMappingURL=list-
|
|
55
|
+
//# sourceMappingURL=list-B5xUVBTU.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-
|
|
1
|
+
{"version":3,"file":"list-B5xUVBTU.mjs","names":[],"sources":["../src/commands/profile/list.ts"],"sourcesContent":["import { discoverProfilesInSourceRepo } from \"@baton-dx/core\";\nimport * as p from \"@clack/prompts\";\nimport { defineCommand } from \"citty\";\nimport { isInSourceRepo } from \"../../utils/context-detection.js\";\n\nexport const profileListCommand = defineCommand({\n meta: {\n name: \"profile list\",\n description: `List all profiles in the current source repository\n\nShows a table of all profiles with:\n - Profile name (root profile marked with \"(root)\")\n - Version from baton.profile.yaml\n - Description from profile manifest\n\nExamples:\n baton profile list\n\nNote: Must be run from a source repository (directory with baton.source.yaml)`,\n },\n run: async () => {\n p.intro(\"List Profiles\");\n\n // Check if we're in a source repo\n const inSourceRepo = await isInSourceRepo();\n if (!inSourceRepo) {\n p.outro(\n \"Error: Not in a source repository. Run this command from a directory containing baton.source.yaml\",\n );\n process.exit(1);\n }\n\n const cwd = process.cwd();\n\n // Discover all profiles in the profiles/ directory\n const profiles = await discoverProfilesInSourceRepo(cwd);\n\n if (profiles.length === 0) {\n p.outro(\"No profiles found.\");\n process.exit(0);\n }\n\n // Build table output\n const lines: string[] = [];\n lines.push(\"┌─────────────────────┬─────────┬────────────────────────────────────┐\");\n lines.push(\"│ Name │ Version │ Description │\");\n lines.push(\"├─────────────────────┼─────────┼────────────────────────────────────┤\");\n\n for (const profile of profiles) {\n const name = profile.name;\n const version = profile.version || \"-\";\n const description = profile.description || \"-\";\n\n // Pad columns to fixed width\n const namePadded = name.padEnd(19);\n const versionPadded = version.padEnd(7);\n const descPadded = description.padEnd(34);\n\n lines.push(`│ ${namePadded} │ ${versionPadded} │ ${descPadded} │`);\n }\n\n lines.push(\"└─────────────────────┴─────────┴────────────────────────────────────┘\");\n\n p.note(lines.join(\"\\n\"), \"Profiles\");\n p.outro(`Found ${profiles.length} profile${profiles.length === 1 ? \"\" : \"s\"}`);\n process.exit(0);\n },\n});\n"],"mappings":";;;;;;AAKA,MAAa,qBAAqB,cAAc;CAC9C,MAAM;EACJ,MAAM;EACN,aAAa;;;;;;;;;;;EAWd;CACD,KAAK,YAAY;AACf,KAAQ,gBAAgB;AAIxB,MAAI,CADiB,MAAM,gBAAgB,EACxB;AACjB,MACE,oGACD;AACD,WAAQ,KAAK,EAAE;;EAMjB,MAAM,WAAW,MAAM,6BAHX,QAAQ,KAAK,CAG+B;AAExD,MAAI,SAAS,WAAW,GAAG;AACzB,MAAQ,qBAAqB;AAC7B,WAAQ,KAAK,EAAE;;EAIjB,MAAM,QAAkB,EAAE;AAC1B,QAAM,KAAK,yEAAyE;AACpF,QAAM,KAAK,yEAAyE;AACpF,QAAM,KAAK,yEAAyE;AAEpF,OAAK,MAAM,WAAW,UAAU;GAC9B,MAAM,OAAO,QAAQ;GACrB,MAAM,UAAU,QAAQ,WAAW;GACnC,MAAM,cAAc,QAAQ,eAAe;GAG3C,MAAM,aAAa,KAAK,OAAO,GAAG;GAClC,MAAM,gBAAgB,QAAQ,OAAO,EAAE;GACvC,MAAM,aAAa,YAAY,OAAO,GAAG;AAEzC,SAAM,KAAK,KAAK,WAAW,KAAK,cAAc,KAAK,WAAW,IAAI;;AAGpE,QAAM,KAAK,yEAAyE;AAEpF,KAAO,MAAM,KAAK,KAAK,EAAE,WAAW;AACpC,KAAQ,SAAS,SAAS,OAAO,UAAU,SAAS,WAAW,IAAI,KAAK,MAAM;AAC9E,UAAQ,KAAK,EAAE;;CAElB,CAAC"}
|