@lumy-pack/line-lore 0.0.1 → 0.0.3
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 +471 -41
- package/dist/cache/file-cache.d.ts +3 -0
- package/dist/cache/index.d.ts +2 -0
- package/dist/cache/sharded-cache.d.ts +33 -0
- package/dist/cli.mjs +829 -504
- package/dist/components/TraceResult.d.ts +1 -1
- package/dist/core/blame/blame.d.ts +1 -1
- package/dist/core/core.d.ts +2 -1
- package/dist/core/patch-id/patch-id.d.ts +7 -2
- package/dist/core/pr-lookup/pr-lookup.d.ts +7 -1
- package/dist/git/executor.d.ts +1 -0
- package/dist/git/index.d.ts +1 -1
- package/dist/index.cjs +762 -448
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +762 -450
- package/dist/platform/github/github-adapter.d.ts +4 -0
- package/dist/platform/github/github-enterprise-adapter.d.ts +1 -0
- package/dist/platform/gitlab/gitlab-adapter.d.ts +4 -0
- package/dist/platform/gitlab/gitlab-self-hosted-adapter.d.ts +1 -0
- package/dist/platform/platform.d.ts +1 -1
- package/dist/platform/scheduler/request-scheduler.d.ts +0 -5
- package/dist/types/graph.d.ts +2 -1
- package/dist/types/pipeline.d.ts +0 -1
- package/dist/types/trace.d.ts +5 -11
- package/dist/version.d.ts +5 -1
- package/package.json +3 -1
|
@@ -4,12 +4,16 @@ export declare class GitHubAdapter implements PlatformAdapter {
|
|
|
4
4
|
readonly platform: PlatformAdapter['platform'];
|
|
5
5
|
private readonly scheduler;
|
|
6
6
|
private readonly hostname;
|
|
7
|
+
private defaultBranchCache;
|
|
8
|
+
private readonly remoteName;
|
|
7
9
|
constructor(options?: {
|
|
8
10
|
hostname?: string;
|
|
9
11
|
scheduler?: RequestScheduler;
|
|
12
|
+
remoteName?: string;
|
|
10
13
|
});
|
|
11
14
|
checkAuth(): Promise<AuthStatus>;
|
|
12
15
|
getPRForCommit(sha: string): Promise<PRInfo | null>;
|
|
16
|
+
private detectDefaultBranch;
|
|
13
17
|
getPRCommits(prNumber: number): Promise<string[]>;
|
|
14
18
|
getLinkedIssues(prNumber: number): Promise<IssueInfo[]>;
|
|
15
19
|
getLinkedPRs(issueNumber: number): Promise<PRInfo[]>;
|
|
@@ -4,12 +4,16 @@ export declare class GitLabAdapter implements PlatformAdapter {
|
|
|
4
4
|
readonly platform: PlatformAdapter['platform'];
|
|
5
5
|
private readonly scheduler;
|
|
6
6
|
private readonly hostname;
|
|
7
|
+
private defaultBranchCache;
|
|
8
|
+
private readonly remoteName;
|
|
7
9
|
constructor(options?: {
|
|
8
10
|
hostname?: string;
|
|
9
11
|
scheduler?: RequestScheduler;
|
|
12
|
+
remoteName?: string;
|
|
10
13
|
});
|
|
11
14
|
checkAuth(): Promise<AuthStatus>;
|
|
12
15
|
getPRForCommit(sha: string): Promise<PRInfo | null>;
|
|
16
|
+
private detectDefaultBranch;
|
|
13
17
|
getPRCommits(prNumber: number): Promise<string[]>;
|
|
14
18
|
getLinkedIssues(prNumber: number): Promise<IssueInfo[]>;
|
|
15
19
|
getLinkedPRs(issueNumber: number): Promise<PRInfo[]>;
|
|
@@ -6,4 +6,4 @@ export declare function detectPlatformAdapter(options?: {
|
|
|
6
6
|
adapter: PlatformAdapter;
|
|
7
7
|
remote: RemoteInfo;
|
|
8
8
|
}>;
|
|
9
|
-
export declare function createAdapter(remote: RemoteInfo): PlatformAdapter;
|
|
9
|
+
export declare function createAdapter(remote: RemoteInfo, remoteName?: string): PlatformAdapter;
|
|
@@ -5,13 +5,8 @@ export interface SchedulerOptions {
|
|
|
5
5
|
export declare class RequestScheduler {
|
|
6
6
|
private rateLimitInfo;
|
|
7
7
|
private readonly threshold;
|
|
8
|
-
private etagCache;
|
|
9
|
-
private responseCache;
|
|
10
8
|
constructor(options?: SchedulerOptions);
|
|
11
9
|
updateRateLimit(info: RateLimitInfo): void;
|
|
12
10
|
isRateLimited(): boolean;
|
|
13
11
|
getRateLimit(): RateLimitInfo | null;
|
|
14
|
-
setEtag(url: string, etag: string, response: string): void;
|
|
15
|
-
getEtag(url: string): string | null;
|
|
16
|
-
getCachedResponse(url: string): string | null;
|
|
17
12
|
}
|
package/dist/types/graph.d.ts
CHANGED
package/dist/types/pipeline.d.ts
CHANGED
package/dist/types/trace.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface TraceResult {
|
|
|
10
10
|
pr: PRInfo | null;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Options for the trace operation.
|
|
13
|
+
* Options for the trace operation (library API).
|
|
14
14
|
*/
|
|
15
15
|
export interface TraceOptions {
|
|
16
16
|
/** Path to the file to trace */
|
|
@@ -21,18 +21,12 @@ export interface TraceOptions {
|
|
|
21
21
|
endLine?: number;
|
|
22
22
|
/** Git remote name to use for PR lookups (default: 'origin') */
|
|
23
23
|
remote?: string;
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
/** Enable deep trace (squash PR recursive exploration) */
|
|
24
|
+
/** Working directory of the target repository */
|
|
25
|
+
cwd?: string;
|
|
26
|
+
/** Enable deep trace (squash PR recursive exploration, expands patch-id scan) */
|
|
27
27
|
deep?: boolean;
|
|
28
|
-
/** Issue graph traversal depth (0=PR only, 1=issues, 2+=multi-hop) */
|
|
29
|
-
graphDepth?: number;
|
|
30
28
|
/** Disable AST diff analysis */
|
|
31
29
|
noAst?: boolean;
|
|
32
|
-
/** Disable cache */
|
|
30
|
+
/** Disable cache for this invocation */
|
|
33
31
|
noCache?: boolean;
|
|
34
|
-
/** Output format */
|
|
35
|
-
output?: 'human' | 'json' | 'llm';
|
|
36
|
-
/** Suppress output (return PR number only) */
|
|
37
|
-
quiet?: boolean;
|
|
38
32
|
}
|
package/dist/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumy-pack/line-lore",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "CLI tool for tracing code lines to their originating Pull Requests via git blame",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
"version:patch": "yarn version patch"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
+
"@winglet/common-utils": "^0.11.2",
|
|
58
|
+
"@winglet/react-utils": "^0.11.2",
|
|
57
59
|
"commander": "^12.1.0",
|
|
58
60
|
"execa": "^9.5.0",
|
|
59
61
|
"ink": "^5.0.0",
|