@ff-labs/fff-node 0.10.7-nightly.e8d80e4 → 0.11.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 +4 -1
- package/dist/fff-api.d.ts +7 -3
- package/dist/fff-api.d.ts.map +1 -1
- package/dist/ffi.d.ts.map +1 -1
- package/dist/index.cjs +16 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -1251,6 +1251,8 @@ function watchKindFromU8(kind) {
|
|
|
1251
1251
|
return "modified";
|
|
1252
1252
|
case 2:
|
|
1253
1253
|
return "removed";
|
|
1254
|
+
case 4:
|
|
1255
|
+
return "renamed";
|
|
1254
1256
|
default:
|
|
1255
1257
|
return "rescan";
|
|
1256
1258
|
}
|
|
@@ -1296,10 +1298,22 @@ function consumeWatchBatch(address) {
|
|
|
1296
1298
|
paramsType: [DataType.External, DataType.U32],
|
|
1297
1299
|
paramsValue: [batchPtr, i]
|
|
1298
1300
|
});
|
|
1299
|
-
|
|
1301
|
+
const event = {
|
|
1300
1302
|
path: readCString(path) ?? "",
|
|
1301
1303
|
kind: watchKindFromU8(kind)
|
|
1302
|
-
}
|
|
1304
|
+
};
|
|
1305
|
+
if (event.kind === "renamed") {
|
|
1306
|
+
const from = load({
|
|
1307
|
+
library: LIBRARY_KEY,
|
|
1308
|
+
funcName: "fff_watch_events_get_from_path",
|
|
1309
|
+
retType: DataType.External,
|
|
1310
|
+
paramsType: [DataType.External, DataType.U32],
|
|
1311
|
+
paramsValue: [batchPtr, i]
|
|
1312
|
+
});
|
|
1313
|
+
const decoded = readCString(from);
|
|
1314
|
+
if (decoded) event.from = decoded;
|
|
1315
|
+
}
|
|
1316
|
+
events.push(event);
|
|
1303
1317
|
}
|
|
1304
1318
|
load({
|
|
1305
1319
|
library: LIBRARY_KEY,
|