Commit 10a1fc5
feat(auth): add sf provar auth rotate command
Implements /auth/rotate endpoint: atomically replaces the stored pv_k_ key
with a new one without going through the browser login flow. Old key is
invalidated immediately on success.
- src/commands/provar/auth/rotate.ts — new SfProvarAuthRotate command
- messages/sf.provar.auth.rotate.md — summary, description, examples
- src/services/qualityHub/client.ts — rotateKey() function + indirection entry
- test/unit/commands/provar/auth/rotate.test.ts — 5 unit tests (599 total)
- README.md, docs/mcp.md — rotate command documentation
Root cause of test ERROR: null debugged and fixed — ts-node/esm surfaces
noUnusedLocals TS6133 as a null-prototype error when a module-level sinon
stub variable is declared but never read (sinon.restore() cleans up without
referencing it). Fixed by inlining stubs inside each it() block.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 0fa223b commit 10a1fc5
6 files changed
Lines changed: 303 additions & 89 deletions
File tree
- docs
- messages
- src
- commands/provar/auth
- services/qualityHub
- test/unit/commands/provar/auth
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
123 | 146 | | |
124 | 147 | | |
125 | 148 | | |
| |||
0 commit comments