@ligeti/step-beads 0.0.0-stage → 2.2.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/LICENSE +201 -0
- package/README.md +190 -2
- package/dist/add-dependency.d.ts +25 -0
- package/dist/add-dependency.d.ts.map +1 -0
- package/dist/add-dependency.js +52 -0
- package/dist/add-dependency.js.map +1 -0
- package/dist/bd.d.ts +4 -0
- package/dist/bd.d.ts.map +1 -0
- package/dist/bd.js +146 -0
- package/dist/bd.js.map +1 -0
- package/dist/close.d.ts +44 -0
- package/dist/close.d.ts.map +1 -0
- package/dist/close.js +39 -0
- package/dist/close.js.map +1 -0
- package/dist/comment.d.ts +33 -0
- package/dist/comment.d.ts.map +1 -0
- package/dist/comment.js +33 -0
- package/dist/comment.js.map +1 -0
- package/dist/create.d.ts +88 -0
- package/dist/create.d.ts.map +1 -0
- package/dist/create.js +93 -0
- package/dist/create.js.map +1 -0
- package/dist/environment.d.ts +17 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/environment.js +28 -0
- package/dist/environment.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/list-human.d.ts +40 -0
- package/dist/list-human.d.ts.map +1 -0
- package/dist/list-human.js +35 -0
- package/dist/list-human.js.map +1 -0
- package/dist/list.d.ts +55 -0
- package/dist/list.d.ts.map +1 -0
- package/dist/list.js +77 -0
- package/dist/list.js.map +1 -0
- package/dist/remove-label.d.ts +42 -0
- package/dist/remove-label.d.ts.map +1 -0
- package/dist/remove-label.js +32 -0
- package/dist/remove-label.js.map +1 -0
- package/dist/settings.d.ts +13 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +21 -0
- package/dist/settings.js.map +1 -0
- package/dist/show.d.ts +69 -0
- package/dist/show.d.ts.map +1 -0
- package/dist/show.js +35 -0
- package/dist/show.js.map +1 -0
- package/dist/types.d.ts +80 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +116 -0
- package/dist/types.js.map +1 -0
- package/dist/update.d.ts +89 -0
- package/dist/update.d.ts.map +1 -0
- package/dist/update.js +56 -0
- package/dist/update.js.map +1 -0
- package/package.json +26 -3
package/dist/list.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// ABOUTME: beads.list, the step that lists issues from a bd (beads) database via `bd list --json`,
|
|
2
|
+
// ABOUTME: with an unlimited default and an exact-match externalRef filter, applied by bd or, with ready, by the step.
|
|
3
|
+
import { defineStep, z } from "@ligeti/sdk";
|
|
4
|
+
import pkg from "../package.json" with { type: "json" };
|
|
5
|
+
import { BEADS_ENV_VARS } from "./settings.js";
|
|
6
|
+
import { bdBeads } from "./bd.js";
|
|
7
|
+
import { BeadId, BeadListOutput } from "./types.js";
|
|
8
|
+
export const SafeToken = z
|
|
9
|
+
.string()
|
|
10
|
+
.min(1)
|
|
11
|
+
.refine((value) => !value.startsWith("-"), {
|
|
12
|
+
message: 'must not start with "-"',
|
|
13
|
+
});
|
|
14
|
+
const NoCommaToken = SafeToken.refine((value) => !value.includes(","), {
|
|
15
|
+
message: 'must not contain ","',
|
|
16
|
+
});
|
|
17
|
+
export const SafeStatus = NoCommaToken;
|
|
18
|
+
export const SafeLabel = NoCommaToken;
|
|
19
|
+
export const BeadsListInput = z
|
|
20
|
+
.object({
|
|
21
|
+
repoPath: z.string().min(1),
|
|
22
|
+
status: z.array(SafeStatus).optional(),
|
|
23
|
+
labels: z.array(SafeLabel).optional(),
|
|
24
|
+
labelsAny: z.array(SafeLabel).optional(),
|
|
25
|
+
issueType: SafeToken.optional(),
|
|
26
|
+
parent: BeadId.optional(),
|
|
27
|
+
externalRef: SafeToken.optional(),
|
|
28
|
+
limit: z.number().int().min(0).default(0),
|
|
29
|
+
ready: z.boolean().default(false),
|
|
30
|
+
})
|
|
31
|
+
.refine((input) => !(input.ready && input.status && input.status.length > 0), {
|
|
32
|
+
message: "ready and status are mutually exclusive: --ready already implies an open-ish status set",
|
|
33
|
+
path: ["status"],
|
|
34
|
+
});
|
|
35
|
+
export const beadsList = defineStep({
|
|
36
|
+
name: "beads.list",
|
|
37
|
+
envVars: BEADS_ENV_VARS,
|
|
38
|
+
description: "Lists issues from a bd (beads) database, filtered by status/labels/type/parent, or by blocker-aware readiness (ready), with an explicit (default: unlimited) result limit.",
|
|
39
|
+
package: { name: pkg.name, version: pkg.version },
|
|
40
|
+
input: BeadsListInput,
|
|
41
|
+
output: BeadListOutput,
|
|
42
|
+
retry: { maxAttempts: 3, intervalSeconds: 2 },
|
|
43
|
+
async run(sctx, input) {
|
|
44
|
+
const args = ["list"];
|
|
45
|
+
if (input.status && input.status.length > 0) {
|
|
46
|
+
args.push("-s", input.status.join(","));
|
|
47
|
+
}
|
|
48
|
+
for (const label of input.labels ?? []) {
|
|
49
|
+
args.push("-l", label);
|
|
50
|
+
}
|
|
51
|
+
for (const label of input.labelsAny ?? []) {
|
|
52
|
+
args.push("--label-any", label);
|
|
53
|
+
}
|
|
54
|
+
if (input.issueType !== undefined) {
|
|
55
|
+
args.push("-t", input.issueType);
|
|
56
|
+
}
|
|
57
|
+
if (input.parent !== undefined) {
|
|
58
|
+
args.push("--parent", input.parent);
|
|
59
|
+
}
|
|
60
|
+
const filterExternalRefHere = input.ready && input.externalRef !== undefined;
|
|
61
|
+
if (input.externalRef !== undefined && !filterExternalRefHere) {
|
|
62
|
+
args.push("--external-ref", input.externalRef);
|
|
63
|
+
}
|
|
64
|
+
if (input.ready) {
|
|
65
|
+
args.push("--ready");
|
|
66
|
+
}
|
|
67
|
+
args.push("-n", String(filterExternalRefHere ? 0 : input.limit));
|
|
68
|
+
args.push("--no-pager", "--readonly");
|
|
69
|
+
const beads = await bdBeads(input.repoPath, args, sctx.signal);
|
|
70
|
+
if (!filterExternalRefHere) {
|
|
71
|
+
return { beads };
|
|
72
|
+
}
|
|
73
|
+
const matching = beads.filter((bead) => bead.externalRef === input.externalRef);
|
|
74
|
+
return { beads: input.limit === 0 ? matching : matching.slice(0, input.limit) };
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=list.js.map
|
package/dist/list.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../src/list.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,uHAAuH;AACvH,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC;KACvB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;IACzC,OAAO,EAAE,yBAAyB;CACnC,CAAC,CAAC;AAEL,MAAM,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;IACrE,OAAO,EAAE,sBAAsB;CAChC,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AACvC,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,CAAC;IACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CA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CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;QAEtC,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC3B,OAAO,EAAE,KAAK,EAAE,CAAC;QACnB,CAAC;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,WAAW,CAAC,CAAC;QAChF,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;IAClF,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "@ligeti/sdk";
|
|
2
|
+
export declare const BeadsRemoveLabelInput: z.ZodObject<{
|
|
3
|
+
repoPath: z.ZodString;
|
|
4
|
+
ids: z.ZodArray<z.ZodString>;
|
|
5
|
+
label: z.ZodString;
|
|
6
|
+
actor: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type BeadsRemoveLabelInput = z.infer<typeof BeadsRemoveLabelInput>;
|
|
9
|
+
export declare const beadsRemoveLabel: import("@ligeti/sdk").StepDefinition<z.ZodObject<{
|
|
10
|
+
repoPath: z.ZodString;
|
|
11
|
+
ids: z.ZodArray<z.ZodString>;
|
|
12
|
+
label: z.ZodString;
|
|
13
|
+
actor: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
beads: z.ZodArray<z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
title: z.ZodString;
|
|
18
|
+
status: z.ZodString;
|
|
19
|
+
priority: z.ZodNumber;
|
|
20
|
+
issueType: z.ZodString;
|
|
21
|
+
createdAt: z.ZodString;
|
|
22
|
+
description: z.ZodOptional<z.ZodString>;
|
|
23
|
+
acceptanceCriteria: z.ZodOptional<z.ZodString>;
|
|
24
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
25
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
26
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
27
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
28
|
+
closedAt: z.ZodOptional<z.ZodString>;
|
|
29
|
+
closeReason: z.ZodOptional<z.ZodString>;
|
|
30
|
+
externalRef: z.ZodOptional<z.ZodString>;
|
|
31
|
+
sourceSystem: z.ZodOptional<z.ZodString>;
|
|
32
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
34
|
+
dependencyCount: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
dependentCount: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
commentCount: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
38
|
+
commentsOmitted: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
//# sourceMappingURL=remove-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-label.d.ts","sourceRoot":"","sources":["../src/remove-label.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,CAAC,EAAE,MAAM,aAAa,CAAC;AAO5C,eAAO,MAAM,qBAAqB;;;;;iBAKhC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkB3B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// ABOUTME: beads.remove-label, the step that removes one label from one or more issues in a bd
|
|
2
|
+
// ABOUTME: (beads) database via `bd update --remove-label --json`, idempotent for an absent label.
|
|
3
|
+
import { defineStep, z } from "@ligeti/sdk";
|
|
4
|
+
import pkg from "../package.json" with { type: "json" };
|
|
5
|
+
import { BEADS_ENV_VARS } from "./settings.js";
|
|
6
|
+
import { bdBeads } from "./bd.js";
|
|
7
|
+
import { SafeLabel } from "./list.js";
|
|
8
|
+
import { BeadId, BeadListOutput } from "./types.js";
|
|
9
|
+
export const BeadsRemoveLabelInput = z.object({
|
|
10
|
+
repoPath: z.string().min(1),
|
|
11
|
+
ids: z.array(BeadId).min(1),
|
|
12
|
+
label: SafeLabel,
|
|
13
|
+
actor: z.string().min(1).optional(),
|
|
14
|
+
});
|
|
15
|
+
export const beadsRemoveLabel = defineStep({
|
|
16
|
+
name: "beads.remove-label",
|
|
17
|
+
envVars: BEADS_ENV_VARS,
|
|
18
|
+
description: "Removes one label from one or more issues in a bd (beads) database.",
|
|
19
|
+
package: { name: pkg.name, version: pkg.version },
|
|
20
|
+
input: BeadsRemoveLabelInput,
|
|
21
|
+
output: BeadListOutput,
|
|
22
|
+
retry: { maxAttempts: 3, intervalSeconds: 2 },
|
|
23
|
+
async run(sctx, input) {
|
|
24
|
+
const args = ["update", ...input.ids, "--remove-label", input.label];
|
|
25
|
+
if (input.actor !== undefined) {
|
|
26
|
+
args.push("--actor", input.actor);
|
|
27
|
+
}
|
|
28
|
+
const beads = await bdBeads(input.repoPath, args, sctx.signal);
|
|
29
|
+
return { beads };
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=remove-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-label.js","sourceRoot":"","sources":["../src/remove-label.ts"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AAK,CAAC,KAAK,CAAC,CAAC;QACrE,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/D,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "@ligeti/sdk";
|
|
2
|
+
export declare const BEADS_ENV_VARS: {
|
|
3
|
+
optional: string[];
|
|
4
|
+
public: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare const settingsSchema: z.ZodObject<{
|
|
7
|
+
LIGETI_BEADS_BIN: z.ZodDefault<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export interface BeadsSettings {
|
|
10
|
+
readonly bdBin: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function loadBeadsSettings(env?: NodeJS.ProcessEnv): BeadsSettings;
|
|
13
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,CAAC,EAA2B,MAAM,aAAa,CAAC;AAE/E,eAAO,MAAM,cAAc;;;CAGG,CAAC;AAE/B,eAAO,MAAM,cAAc;;iBAEzB,CAAC;AAEH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,aAAa,CASrF"}
|
package/dist/settings.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// ABOUTME: @ligeti/step-beads settings loaded from the environment (prefix LIGETI_),
|
|
2
|
+
// ABOUTME: parsed with zod. Read inside step code only -- never in a workflow body.
|
|
3
|
+
import { defineSettingsSchema, z } from "@ligeti/sdk";
|
|
4
|
+
export const BEADS_ENV_VARS = {
|
|
5
|
+
optional: ["LIGETI_BEADS_BIN"],
|
|
6
|
+
public: ["LIGETI_BEADS_BIN"],
|
|
7
|
+
};
|
|
8
|
+
export const settingsSchema = defineSettingsSchema({
|
|
9
|
+
LIGETI_BEADS_BIN: z.string().min(1).default("bd").meta({ sensitivity: "public" }),
|
|
10
|
+
});
|
|
11
|
+
export function loadBeadsSettings(env = process.env) {
|
|
12
|
+
const result = settingsSchema.safeParse(env);
|
|
13
|
+
if (!result.success) {
|
|
14
|
+
const issues = result.error.issues
|
|
15
|
+
.map((issue) => ` - ${issue.path.join(".")}: ${issue.message}`)
|
|
16
|
+
.join("\n");
|
|
17
|
+
throw new Error(`invalid beads step environment:\n${issues}`);
|
|
18
|
+
}
|
|
19
|
+
return { bdBin: result.data.LIGETI_BEADS_BIN };
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,oFAAoF;AACpF,OAAO,EAAE,oBAAoB,EAAE,CAAC,EAA2B,MAAM,aAAa,CAAC;AAE/E,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,CAAC,kBAAkB,CAAC;IAC9B,MAAM,EAAE,CAAC,kBAAkB,CAAC;CACA,CAAC;AAE/B,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAC;IACjD,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;CAClF,CAAC,CAAC;AAMH,MAAM,UAAU,iBAAiB,CAAC,MAAyB,OAAO,CAAC,GAAG;IACpE,MAAM,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM;aAC/B,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;aAC/D,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,oCAAoC,MAAM,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;AACjD,CAAC"}
|
package/dist/show.d.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from "@ligeti/sdk";
|
|
2
|
+
export declare const BeadsShowInput: z.ZodObject<{
|
|
3
|
+
repoPath: z.ZodString;
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
includeComments: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type BeadsShowInput = z.infer<typeof BeadsShowInput>;
|
|
8
|
+
export declare const BeadsShowOutput: z.ZodObject<{
|
|
9
|
+
bead: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
title: z.ZodString;
|
|
12
|
+
status: z.ZodString;
|
|
13
|
+
priority: z.ZodNumber;
|
|
14
|
+
issueType: z.ZodString;
|
|
15
|
+
createdAt: z.ZodString;
|
|
16
|
+
description: z.ZodOptional<z.ZodString>;
|
|
17
|
+
acceptanceCriteria: z.ZodOptional<z.ZodString>;
|
|
18
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
19
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
20
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
21
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
22
|
+
closedAt: z.ZodOptional<z.ZodString>;
|
|
23
|
+
closeReason: z.ZodOptional<z.ZodString>;
|
|
24
|
+
externalRef: z.ZodOptional<z.ZodString>;
|
|
25
|
+
sourceSystem: z.ZodOptional<z.ZodString>;
|
|
26
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
27
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
28
|
+
dependencyCount: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
dependentCount: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
commentCount: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
32
|
+
commentsOmitted: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type BeadsShowOutput = z.infer<typeof BeadsShowOutput>;
|
|
37
|
+
export declare const beadsShow: import("@ligeti/sdk").StepDefinition<z.ZodObject<{
|
|
38
|
+
repoPath: z.ZodString;
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
includeComments: z.ZodDefault<z.ZodBoolean>;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
bead: z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
title: z.ZodString;
|
|
45
|
+
status: z.ZodString;
|
|
46
|
+
priority: z.ZodNumber;
|
|
47
|
+
issueType: z.ZodString;
|
|
48
|
+
createdAt: z.ZodString;
|
|
49
|
+
description: z.ZodOptional<z.ZodString>;
|
|
50
|
+
acceptanceCriteria: z.ZodOptional<z.ZodString>;
|
|
51
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
52
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
53
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
54
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
55
|
+
closedAt: z.ZodOptional<z.ZodString>;
|
|
56
|
+
closeReason: z.ZodOptional<z.ZodString>;
|
|
57
|
+
externalRef: z.ZodOptional<z.ZodString>;
|
|
58
|
+
sourceSystem: z.ZodOptional<z.ZodString>;
|
|
59
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
61
|
+
dependencyCount: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
dependentCount: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
commentCount: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
65
|
+
commentsOmitted: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
//# sourceMappingURL=show.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../src/show.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,CAAC,EAAE,MAAM,aAAa,CAAC;AAM5C,eAAO,MAAM,cAAc;;;;iBAIzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA2B,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsBpB,CAAC"}
|
package/dist/show.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// ABOUTME: beads.show, the step that fetches one issue's full detail from a bd (beads) database
|
|
2
|
+
// ABOUTME: via `bd show --id ... --long --json`.
|
|
3
|
+
import { defineStep, z } from "@ligeti/sdk";
|
|
4
|
+
import pkg from "../package.json" with { type: "json" };
|
|
5
|
+
import { BEADS_ENV_VARS } from "./settings.js";
|
|
6
|
+
import { bdBeads } from "./bd.js";
|
|
7
|
+
import { Bead, BeadId } from "./types.js";
|
|
8
|
+
export const BeadsShowInput = z.object({
|
|
9
|
+
repoPath: z.string().min(1),
|
|
10
|
+
id: BeadId,
|
|
11
|
+
includeComments: z.boolean().default(false),
|
|
12
|
+
});
|
|
13
|
+
export const BeadsShowOutput = z.object({ bead: Bead });
|
|
14
|
+
export const beadsShow = defineStep({
|
|
15
|
+
name: "beads.show",
|
|
16
|
+
envVars: BEADS_ENV_VARS,
|
|
17
|
+
description: "Fetches one issue's full detail from a bd (beads) database.",
|
|
18
|
+
package: { name: pkg.name, version: pkg.version },
|
|
19
|
+
input: BeadsShowInput,
|
|
20
|
+
output: BeadsShowOutput,
|
|
21
|
+
retry: { maxAttempts: 3, intervalSeconds: 2 },
|
|
22
|
+
async run(sctx, input) {
|
|
23
|
+
const args = ["show", "--id", input.id, "--long", "--readonly"];
|
|
24
|
+
if (input.includeComments) {
|
|
25
|
+
args.push("--include-comments");
|
|
26
|
+
}
|
|
27
|
+
const beads = await bdBeads(input.repoPath, args, sctx.signal);
|
|
28
|
+
const [first] = beads;
|
|
29
|
+
if (first === undefined) {
|
|
30
|
+
throw new Error(`beads.show: no issue "${input.id}" found in bd repo "${input.repoPath}"`);
|
|
31
|
+
}
|
|
32
|
+
return { bead: first };
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=show.js.map
|
package/dist/show.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.js","sourceRoot":"","sources":["../src/show.ts"],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AC1B,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAClC,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/D,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QACtB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,yBAAyB,KAAK,CAAC,EAAE,uBAAuB,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;QAC7F,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;CACF,CAAC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from "@ligeti/sdk";
|
|
2
|
+
export declare const BeadStatus: z.ZodEnum<{
|
|
3
|
+
open: "open";
|
|
4
|
+
in_progress: "in_progress";
|
|
5
|
+
blocked: "blocked";
|
|
6
|
+
deferred: "deferred";
|
|
7
|
+
closed: "closed";
|
|
8
|
+
pinned: "pinned";
|
|
9
|
+
hooked: "hooked";
|
|
10
|
+
}>;
|
|
11
|
+
export type BeadStatus = z.infer<typeof BeadStatus>;
|
|
12
|
+
export declare const Bead: z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
title: z.ZodString;
|
|
15
|
+
status: z.ZodString;
|
|
16
|
+
priority: z.ZodNumber;
|
|
17
|
+
issueType: z.ZodString;
|
|
18
|
+
createdAt: z.ZodString;
|
|
19
|
+
description: z.ZodOptional<z.ZodString>;
|
|
20
|
+
acceptanceCriteria: z.ZodOptional<z.ZodString>;
|
|
21
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
22
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
23
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
24
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
25
|
+
closedAt: z.ZodOptional<z.ZodString>;
|
|
26
|
+
closeReason: z.ZodOptional<z.ZodString>;
|
|
27
|
+
externalRef: z.ZodOptional<z.ZodString>;
|
|
28
|
+
sourceSystem: z.ZodOptional<z.ZodString>;
|
|
29
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
31
|
+
dependencyCount: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
dependentCount: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
commentCount: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
35
|
+
commentsOmitted: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type Bead = z.infer<typeof Bead>;
|
|
39
|
+
export declare function parseBead(raw: unknown): Bead;
|
|
40
|
+
export declare const BeadId: z.ZodString;
|
|
41
|
+
export type BeadId = z.infer<typeof BeadId>;
|
|
42
|
+
export declare const BeadListOutput: z.ZodObject<{
|
|
43
|
+
beads: z.ZodArray<z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
title: z.ZodString;
|
|
46
|
+
status: z.ZodString;
|
|
47
|
+
priority: z.ZodNumber;
|
|
48
|
+
issueType: z.ZodString;
|
|
49
|
+
createdAt: z.ZodString;
|
|
50
|
+
description: z.ZodOptional<z.ZodString>;
|
|
51
|
+
acceptanceCriteria: z.ZodOptional<z.ZodString>;
|
|
52
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
53
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
54
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
55
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
56
|
+
closedAt: z.ZodOptional<z.ZodString>;
|
|
57
|
+
closeReason: z.ZodOptional<z.ZodString>;
|
|
58
|
+
externalRef: z.ZodOptional<z.ZodString>;
|
|
59
|
+
sourceSystem: z.ZodOptional<z.ZodString>;
|
|
60
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
62
|
+
dependencyCount: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
dependentCount: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
commentCount: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
66
|
+
commentsOmitted: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
export type BeadListOutput = z.infer<typeof BeadListOutput>;
|
|
71
|
+
export declare const Comment: z.ZodObject<{
|
|
72
|
+
id: z.ZodString;
|
|
73
|
+
issueId: z.ZodString;
|
|
74
|
+
author: z.ZodString;
|
|
75
|
+
text: z.ZodString;
|
|
76
|
+
createdAt: z.ZodString;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export type Comment = z.infer<typeof Comment>;
|
|
79
|
+
export declare function parseComment(raw: unknown): Comment;
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAEhC,eAAO,MAAM,UAAU;;;;;;;;EAQrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CA4C5C;AAED,eAAO,MAAM,MAAM,aAKf,CAAC;AACL,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAE5C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAqC,CAAC;AACjE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,OAAO;;;;;;iBAMlB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAE9C,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAsBlD"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// ABOUTME: Zod schemas for a bd (beads) issue: the wire (snake_case) shape bd's --json emits,
|
|
2
|
+
// ABOUTME: normalised to a camelCase Bead, plus a BeadId schema guarding argv-injection-safe ids.
|
|
3
|
+
import { z } from "@ligeti/sdk";
|
|
4
|
+
export const BeadStatus = z.enum([
|
|
5
|
+
"open",
|
|
6
|
+
"in_progress",
|
|
7
|
+
"blocked",
|
|
8
|
+
"deferred",
|
|
9
|
+
"closed",
|
|
10
|
+
"pinned",
|
|
11
|
+
"hooked",
|
|
12
|
+
]);
|
|
13
|
+
export const Bead = z.object({
|
|
14
|
+
id: z.string(),
|
|
15
|
+
title: z.string(),
|
|
16
|
+
status: z.string(),
|
|
17
|
+
priority: z.number().int(),
|
|
18
|
+
issueType: z.string(),
|
|
19
|
+
createdAt: z.string(),
|
|
20
|
+
description: z.string().optional(),
|
|
21
|
+
acceptanceCriteria: z.string().optional(),
|
|
22
|
+
owner: z.string().optional(),
|
|
23
|
+
assignee: z.string().optional(),
|
|
24
|
+
createdBy: z.string().optional(),
|
|
25
|
+
updatedAt: z.string().optional(),
|
|
26
|
+
closedAt: z.string().optional(),
|
|
27
|
+
closeReason: z.string().optional(),
|
|
28
|
+
externalRef: z.string().optional(),
|
|
29
|
+
sourceSystem: z.string().optional(),
|
|
30
|
+
labels: z.array(z.string()).optional(),
|
|
31
|
+
dependencies: z.array(z.unknown()).optional(),
|
|
32
|
+
dependencyCount: z.number().int().optional(),
|
|
33
|
+
dependentCount: z.number().int().optional(),
|
|
34
|
+
commentCount: z.number().int().optional(),
|
|
35
|
+
comments: z.array(z.unknown()).optional(),
|
|
36
|
+
commentsOmitted: z.boolean().optional(),
|
|
37
|
+
revision: z.string().optional(),
|
|
38
|
+
});
|
|
39
|
+
export function parseBead(raw) {
|
|
40
|
+
if (typeof raw !== "object" || raw === null) {
|
|
41
|
+
throw new Error(`bd returned a non-object issue: ${JSON.stringify(raw)}`);
|
|
42
|
+
}
|
|
43
|
+
const wire = raw;
|
|
44
|
+
const mapped = {
|
|
45
|
+
id: wire.id,
|
|
46
|
+
title: wire.title,
|
|
47
|
+
status: wire.status,
|
|
48
|
+
priority: wire.priority,
|
|
49
|
+
issueType: wire.issue_type,
|
|
50
|
+
createdAt: wire.created_at,
|
|
51
|
+
...(wire.description !== undefined ? { description: wire.description } : {}),
|
|
52
|
+
...(wire.acceptance_criteria !== undefined
|
|
53
|
+
? { acceptanceCriteria: wire.acceptance_criteria }
|
|
54
|
+
: {}),
|
|
55
|
+
...(wire.owner !== undefined ? { owner: wire.owner } : {}),
|
|
56
|
+
...(wire.assignee !== undefined ? { assignee: wire.assignee } : {}),
|
|
57
|
+
...(wire.created_by !== undefined ? { createdBy: wire.created_by } : {}),
|
|
58
|
+
...(wire.updated_at !== undefined ? { updatedAt: wire.updated_at } : {}),
|
|
59
|
+
...(wire.closed_at !== undefined ? { closedAt: wire.closed_at } : {}),
|
|
60
|
+
...(wire.close_reason !== undefined ? { closeReason: wire.close_reason } : {}),
|
|
61
|
+
...(wire.external_ref !== undefined ? { externalRef: wire.external_ref } : {}),
|
|
62
|
+
...(wire.source_system !== undefined ? { sourceSystem: wire.source_system } : {}),
|
|
63
|
+
...(wire.labels !== undefined ? { labels: wire.labels } : {}),
|
|
64
|
+
...(wire.dependencies !== undefined ? { dependencies: wire.dependencies } : {}),
|
|
65
|
+
...(wire.dependency_count !== undefined ? { dependencyCount: wire.dependency_count } : {}),
|
|
66
|
+
...(wire.dependent_count !== undefined ? { dependentCount: wire.dependent_count } : {}),
|
|
67
|
+
...(wire.comment_count !== undefined ? { commentCount: wire.comment_count } : {}),
|
|
68
|
+
...(wire.comments !== undefined ? { comments: wire.comments } : {}),
|
|
69
|
+
...(wire.comments_omitted !== undefined ? { commentsOmitted: wire.comments_omitted } : {}),
|
|
70
|
+
...(wire.revision !== undefined ? { revision: wire.revision } : {}),
|
|
71
|
+
};
|
|
72
|
+
const result = Bead.safeParse(mapped);
|
|
73
|
+
if (!result.success) {
|
|
74
|
+
const fields = [...new Set(result.error.issues.map((issue) => issue.path.join(".")))].join(", ");
|
|
75
|
+
throw new Error(`bd returned an issue missing/invalid required field(s): ${fields}`, {
|
|
76
|
+
cause: result.error,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return result.data;
|
|
80
|
+
}
|
|
81
|
+
export const BeadId = z
|
|
82
|
+
.string()
|
|
83
|
+
.min(1)
|
|
84
|
+
.refine((id) => !id.startsWith("-") && /^[A-Za-z0-9._/-]+$/.test(id), {
|
|
85
|
+
message: 'must be a safe bd issue id: no leading "-", no whitespace, and only [A-Za-z0-9._/-]',
|
|
86
|
+
});
|
|
87
|
+
export const BeadListOutput = z.object({ beads: z.array(Bead) });
|
|
88
|
+
export const Comment = z.object({
|
|
89
|
+
id: z.string(),
|
|
90
|
+
issueId: z.string(),
|
|
91
|
+
author: z.string(),
|
|
92
|
+
text: z.string(),
|
|
93
|
+
createdAt: z.string(),
|
|
94
|
+
});
|
|
95
|
+
export function parseComment(raw) {
|
|
96
|
+
if (typeof raw !== "object" || raw === null) {
|
|
97
|
+
throw new Error(`bd returned a non-object comment: ${JSON.stringify(raw)}`);
|
|
98
|
+
}
|
|
99
|
+
const wire = raw;
|
|
100
|
+
const mapped = {
|
|
101
|
+
id: wire.id,
|
|
102
|
+
issueId: wire.issue_id,
|
|
103
|
+
author: wire.author,
|
|
104
|
+
text: wire.text,
|
|
105
|
+
createdAt: wire.created_at,
|
|
106
|
+
};
|
|
107
|
+
const result = Comment.safeParse(mapped);
|
|
108
|
+
if (!result.success) {
|
|
109
|
+
const fields = [...new Set(result.error.issues.map((issue) => issue.path.join(".")))].join(", ");
|
|
110
|
+
throw new Error(`bd returned a comment missing/invalid required field(s): ${fields}`, {
|
|
111
|
+
cause: result.error,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return result.data;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,kGAAkG;AAClG,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAEhC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC;IAC/B,MAAM;IACN,aAAa;IACb,SAAS;IACT,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,QAAQ;CACT,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,WAAW,EAAE,CAA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AK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CACxF,IAAI,CACL,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,4DAA4D,MAAM,EAAE,EAAE;YACpF,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
|
package/dist/update.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from "@ligeti/sdk";
|
|
2
|
+
export declare const BeadsUpdateInput: z.ZodObject<{
|
|
3
|
+
repoPath: z.ZodString;
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
open: "open";
|
|
7
|
+
in_progress: "in_progress";
|
|
8
|
+
blocked: "blocked";
|
|
9
|
+
deferred: "deferred";
|
|
10
|
+
pinned: "pinned";
|
|
11
|
+
hooked: "hooked";
|
|
12
|
+
}>>;
|
|
13
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
14
|
+
actor: z.ZodOptional<z.ZodString>;
|
|
15
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type BeadsUpdateInput = z.infer<typeof BeadsUpdateInput>;
|
|
18
|
+
export declare const BeadsUpdateOutput: z.ZodObject<{
|
|
19
|
+
bead: z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
title: z.ZodString;
|
|
22
|
+
status: z.ZodString;
|
|
23
|
+
priority: z.ZodNumber;
|
|
24
|
+
issueType: z.ZodString;
|
|
25
|
+
createdAt: z.ZodString;
|
|
26
|
+
description: z.ZodOptional<z.ZodString>;
|
|
27
|
+
acceptanceCriteria: z.ZodOptional<z.ZodString>;
|
|
28
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
29
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
30
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
31
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
32
|
+
closedAt: z.ZodOptional<z.ZodString>;
|
|
33
|
+
closeReason: z.ZodOptional<z.ZodString>;
|
|
34
|
+
externalRef: z.ZodOptional<z.ZodString>;
|
|
35
|
+
sourceSystem: z.ZodOptional<z.ZodString>;
|
|
36
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
38
|
+
dependencyCount: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
dependentCount: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
commentCount: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
42
|
+
commentsOmitted: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export type BeadsUpdateOutput = z.infer<typeof BeadsUpdateOutput>;
|
|
47
|
+
export declare const beadsUpdate: import("@ligeti/sdk").StepDefinition<z.ZodObject<{
|
|
48
|
+
repoPath: z.ZodString;
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
open: "open";
|
|
52
|
+
in_progress: "in_progress";
|
|
53
|
+
blocked: "blocked";
|
|
54
|
+
deferred: "deferred";
|
|
55
|
+
pinned: "pinned";
|
|
56
|
+
hooked: "hooked";
|
|
57
|
+
}>>;
|
|
58
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
59
|
+
actor: z.ZodOptional<z.ZodString>;
|
|
60
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
bead: z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
title: z.ZodString;
|
|
65
|
+
status: z.ZodString;
|
|
66
|
+
priority: z.ZodNumber;
|
|
67
|
+
issueType: z.ZodString;
|
|
68
|
+
createdAt: z.ZodString;
|
|
69
|
+
description: z.ZodOptional<z.ZodString>;
|
|
70
|
+
acceptanceCriteria: z.ZodOptional<z.ZodString>;
|
|
71
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
72
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
73
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
74
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
75
|
+
closedAt: z.ZodOptional<z.ZodString>;
|
|
76
|
+
closeReason: z.ZodOptional<z.ZodString>;
|
|
77
|
+
externalRef: z.ZodOptional<z.ZodString>;
|
|
78
|
+
sourceSystem: z.ZodOptional<z.ZodString>;
|
|
79
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
80
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
81
|
+
dependencyCount: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
dependentCount: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
commentCount: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
85
|
+
commentsOmitted: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
}, z.core.$strip>>;
|
|
89
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,CAAC,EAAE,MAAM,aAAa,CAAC;AAM5C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;iBAazB,CAAC;AACL,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA2B,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoCtB,CAAC"}
|