@islamihab/kds 0.4.0 → 0.5.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 +18 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -14597,7 +14597,7 @@ import { join } from "path";
|
|
|
14597
14597
|
// package.json
|
|
14598
14598
|
var package_default = {
|
|
14599
14599
|
name: "cli",
|
|
14600
|
-
version: "0.
|
|
14600
|
+
version: "0.5.0",
|
|
14601
14601
|
private: true,
|
|
14602
14602
|
type: "module",
|
|
14603
14603
|
bin: {
|
|
@@ -18005,6 +18005,19 @@ var logout = command({
|
|
|
18005
18005
|
}
|
|
18006
18006
|
});
|
|
18007
18007
|
|
|
18008
|
+
// src/commands/auth/reviewer-token.ts
|
|
18009
|
+
var reviewerToken = command({
|
|
18010
|
+
name: "reviewer-token",
|
|
18011
|
+
description: "Print a short-lived GitHub token for the reviewer App identity",
|
|
18012
|
+
options: {
|
|
18013
|
+
json: exports_external.boolean().default(false).describe("Print as JSON")
|
|
18014
|
+
},
|
|
18015
|
+
run: async ({ options: { json: json2 } }) => {
|
|
18016
|
+
const minted = await (await backendClient()).action(api2.githubReviewer.mintToken, {});
|
|
18017
|
+
console.log(json2 ? JSON.stringify(minted, null, 2) : minted.token);
|
|
18018
|
+
}
|
|
18019
|
+
});
|
|
18020
|
+
|
|
18008
18021
|
// src/lib/activity.ts
|
|
18009
18022
|
var SOURCE_LABELS = { github: "GitHub", agent: "Agent" };
|
|
18010
18023
|
var actorLabel = (via, agent) => {
|
|
@@ -18091,7 +18104,7 @@ var status = command({
|
|
|
18091
18104
|
var auth = group({
|
|
18092
18105
|
name: "auth",
|
|
18093
18106
|
description: "Manage backend authentication",
|
|
18094
|
-
commands: [login, logout, status]
|
|
18107
|
+
commands: [login, logout, status, reviewerToken]
|
|
18095
18108
|
});
|
|
18096
18109
|
|
|
18097
18110
|
// src/lib/output.ts
|
|
@@ -18476,7 +18489,7 @@ var get = command({
|
|
|
18476
18489
|
]);
|
|
18477
18490
|
if (json2)
|
|
18478
18491
|
return console.log(JSON.stringify({ ...issue2, relations, attachments, tasks, feed }, null, 2));
|
|
18479
|
-
const project = issue2.
|
|
18492
|
+
const project = issue2.project;
|
|
18480
18493
|
const milestone = issue2.milestoneId ? await client3.query(api2.milestones.get, { id: issue2.milestoneId, today: localToday() }) : null;
|
|
18481
18494
|
console.log(`${issue2.identifier} ${issue2.title}`);
|
|
18482
18495
|
console.log(`Status: ${issue2.status} \xB7 Priority: ${issue2.priority} \xB7 Disposition: ${issue2.disposition}`);
|
|
@@ -18777,10 +18790,10 @@ var set2 = command({
|
|
|
18777
18790
|
throw new Error("Nothing to set. Pass --status, --priority, --estimate, --due, --project, --milestone, --parent, --agent-config, or --label.");
|
|
18778
18791
|
const client3 = await backendClient();
|
|
18779
18792
|
const issue2 = await resolveIssue(client3, id);
|
|
18780
|
-
const projectId = project === undefined ? issue2.
|
|
18793
|
+
const projectId = project === undefined ? issue2.project?._id : project === null ? undefined : (await resolveProject(client3, project))._id;
|
|
18781
18794
|
let milestoneId;
|
|
18782
18795
|
if (milestone === undefined) {
|
|
18783
|
-
milestoneId = projectId === issue2.
|
|
18796
|
+
milestoneId = projectId === issue2.project?._id ? issue2.milestoneId : undefined;
|
|
18784
18797
|
} else if (milestone !== null) {
|
|
18785
18798
|
if (projectId === undefined)
|
|
18786
18799
|
throw new Error("A milestone needs a project. Pass --project too.");
|