@beryl-so/cli 0.36.0 → 0.37.0

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.
@@ -59,9 +59,10 @@ export const runCommands = [
59
59
  { name: "test", type: "strings", description: "Run only these test ids (repeatable)" },
60
60
  {
61
61
  name: "group",
62
- type: "string",
63
- description: "Run only the active tests in this group (by name), resolved to ids before the run, " +
64
- "so the run records exactly what it ran. Cannot be combined with --test.",
62
+ type: "strings",
63
+ description: "Run only the active tests in these groups (by name, repeatable, union of members), " +
64
+ "resolved to ids before the run so the run records exactly what it ran. " +
65
+ "Cannot be combined with --test.",
65
66
  },
66
67
  { name: "env", type: "string", description: "Environment id to run against" },
67
68
  { name: "url-override", type: "string", description: "Replace the base URL (preview deploys)" },
@@ -84,21 +85,28 @@ export const runCommands = [
84
85
  "beryl runs trigger --url-override https://preview-123.example.com --watch --timeout 30",
85
86
  "beryl runs trigger --url-override https://preview-123.example.com --header x-vercel-protection-bypass=<token> --watch",
86
87
  "beryl runs trigger --test 4f… --test 9a…",
87
- "beryl runs trigger --group Smoke --watch",
88
+ "beryl runs trigger --group Smoke --group Checkout --watch",
88
89
  "beryl runs trigger --retries 0 --watch",
89
90
  ],
90
91
  async run(ctx, input) {
91
92
  const { workspaceId, projectId } = await ctx.requireProject(input);
92
93
  let tests = input.flags.test;
93
- const group = flagStr(input, "group");
94
- if (group && tests && tests.length > 0)
94
+ const groups = input.flags.group;
95
+ if (groups && groups.length > 0 && tests && tests.length > 0)
95
96
  throw new UsageError("--group cannot be combined with --test");
96
- if (group) {
97
+ if (groups && groups.length > 0) {
97
98
  const listed = (await ctx.client.get(`${projectPath(workspaceId, projectId)}/tests`));
98
- tests = idsInGroup(listed, group);
99
- // Exiting 0 here would be a green CI run that tested nothing.
100
- if (tests.length === 0)
101
- throw new UsageError(`No active tests in group '${group}'.`);
99
+ const union = new Set();
100
+ for (const group of groups) {
101
+ const ids = idsInGroup(listed, group);
102
+ // Exiting 0 here would be a green CI run that tested nothing (or a typo'd
103
+ // group silently narrowing the run).
104
+ if (ids.length === 0)
105
+ throw new UsageError(`No active tests in group '${group}'.`);
106
+ for (const id of ids)
107
+ union.add(id);
108
+ }
109
+ tests = [...union];
102
110
  }
103
111
  const extraHeaders = parseHeaders(input.flags.header);
104
112
  const created = (await ctx.client.post(`${projectPath(workspaceId, projectId)}/runs`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beryl-so/cli",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "Beryl on the command line — projects, runs, the exploring agent, and an MCP server over the same commands.",
5
5
  "license": "MIT",
6
6
  "type": "module",