Skip to content

Commit 467306e

Browse files
chore(miner): migrate CLI command lib modules to TypeScript (batch 3.2 of 4, Phase 3) (#7387)
Converts plan-store-cli, run-state-cli, governor-ledger-cli, purge-cli, event-ledger-cli, and claim-ledger-cli (plus their hand-maintained .d.ts siblings) from .js to real .ts, using the in-place-emit build pipeline Phase 1 (#7299) already wired up. No behavior change; existing tests continue to pass unmodified against the compiled output, and each converted module is covered to 100% of its statements/branches/functions/lines.
1 parent 32e0998 commit 467306e

23 files changed

Lines changed: 3126 additions & 1313 deletions
Lines changed: 37 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,38 @@
11
import type { ClaimEntry, ClaimLedger, ClaimStatus } from "./claim-ledger.js";
2-
3-
export type ParsedClaimClaimArgs =
4-
| {
5-
repoFullName: string;
6-
issueNumber: number;
7-
note: string | undefined;
8-
dryRun: boolean;
9-
json: boolean;
10-
apiBaseUrl: string | undefined;
11-
}
12-
| { error: string };
13-
14-
export type ParsedClaimReleaseArgs =
15-
| {
16-
repoFullName: string;
17-
issueNumber: number;
18-
dryRun: boolean;
19-
json: boolean;
20-
apiBaseUrl: string | undefined;
21-
}
22-
| { error: string };
23-
24-
export type ParsedClaimListArgs =
25-
| {
26-
json: boolean;
27-
repoFullName: string | null;
28-
status: ClaimStatus | null;
29-
}
30-
| { error: string };
31-
32-
export function parseClaimClaimArgs(args: string[]): ParsedClaimClaimArgs;
33-
34-
export function parseClaimReleaseArgs(args: string[]): ParsedClaimReleaseArgs;
35-
36-
export function parseClaimListArgs(args: string[]): ParsedClaimListArgs;
37-
38-
export function renderClaimsTable(entries: ClaimEntry[]): string;
39-
40-
export function runClaimClaim(
41-
args: string[],
42-
options?: { openClaimLedger?: () => ClaimLedger },
43-
): number;
44-
45-
export function runClaimRelease(
46-
args: string[],
47-
options?: { openClaimLedger?: () => ClaimLedger },
48-
): number;
49-
50-
export function runClaimList(
51-
args: string[],
52-
options?: { openClaimLedger?: () => ClaimLedger },
53-
): number;
54-
55-
export function runClaimCli(
56-
subcommand: string | undefined,
57-
args: string[],
58-
options?: { openClaimLedger?: () => ClaimLedger },
59-
): number;
2+
export type ParsedClaimClaimArgs = {
3+
repoFullName: string;
4+
issueNumber: number;
5+
note: string | undefined;
6+
dryRun: boolean;
7+
json: boolean;
8+
apiBaseUrl: string | undefined;
9+
} | {
10+
error: string;
11+
};
12+
export type ParsedClaimReleaseArgs = {
13+
repoFullName: string;
14+
issueNumber: number;
15+
dryRun: boolean;
16+
json: boolean;
17+
apiBaseUrl: string | undefined;
18+
} | {
19+
error: string;
20+
};
21+
export type ParsedClaimListArgs = {
22+
json: boolean;
23+
repoFullName: string | null;
24+
status: ClaimStatus | null;
25+
} | {
26+
error: string;
27+
};
28+
export type ClaimLedgerCliOptions = {
29+
openClaimLedger?: () => ClaimLedger;
30+
};
31+
export declare function parseClaimClaimArgs(args: string[]): ParsedClaimClaimArgs;
32+
export declare function parseClaimReleaseArgs(args: string[]): ParsedClaimReleaseArgs;
33+
export declare function parseClaimListArgs(args: string[]): ParsedClaimListArgs;
34+
export declare function renderClaimsTable(entries: ClaimEntry[]): string;
35+
export declare function runClaimClaim(args: string[], options?: ClaimLedgerCliOptions): number;
36+
export declare function runClaimRelease(args: string[], options?: ClaimLedgerCliOptions): number;
37+
export declare function runClaimList(args: string[], options?: ClaimLedgerCliOptions): number;
38+
export declare function runClaimCli(subcommand: string | undefined, args: string[], options?: ClaimLedgerCliOptions): number;

0 commit comments

Comments
 (0)