svamp-cli 0.2.154 → 0.2.155
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/dist/cli.mjs +3 -3
- package/dist/{commands-GYM5Mj8d.mjs → commands-CuQ87Qhs.mjs} +31 -2
- package/dist/{commands-C5NCV1-2.mjs → commands-UHMWfXk1.mjs} +1 -1
- package/dist/{package-BzAFY3_A.mjs → package-cApi42JB.mjs} +1 -1
- package/dist/{store-ChN9bgel.mjs → store-lU-KvCBQ.mjs} +5 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -375,11 +375,11 @@ async function main() {
|
|
|
375
375
|
}), machineId);
|
|
376
376
|
process.exit(0);
|
|
377
377
|
} else if (subcommand === "issue" || subcommand === "issues") {
|
|
378
|
-
const { issueCommand } = await import('./commands-
|
|
378
|
+
const { issueCommand } = await import('./commands-CuQ87Qhs.mjs');
|
|
379
379
|
await issueCommand(args.slice(1));
|
|
380
380
|
process.exit(0);
|
|
381
381
|
} else if (subcommand === "workflow" || subcommand === "workflows") {
|
|
382
|
-
const { workflowCommand } = await import('./commands-
|
|
382
|
+
const { workflowCommand } = await import('./commands-UHMWfXk1.mjs');
|
|
383
383
|
await workflowCommand(args.slice(1));
|
|
384
384
|
process.exit(0);
|
|
385
385
|
} else if (subcommand === "trigger" || subcommand === "triggers" || subcommand === "routine" || subcommand === "routines") {
|
|
@@ -398,7 +398,7 @@ async function main() {
|
|
|
398
398
|
} else if (!subcommand || subcommand === "start") {
|
|
399
399
|
await handleInteractiveCommand();
|
|
400
400
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
401
|
-
const pkg = await import('./package-
|
|
401
|
+
const pkg = await import('./package-cApi42JB.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
402
402
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
403
403
|
} else {
|
|
404
404
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as resolveProjectRoot, s as searchIssues, l as listIssues, a as addComment, u as updateIssue, b as summarize, c as addIssue, g as getIssue } from './store-
|
|
1
|
+
import { r as resolveProjectRoot, s as searchIssues, l as listIssues, a as addComment, u as updateIssue, b as summarize, c as addIssue, g as getIssue } from './store-lU-KvCBQ.mjs';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'node:path';
|
|
4
4
|
import 'node:child_process';
|
|
@@ -30,10 +30,12 @@ function positional(args) {
|
|
|
30
30
|
return out;
|
|
31
31
|
}
|
|
32
32
|
function fmtIssue(i) {
|
|
33
|
+
const tri = i.triaged === false ? " \u25B3triage" : "";
|
|
34
|
+
const disp = i.disposition === "crew" ? " {crew}" : "";
|
|
33
35
|
const label = i.labels.length ? ` [${i.labels.join(", ")}]` : "";
|
|
34
36
|
const v = i.verify ? ` (verify:${i.verify.type})` : "";
|
|
35
37
|
const br = i.branch ? ` {branch:${i.branch}}` : "";
|
|
36
|
-
return `#${i.id} ${STATUS_GLYPH[i.status]} ${i.title}${label}${v}${br}`;
|
|
38
|
+
return `#${i.id} ${STATUS_GLYPH[i.status]} ${i.title}${tri}${disp}${label}${v}${br}`;
|
|
37
39
|
}
|
|
38
40
|
function buildVerify(args) {
|
|
39
41
|
const cmd = flag(args, "--verify-cmd");
|
|
@@ -180,6 +182,9 @@ ${issue.body}`);
|
|
|
180
182
|
if (flag(rest, "--scope")) patch.scope = flag(rest, "--scope");
|
|
181
183
|
if (flag(rest, "--body")) patch.body = flag(rest, "--body");
|
|
182
184
|
if (flag(rest, "--status")) patch.status = flag(rest, "--status");
|
|
185
|
+
if (has(rest, "--crew")) patch.disposition = "crew";
|
|
186
|
+
else if (has(rest, "--inline")) patch.disposition = "inline";
|
|
187
|
+
if (has(rest, "--triaged")) patch.triaged = true;
|
|
183
188
|
const updated = updateIssue(root, id, patch);
|
|
184
189
|
if (!updated) {
|
|
185
190
|
console.error(`Issue not found: ${id}`);
|
|
@@ -188,6 +193,30 @@ ${issue.body}`);
|
|
|
188
193
|
ok(updated, `Updated #${updated.id}: ${updated.title}`);
|
|
189
194
|
break;
|
|
190
195
|
}
|
|
196
|
+
case "triage": {
|
|
197
|
+
const id = positional(rest)[0];
|
|
198
|
+
if (!id) {
|
|
199
|
+
console.error('usage: svamp issue triage <id> [--title "\u2026"] [--label x \u2026] [--crew|--inline] [--verify-cmd "cmd" | --verify "criterion" | --manual] [--body "rewritten"] [--backlog]');
|
|
200
|
+
process.exit(1);
|
|
201
|
+
}
|
|
202
|
+
const patch = { triaged: true };
|
|
203
|
+
if (flag(rest, "--title")) patch.title = flag(rest, "--title");
|
|
204
|
+
const tlabels = rest.filter((a, idx) => rest[idx - 1] === "--label");
|
|
205
|
+
if (tlabels.length) patch.labels = tlabels;
|
|
206
|
+
if (has(rest, "--crew")) patch.disposition = "crew";
|
|
207
|
+
else if (has(rest, "--inline")) patch.disposition = "inline";
|
|
208
|
+
const tv = buildVerify(rest);
|
|
209
|
+
if (tv) patch.verify = tv;
|
|
210
|
+
if (flag(rest, "--body")) patch.body = flag(rest, "--body");
|
|
211
|
+
patch.status = has(rest, "--backlog") ? "backlog" : "ready";
|
|
212
|
+
const updated = updateIssue(root, id, patch);
|
|
213
|
+
if (!updated) {
|
|
214
|
+
console.error(`Issue not found: ${id}`);
|
|
215
|
+
process.exit(1);
|
|
216
|
+
}
|
|
217
|
+
ok(updated, `Triaged #${updated.id}: ${updated.title} [${updated.disposition}${updated.verify ? ", verify:" + updated.verify.type : ""}] \u2192 ${updated.status}`);
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
191
220
|
case "comment": {
|
|
192
221
|
const id = positional(rest)[0];
|
|
193
222
|
const text = positional(rest)[1];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { r as resolveProjectRoot } from './store-
|
|
2
|
+
import { r as resolveProjectRoot } from './store-lU-KvCBQ.mjs';
|
|
3
3
|
import { existsSync, unlinkSync, readFileSync, readdirSync, mkdirSync, writeFileSync, renameSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { parse, stringify } from 'yaml';
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, unlinkSync, readdirSync, mkdirSync, writeFile
|
|
|
2
2
|
import { join, dirname } from 'node:path';
|
|
3
3
|
import { execFileSync } from 'node:child_process';
|
|
4
4
|
|
|
5
|
-
const FIELD_ORDER = ["id", "title", "status", "scope", "labels", "verify", "branch", "session", "created", "closed"];
|
|
5
|
+
const FIELD_ORDER = ["id", "title", "status", "scope", "labels", "verify", "disposition", "triaged", "branch", "session", "created", "closed"];
|
|
6
6
|
function resolveProjectRoot(start = process.cwd()) {
|
|
7
7
|
let dir = start;
|
|
8
8
|
for (let i = 0; i < 40; i++) {
|
|
@@ -55,6 +55,8 @@ function parseIssue(content) {
|
|
|
55
55
|
scope: fm.scope ?? "session",
|
|
56
56
|
labels: Array.isArray(fm.labels) ? fm.labels.map(String) : [],
|
|
57
57
|
verify: fm.verify ?? null,
|
|
58
|
+
disposition: fm.disposition === "crew" ? "crew" : "inline",
|
|
59
|
+
triaged: fm.triaged === true,
|
|
58
60
|
branch: fm.branch ?? null,
|
|
59
61
|
session: fm.session ?? null,
|
|
60
62
|
created: String(fm.created ?? (/* @__PURE__ */ new Date()).toISOString()),
|
|
@@ -115,6 +117,8 @@ function addIssue(projectRoot, fields) {
|
|
|
115
117
|
scope: fields.scope ?? "session",
|
|
116
118
|
labels: fields.labels ?? [],
|
|
117
119
|
verify: fields.verify ?? null,
|
|
120
|
+
disposition: fields.disposition ?? "inline",
|
|
121
|
+
triaged: fields.triaged ?? false,
|
|
118
122
|
branch: null,
|
|
119
123
|
session: fields.session ?? null,
|
|
120
124
|
created: (/* @__PURE__ */ new Date()).toISOString(),
|