@islamihab/kds 0.6.0 → 0.7.0
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/index.js +52 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -14420,9 +14420,11 @@ var printHelp = (help) => {
|
|
|
14420
14420
|
description: `${field.description ?? ""}${isRequired(field) ? " (required)" : ""}`
|
|
14421
14421
|
}));
|
|
14422
14422
|
const usageOptions = options?.length ? " [options]" : "";
|
|
14423
|
-
if (help.description)
|
|
14424
|
-
console.log(`${help.description}
|
|
14423
|
+
if (help.description) {
|
|
14424
|
+
console.log(`${help.description}${help.longDescription ? `
|
|
14425
|
+
${help.longDescription}` : ""}
|
|
14425
14426
|
`);
|
|
14427
|
+
}
|
|
14426
14428
|
console.log(`Usage: ${help.path}${usageCommands}${usageOptions}${usagePositionals}`);
|
|
14427
14429
|
const labels = [commands, positionals, options].flatMap((entries) => entries ?? []);
|
|
14428
14430
|
const width = Math.max(...labels.map(({ label }) => label.length));
|
|
@@ -14552,7 +14554,13 @@ var command = (def) => {
|
|
|
14552
14554
|
const positionalEntries = Object.entries(inputShape.shape.positionals.shape);
|
|
14553
14555
|
const optionsEntries = optionEntries(inputShape.shape.options.shape);
|
|
14554
14556
|
const run = async (args, path) => {
|
|
14555
|
-
const help = () => printHelp({
|
|
14557
|
+
const help = () => printHelp({
|
|
14558
|
+
path,
|
|
14559
|
+
description: def.description,
|
|
14560
|
+
longDescription: def.longDescription,
|
|
14561
|
+
positionals: positionalEntries,
|
|
14562
|
+
options: optionsEntries
|
|
14563
|
+
});
|
|
14556
14564
|
if (args.some(isHelpFlag))
|
|
14557
14565
|
return help();
|
|
14558
14566
|
const { values, positionals } = parseArgs({ args, positionalEntries, optionsEntries, help });
|
|
@@ -14570,7 +14578,13 @@ var group = (def) => {
|
|
|
14570
14578
|
const optionsShape = exports_external.object(def.options);
|
|
14571
14579
|
const optionsEntries = optionEntries(optionsShape.shape);
|
|
14572
14580
|
const run = async ([sub, ...rest], path) => {
|
|
14573
|
-
const help = () => printHelp({
|
|
14581
|
+
const help = () => printHelp({
|
|
14582
|
+
path,
|
|
14583
|
+
description: def.description,
|
|
14584
|
+
longDescription: def.longDescription,
|
|
14585
|
+
commands: def.commands,
|
|
14586
|
+
options: optionsEntries
|
|
14587
|
+
});
|
|
14574
14588
|
if (!sub && !def.run || sub === "help" || isHelpFlag(sub))
|
|
14575
14589
|
return help();
|
|
14576
14590
|
if (def.run && (sub?.startsWith("-") || !sub)) {
|
|
@@ -14597,7 +14611,7 @@ import { join } from "path";
|
|
|
14597
14611
|
// package.json
|
|
14598
14612
|
var package_default = {
|
|
14599
14613
|
name: "cli",
|
|
14600
|
-
version: "0.
|
|
14614
|
+
version: "0.7.0",
|
|
14601
14615
|
private: true,
|
|
14602
14616
|
type: "module",
|
|
14603
14617
|
bin: {
|
|
@@ -18410,7 +18424,7 @@ var comment = command({
|
|
|
18410
18424
|
body: exports_external.string().describe("Comment markdown, or - for stdin")
|
|
18411
18425
|
},
|
|
18412
18426
|
options: {
|
|
18413
|
-
attach: exports_external.array(exports_external.string()).optional().describe("Attach a file to the issue (repeatable)").meta({ short: "a" })
|
|
18427
|
+
attach: exports_external.array(exports_external.string()).optional().describe("Attach a file to the issue (repeatable); the printed URL is usable in issue markdown, and removal is dashboard-only").meta({ short: "a" })
|
|
18414
18428
|
},
|
|
18415
18429
|
run: async ({ positionals: { id, body }, options: { attach } }) => {
|
|
18416
18430
|
const client3 = await backendClient();
|
|
@@ -18436,6 +18450,7 @@ var agentConfigurationLine = (id) => {
|
|
|
18436
18450
|
var create = command({
|
|
18437
18451
|
name: "create",
|
|
18438
18452
|
description: "Create an issue and print its identifier",
|
|
18453
|
+
longDescription: "--disposition ready_for_agent requires --agent-config; the agent queue refuses an issue without one.",
|
|
18439
18454
|
positionals: {
|
|
18440
18455
|
title: exports_external.string().describe("Issue title")
|
|
18441
18456
|
},
|
|
@@ -18787,6 +18802,8 @@ var remove2 = command({
|
|
|
18787
18802
|
var route = command({
|
|
18788
18803
|
name: "route",
|
|
18789
18804
|
description: "Route an issue to a disposition (wontfix also cancels it)",
|
|
18805
|
+
longDescription: `The disposition says who acts next; needs_triage is the default. Routing to
|
|
18806
|
+
ready_for_agent requires the issue to carry an agent configuration (set --agent-config).`,
|
|
18790
18807
|
positionals: {
|
|
18791
18808
|
id: exports_external.string().describe("Issue identifier, number, or URL"),
|
|
18792
18809
|
disposition: exports_external.enum(ISSUE_DISPOSITIONS).describe("Where the issue goes next")
|
|
@@ -18810,6 +18827,9 @@ var route = command({
|
|
|
18810
18827
|
var set2 = command({
|
|
18811
18828
|
name: "set",
|
|
18812
18829
|
description: "Set an issue's status, priority, estimate, due date, project, milestone, parent, agent configuration, or labels",
|
|
18830
|
+
longDescription: `Status normally moves through the workflow commands and the linked pull request;
|
|
18831
|
+
--status is the correction path. Clearing the agent configuration is refused while
|
|
18832
|
+
the issue sits in ready_for_agent.`,
|
|
18813
18833
|
positionals: {
|
|
18814
18834
|
id: exports_external.string().describe("Issue identifier, number, or URL")
|
|
18815
18835
|
},
|
|
@@ -18884,6 +18904,8 @@ var shellArg = (value) => /^[\w./-]+$/.test(value) ? value : `'${value.replaceAl
|
|
|
18884
18904
|
var start = command({
|
|
18885
18905
|
name: "start",
|
|
18886
18906
|
description: "Claim implementation work: move unstarted or changes_requested work to in_progress with its branch",
|
|
18907
|
+
longDescription: `Starting never routes the issue: the note printed when the disposition is not
|
|
18908
|
+
ready_for_agent is informational, and --ready belongs only to an explicit hand-off.`,
|
|
18887
18909
|
positionals: {
|
|
18888
18910
|
id: exports_external.string().describe("Issue identifier, number, or URL")
|
|
18889
18911
|
},
|
|
@@ -18967,6 +18989,9 @@ ${exports_external.prettifyError(parsed.error)}`);
|
|
|
18967
18989
|
var submitReview = command({
|
|
18968
18990
|
name: "submit-review",
|
|
18969
18991
|
description: "Submit the review verdict on an issue's linked pull request as the reviewer App",
|
|
18992
|
+
longDescription: `Findings are a JSON array (at most ${MAX_REVIEW_FINDINGS}) of objects with path, line, category,
|
|
18993
|
+
severity, summary, and body, plus optional startLine and diff.
|
|
18994
|
+
Categories: ${REVIEW_FINDING_CATEGORIES.join(", ")}; severities: ${REVIEW_FINDING_SEVERITIES.join(", ")}.`,
|
|
18970
18995
|
positionals: {
|
|
18971
18996
|
id: exports_external.string().describe("Issue identifier, number, or URL")
|
|
18972
18997
|
},
|
|
@@ -19008,6 +19033,9 @@ var position = exports_external.array(exports_external.coerce.number().int().pos
|
|
|
19008
19033
|
var tasks = command({
|
|
19009
19034
|
name: "tasks",
|
|
19010
19035
|
description: "Show an issue's checklist, or add, tick, promote, and drop its tasks",
|
|
19036
|
+
longDescription: `Tasks have no identifier, status, disposition, or feed, and ticking one files no
|
|
19037
|
+
activity. Task numbers resolve against the listing as printed, so one call may
|
|
19038
|
+
address several rows even as removals renumber it.`,
|
|
19011
19039
|
positionals: {
|
|
19012
19040
|
id: exports_external.string().describe("Issue identifier, number, or URL")
|
|
19013
19041
|
},
|
|
@@ -19015,7 +19043,7 @@ var tasks = command({
|
|
|
19015
19043
|
add: exports_external.array(exports_external.string()).optional().describe("Add a task (repeatable)").meta({ short: "a" }),
|
|
19016
19044
|
check: position.optional().describe("Tick a task by its number (repeatable)"),
|
|
19017
19045
|
uncheck: position.optional().describe("Untick a task by its number (repeatable)"),
|
|
19018
|
-
convert: position.optional().describe("Promote a task into
|
|
19046
|
+
convert: position.optional().describe("Promote a task into a sub-issue (repeatable); the new issue inherits the project and milestone, arrives in needs_triage, and consumes the task \u2014 a related issue instead when this issue is already a sub-issue"),
|
|
19019
19047
|
remove: position.optional().describe("Drop a task by its number (repeatable)"),
|
|
19020
19048
|
json: exports_external.boolean().default(false).describe("Print as JSON")
|
|
19021
19049
|
},
|
|
@@ -19104,7 +19132,7 @@ var update2 = command({
|
|
|
19104
19132
|
options: {
|
|
19105
19133
|
title: exports_external.string().optional().describe("New title").meta({ short: "t" }),
|
|
19106
19134
|
description: exports_external.string().optional().describe("New markdown description, or - for stdin").meta({ short: "d" }),
|
|
19107
|
-
attach: exports_external.array(exports_external.string()).optional().describe("Attach a file to the issue (repeatable)").meta({ short: "a" })
|
|
19135
|
+
attach: exports_external.array(exports_external.string()).optional().describe("Attach a file to the issue (repeatable); the printed URL is usable in issue markdown, and removal is dashboard-only").meta({ short: "a" })
|
|
19108
19136
|
},
|
|
19109
19137
|
run: async ({ positionals: { id }, options: { title, description, attach } }) => {
|
|
19110
19138
|
if (title === undefined && description === undefined && attach === undefined)
|
|
@@ -19127,6 +19155,16 @@ var update2 = command({
|
|
|
19127
19155
|
var issues = group({
|
|
19128
19156
|
name: "issues",
|
|
19129
19157
|
description: "Track and triage issues",
|
|
19158
|
+
longDescription: `An issue moves on three independent axes: status (the lifecycle, in order: backlog,
|
|
19159
|
+
todo, in_progress, ready_for_review, in_review, changes_requested, approved, done,
|
|
19160
|
+
canceled), priority, and disposition (who acts next). The workflow commands \u2014 start,
|
|
19161
|
+
submit, start-review, submit-review \u2014 and the linked pull request move the status;
|
|
19162
|
+
each refuses an issue outside its own status, and \`set -s\` is for corrections.
|
|
19163
|
+
The repo link is never set by hand: work on a branch whose name contains the issue
|
|
19164
|
+
identifier and the branch, pull request, and status track automatically \u2014 a change
|
|
19165
|
+
request moves the issue to changes_requested, an approval to approved (one
|
|
19166
|
+
outstanding change request outweighs any number of approvals), and a merge lands
|
|
19167
|
+
it as done.`,
|
|
19130
19168
|
commands: [
|
|
19131
19169
|
create,
|
|
19132
19170
|
list2,
|
|
@@ -19336,6 +19374,10 @@ var versions2 = command({
|
|
|
19336
19374
|
var pages = group({
|
|
19337
19375
|
name: "pages",
|
|
19338
19376
|
description: "Publish HTML documents to the web",
|
|
19377
|
+
longDescription: `Themed pages (the default) render inside the site chrome under a strict CSP: only
|
|
19378
|
+
the site theme's styles apply \u2014 inline style attributes and author scripts are
|
|
19379
|
+
dropped. A self-contained document with its own CSS or JS needs raw mode, which
|
|
19380
|
+
serves it verbatim. A page keeps its URL across updates and reverts.`,
|
|
19339
19381
|
commands: [create3, list3, get2, update3, versions2, revert, remove3]
|
|
19340
19382
|
});
|
|
19341
19383
|
|
|
@@ -19551,6 +19593,8 @@ var update4 = command({
|
|
|
19551
19593
|
var projects = group({
|
|
19552
19594
|
name: "projects",
|
|
19553
19595
|
description: "Manage projects",
|
|
19596
|
+
longDescription: `Connect a repository (set --repo) to make --here resolve in that checkout and to
|
|
19597
|
+
let issue branches and pull requests link automatically.`,
|
|
19554
19598
|
commands: [create4, list4, get3, update4, set3, remove4]
|
|
19555
19599
|
});
|
|
19556
19600
|
|