@hasna/testers 0.0.27 → 0.0.28
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/cli/index.js +11 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -27119,7 +27119,7 @@ import chalk6 from "chalk";
|
|
|
27119
27119
|
// package.json
|
|
27120
27120
|
var package_default = {
|
|
27121
27121
|
name: "@hasna/testers",
|
|
27122
|
-
version: "0.0.
|
|
27122
|
+
version: "0.0.28",
|
|
27123
27123
|
description: "AI-powered QA testing CLI \u2014 spawns cheap AI agents to test web apps with headless browsers",
|
|
27124
27124
|
type: "module",
|
|
27125
27125
|
main: "dist/index.js",
|
|
@@ -29942,7 +29942,7 @@ projectCmd.command("list").description("List all projects").option("--json", "Ou
|
|
|
29942
29942
|
process.exit(1);
|
|
29943
29943
|
}
|
|
29944
29944
|
});
|
|
29945
|
-
projectCmd.command("show <id>").description("Show project details").action((id) => {
|
|
29945
|
+
projectCmd.command("show <id>").description("Show project details").option("--json", "Output as JSON", false).action((id, opts) => {
|
|
29946
29946
|
try {
|
|
29947
29947
|
let project = getProject(id);
|
|
29948
29948
|
if (!project) {
|
|
@@ -29953,6 +29953,10 @@ projectCmd.command("show <id>").description("Show project details").action((id)
|
|
|
29953
29953
|
logError(chalk6.red(`Project not found: ${id}`));
|
|
29954
29954
|
process.exit(1);
|
|
29955
29955
|
}
|
|
29956
|
+
if (opts.json) {
|
|
29957
|
+
log(JSON.stringify(project, null, 2));
|
|
29958
|
+
return;
|
|
29959
|
+
}
|
|
29956
29960
|
log("");
|
|
29957
29961
|
log(chalk6.bold(` Project: ${project.name}`));
|
|
29958
29962
|
log(` ID: ${project.id}`);
|
|
@@ -29966,7 +29970,7 @@ projectCmd.command("show <id>").description("Show project details").action((id)
|
|
|
29966
29970
|
process.exit(1);
|
|
29967
29971
|
}
|
|
29968
29972
|
});
|
|
29969
|
-
projectCmd.command("use <name>").description("Set active project (find or create)").action((name) => {
|
|
29973
|
+
projectCmd.command("use <name>").description("Set active project (find or create)").option("--json", "Output as JSON", false).action((name, opts) => {
|
|
29970
29974
|
try {
|
|
29971
29975
|
const project = ensureProject(name, process.cwd());
|
|
29972
29976
|
if (!existsSync14(CONFIG_DIR5)) {
|
|
@@ -29980,6 +29984,10 @@ projectCmd.command("use <name>").description("Set active project (find or create
|
|
|
29980
29984
|
}
|
|
29981
29985
|
config.activeProject = project.id;
|
|
29982
29986
|
writeFileSync4(CONFIG_PATH3, JSON.stringify(config, null, 2), "utf-8");
|
|
29987
|
+
if (opts.json) {
|
|
29988
|
+
log(JSON.stringify({ activeProject: project.id, project }, null, 2));
|
|
29989
|
+
return;
|
|
29990
|
+
}
|
|
29983
29991
|
log(chalk6.green(`Active project set to ${chalk6.bold(project.name)} (${project.id})`));
|
|
29984
29992
|
} catch (error) {
|
|
29985
29993
|
logError(chalk6.red(`Error: ${error instanceof Error ? error.message : String(error)}`));
|