aof-db 2.4.68 → 2.5.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.
Binary file
Binary file
Binary file
Binary file
package/nedb-distro.js ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ // aof-db — distribution defaults.
3
+ //
4
+ // The fast, lightweight distribution defaults to the append-only v3 segment
5
+ // store with macOS fast-fsync (group-commit, one fsync per batch). These
6
+ // defaults are applied by setting the engine's existing env knobs BEFORE the
7
+ // native addon opens any database — the engine reads them at open time.
8
+ //
9
+ // Set-if-unset: explicit values always win, so `NEDB_DAG_V3=0` /
10
+ // `NEDB_FAST_FSYNC=0` opt out.
11
+ if (process.env.NEDB_DAG_V3 === undefined) process.env.NEDB_DAG_V3 = "1";
12
+ if (process.env.NEDB_FAST_FSYNC === undefined) process.env.NEDB_FAST_FSYNC = "1";
13
+
14
+ module.exports = require("./index.js");
Binary file
Binary file
package/nedbd-v2.js CHANGED
@@ -68,9 +68,17 @@ function main() {
68
68
  }
69
69
  }
70
70
 
71
+ // aof-db defaults: append-only v3 segment store + macOS fast-fsync. Injected
72
+ // into the daemon's env (the engine reads these at database open). Set-if-unset,
73
+ // so explicit NEDB_DAG_V3=0 / NEDB_FAST_FSYNC=0 (or flags) from the caller win.
74
+ const env = { ...process.env };
75
+ if (env.NEDB_DAG_V3 === undefined) env.NEDB_DAG_V3 = "1";
76
+ if (env.NEDB_FAST_FSYNC === undefined) env.NEDB_FAST_FSYNC = "1";
77
+
71
78
  const child = spawn(binPath, process.argv.slice(2), {
72
79
  stdio: "inherit",
73
80
  windowsHide: false,
81
+ env,
74
82
  });
75
83
 
76
84
  child.on("error", (err) => {
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "aof-db",
3
- "version": "2.4.68",
3
+ "version": "2.5.0",
4
4
  "description": "NEDB — hash-chained, time-traveling, bi-temporal embedded database with Rust native core. SQL, Redis, MongoDB adapters. Causal Write Provenance. RESP2 wire protocol.",
5
- "main": "index.js",
5
+ "main": "nedb-distro.js",
6
6
  "types": "index.d.ts",
7
7
  "bin": {
8
8
  "nedbd-v2": "./nedbd-v2.js",
9
9
  "nedbdv2": "./nedbd-v2.js"
10
10
  },
11
11
  "files": [
12
+ "nedb-distro.js",
12
13
  "index.js",
13
14
  "index.d.ts",
14
15
  "nedbd-v2.js",