qa360 2.0.4 → 2.0.6

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.
@@ -188,19 +188,27 @@ export class QA360History {
188
188
  */
189
189
  async diff(runIdA, runIdB, options) {
190
190
  const vault = await this.getVault();
191
+ // Support short IDs (prefix match) like history get does
192
+ const getRunWithPrefix = async (runId) => {
193
+ let run = await vault.getRun(runId);
194
+ if (!run && runId.length < 36) {
195
+ run = await vault.getRunByPrefix(runId);
196
+ }
197
+ return run;
198
+ };
191
199
  const [runA, runB] = await Promise.all([
192
- vault.getRun(runIdA),
193
- vault.getRun(runIdB)
200
+ getRunWithPrefix(runIdA),
201
+ getRunWithPrefix(runIdB)
194
202
  ]);
195
203
  if (!runA)
196
204
  throw new Error(`Run A not found: ${runIdA}`);
197
205
  if (!runB)
198
206
  throw new Error(`Run B not found: ${runIdB}`);
199
207
  const [gatesA, gatesB, findingsA, findingsB] = await Promise.all([
200
- vault.getGates(runIdA),
201
- vault.getGates(runIdB),
202
- vault.getFindings(runIdA),
203
- vault.getFindings(runIdB)
208
+ vault.getGates(runA.id),
209
+ vault.getGates(runB.id),
210
+ vault.getFindings(runA.id),
211
+ vault.getFindings(runB.id)
204
212
  ]);
205
213
  const diff = {
206
214
  runs: {
@@ -761,7 +761,7 @@ export class Phase3Runner {
761
761
  try {
762
762
  // Begin run in vault (returns actual runId used)
763
763
  const { runId: vaultRunId } = await this.vault.beginRun({
764
- pack_path: 'test-pack.yaml',
764
+ pack_path: `${this.pack.name || 'pack'}.yaml`,
765
765
  pack_hash: this.hashPack(result.pack)
766
766
  });
767
767
  // Finish run with final status
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qa360",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "QA360 Proof CLI - Quality as Cryptographic Proof",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",