linear-sdk-cli 0.1.0 → 0.1.1
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/CHANGELOG.md +46 -46
- package/COVERAGE.md +5 -5
- package/MIGRATING.md +69 -71
- package/README.md +88 -96
- package/package.json +3 -4
- package/skills/linear-sdk-cli/SKILL.md +3 -13
- package/skills/linear-sdk-cli/references/api.md +9 -9
- package/skills/linear-sdk-cli/references/auth.md +0 -18
- package/skills/linear-sdk-cli/references/commands.md +2 -2
- package/skills/linear-sdk-cli/references/config.md +11 -9
- package/skills/linear-sdk-cli/references/issue.md +12 -63
- package/skills/linear-sdk-cli/references/team.md +0 -16
- package/skills/linear-sdk-cli/scripts/generate-docs.ts +2 -6
- package/src/bin/linear.ts +6 -16
- package/src/cli.ts +1 -3
- package/src/commands/agent-session.ts +5 -13
- package/src/commands/api.ts +9 -15
- package/src/commands/attach.ts +4 -15
- package/src/commands/comment.ts +2 -6
- package/src/commands/completion.ts +6 -2
- package/src/commands/cycle.ts +1 -6
- package/src/commands/discover.ts +2 -6
- package/src/commands/document.ts +1 -4
- package/src/commands/initiative.ts +1 -5
- package/src/commands/issue.ts +88 -376
- package/src/commands/meta.ts +31 -139
- package/src/commands/milestone.ts +1 -4
- package/src/commands/notification.ts +6 -15
- package/src/commands/project.ts +4 -17
- package/src/commands/team.ts +0 -13
- package/src/commands/webhook.ts +2 -12
- package/src/config.ts +183 -500
- package/src/context.ts +4 -13
- package/src/git.ts +3 -28
- package/src/lib/body.ts +2 -26
- package/src/lib/errors.ts +7 -32
- package/src/lib/introspect.ts +7 -76
- package/src/lib/keyring.ts +9 -51
- package/src/lib/options.ts +12 -108
- package/src/lib/output-shapes.ts +9 -81
- package/src/lib/pagination.ts +17 -50
- package/src/lib/resolve.ts +7 -40
- package/src/lib/shape.ts +12 -16
- package/src/lib/upload.ts +1 -3
- package/src/output/format.ts +18 -96
- package/src/output/table.ts +7 -7
- package/src/services/agent-session.ts +3 -11
- package/src/services/attachment.ts +5 -14
- package/src/services/comment.ts +4 -12
- package/src/services/cycle.ts +4 -11
- package/src/services/document.ts +10 -29
- package/src/services/favorite.ts +9 -15
- package/src/services/initiative-update.ts +15 -16
- package/src/services/initiative.ts +10 -15
- package/src/services/issue.ts +18 -262
- package/src/services/label.ts +2 -12
- package/src/services/milestone.ts +5 -8
- package/src/services/notification.ts +2 -16
- package/src/services/organization.ts +18 -23
- package/src/services/project.ts +34 -55
- package/src/services/roadmap.ts +6 -7
- package/src/services/state.ts +3 -9
- package/src/services/team.ts +24 -67
- package/src/services/user.ts +2 -2
- package/src/services/webhook.ts +17 -28
- package/skills/linear-sdk-cli/references/open.md +0 -29
- package/src/commands/open.ts +0 -84
- package/src/lib/open.ts +0 -32
- package/src/output/color.ts +0 -52
- package/src/output/markdown.ts +0 -133
- package/src/output/pager.ts +0 -131
package/src/commands/cycle.ts
CHANGED
|
@@ -41,12 +41,7 @@ export function registerCycle(program: Command): void {
|
|
|
41
41
|
.description("Show a cycle (by id, number, or 'current')")
|
|
42
42
|
.action(
|
|
43
43
|
action(async (ctx: Context, opts, id: string) => {
|
|
44
|
-
const detail = await svc.getCycleDetail(
|
|
45
|
-
ctx.client,
|
|
46
|
-
id,
|
|
47
|
-
opts.team ?? ctx.defaultTeam,
|
|
48
|
-
ctx.defaultTeam,
|
|
49
|
-
);
|
|
44
|
+
const detail = await svc.getCycleDetail(ctx.client, id, opts.team ?? ctx.defaultTeam, ctx.defaultTeam);
|
|
50
45
|
emitDetail(ctx, detail);
|
|
51
46
|
}),
|
|
52
47
|
);
|
package/src/commands/discover.ts
CHANGED
|
@@ -26,9 +26,7 @@ import type { Context } from "../context.js";
|
|
|
26
26
|
export function registerCommands(program: Command): void {
|
|
27
27
|
program
|
|
28
28
|
.command("commands [path...]")
|
|
29
|
-
.description(
|
|
30
|
-
"List every command in a machine-readable tree, or describe one (for scripts/agents)",
|
|
31
|
-
)
|
|
29
|
+
.description("List every command in a machine-readable tree, or describe one (for scripts/agents)")
|
|
32
30
|
.addHelpText(
|
|
33
31
|
"after",
|
|
34
32
|
[
|
|
@@ -91,9 +89,7 @@ function renderTree(ctx: Context, nodes: CommandNode[], baseDepth = 0): void {
|
|
|
91
89
|
|
|
92
90
|
/** One command in full: usage, aliases, options, and the `--json` output shape. */
|
|
93
91
|
function renderOne(ctx: Context, n: CommandNode): void {
|
|
94
|
-
ctx.output.line(
|
|
95
|
-
`Usage: linear ${[n.path, n.options.length ? "[options]" : "", usageArgs(n)].filter(Boolean).join(" ")}`,
|
|
96
|
-
);
|
|
92
|
+
ctx.output.line(`Usage: linear ${[n.path, n.options.length ? "[options]" : "", usageArgs(n)].filter(Boolean).join(" ")}`);
|
|
97
93
|
if (n.description) ctx.output.line(` ${n.description}`);
|
|
98
94
|
if (n.aliases.length) ctx.output.line(`Aliases: ${n.aliases.join(", ")}`);
|
|
99
95
|
if (n.options.length) {
|
package/src/commands/document.ts
CHANGED
|
@@ -34,10 +34,7 @@ function addTargetOptions(cmd: Command, verb: string): Command {
|
|
|
34
34
|
.option("-p, --project <name>", `${verb} a project (name or id)`)
|
|
35
35
|
.option("--issue <id>", `${verb} an issue (identifier or id)`)
|
|
36
36
|
.option("--initiative <name>", `${verb} an initiative (name or id)`)
|
|
37
|
-
.option(
|
|
38
|
-
CYCLE_FLAG,
|
|
39
|
-
`${verb} a cycle (number, name, id, or 'current'; team from --team or config)`,
|
|
40
|
-
)
|
|
37
|
+
.option(CYCLE_FLAG, `${verb} a cycle (number, name, id, or 'current'; team from --team or config)`)
|
|
41
38
|
.option("--release <name>", `${verb} a release (name, version, or id)`);
|
|
42
39
|
}
|
|
43
40
|
|
|
@@ -18,11 +18,7 @@ import type { Column } from "../output/table.js";
|
|
|
18
18
|
const ROW_COLUMNS: Column<svc.InitiativeRow>[] = [
|
|
19
19
|
{ key: "name", header: "Name", value: (r) => r.name, max: 40 },
|
|
20
20
|
{ key: "status", header: "Status", value: (r) => r.status ?? "—", max: 12 },
|
|
21
|
-
{
|
|
22
|
-
key: "priority",
|
|
23
|
-
header: "Pri",
|
|
24
|
-
value: (r) => (r.priority ? svc.priorityLabel(r.priority) : "—"),
|
|
25
|
-
},
|
|
21
|
+
{ key: "priority", header: "Pri", value: (r) => (r.priority ? svc.priorityLabel(r.priority) : "—") },
|
|
26
22
|
{ key: "targetDate", header: "Target", value: (r) => r.targetDate ?? "—" },
|
|
27
23
|
{ key: "health", header: "Health", value: (r) => r.health ?? "—", max: 12 },
|
|
28
24
|
];
|