@sakiori/fff-node 0.11.1-sakiori.20261109.1 → 1.0.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 +37 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +12 -9
package/README.md
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
|
-
# fff
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
# @sakiori/fff-node
|
|
2
|
+
|
|
3
|
+
Fast, typo-resistant file, directory and content search for Node.js, from the
|
|
4
|
+
[sakiori-oss fork of fff](https://gitlab.com/sakiori-oss/fff). The search itself is upstream
|
|
5
|
+
fff's: fuzzy path matching, globs, plain-text, regex and multi-pattern grep, git status and
|
|
6
|
+
frecency ranking.
|
|
7
|
+
|
|
8
|
+
The difference is where the index lives. Upstream's `@ff-labs/fff-node` keeps it in your
|
|
9
|
+
process. This package keeps it in the shared fff service of the current OS user, which the
|
|
10
|
+
`fff-mcp` agents of the same fork release use too, so an application and its agents index a
|
|
11
|
+
directory once.
|
|
12
|
+
|
|
13
|
+
Compared with `@ff-labs/fff-node`, this package:
|
|
14
|
+
|
|
15
|
+
- returns a Promise from `FileFinder.create` and from every instance method except
|
|
16
|
+
`getBasePath`, `isDestroyed` and the methods listed as unavailable below, and runs each
|
|
17
|
+
call off the event loop; upstream's `destroy`, `isScanning`, searches and greps are
|
|
18
|
+
synchronous. Results keep upstream's `Result` shape;
|
|
19
|
+
- fails a call after a bound when the service does not answer (`timeoutMs` in
|
|
20
|
+
`FileFinder.create`, see [Timeouts](#timeouts));
|
|
21
|
+
- adds `notifyChanged` for files your program changes, `excludeFrecency` for rankings
|
|
22
|
+
without the shared frecency, `serviceDir` for a separate service namespace, and repository
|
|
23
|
+
and ref events in `watch`;
|
|
24
|
+
- shares a service only with the `fff-mcp` of the same fork release, which has the
|
|
25
|
+
package's version;
|
|
26
|
+
- has no `waitForScanBlocking`; `trackQuery`, `getHistoricalQuery` and `refreshGitStatus`
|
|
27
|
+
return an error, `reindex` rescans only the instance's own directory, `historyDbPath` is
|
|
28
|
+
not supported, and `cacheBudgetMaxBytes` and `cacheBudgetMaxFileSize` are ignored
|
|
29
|
+
([Unavailable methods](#unavailable-methods)).
|
|
8
30
|
|
|
9
31
|
## Installation
|
|
10
32
|
|
|
@@ -25,10 +47,16 @@ The native library and the `fff-mcp` service executable come in platform package
|
|
|
25
47
|
|
|
26
48
|
The package installs on macOS, Linux and FreeBSD, on x64 and ARM64; npm and pnpm refuse it on any other platform (`EBADPLATFORM`). FreeBSD has no platform package: build the native files from source (see [Platforms without a prebuilt package](#platforms-without-a-prebuilt-package)), or `FileFinder.create` fails with `unsupportedPlatform`. An install that omits optional dependencies has no native files, and `FileFinder.create` fails with `libraryUnavailable`. The glibc packages need glibc 2.28 or later.
|
|
27
49
|
|
|
28
|
-
A project that imports the upstream name `@ff-labs/fff-node`
|
|
50
|
+
A project that imports the upstream name `@ff-labs/fff-node` can keep its imports with a package-manager alias, `npm install @ff-labs/fff-node@npm:@sakiori/fff-node@^1.0.0`, but its calls still need the changes listed at the top.
|
|
29
51
|
|
|
30
52
|
Requires Node.js 20.19 or later in the 20 line, or 22.12 and later. The package is an ES module; CommonJS `require` loads the same module, which relies on `require` of ES modules in those Node.js versions. In Electron, that takes a release whose bundled Node.js is one of them.
|
|
31
53
|
|
|
54
|
+
### Versions
|
|
55
|
+
|
|
56
|
+
The package is published at the version of the fork release that builds it, a semantic version of the fork's own: a breaking change of the package's API or its `exports` raises the major version, an addition the minor, and a fix the patch. A change of the platforms or Node.js versions it supports raises at least the minor version, and the maintainers mark one that drops support as breaking; a release that changes only the native code is a new version too. Depend on a range of one major, such as the `^1.0.0` that `npm install` writes, to take every later release of it. The platform packages come at exactly the Node package's version. The package shares its service with the `fff-mcp` archives of the same version; the release's notes name the upstream fff release it carries.
|
|
57
|
+
|
|
58
|
+
Versions before 1.0.0, `0.11.1-sakiori.<date>.<n>`, were prereleases, which a range does not follow past their own `major.minor.patch`; replace an exact pin of one with `^1.0.0`.
|
|
59
|
+
|
|
32
60
|
### Electron
|
|
33
61
|
|
|
34
62
|
Unpack the platform package's whole directory from the application archive (for example with electron-builder's `asarUnpack`). The package then loads the library and starts the service from `app.asar.unpacked`, and reports an error when only one of the two files is unpacked.
|
|
@@ -147,7 +175,7 @@ A service that does not answer makes `FileFinder.create` fail after 90 seconds a
|
|
|
147
175
|
|
|
148
176
|
## Unavailable methods
|
|
149
177
|
|
|
150
|
-
`trackQuery`, `getHistoricalQuery` and `refreshGitStatus` have no shared service equivalent and return an error naming them as unavailable over the shared service; the service keeps the index and git status current itself. `reindex` rescans the instance's own directory; create a new instance for another directory. `historyDbPath` is not supported.
|
|
178
|
+
`waitForScanBlocking` does not exist; await `waitForScan` or `waitForIndexReady`. `trackQuery`, `getHistoricalQuery` and `refreshGitStatus` have no shared service equivalent and return an error naming them as unavailable over the shared service; the service keeps the index and git status current itself. `reindex` rescans the instance's own directory; create a new instance for another directory. `historyDbPath` is not supported.
|
|
151
179
|
|
|
152
180
|
## API Reference
|
|
153
181
|
|
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
*/
|
|
44
44
|
export { binaryExists, findBinary, findNativeFiles, findServiceExecutable, type NativeFiles, unpackedAsarPath, } from "./binary.js";
|
|
45
45
|
export { closeLibrary, nativeInstanceCount } from "./ffi.js";
|
|
46
|
-
export type { DbHealth, DirItem, DirSearchOptions, DirSearchResult, FileItem, GrepCursor, GrepMatch, GrepMode, DefinitionMode, GrepOptions, GrepResult, HealthCheck, InitOptions, Location, MixedItem, MixedSearchResult, MultiGrepOptions, ScanProgress, Score, SearchOptions, SearchResult, WatchBatchCallback, WatchEvent, WatchEventKind, WatchOptions, WatchUnsubscribe, } from "./fff-api.js";
|
|
46
|
+
export type { DbHealth, DirItem, DirSearchOptions, DirSearchResult, FileItem, GlobOptions, GrepCursor, GrepMatch, GrepMode, DefinitionMode, GrepOptions, GrepResult, HealthCheck, InitOptions, Location, MixedItem, MixedSearchResult, MultiGrepOptions, ScanProgress, Score, SearchOptions, SearchResult, WatchBatchCallback, WatchEvent, WatchEventKind, WatchOptions, WatchUnsubscribe, } from "./fff-api.js";
|
|
47
47
|
export { ErrorCode, type Failure, type Result, err, ok } from "./errors.js";
|
|
48
48
|
export { FileFinder } from "./finder.js";
|
|
49
49
|
export { getLibExtension, getLibFilename, getNpmPackageName, getServiceExecutableFilename, getTriple, } from "./platform.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EACL,YAAY,EACZ,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,KAAK,WAAW,EAChB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC7D,YAAY,EACV,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,UAAU,EACV,SAAS,EACT,QAAQ,EACR,cAAc,EACd,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACL,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,4BAA4B,EAC5B,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EACL,YAAY,EACZ,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,KAAK,WAAW,EAChB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC7D,YAAY,EACV,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,cAAc,EACd,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACL,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,4BAA4B,EAC5B,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sakiori/fff-node",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Fuzzy file finder for Node.js over the shared fff service - perfect for LLM agent tools",
|
|
6
6
|
"type": "module",
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
"build": "npm run build:bundle && npm run build:types",
|
|
23
23
|
"build:bundle": "tsup src/index.ts src/watch-delivery.ts --format esm --platform node --target node20 --external ffi-rs --sourcemap",
|
|
24
24
|
"build:types": "tsc -p tsconfig.build.json",
|
|
25
|
+
"api:update": "npm run build:types && api-extractor run --local",
|
|
26
|
+
"api:check": "npm run build:types && api-extractor run",
|
|
25
27
|
"test": "node --test --test-concurrency=1 test/e2e.mjs test/service.mjs",
|
|
26
28
|
"typecheck": "tsc --noEmit"
|
|
27
29
|
},
|
|
@@ -65,16 +67,17 @@
|
|
|
65
67
|
"ffi-rs": "^1.0.0"
|
|
66
68
|
},
|
|
67
69
|
"devDependencies": {
|
|
68
|
-
"
|
|
70
|
+
"@microsoft/api-extractor": "7.60.1",
|
|
69
71
|
"@types/node": "^22.0.0",
|
|
70
|
-
"tsup": "^8.5.0"
|
|
72
|
+
"tsup": "^8.5.0",
|
|
73
|
+
"typescript": "5.9.3"
|
|
71
74
|
},
|
|
72
75
|
"optionalDependencies": {
|
|
73
|
-
"@sakiori/fff-bin-darwin-arm64": "
|
|
74
|
-
"@sakiori/fff-bin-darwin-x64": "
|
|
75
|
-
"@sakiori/fff-bin-linux-arm64-gnu": "
|
|
76
|
-
"@sakiori/fff-bin-linux-arm64-musl": "
|
|
77
|
-
"@sakiori/fff-bin-linux-x64-gnu": "
|
|
78
|
-
"@sakiori/fff-bin-linux-x64-musl": "
|
|
76
|
+
"@sakiori/fff-bin-darwin-arm64": "1.0.0",
|
|
77
|
+
"@sakiori/fff-bin-darwin-x64": "1.0.0",
|
|
78
|
+
"@sakiori/fff-bin-linux-arm64-gnu": "1.0.0",
|
|
79
|
+
"@sakiori/fff-bin-linux-arm64-musl": "1.0.0",
|
|
80
|
+
"@sakiori/fff-bin-linux-x64-gnu": "1.0.0",
|
|
81
|
+
"@sakiori/fff-bin-linux-x64-musl": "1.0.0"
|
|
79
82
|
}
|
|
80
83
|
}
|