@provartesting/provardx-cli 1.5.0-beta.4 → 1.5.0-beta.5
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 +37 -13
- package/lib/services/auth/loginFlow.d.ts +10 -0
- package/lib/services/auth/loginFlow.js +30 -10
- package/lib/services/auth/loginFlow.js.map +1 -1
- package/oclif.manifest.json +64 -64
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,10 +11,12 @@ The Provar DX CLI is a Salesforce CLI plugin for Provar customers who want to au
|
|
|
11
11
|
|
|
12
12
|
# Installation, Update, and Uninstall
|
|
13
13
|
|
|
14
|
+
**Requires Node.js 18–24 (LTS 22 recommended).** Node 25+ is not yet supported due to a breaking change in a transitive dependency. Check with `node --version`.
|
|
15
|
+
|
|
14
16
|
Install the plugin
|
|
15
17
|
|
|
16
18
|
```sh-session
|
|
17
|
-
$ sf plugins install @provartesting/provardx-cli
|
|
19
|
+
$ sf plugins install @provartesting/provardx-cli@beta
|
|
18
20
|
```
|
|
19
21
|
|
|
20
22
|
Update plugins
|
|
@@ -33,28 +35,45 @@ $ sf plugins uninstall @provartesting/provardx-cli
|
|
|
33
35
|
|
|
34
36
|
The Provar DX CLI includes a built-in **Model Context Protocol (MCP) server** that connects AI assistants (Claude Desktop, Claude Code, Cursor) directly to your Provar project. Once connected, an AI agent can inspect your project structure, generate Page Objects and test cases, validate every level of the test hierarchy with quality scores, and work with NitroX (Hybrid Model) component page objects for LWC, Screen Flow, Industry Components, Experience Cloud, and HTML5.
|
|
35
37
|
|
|
36
|
-
Validation runs in two modes: **local only** (structural rules, no key required) or **Quality Hub API** (170+ rules, quality scoring — requires a `pv_k_` API key).
|
|
38
|
+
Validation runs in two modes: **local only** (structural rules, no key required) or **Quality Hub API** (170+ rules, quality scoring — requires a `pv_k_` API key). Don't have an account? **[Request access](https://aqqlrlhga7.execute-api.us-east-1.amazonaws.com/dev/auth/request-access)**.
|
|
39
|
+
|
|
40
|
+
## Quick setup
|
|
41
|
+
|
|
42
|
+
**Requires:** Provar Automation IDE installed with an activated license.
|
|
37
43
|
|
|
38
44
|
```sh
|
|
39
|
-
|
|
45
|
+
# 1. Install the plugin — @beta is required for MCP support
|
|
46
|
+
sf plugins install @provartesting/provardx-cli@beta
|
|
47
|
+
|
|
48
|
+
# 2. (Optional) Authenticate for full 170+ rule validation
|
|
49
|
+
sf provar auth login
|
|
40
50
|
```
|
|
41
51
|
|
|
42
|
-
|
|
52
|
+
**Claude Code** — run once to register the server:
|
|
43
53
|
|
|
44
|
-
|
|
54
|
+
```sh
|
|
55
|
+
claude mcp add provar -s user -- sf provar mcp start --allowed-paths /path/to/your/provar/project
|
|
56
|
+
```
|
|
45
57
|
|
|
46
|
-
|
|
58
|
+
**Claude Desktop** — add to your config file and restart the app:
|
|
47
59
|
|
|
48
|
-
|
|
60
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
61
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
49
62
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"mcpServers": {
|
|
66
|
+
"provar": {
|
|
67
|
+
"command": "sf",
|
|
68
|
+
"args": ["provar", "mcp", "start", "--allowed-paths", "/path/to/your/provar/project"]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
54
73
|
|
|
55
|
-
|
|
74
|
+
> **Windows (Claude Desktop):** Use `sf.cmd` instead of `sf` if the server fails to start.
|
|
56
75
|
|
|
57
|
-
|
|
76
|
+
📖 **[docs/mcp.md](https://github.com/ProvarTesting/provardx-cli/blob/main/docs/mcp.md) — full setup, all 35+ tools, troubleshooting.**
|
|
58
77
|
|
|
59
78
|
---
|
|
60
79
|
|
|
@@ -236,6 +255,11 @@ TOOLS EXPOSED
|
|
|
236
255
|
provar.testplan.add-instance — wire a test case into a plan suite by writing a .testinstance file
|
|
237
256
|
provar.testplan.create-suite — create a new test suite directory with .planitem inside a plan
|
|
238
257
|
provar.testplan.remove-instance — remove a .testinstance file from a plan suite
|
|
258
|
+
provar.nitrox.discover — discover projects containing NitroX (Hybrid Model) page objects
|
|
259
|
+
provar.nitrox.read — read NitroX .po.json files and return parsed content
|
|
260
|
+
provar.nitrox.validate — validate a NitroX .po.json against schema rules
|
|
261
|
+
provar.nitrox.generate — generate a new NitroX .po.json from a component description
|
|
262
|
+
provar.nitrox.patch — apply a JSON merge-patch to an existing NitroX .po.json file
|
|
239
263
|
|
|
240
264
|
EXAMPLES
|
|
241
265
|
Start MCP server (accepts stdio connections from Claude Desktop / Cursor):
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
1
2
|
export declare const CALLBACK_PORTS: number[];
|
|
2
3
|
/**
|
|
3
4
|
* Generate a PKCE code_verifier / code_challenge pair (S256 method, as required by Cognito).
|
|
@@ -24,6 +25,15 @@ export declare function findAvailablePort(): Promise<number>;
|
|
|
24
25
|
* Open a URL in the system browser. The URL is passed as an argument — not
|
|
25
26
|
* interpolated into a shell string — to avoid command injection.
|
|
26
27
|
*/
|
|
28
|
+
/**
|
|
29
|
+
* Return the platform-specific command and argument list for opening a URL
|
|
30
|
+
* in the system browser. Exported so tests can assert the correct command is
|
|
31
|
+
* chosen for each platform without actually spawning a process.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getBrowserCommand(url: string, platform?: NodeJS.Platform): {
|
|
34
|
+
cmd: string;
|
|
35
|
+
args: string[];
|
|
36
|
+
};
|
|
27
37
|
export declare function openBrowser(url: string): void;
|
|
28
38
|
/**
|
|
29
39
|
* Spin up a temporary localhost HTTP server that accepts exactly one callback
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import crypto from 'node:crypto';
|
|
9
9
|
import http from 'node:http';
|
|
10
10
|
import https from 'node:https';
|
|
11
|
-
import {
|
|
11
|
+
import { spawn } from 'node:child_process';
|
|
12
12
|
import { URL } from 'node:url';
|
|
13
13
|
// All three ports must be pre-registered in the Cognito App Client.
|
|
14
14
|
// Cognito requires redirect_uri to exactly match a registered callback URL — no wildcards.
|
|
@@ -64,20 +64,33 @@ function isPortFree(port) {
|
|
|
64
64
|
* Open a URL in the system browser. The URL is passed as an argument — not
|
|
65
65
|
* interpolated into a shell string — to avoid command injection.
|
|
66
66
|
*/
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Return the platform-specific command and argument list for opening a URL
|
|
69
|
+
* in the system browser. Exported so tests can assert the correct command is
|
|
70
|
+
* chosen for each platform without actually spawning a process.
|
|
71
|
+
*/
|
|
72
|
+
export function getBrowserCommand(url, platform = process.platform) {
|
|
73
|
+
switch (platform) {
|
|
69
74
|
case 'darwin':
|
|
70
|
-
|
|
71
|
-
break;
|
|
75
|
+
return { cmd: 'open', args: [url] };
|
|
72
76
|
case 'win32':
|
|
73
77
|
// Pass the URL via $args[0] so it is never interpolated into the -Command
|
|
74
78
|
// string — avoids quote-breaking and injection risk from special characters.
|
|
75
|
-
|
|
76
|
-
break;
|
|
79
|
+
return { cmd: 'powershell.exe', args: ['-NoProfile', '-Command', 'Start-Process $args[0]', '-args', url] };
|
|
77
80
|
default:
|
|
78
|
-
|
|
81
|
+
return { cmd: 'xdg-open', args: [url] };
|
|
79
82
|
}
|
|
80
83
|
}
|
|
84
|
+
export function openBrowser(url) {
|
|
85
|
+
// detached:true + stdio:'ignore' + unref() is the standard Node.js pattern for
|
|
86
|
+
// fire-and-forget child processes — the event loop will not wait for them to exit.
|
|
87
|
+
const { cmd, args } = getBrowserCommand(url);
|
|
88
|
+
const child = spawn(cmd, args, { detached: true, stdio: 'ignore' });
|
|
89
|
+
// Suppress unhandled-error crashes if the browser executable is not found.
|
|
90
|
+
// The login URL is already printed to the terminal so the user can open it manually.
|
|
91
|
+
child.on('error', () => { });
|
|
92
|
+
child.unref();
|
|
93
|
+
}
|
|
81
94
|
// ── Localhost callback server ─────────────────────────────────────────────────
|
|
82
95
|
/**
|
|
83
96
|
* Spin up a temporary localhost HTTP server that accepts exactly one callback
|
|
@@ -92,21 +105,28 @@ export function listenForCallback(port, expectedState) {
|
|
|
92
105
|
const description = parsed.searchParams.get('error_description');
|
|
93
106
|
const callbackState = parsed.searchParams.get('state');
|
|
94
107
|
if (expectedState && callbackState !== expectedState) {
|
|
95
|
-
res.writeHead(400, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
108
|
+
res.writeHead(400, { 'Content-Type': 'text/html; charset=utf-8', Connection: 'close' });
|
|
96
109
|
res.end('<html><body style="font-family:sans-serif;padding:2rem;max-width:480px">' +
|
|
97
110
|
'<h2 style="color:#c23934">Authentication failed</h2>' +
|
|
98
111
|
'<p>Invalid state parameter — possible CSRF attack. Please try again.</p>' +
|
|
99
112
|
'</body></html>');
|
|
100
113
|
server.close();
|
|
114
|
+
server.closeAllConnections?.();
|
|
101
115
|
reject(new Error('OAuth callback state mismatch — possible CSRF. Try again.'));
|
|
102
116
|
return;
|
|
103
117
|
}
|
|
104
|
-
|
|
118
|
+
// 'Connection: close' tells the browser to close the TCP connection after
|
|
119
|
+
// this response so server.close() has no lingering keep-alive sockets to
|
|
120
|
+
// wait for, allowing the Node.js event loop to exit promptly.
|
|
121
|
+
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8', Connection: 'close' });
|
|
105
122
|
res.end('<html><body style="font-family:sans-serif;padding:2rem;max-width:480px">' +
|
|
106
123
|
'<h2 style="color:#0070d2">Authentication complete</h2>' +
|
|
107
124
|
'<p>You can close this tab and return to the terminal.</p>' +
|
|
108
125
|
'</body></html>');
|
|
109
126
|
server.close();
|
|
127
|
+
// Destroy any sockets that are still open (e.g. a browser that ignores
|
|
128
|
+
// the Connection:close header). Requires Node 18.2+.
|
|
129
|
+
server.closeAllConnections?.();
|
|
110
130
|
if (code) {
|
|
111
131
|
resolve(code);
|
|
112
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginFlow.js","sourceRoot":"","sources":["../../../src/services/auth/loginFlow.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,8BAA8B;AAC9B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"loginFlow.js","sourceRoot":"","sources":["../../../src/services/auth/loginFlow.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,8BAA8B;AAC9B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,oEAAoE;AACpE,2FAA2F;AAC3F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEjD,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACnF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACtD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,MAAM,CAAC,W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E,EAAE;YACN,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;gBAC/B,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAClC,CAAC,CAAC,CAAC;YACH,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,UAAU,IAAI,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACpF,CAAC,CACF,CAAC;QACF,GAAG,CAAC,UAAU,CAAC,kBAAkB,EAAE,GAAG,EAAE;YACtC,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,0CAA0C,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;QACjG,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACxB,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChB,GAAG,CAAC,GAAG,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,iFAAiF;AAEjF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,YAAY;IACZ,aAAa;IACb,aAAa;IACb,iBAAiB;IACjB,WAAW;IACX,iBAAiB,EAAE,iBAA8E;IACjG,qBAAqB;CACtB,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -213,6 +213,69 @@
|
|
|
213
213
|
"status:auth:provar"
|
|
214
214
|
]
|
|
215
215
|
},
|
|
216
|
+
"provar:mcp:start": {
|
|
217
|
+
"aliases": [],
|
|
218
|
+
"args": {},
|
|
219
|
+
"description": "Launches a stateless MCP (Model Context Protocol) server that exposes Provar tools to\nAI assistants (Claude Desktop, Claude Code, Cursor) via stdio transport. All MCP\nJSON-RPC communication happens over stdout; all internal logging goes to stderr.\n\nAvailable tools:\n\n Project & inspection:\n - provar.project.inspect — inspect project folder inventory\n - provar.project.validate — validate full project from disk: coverage, quality scores\n\n Page Object:\n - provar.pageobject.generate — generate a Java Page Object skeleton\n - provar.pageobject.validate — validate Page Object quality and naming\n\n Test Case:\n - provar.testcase.generate — generate an XML test case skeleton\n - provar.testcase.validate — validate test case XML (validity + best-practices scores)\n\n Test Suite / Plan:\n - provar.testsuite.validate — validate test suite hierarchy\n - provar.testplan.validate — validate test plan metadata completeness\n - provar.testplan.create-suite — create a test suite under a plan\n - provar.testplan.add-instance — add a test instance to a plan\n - provar.testplan.remove-instance — remove a test instance from a plan\n\n Properties files:\n - provar.properties.read — read a Provar properties file\n - provar.properties.set — set a key in a Provar properties file\n - provar.properties.validate — validate a properties file structure\n - provar.properties.generate — generate a properties file skeleton\n\n Quality Hub (sf provar quality-hub wrappers):\n - provar.qualityhub.connect — connect to a Quality Hub org\n - provar.qualityhub.display — display connected org info\n - provar.qualityhub.testrun — trigger a Quality Hub test run\n - provar.qualityhub.testrun.report — poll test run status\n - provar.qualityhub.testrun.abort — abort a running test run\n - provar.qualityhub.testcase.retrieve — retrieve test case results\n - provar.qualityhub.defect.create — create defects for failed test executions\n\n Automation (sf provar automation wrappers):\n - provar.automation.setup — set up the Provar Automation runtime\n - provar.automation.metadata.download — download Salesforce metadata\n - provar.automation.compile — compile Provar test assets\n - provar.automation.testrun — run Provar tests\n - provar.automation.config.load — load a Provar configuration\n\n ANT build:\n - provar.ant.generate — generate an ANT build.xml\n - provar.ant.validate — validate an ANT build.xml\n\n Test result analysis:\n - provar.testrun.rca — root cause analysis on a test result\n - provar.testrun.report.locate — locate a test result report\n\nFor full tool documentation see docs/mcp.md in this repository.",
|
|
220
|
+
"examples": [
|
|
221
|
+
"Start MCP server (accepts stdio connections from Claude Desktop / Cursor):\n<%= config.bin %> <%= command.id %>",
|
|
222
|
+
"Start with explicit allowed paths:\n<%= config.bin %> <%= command.id %> --allowed-paths /workspace/provar",
|
|
223
|
+
"Allow multiple project directories:\n<%= config.bin %> <%= command.id %> -a /workspace/project-a -a /workspace/project-b"
|
|
224
|
+
],
|
|
225
|
+
"flags": {
|
|
226
|
+
"flags-dir": {
|
|
227
|
+
"helpGroup": "GLOBAL",
|
|
228
|
+
"name": "flags-dir",
|
|
229
|
+
"summary": "Import flag values from a directory.",
|
|
230
|
+
"hasDynamicHelp": false,
|
|
231
|
+
"multiple": false,
|
|
232
|
+
"type": "option"
|
|
233
|
+
},
|
|
234
|
+
"allowed-paths": {
|
|
235
|
+
"char": "a",
|
|
236
|
+
"name": "allowed-paths",
|
|
237
|
+
"summary": "Allowed base directory paths for file operations. Defaults to current directory.",
|
|
238
|
+
"default": [
|
|
239
|
+
"/home/runner/work/provardx-cli/provardx-cli"
|
|
240
|
+
],
|
|
241
|
+
"hasDynamicHelp": false,
|
|
242
|
+
"multiple": true,
|
|
243
|
+
"type": "option"
|
|
244
|
+
},
|
|
245
|
+
"auto-defects": {
|
|
246
|
+
"name": "auto-defects",
|
|
247
|
+
"summary": "When enabled, testrun.report suggestions will prompt defect creation on failures.",
|
|
248
|
+
"allowNo": false,
|
|
249
|
+
"type": "boolean"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"hasDynamicHelp": false,
|
|
253
|
+
"hiddenAliases": [],
|
|
254
|
+
"id": "provar:mcp:start",
|
|
255
|
+
"pluginAlias": "@provartesting/provardx-cli",
|
|
256
|
+
"pluginName": "@provartesting/provardx-cli",
|
|
257
|
+
"pluginType": "core",
|
|
258
|
+
"strict": true,
|
|
259
|
+
"summary": "Start a local MCP server for Provar tools over stdio transport.",
|
|
260
|
+
"enableJsonFlag": false,
|
|
261
|
+
"isESM": true,
|
|
262
|
+
"relativePath": [
|
|
263
|
+
"lib",
|
|
264
|
+
"commands",
|
|
265
|
+
"provar",
|
|
266
|
+
"mcp",
|
|
267
|
+
"start.js"
|
|
268
|
+
],
|
|
269
|
+
"aliasPermutations": [],
|
|
270
|
+
"permutations": [
|
|
271
|
+
"provar:mcp:start",
|
|
272
|
+
"mcp:provar:start",
|
|
273
|
+
"mcp:start:provar",
|
|
274
|
+
"provar:start:mcp",
|
|
275
|
+
"start:provar:mcp",
|
|
276
|
+
"start:mcp:provar"
|
|
277
|
+
]
|
|
278
|
+
},
|
|
216
279
|
"provar:config:get": {
|
|
217
280
|
"aliases": [],
|
|
218
281
|
"args": {},
|
|
@@ -335,69 +398,6 @@
|
|
|
335
398
|
"set:config:provar"
|
|
336
399
|
]
|
|
337
400
|
},
|
|
338
|
-
"provar:mcp:start": {
|
|
339
|
-
"aliases": [],
|
|
340
|
-
"args": {},
|
|
341
|
-
"description": "Launches a stateless MCP (Model Context Protocol) server that exposes Provar tools to\nAI assistants (Claude Desktop, Claude Code, Cursor) via stdio transport. All MCP\nJSON-RPC communication happens over stdout; all internal logging goes to stderr.\n\nAvailable tools:\n\n Project & inspection:\n - provar.project.inspect — inspect project folder inventory\n - provar.project.validate — validate full project from disk: coverage, quality scores\n\n Page Object:\n - provar.pageobject.generate — generate a Java Page Object skeleton\n - provar.pageobject.validate — validate Page Object quality and naming\n\n Test Case:\n - provar.testcase.generate — generate an XML test case skeleton\n - provar.testcase.validate — validate test case XML (validity + best-practices scores)\n\n Test Suite / Plan:\n - provar.testsuite.validate — validate test suite hierarchy\n - provar.testplan.validate — validate test plan metadata completeness\n - provar.testplan.create-suite — create a test suite under a plan\n - provar.testplan.add-instance — add a test instance to a plan\n - provar.testplan.remove-instance — remove a test instance from a plan\n\n Properties files:\n - provar.properties.read — read a Provar properties file\n - provar.properties.set — set a key in a Provar properties file\n - provar.properties.validate — validate a properties file structure\n - provar.properties.generate — generate a properties file skeleton\n\n Quality Hub (sf provar quality-hub wrappers):\n - provar.qualityhub.connect — connect to a Quality Hub org\n - provar.qualityhub.display — display connected org info\n - provar.qualityhub.testrun — trigger a Quality Hub test run\n - provar.qualityhub.testrun.report — poll test run status\n - provar.qualityhub.testrun.abort — abort a running test run\n - provar.qualityhub.testcase.retrieve — retrieve test case results\n - provar.qualityhub.defect.create — create defects for failed test executions\n\n Automation (sf provar automation wrappers):\n - provar.automation.setup — set up the Provar Automation runtime\n - provar.automation.metadata.download — download Salesforce metadata\n - provar.automation.compile — compile Provar test assets\n - provar.automation.testrun — run Provar tests\n - provar.automation.config.load — load a Provar configuration\n\n ANT build:\n - provar.ant.generate — generate an ANT build.xml\n - provar.ant.validate — validate an ANT build.xml\n\n Test result analysis:\n - provar.testrun.rca — root cause analysis on a test result\n - provar.testrun.report.locate — locate a test result report\n\nFor full tool documentation see docs/mcp.md in this repository.",
|
|
342
|
-
"examples": [
|
|
343
|
-
"Start MCP server (accepts stdio connections from Claude Desktop / Cursor):\n<%= config.bin %> <%= command.id %>",
|
|
344
|
-
"Start with explicit allowed paths:\n<%= config.bin %> <%= command.id %> --allowed-paths /workspace/provar",
|
|
345
|
-
"Allow multiple project directories:\n<%= config.bin %> <%= command.id %> -a /workspace/project-a -a /workspace/project-b"
|
|
346
|
-
],
|
|
347
|
-
"flags": {
|
|
348
|
-
"flags-dir": {
|
|
349
|
-
"helpGroup": "GLOBAL",
|
|
350
|
-
"name": "flags-dir",
|
|
351
|
-
"summary": "Import flag values from a directory.",
|
|
352
|
-
"hasDynamicHelp": false,
|
|
353
|
-
"multiple": false,
|
|
354
|
-
"type": "option"
|
|
355
|
-
},
|
|
356
|
-
"allowed-paths": {
|
|
357
|
-
"char": "a",
|
|
358
|
-
"name": "allowed-paths",
|
|
359
|
-
"summary": "Allowed base directory paths for file operations. Defaults to current directory.",
|
|
360
|
-
"default": [
|
|
361
|
-
"/home/runner/work/provardx-cli/provardx-cli"
|
|
362
|
-
],
|
|
363
|
-
"hasDynamicHelp": false,
|
|
364
|
-
"multiple": true,
|
|
365
|
-
"type": "option"
|
|
366
|
-
},
|
|
367
|
-
"auto-defects": {
|
|
368
|
-
"name": "auto-defects",
|
|
369
|
-
"summary": "When enabled, testrun.report suggestions will prompt defect creation on failures.",
|
|
370
|
-
"allowNo": false,
|
|
371
|
-
"type": "boolean"
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
"hasDynamicHelp": false,
|
|
375
|
-
"hiddenAliases": [],
|
|
376
|
-
"id": "provar:mcp:start",
|
|
377
|
-
"pluginAlias": "@provartesting/provardx-cli",
|
|
378
|
-
"pluginName": "@provartesting/provardx-cli",
|
|
379
|
-
"pluginType": "core",
|
|
380
|
-
"strict": true,
|
|
381
|
-
"summary": "Start a local MCP server for Provar tools over stdio transport.",
|
|
382
|
-
"enableJsonFlag": false,
|
|
383
|
-
"isESM": true,
|
|
384
|
-
"relativePath": [
|
|
385
|
-
"lib",
|
|
386
|
-
"commands",
|
|
387
|
-
"provar",
|
|
388
|
-
"mcp",
|
|
389
|
-
"start.js"
|
|
390
|
-
],
|
|
391
|
-
"aliasPermutations": [],
|
|
392
|
-
"permutations": [
|
|
393
|
-
"provar:mcp:start",
|
|
394
|
-
"mcp:provar:start",
|
|
395
|
-
"mcp:start:provar",
|
|
396
|
-
"provar:start:mcp",
|
|
397
|
-
"start:provar:mcp",
|
|
398
|
-
"start:mcp:provar"
|
|
399
|
-
]
|
|
400
|
-
},
|
|
401
401
|
"provar:quality-hub:connect": {
|
|
402
402
|
"aliases": [
|
|
403
403
|
"provar:manager:connect"
|
|
@@ -2024,5 +2024,5 @@
|
|
|
2024
2024
|
]
|
|
2025
2025
|
}
|
|
2026
2026
|
},
|
|
2027
|
-
"version": "1.5.0-beta.
|
|
2027
|
+
"version": "1.5.0-beta.5"
|
|
2028
2028
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@provartesting/provardx-cli",
|
|
3
3
|
"description": "A plugin for the Salesforce CLI to orchestrate testing activities and report quality metrics to Provar Quality Hub",
|
|
4
|
-
"version": "1.5.0-beta.
|
|
4
|
+
"version": "1.5.0-beta.5",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"plugins": [
|
|
7
7
|
"@provartesting/provardx-plugins-automation",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"wireit": "^0.14.0"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=18.0.0"
|
|
38
|
+
"node": ">=18.0.0 <25.0.0"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"/lib",
|