@ff-labs/fff-node 0.11.1-nightly.3004e2d → 0.11.1-nightly.4b013d3
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/dist/fff-api.d.ts +6 -0
- package/dist/fff-api.d.ts.map +1 -1
- package/dist/ffi.d.ts +1 -1
- package/dist/ffi.d.ts.map +1 -1
- package/dist/finder.d.ts.map +1 -1
- package/dist/index.cjs +18 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -244,9 +244,13 @@ var FFF_CREATE_OPTIONS_STRUCT = {
|
|
|
244
244
|
cache_budget_max_file_size: DataType.U64,
|
|
245
245
|
enable_fs_root_scanning: DataType.U8,
|
|
246
246
|
enable_home_dir_scanning: DataType.U8,
|
|
247
|
-
follow_symlinks: DataType.U8
|
|
247
|
+
follow_symlinks: DataType.U8,
|
|
248
|
+
extra_ignore: DataType.String,
|
|
249
|
+
disable_git: DataType.U8,
|
|
250
|
+
disable_ignore_files: DataType.U8
|
|
248
251
|
};
|
|
249
|
-
var FFF_CREATE_OPTIONS_VERSION =
|
|
252
|
+
var FFF_CREATE_OPTIONS_VERSION = 3;
|
|
253
|
+
var LEGACY_CREATE_OPTIONS_VERSION = 2;
|
|
250
254
|
var GREP_MODE_PLAIN = 0;
|
|
251
255
|
var GREP_MODE_REGEX = 1;
|
|
252
256
|
var GREP_MODE_FUZZY = 2;
|
|
@@ -398,10 +402,12 @@ function freeString(ptr) {
|
|
|
398
402
|
} catch {
|
|
399
403
|
}
|
|
400
404
|
}
|
|
401
|
-
function ffiCreate(basePath, frecencyDbPath, historyDbPath, _useUnsafeNoLock, enableMmapCache, enableContentIndexing, watch, aiMode, logFilePath, logLevel, cacheBudgetMaxFiles, cacheBudgetMaxBytes, cacheBudgetMaxFileSize, enableFsRootScanning, enableHomeDirScanning, followSymlinks) {
|
|
405
|
+
function ffiCreate(basePath, frecencyDbPath, historyDbPath, _useUnsafeNoLock, enableMmapCache, enableContentIndexing, watch, aiMode, logFilePath, logLevel, cacheBudgetMaxFiles, cacheBudgetMaxBytes, cacheBudgetMaxFileSize, enableFsRootScanning, enableHomeDirScanning, followSymlinks, extraIgnore, disableGit = false, disableIgnoreFiles = false) {
|
|
406
|
+
if (extraIgnore.includes("\0")) return err("extraIgnore cannot contain NUL bytes");
|
|
402
407
|
loadLibrary();
|
|
408
|
+
const version = extraIgnore || disableGit || disableIgnoreFiles ? FFF_CREATE_OPTIONS_VERSION : LEGACY_CREATE_OPTIONS_VERSION;
|
|
403
409
|
const optsValue = {
|
|
404
|
-
version
|
|
410
|
+
version,
|
|
405
411
|
base_path: basePath,
|
|
406
412
|
frecency_db_path: frecencyDbPath,
|
|
407
413
|
history_db_path: historyDbPath,
|
|
@@ -416,7 +422,10 @@ function ffiCreate(basePath, frecencyDbPath, historyDbPath, _useUnsafeNoLock, en
|
|
|
416
422
|
cache_budget_max_file_size: cacheBudgetMaxFileSize,
|
|
417
423
|
enable_fs_root_scanning: enableFsRootScanning ? 1 : 0,
|
|
418
424
|
enable_home_dir_scanning: enableHomeDirScanning ? 1 : 0,
|
|
419
|
-
follow_symlinks: followSymlinks ? 1 : 0
|
|
425
|
+
follow_symlinks: followSymlinks ? 1 : 0,
|
|
426
|
+
extra_ignore: extraIgnore,
|
|
427
|
+
disable_git: disableGit ? 1 : 0,
|
|
428
|
+
disable_ignore_files: disableIgnoreFiles ? 1 : 0
|
|
420
429
|
};
|
|
421
430
|
const rawPtr = load({
|
|
422
431
|
library: LIBRARY_KEY,
|
|
@@ -1505,7 +1514,10 @@ var FileFinder = class _FileFinder {
|
|
|
1505
1514
|
options.cacheBudgetMaxFileSize ?? 0,
|
|
1506
1515
|
options.enableFsRootScanning ?? false,
|
|
1507
1516
|
options.enableHomeDirScanning ?? false,
|
|
1508
|
-
options.followSymlinks ?? false
|
|
1517
|
+
options.followSymlinks ?? false,
|
|
1518
|
+
options.extraIgnore?.join("\n") ?? "",
|
|
1519
|
+
options.disableGit ?? false,
|
|
1520
|
+
options.disableIgnoreFiles ?? false
|
|
1509
1521
|
);
|
|
1510
1522
|
if (!result.ok) {
|
|
1511
1523
|
return result;
|