ticketlens 0.38.6 → 0.38.8
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/package.json +1 -1
- package/skills/jtb/scripts/lib/compliance-checker.mjs +4 -2
- package/skills/jtb/scripts/lib/ledger.mjs +2 -2
- package/skills/jtb/scripts/lib/note-command.mjs +4 -2
- package/skills/jtb/scripts/lib/recall-command.mjs +1 -1
- package/skills/jtb/scripts/lib/run-collisions.mjs +1 -1
package/package.json
CHANGED
|
@@ -107,14 +107,16 @@ export async function runComplianceCheck({
|
|
|
107
107
|
const missing = analysis.results
|
|
108
108
|
.filter(r => r.status === 'NOT_FOUND')
|
|
109
109
|
.map(r => r.requirement);
|
|
110
|
+
const noCriteria = requirements.length === 0;
|
|
110
111
|
|
|
111
112
|
if (isPro) {
|
|
112
113
|
const gitEmail = execFn('git', ['config', 'user.email'], { encoding: 'utf8' }).stdout?.trim() ?? 'unknown';
|
|
114
|
+
const commitSha = execFn('git', ['rev-parse', 'HEAD'], { encoding: 'utf8' }).stdout?.trim() ?? 'unknown';
|
|
113
115
|
appendLedgerFn(
|
|
114
|
-
{ ticketKey, commitSha: '
|
|
116
|
+
{ ticketKey, commitSha: commitSha || 'unknown', author: gitEmail || 'unknown', coverage: coveragePercent, missing, noCriteria },
|
|
115
117
|
{ configDir, isPro }
|
|
116
118
|
);
|
|
117
119
|
}
|
|
118
120
|
|
|
119
|
-
return { report, results: analysis.results, coveragePercent, noCriteria
|
|
121
|
+
return { report, results: analysis.results, coveragePercent, noCriteria };
|
|
120
122
|
}
|
|
@@ -65,10 +65,10 @@ export function exportLedger(format, { configDir = DEFAULT_CONFIG_DIR, fsModule
|
|
|
65
65
|
const records = readLedger({ configDir, fsModule });
|
|
66
66
|
|
|
67
67
|
if (format === 'csv') {
|
|
68
|
-
const header = 'ts,ticketKey,commitSha,author,coverage,missing';
|
|
68
|
+
const header = 'ts,ticketKey,commitSha,author,coverage,missing,noCriteria';
|
|
69
69
|
const rows = records.map(r => {
|
|
70
70
|
const missing = Array.isArray(r.missing) ? r.missing.join('|') : (r.missing ?? '');
|
|
71
|
-
return [r.ts, r.ticketKey, r.commitSha, r.author, r.coverage, missing]
|
|
71
|
+
return [r.ts, r.ticketKey, r.commitSha, r.author, r.coverage, missing, r.noCriteria]
|
|
72
72
|
.map(v => `"${String(v ?? '').replace(/"/g, '""')}"`)
|
|
73
73
|
.join(',');
|
|
74
74
|
});
|
|
@@ -11,7 +11,7 @@ import { DEFAULT_CONFIG_DIR } from './config.mjs';
|
|
|
11
11
|
import { isLicensed, showUpgradePrompt } from './license.mjs';
|
|
12
12
|
import { scanForSecrets } from './secret-scanner.mjs';
|
|
13
13
|
import { checkNoteStructure } from './note-structural-check.mjs';
|
|
14
|
-
import { writeNote, patchNoteBody, deleteNote } from './recall-vault.mjs';
|
|
14
|
+
import { writeNote, patchNoteBody, deleteNote, rebuildIndex } from './recall-vault.mjs';
|
|
15
15
|
import { readCliToken } from './cli-auth.mjs';
|
|
16
16
|
import { pushNote } from './recall-sync.mjs';
|
|
17
17
|
import { enqueueNote, isRetryableFailure, maybeAutoFlush } from './recall-queue.mjs';
|
|
@@ -230,6 +230,7 @@ export async function runNoteDelete(cmdArgs, {
|
|
|
230
230
|
stdin = process.stdin,
|
|
231
231
|
isLicensedFn = isLicensed,
|
|
232
232
|
deleteNoteFn = deleteNote,
|
|
233
|
+
rebuildIndexFn = rebuildIndex,
|
|
233
234
|
confirmFn = confirmDestructive,
|
|
234
235
|
} = {}) {
|
|
235
236
|
if (!isLicensedFn('pro', configDir)) {
|
|
@@ -256,7 +257,8 @@ export async function runNoteDelete(cmdArgs, {
|
|
|
256
257
|
return { deleted: false };
|
|
257
258
|
}
|
|
258
259
|
|
|
259
|
-
const { deleted } = deleteNoteFn({ external_id: id, tickets: ticketKey ? [ticketKey] : [] }, { configDir });
|
|
260
|
+
const { deleted, prefix } = deleteNoteFn({ external_id: id, tickets: ticketKey ? [ticketKey] : [] }, { configDir });
|
|
261
|
+
if (deleted) rebuildIndexFn(prefix, { configDir });
|
|
260
262
|
stream.write(deleted
|
|
261
263
|
? ` Deleted note (${id}) — local vault only; see help for team-synced notes.\n`
|
|
262
264
|
: ` Note not deleted — (${id}) not found.\n`);
|
|
@@ -54,7 +54,7 @@ export async function runRecall(cmdArgs, {
|
|
|
54
54
|
const filter = TICKET_KEY_PATTERN.test(arg) ? { ticketKey: arg } : { query: arg };
|
|
55
55
|
const results = listNotesFn(filter, { configDir });
|
|
56
56
|
|
|
57
|
-
const styled = !cmdArgs.includes('--plain') && stream.isTTY;
|
|
57
|
+
const styled = !cmdArgs.includes('--plain') && !!stream.isTTY;
|
|
58
58
|
const full = cmdArgs.includes('--full');
|
|
59
59
|
stream.write(styleRecallResults(results, { styled, full }) + '\n');
|
|
60
60
|
return { ok: true };
|
|
@@ -55,7 +55,7 @@ export async function runCollisions(args = [], opts = {}) {
|
|
|
55
55
|
const { collisions = [], message } = await res.json();
|
|
56
56
|
|
|
57
57
|
if (message && collisions.length === 0) {
|
|
58
|
-
print(message + '\n');
|
|
58
|
+
print(jsonFlag ? formatCollisions([], { json: true }) : message + '\n');
|
|
59
59
|
return { ok: true };
|
|
60
60
|
}
|
|
61
61
|
|