@provartesting/provardx-cli 1.5.0-beta.2 → 1.5.0-beta.4

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.
Files changed (37) hide show
  1. package/README.md +101 -1
  2. package/lib/commands/provar/auth/clear.d.ts +7 -0
  3. package/lib/commands/provar/auth/clear.js +36 -0
  4. package/lib/commands/provar/auth/clear.js.map +1 -0
  5. package/lib/commands/provar/auth/login.d.ts +10 -0
  6. package/lib/commands/provar/auth/login.js +88 -0
  7. package/lib/commands/provar/auth/login.js.map +1 -0
  8. package/lib/commands/provar/auth/rotate.d.ts +7 -0
  9. package/lib/commands/provar/auth/rotate.js +42 -0
  10. package/lib/commands/provar/auth/rotate.js.map +1 -0
  11. package/lib/commands/provar/auth/status.d.ts +7 -0
  12. package/lib/commands/provar/auth/status.js +89 -0
  13. package/lib/commands/provar/auth/status.js.map +1 -0
  14. package/lib/mcp/tools/antTools.js +1 -1
  15. package/lib/mcp/tools/antTools.js.map +1 -1
  16. package/lib/mcp/tools/automationTools.js +22 -4
  17. package/lib/mcp/tools/automationTools.js.map +1 -1
  18. package/lib/mcp/tools/propertiesTools.js +2 -1
  19. package/lib/mcp/tools/propertiesTools.js.map +1 -1
  20. package/lib/mcp/tools/testCaseValidate.d.ts +4 -0
  21. package/lib/mcp/tools/testCaseValidate.js +98 -17
  22. package/lib/mcp/tools/testCaseValidate.js.map +1 -1
  23. package/lib/services/auth/credentials.d.ts +18 -0
  24. package/lib/services/auth/credentials.js +71 -0
  25. package/lib/services/auth/credentials.js.map +1 -0
  26. package/lib/services/auth/loginFlow.d.ts +61 -0
  27. package/lib/services/auth/loginFlow.js +183 -0
  28. package/lib/services/auth/loginFlow.js.map +1 -0
  29. package/lib/services/qualityHub/client.d.ts +131 -0
  30. package/lib/services/qualityHub/client.js +196 -0
  31. package/lib/services/qualityHub/client.js.map +1 -0
  32. package/messages/sf.provar.auth.clear.md +13 -0
  33. package/messages/sf.provar.auth.login.md +31 -0
  34. package/messages/sf.provar.auth.rotate.md +23 -0
  35. package/messages/sf.provar.auth.status.md +13 -0
  36. package/oclif.manifest.json +214 -1
  37. package/package.json +5 -2
@@ -1,5 +1,218 @@
1
1
  {
2
2
  "commands": {
3
+ "provar:auth:clear": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Deletes the API key stored at ~/.provar/credentials.json. After clearing, the\nprovar.testcase.validate MCP tool falls back to local validation (structural rules only,\nno Quality Hub quality scoring).\n\nThe PROVAR_API_KEY environment variable is not affected by this command.",
7
+ "examples": [
8
+ "Clear the stored API key:\n<%= config.bin %> <%= command.id %>"
9
+ ],
10
+ "flags": {
11
+ "json": {
12
+ "description": "Format output as json.",
13
+ "helpGroup": "GLOBAL",
14
+ "name": "json",
15
+ "allowNo": false,
16
+ "type": "boolean"
17
+ },
18
+ "flags-dir": {
19
+ "helpGroup": "GLOBAL",
20
+ "name": "flags-dir",
21
+ "summary": "Import flag values from a directory.",
22
+ "hasDynamicHelp": false,
23
+ "multiple": false,
24
+ "type": "option"
25
+ }
26
+ },
27
+ "hasDynamicHelp": false,
28
+ "hiddenAliases": [],
29
+ "id": "provar:auth:clear",
30
+ "pluginAlias": "@provartesting/provardx-cli",
31
+ "pluginName": "@provartesting/provardx-cli",
32
+ "pluginType": "core",
33
+ "strict": true,
34
+ "summary": "Remove the stored Provar API key.",
35
+ "enableJsonFlag": true,
36
+ "isESM": true,
37
+ "relativePath": [
38
+ "lib",
39
+ "commands",
40
+ "provar",
41
+ "auth",
42
+ "clear.js"
43
+ ],
44
+ "aliasPermutations": [],
45
+ "permutations": [
46
+ "provar:auth:clear",
47
+ "auth:provar:clear",
48
+ "auth:clear:provar",
49
+ "provar:clear:auth",
50
+ "clear:provar:auth",
51
+ "clear:auth:provar"
52
+ ]
53
+ },
54
+ "provar:auth:login": {
55
+ "aliases": [],
56
+ "args": {},
57
+ "description": "Opens a browser to the Provar login page. After you authenticate, your API key\nis stored at ~/.provar/credentials.json and used automatically by the Provar MCP\ntools and CI/CD integrations.\n\nThe Cognito session tokens are held in memory only for the duration of the key\nexchange and are then discarded — only the pv*k* API key is written to disk.\n\nRun 'sf provar auth status' after login to confirm the key is configured correctly.\n\nDon't have an account? Request access at:\nhttps://aqqlrlhga7.execute-api.us-east-1.amazonaws.com/dev/auth/request-access",
58
+ "examples": [
59
+ "Log in interactively (opens browser):\n<%= config.bin %> <%= command.id %>",
60
+ "Log in against a staging environment:\n<%= config.bin %> <%= command.id %> --url https://dev.api.example.com"
61
+ ],
62
+ "flags": {
63
+ "json": {
64
+ "description": "Format output as json.",
65
+ "helpGroup": "GLOBAL",
66
+ "name": "json",
67
+ "allowNo": false,
68
+ "type": "boolean"
69
+ },
70
+ "flags-dir": {
71
+ "helpGroup": "GLOBAL",
72
+ "name": "flags-dir",
73
+ "summary": "Import flag values from a directory.",
74
+ "hasDynamicHelp": false,
75
+ "multiple": false,
76
+ "type": "option"
77
+ },
78
+ "url": {
79
+ "name": "url",
80
+ "required": false,
81
+ "summary": "Override the Quality Hub API base URL (for testing against a non-production environment).",
82
+ "hasDynamicHelp": false,
83
+ "multiple": false,
84
+ "type": "option"
85
+ }
86
+ },
87
+ "hasDynamicHelp": false,
88
+ "hiddenAliases": [],
89
+ "id": "provar:auth:login",
90
+ "pluginAlias": "@provartesting/provardx-cli",
91
+ "pluginName": "@provartesting/provardx-cli",
92
+ "pluginType": "core",
93
+ "strict": true,
94
+ "summary": "Log in to Provar Quality Hub and store your API key.",
95
+ "enableJsonFlag": true,
96
+ "isESM": true,
97
+ "relativePath": [
98
+ "lib",
99
+ "commands",
100
+ "provar",
101
+ "auth",
102
+ "login.js"
103
+ ],
104
+ "aliasPermutations": [],
105
+ "permutations": [
106
+ "provar:auth:login",
107
+ "auth:provar:login",
108
+ "auth:login:provar",
109
+ "provar:login:auth",
110
+ "login:provar:auth",
111
+ "login:auth:provar"
112
+ ]
113
+ },
114
+ "provar:auth:rotate": {
115
+ "aliases": [],
116
+ "args": {},
117
+ "description": "Exchanges your current pv*k* key for a new one in a single atomic operation.\nThe old key is invalidated the moment the new key is issued — there is no window\nwhere both are valid.\n\nThe new key is written to ~/.provar/credentials.json automatically.\n\nUse this command to rotate your key on a regular schedule (every ~90 days) without\ngoing through the browser login flow again.\n\nIf the current key is already expired or revoked, rotation is not possible — run\nsf provar auth login instead to authenticate via browser and get a fresh key.",
118
+ "examples": [
119
+ "Rotate the stored API key:\n<%= config.bin %> <%= command.id %>"
120
+ ],
121
+ "flags": {
122
+ "json": {
123
+ "description": "Format output as json.",
124
+ "helpGroup": "GLOBAL",
125
+ "name": "json",
126
+ "allowNo": false,
127
+ "type": "boolean"
128
+ },
129
+ "flags-dir": {
130
+ "helpGroup": "GLOBAL",
131
+ "name": "flags-dir",
132
+ "summary": "Import flag values from a directory.",
133
+ "hasDynamicHelp": false,
134
+ "multiple": false,
135
+ "type": "option"
136
+ }
137
+ },
138
+ "hasDynamicHelp": false,
139
+ "hiddenAliases": [],
140
+ "id": "provar:auth:rotate",
141
+ "pluginAlias": "@provartesting/provardx-cli",
142
+ "pluginName": "@provartesting/provardx-cli",
143
+ "pluginType": "core",
144
+ "strict": true,
145
+ "summary": "Rotate your stored Provar Quality Hub API key.",
146
+ "enableJsonFlag": true,
147
+ "isESM": true,
148
+ "relativePath": [
149
+ "lib",
150
+ "commands",
151
+ "provar",
152
+ "auth",
153
+ "rotate.js"
154
+ ],
155
+ "aliasPermutations": [],
156
+ "permutations": [
157
+ "provar:auth:rotate",
158
+ "auth:provar:rotate",
159
+ "auth:rotate:provar",
160
+ "provar:rotate:auth",
161
+ "rotate:provar:auth",
162
+ "rotate:auth:provar"
163
+ ]
164
+ },
165
+ "provar:auth:status": {
166
+ "aliases": [],
167
+ "args": {},
168
+ "description": "Reports where the active API key comes from (environment variable or stored file),\nshows the key prefix and when it was set, and states whether validation will use the\nQuality Hub API or local rules only. The full key is never printed.\n\nIf no key is configured, guidance is shown for logging in or requesting access.",
169
+ "examples": [
170
+ "Check auth status:\n<%= config.bin %> <%= command.id %>"
171
+ ],
172
+ "flags": {
173
+ "json": {
174
+ "description": "Format output as json.",
175
+ "helpGroup": "GLOBAL",
176
+ "name": "json",
177
+ "allowNo": false,
178
+ "type": "boolean"
179
+ },
180
+ "flags-dir": {
181
+ "helpGroup": "GLOBAL",
182
+ "name": "flags-dir",
183
+ "summary": "Import flag values from a directory.",
184
+ "hasDynamicHelp": false,
185
+ "multiple": false,
186
+ "type": "option"
187
+ }
188
+ },
189
+ "hasDynamicHelp": false,
190
+ "hiddenAliases": [],
191
+ "id": "provar:auth:status",
192
+ "pluginAlias": "@provartesting/provardx-cli",
193
+ "pluginName": "@provartesting/provardx-cli",
194
+ "pluginType": "core",
195
+ "strict": true,
196
+ "summary": "Show the current Provar API key configuration status.",
197
+ "enableJsonFlag": true,
198
+ "isESM": true,
199
+ "relativePath": [
200
+ "lib",
201
+ "commands",
202
+ "provar",
203
+ "auth",
204
+ "status.js"
205
+ ],
206
+ "aliasPermutations": [],
207
+ "permutations": [
208
+ "provar:auth:status",
209
+ "auth:provar:status",
210
+ "auth:status:provar",
211
+ "provar:status:auth",
212
+ "status:provar:auth",
213
+ "status:auth:provar"
214
+ ]
215
+ },
3
216
  "provar:config:get": {
4
217
  "aliases": [],
5
218
  "args": {},
@@ -1811,5 +2024,5 @@
1811
2024
  ]
1812
2025
  }
1813
2026
  },
1814
- "version": "1.5.0-beta.2"
2027
+ "version": "1.5.0-beta.4"
1815
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.2",
4
+ "version": "1.5.0-beta.4",
5
5
  "license": "BSD-3-Clause",
6
6
  "plugins": [
7
7
  "@provartesting/provardx-plugins-automation",
@@ -91,6 +91,9 @@
91
91
  }
92
92
  }
93
93
  },
94
+ "auth": {
95
+ "description": "Commands to manage Provar API key authentication."
96
+ },
94
97
  "automation": {
95
98
  "description": "Commands to interact with Provar Automation.",
96
99
  "subtopics": {
@@ -125,7 +128,7 @@
125
128
  "postpack": "shx rm -f oclif.manifest.json",
126
129
  "prepack": "sf-prepack",
127
130
  "test": "wireit",
128
- "test:nuts": "nyc mocha \"**/*generate.nut.ts\" \"**/*permission.nut.ts\" \"**/*load.nut.ts\" \"**/*validate.nut.ts\" \"**/*set.nut.ts\" \"**/*get.nut.ts\" --slow 4500 --timeout 600000 --reporter mochawesome",
131
+ "test:nuts": "nyc mocha \"**/*generate.nut.ts\" \"**/*permission.nut.ts\" \"**/*load.nut.ts\" \"**/*validate.nut.ts\" \"**/*set.nut.ts\" \"**/*get.nut.ts\" \"**/*key.nut.ts\" \"**/*status.nut.ts\" \"**/*clear.nut.ts\" --slow 4500 --timeout 600000 --reporter mochawesome",
129
132
  "test:only": "wireit",
130
133
  "test:dev": "nyc mocha \"test/**/*.test.ts\"",
131
134
  "test:watch": "mocha \"test/**/*.test.ts\" --watch --watch-files \"src/**/*.ts\" --watch-files \"test/**/*.ts\"",