@testchimp/cli 0.1.7 → 0.1.8

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,3 +1,3 @@
1
1
  import { Command } from "commander";
2
- export declare const PACKAGE_VERSION = "0.1.4";
2
+ export declare const PACKAGE_VERSION = "0.1.7";
3
3
  export declare function buildCliProgram(): Command;
@@ -5,7 +5,26 @@ import { DEFAULT_BACKEND, postMcp } from "../core/client.js";
5
5
  import { deepMerge } from "../core/merge.js";
6
6
  import { runTool } from "../core/tools.js";
7
7
  import { TOOL_DEFINITIONS } from "../core/tools.js";
8
- export const PACKAGE_VERSION = "0.1.4";
8
+ export const PACKAGE_VERSION = "0.1.7";
9
+ function parseRecordTypesCsv(raw) {
10
+ return String(raw)
11
+ .split(",")
12
+ .map((s) => s.trim())
13
+ .filter(Boolean)
14
+ .map((s) => s.toLowerCase())
15
+ .map((s) => {
16
+ if (s === "automated")
17
+ return "smart_test";
18
+ if (s === "smarttest")
19
+ return "smart_test";
20
+ if (s === "smart_test")
21
+ return "smart_test";
22
+ if (s === "manual")
23
+ return "manual";
24
+ return s;
25
+ })
26
+ .filter((v) => v === "smart_test" || v === "manual");
27
+ }
9
28
  function parseJsonInput(raw) {
10
29
  if (raw == null || raw.trim() === "")
11
30
  return {};
@@ -47,6 +66,9 @@ export function buildCliProgram() {
47
66
  .option("--environment <s>")
48
67
  .option("--branch-name <s>")
49
68
  .option("--platform <web|ios|android>")
69
+ .option("--record-types <csv>", "coverage sources: smart_test,manual (aliases: automated,smarttest)")
70
+ .option("--include-manual", "include manual sessions in addition to automated (default)")
71
+ .option("--manual-only", "manual-only coverage (no automated)")
50
72
  .option("--file-paths <csv>", "comma-separated paths under platform tests root")
51
73
  .option("--folder-path <path>", "folder under tests root, slash-separated")
52
74
  .action(async (opts) => {
@@ -59,6 +81,15 @@ export function buildCliProgram() {
59
81
  body.branchName = opts.branchName;
60
82
  if (opts.platform)
61
83
  body.platform = opts.platform;
84
+ let recordTypes;
85
+ if (opts.recordTypes)
86
+ recordTypes = parseRecordTypesCsv(String(opts.recordTypes));
87
+ if (opts.includeManual)
88
+ recordTypes = Array.from(new Set([...(recordTypes ?? ["smart_test"]), "manual"]));
89
+ if (opts.manualOnly)
90
+ recordTypes = ["manual"];
91
+ if (recordTypes && recordTypes.length > 0)
92
+ body.recordTypes = recordTypes;
62
93
  const scope = {};
63
94
  if (opts.filePaths)
64
95
  scope.filePaths = String(opts.filePaths).split(",").map((s) => s.trim()).filter(Boolean);
@@ -22,6 +22,12 @@ export declare const listCoverageInput: z.ZodObject<{
22
22
  ios: "ios";
23
23
  android: "android";
24
24
  }>>;
25
+ recordTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
26
+ smart_test: "smart_test";
27
+ manual: "manual";
28
+ SMART_TEST: "SMART_TEST";
29
+ MANUAL: "MANUAL";
30
+ }>>>;
25
31
  }, z.core.$strip>;
26
32
  export declare const listExecutionInput: z.ZodObject<{
27
33
  release: z.ZodOptional<z.ZodString>;
@@ -6,6 +6,7 @@ export const scopeSchema = z
6
6
  })
7
7
  .optional();
8
8
  const executionPlatformSchema = z.enum(["web", "ios", "android"]);
9
+ const requirementCoverageRecordTypeSchema = z.enum(["smart_test", "manual", "SMART_TEST", "MANUAL"]);
9
10
  export const executionJobDimensionFilterSchema = z.object({
10
11
  dimension: z.string().min(1),
11
12
  values: z.array(z.string()).min(1),
@@ -18,6 +19,13 @@ export const listCoverageInput = z.object({
18
19
  includeNonCoveredTestScenarios: z.boolean().optional(),
19
20
  branchName: z.string().optional(),
20
21
  platform: executionPlatformSchema.optional(),
22
+ /**
23
+ * Which coverage sources to include.
24
+ *
25
+ * Omit for legacy default: SMART_TEST only.
26
+ * When provided, send proto enum names ("SMART_TEST", "MANUAL") or CLI-friendly aliases ("smart_test", "manual").
27
+ */
28
+ recordTypes: z.array(requirementCoverageRecordTypeSchema).optional(),
21
29
  });
22
30
  export const listExecutionInput = z.object({
23
31
  release: z.string().optional(),
@@ -28,6 +28,17 @@ function listCoverageBody(args) {
28
28
  body.branchName = args.branchName.trim();
29
29
  if (args.platform != null)
30
30
  body.platform = platformToProtoEnum(args.platform);
31
+ if (args.recordTypes != null && args.recordTypes.length > 0) {
32
+ const normalized = args.recordTypes.map((t) => {
33
+ const raw = String(t).trim();
34
+ if (raw === "manual")
35
+ return "MANUAL";
36
+ if (raw === "smart_test")
37
+ return "SMART_TEST";
38
+ return raw;
39
+ });
40
+ body.recordTypes = normalized;
41
+ }
31
42
  return body;
32
43
  }
33
44
  function listExecutionBody(args) {
@@ -2,7 +2,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
3
  import { postMcp } from "../core/client.js";
4
4
  import { TOOL_DEFINITIONS, runTool } from "../core/tools.js";
5
- const PACKAGE_VERSION = "0.1.4";
5
+ const PACKAGE_VERSION = "0.1.7";
6
6
  function textResult(json) {
7
7
  return {
8
8
  content: [{ type: "text", text: json }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testchimp/cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "TestChimp CLI and MCP server — coverage, plans, EaaS, TrueCoverage (calls /api/mcp/*)",
5
5
  "type": "module",
6
6
  "main": "dist/bin/testchimp.js",