@nodii/dev 0.6.46 → 0.6.47
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.js +2 -0
- package/dist/core.js +1 -1
- package/dist/lanes.js +8 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -214,6 +214,8 @@ Usage: nodii-dev <command> [options] [--json]
|
|
|
214
214
|
# N min (default 10, then cancelled); --artifact is a path there
|
|
215
215
|
|
|
216
216
|
lane start <key> --title TEXT --kind KIND --side SIDE [--repo REPO] [--issue ISSUE]
|
|
217
|
+
lane start <ISSUE> --key KEY --title TEXT --kind KIND --side SIDE
|
|
218
|
+
# --key names the lane; the positional is then its issue
|
|
217
219
|
lane step <key> --side SIDE --start|--done|--block <step> [--reason TEXT]
|
|
218
220
|
# --block --reason on a blocked step records its new reason
|
|
219
221
|
lane step <key> --side SIDE --done <step> --review REVIEW.json
|
package/dist/core.js
CHANGED
|
@@ -4,7 +4,7 @@ import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
4
4
|
import { homedir, platform } from "node:os";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
|
|
7
|
-
export const VERSION = "0.6.
|
|
7
|
+
export const VERSION = "0.6.47";
|
|
8
8
|
export const configPath = () =>
|
|
9
9
|
process.env.NODII_DEV_CONFIG_PATH ??
|
|
10
10
|
join(homedir(), ".config/nodii-dev/config.json");
|
package/dist/lanes.js
CHANGED
|
@@ -294,13 +294,19 @@ export async function laneCommand(action, args, flags, { request = devRequest, c
|
|
|
294
294
|
return { payload, human: (p) => p.data.map(laneLine).join("\n") || "No lanes." };
|
|
295
295
|
}
|
|
296
296
|
if (action === "start") {
|
|
297
|
-
|
|
297
|
+
// `--key` names the lane; the positional is then the issue (NODII-DEV-CLI-13).
|
|
298
|
+
if (flags.key !== undefined && (typeof flags.key !== "string" || !flags.key.trim()))
|
|
299
|
+
throw new CliError("USAGE", "lane start --key needs one lane key", 2);
|
|
300
|
+
if (flags.key !== undefined && args[0] !== undefined && flags.issue !== undefined)
|
|
301
|
+
throw new CliError("USAGE", `lane start got both <${args[0]}> and --key ${flags.key} --issue ${flags.issue}; pass the lane key once (as <key> or --key) and the issue once.`, 2);
|
|
302
|
+
const key = need(flags.key?.trim() ?? args[0], "lane start needs <key>");
|
|
303
|
+
const issue = flags.key !== undefined ? flags.issue ?? args[0] : flags.issue;
|
|
298
304
|
const c = await config();
|
|
299
305
|
const context = await gitContext();
|
|
300
306
|
const agent = (await request("GET", `/api/v1/agents/${encode(c.agentId)}`)).data;
|
|
301
307
|
if (!agent.machineId) throw new CliError("MACHINE_REQUIRED", "The current agent is not assigned to a machine.", 1);
|
|
302
308
|
let issueIds = [];
|
|
303
|
-
if (
|
|
309
|
+
if (issue) issueIds = [String(issue)].flatMap((x) => x.split(",")).map(String);
|
|
304
310
|
issueIds = await Promise.all(issueIds.map(async (ref) => (await request("GET", `/api/v1/issues/${encode(ref)}`)).data.id));
|
|
305
311
|
await request("POST", "/api/v1/lanes", {
|
|
306
312
|
key, title: requireFlag(flags, "title"), kind: requireFlag(flags, "kind"), side: requireFlag(flags, "side"),
|