@generacy-ai/generacy 0.3.3 → 0.4.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/README.md +153 -0
- package/dist/cli/commands/cluster/scaffolder.d.ts.map +1 -1
- package/dist/cli/commands/cluster/scaffolder.js +2 -0
- package/dist/cli/commands/cluster/scaffolder.js.map +1 -1
- package/dist/cli/commands/cockpit/advance.d.ts +42 -0
- package/dist/cli/commands/cockpit/advance.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/advance.js +136 -0
- package/dist/cli/commands/cockpit/advance.js.map +1 -0
- package/dist/cli/commands/cockpit/clarification-comment-finder.d.ts +13 -0
- package/dist/cli/commands/cockpit/clarification-comment-finder.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/clarification-comment-finder.js +31 -0
- package/dist/cli/commands/cockpit/clarification-comment-finder.js.map +1 -0
- package/dist/cli/commands/cockpit/code-references.d.ts +27 -0
- package/dist/cli/commands/cockpit/code-references.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/code-references.js +48 -0
- package/dist/cli/commands/cockpit/code-references.js.map +1 -0
- package/dist/cli/commands/cockpit/context.d.ts +90 -0
- package/dist/cli/commands/cockpit/context.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/context.js +280 -0
- package/dist/cli/commands/cockpit/context.js.map +1 -0
- package/dist/cli/commands/cockpit/exit.d.ts +12 -0
- package/dist/cli/commands/cockpit/exit.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/exit.js +18 -0
- package/dist/cli/commands/cockpit/exit.js.map +1 -0
- package/dist/cli/commands/cockpit/gate-vocabulary.d.ts +48 -0
- package/dist/cli/commands/cockpit/gate-vocabulary.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/gate-vocabulary.js +96 -0
- package/dist/cli/commands/cockpit/gate-vocabulary.js.map +1 -0
- package/dist/cli/commands/cockpit/index.d.ts +20 -0
- package/dist/cli/commands/cockpit/index.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/index.js +40 -0
- package/dist/cli/commands/cockpit/index.js.map +1 -0
- package/dist/cli/commands/cockpit/manual-advance-marker.d.ts +18 -0
- package/dist/cli/commands/cockpit/manual-advance-marker.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/manual-advance-marker.js +43 -0
- package/dist/cli/commands/cockpit/manual-advance-marker.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/errors.d.ts +54 -0
- package/dist/cli/commands/cockpit/mcp/errors.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/errors.js +190 -0
- package/dist/cli/commands/cockpit/mcp/errors.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/event-bus-registry.d.ts +59 -0
- package/dist/cli/commands/cockpit/mcp/event-bus-registry.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/event-bus-registry.js +305 -0
- package/dist/cli/commands/cockpit/mcp/event-bus-registry.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/event-bus.d.ts +82 -0
- package/dist/cli/commands/cockpit/mcp/event-bus.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/event-bus.js +230 -0
- package/dist/cli/commands/cockpit/mcp/event-bus.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/index.d.ts +17 -0
- package/dist/cli/commands/cockpit/mcp/index.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/index.js +37 -0
- package/dist/cli/commands/cockpit/mcp/index.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/ref-input.d.ts +52 -0
- package/dist/cli/commands/cockpit/mcp/ref-input.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/ref-input.js +132 -0
- package/dist/cli/commands/cockpit/mcp/ref-input.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/schemas.d.ts +287 -0
- package/dist/cli/commands/cockpit/mcp/schemas.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/schemas.js +84 -0
- package/dist/cli/commands/cockpit/mcp/schemas.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/server.d.ts +17 -0
- package/dist/cli/commands/cockpit/mcp/server.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/server.js +62 -0
- package/dist/cli/commands/cockpit/mcp/server.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_advance.d.ts +42 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_advance.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_advance.js +73 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_advance.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_await_events.d.ts +34 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_await_events.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_await_events.js +115 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_await_events.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_context.d.ts +21 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_context.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_context.js +35 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_context.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_merge.d.ts +43 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_merge.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_merge.js +99 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_merge.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_queue.d.ts +43 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_queue.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_queue.js +68 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_queue.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_resume.d.ts +38 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_resume.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_resume.js +79 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_resume.js.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_status.d.ts +21 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_status.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_status.js +59 -0
- package/dist/cli/commands/cockpit/mcp/tools/cockpit_status.js.map +1 -0
- package/dist/cli/commands/cockpit/merge.d.ts +42 -0
- package/dist/cli/commands/cockpit/merge.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/merge.js +360 -0
- package/dist/cli/commands/cockpit/merge.js.map +1 -0
- package/dist/cli/commands/cockpit/plan-dependency-extractor.d.ts +30 -0
- package/dist/cli/commands/cockpit/plan-dependency-extractor.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/plan-dependency-extractor.js +135 -0
- package/dist/cli/commands/cockpit/plan-dependency-extractor.js.map +1 -0
- package/dist/cli/commands/cockpit/queue.d.ts +85 -0
- package/dist/cli/commands/cockpit/queue.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/queue.js +438 -0
- package/dist/cli/commands/cockpit/queue.js.map +1 -0
- package/dist/cli/commands/cockpit/resolver.d.ts +70 -0
- package/dist/cli/commands/cockpit/resolver.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/resolver.js +117 -0
- package/dist/cli/commands/cockpit/resolver.js.map +1 -0
- package/dist/cli/commands/cockpit/resume.d.ts +38 -0
- package/dist/cli/commands/cockpit/resume.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/resume.js +167 -0
- package/dist/cli/commands/cockpit/resume.js.map +1 -0
- package/dist/cli/commands/cockpit/shared/classify-issue.d.ts +12 -0
- package/dist/cli/commands/cockpit/shared/classify-issue.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/shared/classify-issue.js +10 -0
- package/dist/cli/commands/cockpit/shared/classify-issue.js.map +1 -0
- package/dist/cli/commands/cockpit/shared/failing-check-json.d.ts +53 -0
- package/dist/cli/commands/cockpit/shared/failing-check-json.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/shared/failing-check-json.js +170 -0
- package/dist/cli/commands/cockpit/shared/failing-check-json.js.map +1 -0
- package/dist/cli/commands/cockpit/shared/identity.d.ts +54 -0
- package/dist/cli/commands/cockpit/shared/identity.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/shared/identity.js +65 -0
- package/dist/cli/commands/cockpit/shared/identity.js.map +1 -0
- package/dist/cli/commands/cockpit/shared/is-done-snapshot.d.ts +16 -0
- package/dist/cli/commands/cockpit/shared/is-done-snapshot.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/shared/is-done-snapshot.js +17 -0
- package/dist/cli/commands/cockpit/shared/is-done-snapshot.js.map +1 -0
- package/dist/cli/commands/cockpit/shared/pagination.d.ts +17 -0
- package/dist/cli/commands/cockpit/shared/pagination.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/shared/pagination.js +50 -0
- package/dist/cli/commands/cockpit/shared/pagination.js.map +1 -0
- package/dist/cli/commands/cockpit/shared/pr-link.d.ts +8 -0
- package/dist/cli/commands/cockpit/shared/pr-link.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/shared/pr-link.js +15 -0
- package/dist/cli/commands/cockpit/shared/pr-link.js.map +1 -0
- package/dist/cli/commands/cockpit/shared/required-checks.d.ts +17 -0
- package/dist/cli/commands/cockpit/shared/required-checks.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/shared/required-checks.js +38 -0
- package/dist/cli/commands/cockpit/shared/required-checks.js.map +1 -0
- package/dist/cli/commands/cockpit/shared/review-context-json.d.ts +29 -0
- package/dist/cli/commands/cockpit/shared/review-context-json.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/shared/review-context-json.js +28 -0
- package/dist/cli/commands/cockpit/shared/review-context-json.js.map +1 -0
- package/dist/cli/commands/cockpit/status/color.d.ts +11 -0
- package/dist/cli/commands/cockpit/status/color.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/status/color.js +33 -0
- package/dist/cli/commands/cockpit/status/color.js.map +1 -0
- package/dist/cli/commands/cockpit/status/group.d.ts +8 -0
- package/dist/cli/commands/cockpit/status/group.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/status/group.js +35 -0
- package/dist/cli/commands/cockpit/status/group.js.map +1 -0
- package/dist/cli/commands/cockpit/status/render-table.d.ts +24 -0
- package/dist/cli/commands/cockpit/status/render-table.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/status/render-table.js +71 -0
- package/dist/cli/commands/cockpit/status/render-table.js.map +1 -0
- package/dist/cli/commands/cockpit/status/row.d.ts +18 -0
- package/dist/cli/commands/cockpit/status/row.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/status/row.js +17 -0
- package/dist/cli/commands/cockpit/status/row.js.map +1 -0
- package/dist/cli/commands/cockpit/status.d.ts +18 -0
- package/dist/cli/commands/cockpit/status.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/status.js +138 -0
- package/dist/cli/commands/cockpit/status.js.map +1 -0
- package/dist/cli/commands/cockpit/watch/actionable.d.ts +15 -0
- package/dist/cli/commands/cockpit/watch/actionable.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch/actionable.js +32 -0
- package/dist/cli/commands/cockpit/watch/actionable.js.map +1 -0
- package/dist/cli/commands/cockpit/watch/aggregate-emit.d.ts +107 -0
- package/dist/cli/commands/cockpit/watch/aggregate-emit.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch/aggregate-emit.js +41 -0
- package/dist/cli/commands/cockpit/watch/aggregate-emit.js.map +1 -0
- package/dist/cli/commands/cockpit/watch/aggregate.d.ts +25 -0
- package/dist/cli/commands/cockpit/watch/aggregate.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch/aggregate.js +67 -0
- package/dist/cli/commands/cockpit/watch/aggregate.js.map +1 -0
- package/dist/cli/commands/cockpit/watch/check-rollup.d.ts +9 -0
- package/dist/cli/commands/cockpit/watch/check-rollup.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch/check-rollup.js +22 -0
- package/dist/cli/commands/cockpit/watch/check-rollup.js.map +1 -0
- package/dist/cli/commands/cockpit/watch/diff.d.ts +29 -0
- package/dist/cli/commands/cockpit/watch/diff.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch/diff.js +85 -0
- package/dist/cli/commands/cockpit/watch/diff.js.map +1 -0
- package/dist/cli/commands/cockpit/watch/emit.d.ts +58 -0
- package/dist/cli/commands/cockpit/watch/emit.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch/emit.js +30 -0
- package/dist/cli/commands/cockpit/watch/emit.js.map +1 -0
- package/dist/cli/commands/cockpit/watch/poll-loop.d.ts +29 -0
- package/dist/cli/commands/cockpit/watch/poll-loop.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch/poll-loop.js +81 -0
- package/dist/cli/commands/cockpit/watch/poll-loop.js.map +1 -0
- package/dist/cli/commands/cockpit/watch/pr-state.d.ts +17 -0
- package/dist/cli/commands/cockpit/watch/pr-state.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch/pr-state.js +33 -0
- package/dist/cli/commands/cockpit/watch/pr-state.js.map +1 -0
- package/dist/cli/commands/cockpit/watch/snapshot.d.ts +33 -0
- package/dist/cli/commands/cockpit/watch/snapshot.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch/snapshot.js +30 -0
- package/dist/cli/commands/cockpit/watch/snapshot.js.map +1 -0
- package/dist/cli/commands/cockpit/watch/stream-event.d.ts +82 -0
- package/dist/cli/commands/cockpit/watch/stream-event.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch/stream-event.js +9 -0
- package/dist/cli/commands/cockpit/watch/stream-event.js.map +1 -0
- package/dist/cli/commands/cockpit/watch.d.ts +22 -0
- package/dist/cli/commands/cockpit/watch.d.ts.map +1 -0
- package/dist/cli/commands/cockpit/watch.js +186 -0
- package/dist/cli/commands/cockpit/watch.js.map +1 -0
- package/dist/cli/commands/setup/build.d.ts.map +1 -1
- package/dist/cli/commands/setup/build.js +59 -0
- package/dist/cli/commands/setup/build.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +11 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-done-snapshot.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/shared/is-done-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAEtD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issue state: closed dominates any label-derived actionability tier.
|
|
3
|
+
*
|
|
4
|
+
* A closed issue carrying `completed:validate` (or any other actionable-label
|
|
5
|
+
* residue) is done, not actionable. This helper is the single decision
|
|
6
|
+
* surface: both `isActionableSnapshot` (watch) and the status renderer route
|
|
7
|
+
* through it. If you need to expand actionability tiers, extend
|
|
8
|
+
* `isActionableSnapshot` — do not add a second done-gate.
|
|
9
|
+
*
|
|
10
|
+
* The predicate reads raw `snap.state`, NOT `snap.classified.state`. The
|
|
11
|
+
* classified `'terminal'` tier is exactly the label residue this fix stops
|
|
12
|
+
* trusting; reading it would perpetuate the bug pattern (#873).
|
|
13
|
+
*/
|
|
14
|
+
export function isDoneSnapshot(snap) {
|
|
15
|
+
return snap.state === 'CLOSED';
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=is-done-snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-done-snapshot.js","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/shared/is-done-snapshot.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,cAAc,CAAC,IAAc;IAC3C,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GhWrapper, Issue } from '@generacy-ai/cockpit';
|
|
2
|
+
export interface ListAllIssuesOptions {
|
|
3
|
+
pageSize?: number;
|
|
4
|
+
safetyCap?: number;
|
|
5
|
+
repo?: string;
|
|
6
|
+
logger?: {
|
|
7
|
+
warn: (msg: string) => void;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Loop `gh.listIssues` until a page returns fewer items than requested.
|
|
12
|
+
* Advances via a `created:<ISO` predicate cursor (R4).
|
|
13
|
+
* Emits a single stderr warning per call when the cumulative result exceeds
|
|
14
|
+
* `safetyCap`; never truncates.
|
|
15
|
+
*/
|
|
16
|
+
export declare function listAllIssues(gh: GhWrapper, query: string, opts?: ListAllIssuesOptions): Promise<Issue[]>;
|
|
17
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/shared/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAqB,MAAM,sBAAsB,CAAC;AAEhF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;CAC1C;AAKD;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,EAAE,EAAE,SAAS,EACb,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,oBAAyB,GAC9B,OAAO,CAAC,KAAK,EAAE,CAAC,CAuClB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const DEFAULT_PAGE_SIZE = 100;
|
|
2
|
+
const DEFAULT_SAFETY_CAP = 1000;
|
|
3
|
+
/**
|
|
4
|
+
* Loop `gh.listIssues` until a page returns fewer items than requested.
|
|
5
|
+
* Advances via a `created:<ISO` predicate cursor (R4).
|
|
6
|
+
* Emits a single stderr warning per call when the cumulative result exceeds
|
|
7
|
+
* `safetyCap`; never truncates.
|
|
8
|
+
*/
|
|
9
|
+
export async function listAllIssues(gh, query, opts = {}) {
|
|
10
|
+
const pageSize = opts.pageSize ?? DEFAULT_PAGE_SIZE;
|
|
11
|
+
const safetyCap = opts.safetyCap ?? DEFAULT_SAFETY_CAP;
|
|
12
|
+
const logger = opts.logger;
|
|
13
|
+
const out = [];
|
|
14
|
+
const seen = new Set();
|
|
15
|
+
let cursorQuery = query;
|
|
16
|
+
let warned = false;
|
|
17
|
+
for (;;) {
|
|
18
|
+
const listOpts = { limit: pageSize };
|
|
19
|
+
if (opts.repo != null)
|
|
20
|
+
listOpts.repo = opts.repo;
|
|
21
|
+
const page = await gh.listIssues(cursorQuery, listOpts);
|
|
22
|
+
let newCount = 0;
|
|
23
|
+
let minCreated;
|
|
24
|
+
for (const issue of page) {
|
|
25
|
+
if (seen.has(issue.number))
|
|
26
|
+
continue;
|
|
27
|
+
seen.add(issue.number);
|
|
28
|
+
out.push(issue);
|
|
29
|
+
newCount += 1;
|
|
30
|
+
if (issue.createdAt != null && issue.createdAt.length > 0) {
|
|
31
|
+
if (minCreated == null || issue.createdAt < minCreated) {
|
|
32
|
+
minCreated = issue.createdAt;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (!warned && out.length > safetyCap && logger != null) {
|
|
37
|
+
logger.warn(`cockpit: poll cycle exceeded ${safetyCap} items; consider narrower epic scoping`);
|
|
38
|
+
warned = true;
|
|
39
|
+
}
|
|
40
|
+
if (page.length < pageSize)
|
|
41
|
+
break;
|
|
42
|
+
if (newCount === 0)
|
|
43
|
+
break;
|
|
44
|
+
if (minCreated == null)
|
|
45
|
+
break;
|
|
46
|
+
cursorQuery = `${query} created:<${minCreated}`;
|
|
47
|
+
}
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/shared/pagination.ts"],"names":[],"mappings":"AASA,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,EAAa,EACb,KAAa,EACb,OAA6B,EAAE;IAE/B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,iBAAiB,CAAC;IACpD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,kBAAkB,CAAC;IACvD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B,MAAM,GAAG,GAAY,EAAE,CAAC;IACxB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,SAAS,CAAC;QACR,MAAM,QAAQ,GAAsB,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;QACxD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI;YAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACjD,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QACxD,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,IAAI,UAA8B,CAAC;QACnC,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;YACzB,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC;gBAAE,SAAS;YACrC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACvB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChB,QAAQ,IAAI,CAAC,CAAC;YACd,IAAI,KAAK,CAAC,SAAS,IAAI,IAAI,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC1D,IAAI,UAAU,IAAI,IAAI,IAAI,KAAK,CAAC,SAAS,GAAG,UAAU,EAAE,CAAC;oBACvD,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC;gBAC/B,CAAC;YACH,CAAC;QACH,CAAC;QACD,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,SAAS,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACxD,MAAM,CAAC,IAAI,CACT,gCAAgC,SAAS,wCAAwC,CAClF,CAAC;YACF,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,GAAG,QAAQ;YAAE,MAAM;QAClC,IAAI,QAAQ,KAAK,CAAC;YAAE,MAAM;QAC1B,IAAI,UAAU,IAAI,IAAI;YAAE,MAAM;QAC9B,WAAW,GAAG,GAAG,KAAK,aAAa,UAAU,EAAE,CAAC;IAClD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Issue } from '@generacy-ai/cockpit';
|
|
2
|
+
/**
|
|
3
|
+
* Extract the first linked PR URL from an issue's body. Used by `status`'s row
|
|
4
|
+
* builder when `kind === 'issue'` and a `resolveIssueToPR` round-trip is not
|
|
5
|
+
* wanted (or has already returned null).
|
|
6
|
+
*/
|
|
7
|
+
export declare function extractPrUrl(issue: Pick<Issue, 'body' | 'url'>): string | null;
|
|
8
|
+
//# sourceMappingURL=pr-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-link.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/shared/pr-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,GAAG,MAAM,GAAG,IAAI,CAO9E"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const PR_URL_RE = /https?:\/\/github\.com\/[^\s)\]]+\/pull\/\d+/;
|
|
2
|
+
/**
|
|
3
|
+
* Extract the first linked PR URL from an issue's body. Used by `status`'s row
|
|
4
|
+
* builder when `kind === 'issue'` and a `resolveIssueToPR` round-trip is not
|
|
5
|
+
* wanted (or has already returned null).
|
|
6
|
+
*/
|
|
7
|
+
export function extractPrUrl(issue) {
|
|
8
|
+
if (issue.url != null && /\/pull\/\d+/.test(issue.url)) {
|
|
9
|
+
return issue.url;
|
|
10
|
+
}
|
|
11
|
+
const body = issue.body ?? '';
|
|
12
|
+
const m = body.match(PR_URL_RE);
|
|
13
|
+
return m != null ? m[0] : null;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=pr-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-link.js","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/shared/pr-link.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,8CAA8C,CAAC;AAEjE;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAkC;IAC7D,IAAI,KAAK,CAAC,GAAG,IAAI,IAAI,IAAI,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACvD,OAAO,KAAK,CAAC,GAAG,CAAC;IACnB,CAAC;IACD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;IAC9B,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CheckRunSummary, RequiredChecksResult } from '@generacy-ai/cockpit';
|
|
2
|
+
export type FailingCheckState = 'FAILURE' | 'PENDING' | 'NEUTRAL' | 'SKIPPED' | 'CANCELLED' | 'MISSING';
|
|
3
|
+
export interface FailingCheck {
|
|
4
|
+
name: string;
|
|
5
|
+
state: FailingCheckState;
|
|
6
|
+
url?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ClassifyChecksInput {
|
|
9
|
+
required: RequiredChecksResult;
|
|
10
|
+
actual: CheckRunSummary[];
|
|
11
|
+
}
|
|
12
|
+
export interface ClassifyChecksResult {
|
|
13
|
+
failingChecks: FailingCheck[];
|
|
14
|
+
ok: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function classifyChecks(input: ClassifyChecksInput): ClassifyChecksResult;
|
|
17
|
+
//# sourceMappingURL=required-checks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-checks.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/shared/required-checks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,CAAC;AAEd,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,iBAAiB,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,EAAE,EAAE,OAAO,CAAC;CACb;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,mBAAmB,GACzB,oBAAoB,CAqCtB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export function classifyChecks(input) {
|
|
2
|
+
const { required, actual } = input;
|
|
3
|
+
const failing = [];
|
|
4
|
+
if (required.source === 'branch-protection') {
|
|
5
|
+
const actualByName = new Map();
|
|
6
|
+
for (const check of actual) {
|
|
7
|
+
actualByName.set(check.name, check);
|
|
8
|
+
}
|
|
9
|
+
const requiredNames = required.names ?? [];
|
|
10
|
+
for (const name of requiredNames) {
|
|
11
|
+
const found = actualByName.get(name);
|
|
12
|
+
if (!found) {
|
|
13
|
+
failing.push({ name, state: 'MISSING' });
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
if (found.state !== 'SUCCESS') {
|
|
17
|
+
failing.push({
|
|
18
|
+
name: found.name,
|
|
19
|
+
state: found.state,
|
|
20
|
+
...(found.url != null ? { url: found.url } : {}),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
for (const check of actual) {
|
|
27
|
+
if (check.state !== 'SUCCESS') {
|
|
28
|
+
failing.push({
|
|
29
|
+
name: check.name,
|
|
30
|
+
state: check.state,
|
|
31
|
+
...(check.url != null ? { url: check.url } : {}),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return { failingChecks: failing, ok: failing.length === 0 };
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=required-checks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-checks.js","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/shared/required-checks.ts"],"names":[],"mappings":"AA6BA,MAAM,UAAU,cAAc,CAC5B,KAA0B;IAE1B,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACnC,MAAM,OAAO,GAAmB,EAAE,CAAC;IAEnC,IAAI,QAAQ,CAAC,MAAM,KAAK,mBAAmB,EAAE,CAAC;QAC5C,MAAM,YAAY,GAAG,IAAI,GAAG,EAA2B,CAAC;QACxD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC;QAC3C,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;YACjC,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;gBACzC,SAAS;YACX,CAAC;YACD,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC9B,OAAO,CAAC,IAAI,CAAC;oBACX,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,KAAK,EAAE,KAAK,CAAC,KAA0B;oBACvC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACjD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;SAAM,CAAC;QACN,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC9B,OAAO,CAAC,IAAI,CAAC;oBACX,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,KAAK,EAAE,KAAK,CAAC,KAA0B;oBACvC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACjD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CheckRunSummary, PullRequestDetail } from '@generacy-ai/cockpit';
|
|
2
|
+
export declare const DIFF_BYTE_CAP: number;
|
|
3
|
+
export interface ReviewContextPayload {
|
|
4
|
+
pr: {
|
|
5
|
+
number: number;
|
|
6
|
+
title: string;
|
|
7
|
+
url: string;
|
|
8
|
+
base: string;
|
|
9
|
+
head: string;
|
|
10
|
+
body: string;
|
|
11
|
+
author: string | null;
|
|
12
|
+
state: 'OPEN' | 'CLOSED' | 'MERGED';
|
|
13
|
+
draft: boolean;
|
|
14
|
+
};
|
|
15
|
+
diff: string;
|
|
16
|
+
diffTruncated: boolean;
|
|
17
|
+
checks: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
state: 'SUCCESS' | 'FAILURE' | 'PENDING' | 'NEUTRAL' | 'SKIPPED' | 'CANCELLED';
|
|
20
|
+
url?: string;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
export interface BuildReviewContextInput {
|
|
24
|
+
pr: PullRequestDetail;
|
|
25
|
+
checks: CheckRunSummary[];
|
|
26
|
+
}
|
|
27
|
+
export declare function buildReviewContextPayload(input: BuildReviewContextInput): ReviewContextPayload;
|
|
28
|
+
export declare function serializeReviewContextJson(payload: ReviewContextPayload): string;
|
|
29
|
+
//# sourceMappingURL=review-context-json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-context-json.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/shared/review-context-json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,aAAa,QAAa,CAAC;AAExC,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE;QACF,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;QACpC,KAAK,EAAE,OAAO,CAAC;KAChB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;QAC/E,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,iBAAiB,CAAC;IACtB,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,uBAAuB,GAC7B,oBAAoB,CAsBtB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAER"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const DIFF_BYTE_CAP = 256 * 1024;
|
|
2
|
+
export function buildReviewContextPayload(input) {
|
|
3
|
+
const { pr, checks } = input;
|
|
4
|
+
return {
|
|
5
|
+
pr: {
|
|
6
|
+
number: pr.number,
|
|
7
|
+
title: pr.title,
|
|
8
|
+
url: pr.url,
|
|
9
|
+
base: pr.base,
|
|
10
|
+
head: pr.head,
|
|
11
|
+
body: pr.body,
|
|
12
|
+
author: pr.author?.login ?? null,
|
|
13
|
+
state: pr.state,
|
|
14
|
+
draft: pr.draft,
|
|
15
|
+
},
|
|
16
|
+
diff: pr.diff,
|
|
17
|
+
diffTruncated: pr.diffTruncated,
|
|
18
|
+
checks: checks.map((c) => ({
|
|
19
|
+
name: c.name,
|
|
20
|
+
state: c.state,
|
|
21
|
+
...(c.url != null ? { url: c.url } : {}),
|
|
22
|
+
})),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function serializeReviewContextJson(payload) {
|
|
26
|
+
return JSON.stringify(payload) + '\n';
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=review-context-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-context-json.js","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/shared/review-context-json.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;AA4BxC,MAAM,UAAU,yBAAyB,CACvC,KAA8B;IAE9B,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC7B,OAAO;QACL,EAAE,EAAE;YACF,MAAM,EAAE,EAAE,CAAC,MAAM;YACjB,KAAK,EAAE,EAAE,CAAC,KAAK;YACf,GAAG,EAAE,EAAE,CAAC,GAAG;YACX,IAAI,EAAE,EAAE,CAAC,IAAI;YACb,IAAI,EAAE,EAAE,CAAC,IAAI;YACb,IAAI,EAAE,EAAE,CAAC,IAAI;YACb,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,IAAI,IAAI;YAChC,KAAK,EAAE,EAAE,CAAC,KAAK;YACf,KAAK,EAAE,EAAE,CAAC,KAAK;SAChB;QACD,IAAI,EAAE,EAAE,CAAC,IAAI;QACb,aAAa,EAAE,EAAE,CAAC,aAAa;QAC/B,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACzB,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACzC,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,OAA6B;IAE7B,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CockpitState } from '@generacy-ai/cockpit';
|
|
2
|
+
export type ChalkFn = (s: string) => string;
|
|
3
|
+
export interface Colorizer {
|
|
4
|
+
state(s: string, state: CockpitState): string;
|
|
5
|
+
doneMerged(s: string): string;
|
|
6
|
+
doneNotPlanned(s: string): string;
|
|
7
|
+
}
|
|
8
|
+
export declare const STATE_COLOR: Record<CockpitState, ChalkFn>;
|
|
9
|
+
export declare const chalkColorizer: Colorizer;
|
|
10
|
+
export declare const identityColorizer: Colorizer;
|
|
11
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/status/color.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;AAE5C,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,CAAC;IAC9C,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACnC;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,CAQrD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAU5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SAU/B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
export const STATE_COLOR = {
|
|
3
|
+
terminal: chalk.green,
|
|
4
|
+
error: chalk.red,
|
|
5
|
+
waiting: chalk.yellow,
|
|
6
|
+
active: chalk.cyan,
|
|
7
|
+
pending: chalk.dim,
|
|
8
|
+
'stage-complete': chalk.dim,
|
|
9
|
+
unknown: chalk.dim,
|
|
10
|
+
};
|
|
11
|
+
export const chalkColorizer = {
|
|
12
|
+
state(s, state) {
|
|
13
|
+
return STATE_COLOR[state](s);
|
|
14
|
+
},
|
|
15
|
+
doneMerged(s) {
|
|
16
|
+
return chalk.green(s);
|
|
17
|
+
},
|
|
18
|
+
doneNotPlanned(s) {
|
|
19
|
+
return chalk.gray(s);
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
export const identityColorizer = {
|
|
23
|
+
state(s) {
|
|
24
|
+
return s;
|
|
25
|
+
},
|
|
26
|
+
doneMerged(s) {
|
|
27
|
+
return s;
|
|
28
|
+
},
|
|
29
|
+
doneNotPlanned(s) {
|
|
30
|
+
return s;
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.js","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/status/color.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,CAAC,MAAM,WAAW,GAAkC;IACxD,QAAQ,EAAE,KAAK,CAAC,KAAK;IACrB,KAAK,EAAE,KAAK,CAAC,GAAG;IAChB,OAAO,EAAE,KAAK,CAAC,MAAM;IACrB,MAAM,EAAE,KAAK,CAAC,IAAI;IAClB,OAAO,EAAE,KAAK,CAAC,GAAG;IAClB,gBAAgB,EAAE,KAAK,CAAC,GAAG;IAC3B,OAAO,EAAE,KAAK,CAAC,GAAG;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,KAAK,CAAC,CAAC,EAAE,KAAK;QACZ,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;IACD,UAAU,CAAC,CAAC;QACV,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC;IACD,cAAc,CAAC,CAAC;QACd,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,KAAK,CAAC,CAAC;QACL,OAAO,CAAC,CAAC;IACX,CAAC;IACD,UAAU,CAAC,CAAC;QACV,OAAO,CAAC,CAAC;IACX,CAAC;IACD,cAAc,CAAC,CAAC;QACd,OAAO,CAAC,CAAC;IACX,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedPhase } from '@generacy-ai/cockpit';
|
|
2
|
+
import type { StatusRow } from './row.js';
|
|
3
|
+
export interface RowGroup {
|
|
4
|
+
header: string;
|
|
5
|
+
rows: StatusRow[];
|
|
6
|
+
}
|
|
7
|
+
export declare function groupRows(rows: StatusRow[], phases: ParsedPhase[], _epicOwnerRepo: string): RowGroup[];
|
|
8
|
+
//# sourceMappingURL=group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/status/group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB;AAWD,wBAAgB,SAAS,CACvB,IAAI,EAAE,SAAS,EAAE,EACjB,MAAM,EAAE,WAAW,EAAE,EACrB,cAAc,EAAE,MAAM,GACrB,QAAQ,EAAE,CA2BZ"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function formatPhaseHeader(phase) {
|
|
2
|
+
if (phase.heading.toLowerCase() === phase.token) {
|
|
3
|
+
return `— ${phase.token.toUpperCase()} —`;
|
|
4
|
+
}
|
|
5
|
+
return `— ${phase.heading} —`;
|
|
6
|
+
}
|
|
7
|
+
const NO_PHASE_HEADER = '— (no phase) —';
|
|
8
|
+
export function groupRows(rows, phases, _epicOwnerRepo) {
|
|
9
|
+
const buckets = new Map();
|
|
10
|
+
for (const row of rows) {
|
|
11
|
+
const bucket = buckets.get(row.phase);
|
|
12
|
+
if (bucket != null)
|
|
13
|
+
bucket.push(row);
|
|
14
|
+
else
|
|
15
|
+
buckets.set(row.phase, [row]);
|
|
16
|
+
}
|
|
17
|
+
const groups = [];
|
|
18
|
+
for (const phase of phases) {
|
|
19
|
+
const bucket = buckets.get(phase.token) ?? [];
|
|
20
|
+
const order = new Map();
|
|
21
|
+
phase.refs.forEach((ref, i) => order.set(`${ref.repo}#${ref.number}`, i));
|
|
22
|
+
const sorted = [...bucket].sort((a, b) => {
|
|
23
|
+
const ka = `${a.repo}#${a.number}`;
|
|
24
|
+
const kb = `${b.repo}#${b.number}`;
|
|
25
|
+
return (order.get(ka) ?? 0) - (order.get(kb) ?? 0);
|
|
26
|
+
});
|
|
27
|
+
groups.push({ header: formatPhaseHeader(phase), rows: sorted });
|
|
28
|
+
}
|
|
29
|
+
const noneBucket = buckets.get(null) ?? [];
|
|
30
|
+
if (noneBucket.length > 0 || phases.length === 0) {
|
|
31
|
+
groups.push({ header: NO_PHASE_HEADER, rows: noneBucket });
|
|
32
|
+
}
|
|
33
|
+
return groups;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.js","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/status/group.ts"],"names":[],"mappings":"AAQA,SAAS,iBAAiB,CAAC,KAAkB;IAC3C,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,KAAK,EAAE,CAAC;QAChD,OAAO,KAAK,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC;IAC5C,CAAC;IACD,OAAO,KAAK,KAAK,CAAC,OAAO,IAAI,CAAC;AAChC,CAAC;AAED,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAEzC,MAAM,UAAU,SAAS,CACvB,IAAiB,EACjB,MAAqB,EACrB,cAAsB;IAEtB,MAAM,OAAO,GAAG,IAAI,GAAG,EAA8B,CAAC;IACtD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtC,IAAI,MAAM,IAAI,IAAI;YAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;;YAChC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,MAAM,GAAe,EAAE,CAAC;IAC9B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;QACxC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAC1E,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;YACnC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;YACnC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC3C,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjD,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Colorizer } from './color.js';
|
|
2
|
+
import type { RowGroup } from './group.js';
|
|
3
|
+
import type { StatusRow } from './row.js';
|
|
4
|
+
export interface StatusEnvelope {
|
|
5
|
+
scope: {
|
|
6
|
+
kind: 'epic';
|
|
7
|
+
owner: string;
|
|
8
|
+
repo: string;
|
|
9
|
+
issue: number;
|
|
10
|
+
};
|
|
11
|
+
rows: StatusRow[];
|
|
12
|
+
}
|
|
13
|
+
export interface RenderOptions {
|
|
14
|
+
tty: boolean;
|
|
15
|
+
json: boolean;
|
|
16
|
+
colorizer: Colorizer;
|
|
17
|
+
}
|
|
18
|
+
export declare function renderTable(groups: RowGroup[], options: RenderOptions): string;
|
|
19
|
+
export declare function renderJsonEnvelope(epic: {
|
|
20
|
+
owner: string;
|
|
21
|
+
repo: string;
|
|
22
|
+
issue: number;
|
|
23
|
+
}, rows: StatusRow[]): string;
|
|
24
|
+
//# sourceMappingURL=render-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-table.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/status/render-table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AA+C1C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACpE,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAW9E;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EACpD,IAAI,EAAE,SAAS,EAAE,GAChB,MAAM,CAWR"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const COL_REPO = 20;
|
|
2
|
+
const COL_NUMBER = 5;
|
|
3
|
+
const COL_STATE = 8;
|
|
4
|
+
const COL_SOURCE_LABEL = 30;
|
|
5
|
+
const COL_PR_NUMBER = 5;
|
|
6
|
+
const COL_CHECKS = 8;
|
|
7
|
+
const COL_TITLE = 60;
|
|
8
|
+
function truncate(s, max) {
|
|
9
|
+
if (s.length <= max)
|
|
10
|
+
return s;
|
|
11
|
+
return `${s.slice(0, max - 1)}…`;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Renders a single row. Closed rows swap the state + source columns to convey
|
|
15
|
+
* "done" per `data-model.md`. The invariant carrier is `isDoneSnapshot`
|
|
16
|
+
* (`shared/is-done-snapshot.ts`) — the branch below is the single render-layer
|
|
17
|
+
* consumer of `StatusRow.issueState`.
|
|
18
|
+
*
|
|
19
|
+
* @see isDoneSnapshot
|
|
20
|
+
*/
|
|
21
|
+
function fmtRow(row, colorizer) {
|
|
22
|
+
const repoCol = row.repo.padEnd(COL_REPO);
|
|
23
|
+
const numCol = `#${String(row.number).padStart(COL_NUMBER)}`;
|
|
24
|
+
let stateCol;
|
|
25
|
+
let sourceCol;
|
|
26
|
+
if (row.issueState === 'CLOSED') {
|
|
27
|
+
if (row.stateReason === 'NOT_PLANNED') {
|
|
28
|
+
stateCol = colorizer.doneNotPlanned('✗ closed'.padEnd(COL_STATE));
|
|
29
|
+
sourceCol = colorizer.doneNotPlanned('(not planned)'.padEnd(COL_SOURCE_LABEL));
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
stateCol = colorizer.doneMerged('✓ merged'.padEnd(COL_STATE));
|
|
33
|
+
sourceCol = colorizer.doneMerged('merged/closed'.padEnd(COL_SOURCE_LABEL));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
const stateRaw = row.state.padEnd(COL_STATE);
|
|
38
|
+
stateCol = colorizer.state(stateRaw, row.state);
|
|
39
|
+
sourceCol = row.sourceLabel.padEnd(COL_SOURCE_LABEL);
|
|
40
|
+
}
|
|
41
|
+
const prCol = `PR ${row.prNumber == null ? '-'.padStart(COL_PR_NUMBER) : String(row.prNumber).padStart(COL_PR_NUMBER)}`;
|
|
42
|
+
const checksCol = row.checks.padEnd(COL_CHECKS);
|
|
43
|
+
const titleCol = truncate(row.title, COL_TITLE);
|
|
44
|
+
return `${repoCol} ${numCol} ${stateCol} ${sourceCol} ${prCol} ${checksCol} ${titleCol}`;
|
|
45
|
+
}
|
|
46
|
+
export function renderTable(groups, options) {
|
|
47
|
+
const lines = [];
|
|
48
|
+
for (let i = 0; i < groups.length; i++) {
|
|
49
|
+
const group = groups[i];
|
|
50
|
+
if (i > 0)
|
|
51
|
+
lines.push('');
|
|
52
|
+
lines.push(group.header);
|
|
53
|
+
for (const row of group.rows) {
|
|
54
|
+
lines.push(fmtRow(row, options.colorizer));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return lines.join('\n');
|
|
58
|
+
}
|
|
59
|
+
export function renderJsonEnvelope(epic, rows) {
|
|
60
|
+
const envelope = {
|
|
61
|
+
scope: {
|
|
62
|
+
kind: 'epic',
|
|
63
|
+
owner: epic.owner,
|
|
64
|
+
repo: epic.repo,
|
|
65
|
+
issue: epic.issue,
|
|
66
|
+
},
|
|
67
|
+
rows,
|
|
68
|
+
};
|
|
69
|
+
return JSON.stringify(envelope);
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=render-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-table.js","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/status/render-table.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Issue, CockpitState } from '@generacy-ai/cockpit';
|
|
2
|
+
import type { ClassifiedIssue } from '../shared/classify-issue.js';
|
|
3
|
+
export interface StatusRow {
|
|
4
|
+
repo: string;
|
|
5
|
+
kind: 'issue' | 'pr';
|
|
6
|
+
number: number;
|
|
7
|
+
title: string;
|
|
8
|
+
state: CockpitState;
|
|
9
|
+
sourceLabel: string;
|
|
10
|
+
issueState: 'OPEN' | 'CLOSED';
|
|
11
|
+
stateReason: 'COMPLETED' | 'NOT_PLANNED' | null;
|
|
12
|
+
prNumber: number | null;
|
|
13
|
+
checks: 'pending' | 'success' | 'failure' | 'none' | 'error';
|
|
14
|
+
url: string;
|
|
15
|
+
phase: string | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function buildStatusRow(repo: string, issue: Pick<Issue, 'number' | 'title' | 'url' | 'state' | 'stateReason'>, classified: ClassifiedIssue, kind: 'issue' | 'pr', prNumber: number | null, checks: 'pending' | 'success' | 'failure' | 'none' | 'error', phase: string | null): StatusRow;
|
|
18
|
+
//# sourceMappingURL=row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/status/row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,YAAY,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC9B,WAAW,EAAE,WAAW,GAAG,aAAa,GAAG,IAAI,CAAC;IAChD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAC7D,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,aAAa,CAAC,EACxE,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,EAC5D,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,SAAS,CAeX"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function buildStatusRow(repo, issue, classified, kind, prNumber, checks, phase) {
|
|
2
|
+
return {
|
|
3
|
+
repo,
|
|
4
|
+
kind,
|
|
5
|
+
number: issue.number,
|
|
6
|
+
title: issue.title,
|
|
7
|
+
state: classified.state,
|
|
8
|
+
sourceLabel: classified.sourceLabel,
|
|
9
|
+
issueState: issue.state,
|
|
10
|
+
stateReason: issue.stateReason,
|
|
11
|
+
prNumber,
|
|
12
|
+
checks,
|
|
13
|
+
url: issue.url,
|
|
14
|
+
phase,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row.js","sourceRoot":"","sources":["../../../../../src/cli/commands/cockpit/status/row.ts"],"names":[],"mappings":"AAkBA,MAAM,UAAU,cAAc,CAC5B,IAAY,EACZ,KAAwE,EACxE,UAA2B,EAC3B,IAAoB,EACpB,QAAuB,EACvB,MAA4D,EAC5D,KAAoB;IAEpB,OAAO;QACL,IAAI;QACJ,IAAI;QACJ,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,UAAU,EAAE,KAAK,CAAC,KAAK;QACvB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,QAAQ;QACR,MAAM;QACN,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { type CommandRunner, type GhWrapper } from '@generacy-ai/cockpit';
|
|
3
|
+
interface StatusCliOptions {
|
|
4
|
+
json?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface StatusDeps {
|
|
7
|
+
gh?: GhWrapper;
|
|
8
|
+
runner?: CommandRunner;
|
|
9
|
+
stdout?: (line: string) => void;
|
|
10
|
+
stderr?: (line: string) => void;
|
|
11
|
+
logger?: {
|
|
12
|
+
warn: (msg: string) => void;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare function runStatus(epicRef: string | undefined, options: StatusCliOptions, deps?: StatusDeps): Promise<number>;
|
|
16
|
+
export declare function statusCommand(): Command;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/cockpit/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,SAAS,EAEf,MAAM,sBAAsB,CAAC;AAU9B,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAOD,MAAM,WAAW,UAAU;IACzB,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;CAC1C;AAED,wBAAsB,SAAS,CAC7B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,gBAAgB,EACzB,IAAI,GAAE,UAAe,GACpB,OAAO,CAAC,MAAM,CAAC,CA+HjB;AAED,wBAAgB,aAAa,IAAI,OAAO,CAYvC"}
|