github-search-cli 9.1.0 → 9.2.1
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 +31 -11
- package/bin/ghfind.js +3 -3
- package/completions/ghfind.bash +5 -1
- package/completions/ghfind.fish +2 -0
- package/completions/ghfind.zsh +2 -0
- package/demo.svg +51 -46
- package/dist/{chunk-TUMYR2IC.js → chunk-IVUU2KGR.js} +1 -2
- package/dist/cli.js +1014 -238
- package/dist/{config-DFL44OVL.js → config-GNZOQRTH.js} +1 -1
- package/package.json +2 -4
- package/scripts/postinstall.js +10 -7
- package/src/cli.ts +116 -7
- package/src/config.ts +1 -1
- package/src/help.ts +45 -15
- package/src/init.ts +1 -1
- package/src/package-browser.ts +305 -0
- package/src/package.ts +137 -0
- package/src/search.ts +1 -0
- package/src/themes.ts +60 -36
- package/src/trending.ts +31 -5
- package/src/tui.ts +390 -52
- package/src/types.ts +16 -2
- package/vendor/bun.exe +0 -0
package/src/types.ts
CHANGED
|
@@ -42,6 +42,20 @@ export interface Repo {
|
|
|
42
42
|
score: number; // relevance score returned by GitHub
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
/** A package as returned by a registry search provider, normalized to a stable shape.
|
|
46
|
+
* Parallel to `Repo` (the search feature's entity; see ticket 002-007). */
|
|
47
|
+
export interface Package {
|
|
48
|
+
name: string;
|
|
49
|
+
version: string;
|
|
50
|
+
description: string | null;
|
|
51
|
+
url: string; // registry page (npm)
|
|
52
|
+
downloads: number; // monthly downloads (npm)
|
|
53
|
+
score: number; // registry relevance (npm score.final)
|
|
54
|
+
publisher: string | null;
|
|
55
|
+
keywords: string[];
|
|
56
|
+
registry: "npm"; // registry this package came from (npm-only for MVP)
|
|
57
|
+
}
|
|
58
|
+
|
|
45
59
|
/** Ranking strategies supported by the ranking layer. */
|
|
46
60
|
export type SortStrategy = "best-match" | "stars" | "updated" | "forks";
|
|
47
61
|
|
|
@@ -106,11 +120,11 @@ export interface SavedSearch {
|
|
|
106
120
|
|
|
107
121
|
/** Session state restored on startup. */
|
|
108
122
|
export interface SessionState {
|
|
109
|
-
mode: "search" | "trending";
|
|
123
|
+
mode: "search" | "trending" | "packages";
|
|
110
124
|
query: string;
|
|
111
125
|
sort: SortStrategy;
|
|
112
126
|
limit: number;
|
|
113
|
-
|
|
127
|
+
theme?: string;
|
|
114
128
|
}
|
|
115
129
|
|
|
116
130
|
/** Cache entry with TTL. */
|
package/vendor/bun.exe
DELETED
|
Binary file
|