@ff-labs/fff-bun 0.7.1 → 0.7.2-nightly.e5662c1

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.
Files changed (2) hide show
  1. package/examples/grep.ts +9 -2
  2. package/package.json +9 -9
package/examples/grep.ts CHANGED
@@ -137,9 +137,13 @@ async function main() {
137
137
  const scanTime = Date.now() - startTime;
138
138
  const finalProgress = finder.getScanProgress();
139
139
  const totalFiles = finalProgress.ok ? finalProgress.value.scannedFilesCount : 0;
140
+ const warmupDone = finalProgress.ok ? finalProgress.value.isWarmupComplete : false;
140
141
 
141
142
  console.log(
142
- `\r${GREEN}✓${RESET} Indexed ${BOLD}${totalFiles}${RESET} files in ${scanTime}ms\n`,
143
+ `\r${GREEN}✓${RESET} Indexed ${BOLD}${totalFiles}${RESET} files in ${scanTime}ms`,
144
+ );
145
+ console.log(
146
+ ` Content index: ${warmupDone ? `${GREEN}ready${RESET}` : `${YELLOW}building in background...${RESET}`}\n`,
143
147
  );
144
148
 
145
149
  console.log(
@@ -159,8 +163,11 @@ async function main() {
159
163
  const prompt = () => {
160
164
  const modeLabel =
161
165
  currentMode === "plain" ? "txt" : currentMode === "regex" ? "re" : "fzy";
166
+ const prog = finder.getScanProgress();
167
+ const indexed = prog.ok && prog.value.isWarmupComplete;
168
+ const indexLabel = indexed ? `${GREEN}idx${RESET}` : `${YELLOW}no-idx${RESET}`;
162
169
 
163
- rl.question(`${CYAN}grep[${modeLabel}]>${RESET} `, (query) => {
170
+ rl.question(`${CYAN}grep[${modeLabel}|${indexLabel}]>${RESET} `, (query) => {
164
171
  if (query.toLowerCase() === "q" || query.toLowerCase() === "quit") {
165
172
  console.log(`\n${DIM}Goodbye!${RESET}`);
166
173
  finder.destroy();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ff-labs/fff-bun",
3
- "version": "0.7.1",
3
+ "version": "0.7.2-nightly.e5662c1",
4
4
  "private": false,
5
5
  "description": "High-performance fuzzy file finder for Bun - perfect for LLM agent tools",
6
6
  "type": "module",
@@ -62,14 +62,14 @@
62
62
  },
63
63
  "homepage": "https://github.com/dmtrKovalenko/fff.nvim#readme",
64
64
  "optionalDependencies": {
65
- "@ff-labs/fff-bin-darwin-arm64": "0.7.1",
66
- "@ff-labs/fff-bin-darwin-x64": "0.7.1",
67
- "@ff-labs/fff-bin-linux-x64-gnu": "0.7.1",
68
- "@ff-labs/fff-bin-linux-arm64-gnu": "0.7.1",
69
- "@ff-labs/fff-bin-linux-x64-musl": "0.7.1",
70
- "@ff-labs/fff-bin-linux-arm64-musl": "0.7.1",
71
- "@ff-labs/fff-bin-win32-x64": "0.7.1",
72
- "@ff-labs/fff-bin-win32-arm64": "0.7.1"
65
+ "@ff-labs/fff-bin-darwin-arm64": "0.7.2-nightly.e5662c1",
66
+ "@ff-labs/fff-bin-darwin-x64": "0.7.2-nightly.e5662c1",
67
+ "@ff-labs/fff-bin-linux-x64-gnu": "0.7.2-nightly.e5662c1",
68
+ "@ff-labs/fff-bin-linux-arm64-gnu": "0.7.2-nightly.e5662c1",
69
+ "@ff-labs/fff-bin-linux-x64-musl": "0.7.2-nightly.e5662c1",
70
+ "@ff-labs/fff-bin-linux-arm64-musl": "0.7.2-nightly.e5662c1",
71
+ "@ff-labs/fff-bin-win32-x64": "0.7.2-nightly.e5662c1",
72
+ "@ff-labs/fff-bin-win32-arm64": "0.7.2-nightly.e5662c1"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@types/bun": "^1.3.8",