@islamihab/kds 0.8.0 → 0.9.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 +16 -23
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -14611,7 +14611,7 @@ import { join } from "path";
|
|
|
14611
14611
|
// package.json
|
|
14612
14612
|
var package_default = {
|
|
14613
14613
|
name: "cli",
|
|
14614
|
-
version: "0.
|
|
14614
|
+
version: "0.9.0",
|
|
14615
14615
|
private: true,
|
|
14616
14616
|
type: "module",
|
|
14617
14617
|
bin: {
|
|
@@ -17788,6 +17788,7 @@ var HARNESSES = [
|
|
|
17788
17788
|
{ env: "CLAUDECODE", label: "Claude Code" },
|
|
17789
17789
|
{ env: "CLAUDE_CODE_ENTRYPOINT", label: "Claude Code" },
|
|
17790
17790
|
{ env: "CODEX_SANDBOX", label: "Codex" },
|
|
17791
|
+
{ env: "CODEX_THREAD_ID", label: "Codex" },
|
|
17791
17792
|
{ env: "CURSOR_AGENT", label: "Cursor" },
|
|
17792
17793
|
{ env: "AI_AGENT", label: undefined }
|
|
17793
17794
|
];
|
|
@@ -18303,35 +18304,27 @@ var repoProject = async (client3) => {
|
|
|
18303
18304
|
throw new Error(`No project is connected to ${repo}. Connect one on the project in the dashboard.`);
|
|
18304
18305
|
return project;
|
|
18305
18306
|
};
|
|
18306
|
-
var
|
|
18307
|
-
if (names.length === 0)
|
|
18308
|
-
return [];
|
|
18307
|
+
var missingLabelError = async (client3, lead) => {
|
|
18309
18308
|
const labels = await client3.query(api2.issueLabels.list, {});
|
|
18310
|
-
|
|
18311
|
-
|
|
18312
|
-
const label = labels.find((candidate) => candidate.name.toLowerCase() === wanted);
|
|
18313
|
-
if (!label) {
|
|
18314
|
-
const available = labels.map((candidate) => candidate.name).join(", ");
|
|
18315
|
-
throw new Error(available ? `No label named "${name}". The labels are: ${available}.` : "There are no labels yet.");
|
|
18316
|
-
}
|
|
18317
|
-
return label;
|
|
18318
|
-
});
|
|
18309
|
+
const available = labels.map((candidate) => candidate.name).join(", ");
|
|
18310
|
+
return new Error(available ? `${lead} The labels are: ${available}.` : "There are no labels yet.");
|
|
18319
18311
|
};
|
|
18312
|
+
var resolveIssueLabels = async (client3, names) => await Promise.all(names.map(async (name) => {
|
|
18313
|
+
const label = await client3.query(api2.issueLabels.find, { ref: name });
|
|
18314
|
+
if (!label)
|
|
18315
|
+
throw await missingLabelError(client3, `No label named "${name}".`);
|
|
18316
|
+
return label;
|
|
18317
|
+
}));
|
|
18320
18318
|
var resolveIssueLabel = async (client3, ref) => {
|
|
18321
|
-
const
|
|
18322
|
-
|
|
18323
|
-
|
|
18324
|
-
if (!label) {
|
|
18325
|
-
const available = labels.map((candidate) => candidate.name).join(", ");
|
|
18326
|
-
throw new Error(available ? `No label matches "${ref}". The labels are: ${available}.` : "There are no labels yet.");
|
|
18327
|
-
}
|
|
18319
|
+
const label = await client3.query(api2.issueLabels.find, { ref });
|
|
18320
|
+
if (!label)
|
|
18321
|
+
throw await missingLabelError(client3, `No label matches "${ref}".`);
|
|
18328
18322
|
return label;
|
|
18329
18323
|
};
|
|
18330
18324
|
var resolveMilestone = async (client3, projectId, name) => {
|
|
18331
|
-
const
|
|
18332
|
-
const wanted = name.trim().toLowerCase();
|
|
18333
|
-
const milestone = milestones.find((candidate) => candidate.name.toLowerCase() === wanted);
|
|
18325
|
+
const milestone = await client3.query(api2.milestones.find, { projectId, name });
|
|
18334
18326
|
if (!milestone) {
|
|
18327
|
+
const milestones = await client3.query(api2.milestones.listByProject, { projectId, today: localToday() });
|
|
18335
18328
|
const names = milestones.map((candidate) => candidate.name).join(", ");
|
|
18336
18329
|
throw new Error(names ? `No milestone named "${name}". The project has: ${names}.` : "The project has no milestones.");
|
|
18337
18330
|
}
|