nedb-engine 9.0.0 → 9.0.2

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
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,21 @@
1
+ === nesql staging for aarch64-apple-darwin ===
2
+ /var/folders/w2/rrf5p87d1bbfyphxc7jdnyvh0000gn/T/build_script_9_1_bn6620yl: line 51: cargo: command not found
3
+ cargo exit: 127
4
+ --- expected: rust/target/aarch64-apple-darwin/release/nesql ---
5
+ total 11936
6
+ drwxr-xr-x 16 builder staff 512 Sep 16 23:39 .
7
+ drwxr-xr-x@ 4 builder staff 128 Sep 16 23:37 ..
8
+ -rw-r--r-- 1 builder staff 0 Sep 16 23:37 .cargo-artifact-lock
9
+ -rw-r--r-- 1 builder staff 0 Sep 16 23:37 .cargo-build-lock
10
+ -rw-r--r-- 1 builder staff 0 Sep 16 23:37 .cargo-lock
11
+ drwxr-xr-x 229 builder staff 7328 Sep 16 23:39 .fingerprint
12
+ drwxr-xr-x 34 builder staff 1088 Sep 16 23:39 build
13
+ drwxr-xr-x 584 builder staff 18688 Sep 16 23:39 deps
14
+ drwxr-xr-x 2 builder staff 64 Sep 16 23:37 examples
15
+ drwxr-xr-x 2 builder staff 64 Sep 16 23:37 incremental
16
+ -rw-r--r-- 1 builder staff 1479 Sep 16 23:39 lib_native.d
17
+ -rwxr-xr-x 1 builder staff 1665536 Sep 16 23:39 lib_native.dylib
18
+ -rw-r--r-- 1 builder staff 1535 Sep 16 23:39 libnedb_node.d
19
+ -rwxr-xr-x 1 builder staff 1642064 Sep 16 23:39 libnedb_node.dylib
20
+ -rwxr-xr-x 1 builder staff 2786272 Sep 16 23:38 nedbd
21
+ -rw-r--r-- 1 builder staff 1462 Sep 16 23:38 nedbd.d
@@ -0,0 +1,21 @@
1
+ === nesql staging for x86_64-apple-darwin ===
2
+ /var/folders/w2/rrf5p87d1bbfyphxc7jdnyvh0000gn/T/build_script_9_1_t3ccpi13: line 51: cargo: command not found
3
+ cargo exit: 127
4
+ --- expected: rust/target/x86_64-apple-darwin/release/nesql ---
5
+ total 13344
6
+ drwxr-xr-x 16 builder staff 512 Sep 16 23:43 .
7
+ drwxr-xr-x@ 4 builder staff 128 Sep 16 23:40 ..
8
+ -rw-r--r-- 1 builder staff 0 Sep 16 23:40 .cargo-artifact-lock
9
+ -rw-r--r-- 1 builder staff 0 Sep 16 23:40 .cargo-build-lock
10
+ -rw-r--r-- 1 builder staff 0 Sep 16 23:40 .cargo-lock
11
+ drwxr-xr-x 229 builder staff 7328 Sep 16 23:42 .fingerprint
12
+ drwxr-xr-x 34 builder staff 1088 Sep 16 23:42 build
13
+ drwxr-xr-x 584 builder staff 18688 Sep 16 23:43 deps
14
+ drwxr-xr-x 2 builder staff 64 Sep 16 23:40 examples
15
+ drwxr-xr-x 2 builder staff 64 Sep 16 23:40 incremental
16
+ -rw-r--r-- 1 builder staff 1478 Sep 16 23:42 lib_native.d
17
+ -rwxr-xr-x 1 builder staff 1868240 Sep 16 23:42 lib_native.dylib
18
+ -rw-r--r-- 1 builder staff 1534 Sep 16 23:43 libnedb_node.d
19
+ -rwxr-xr-x 1 builder staff 1848872 Sep 16 23:43 libnedb_node.dylib
20
+ -rwxr-xr-x 1 builder staff 3096560 Sep 16 23:41 nedbd
21
+ -rw-r--r-- 1 builder staff 1461 Sep 16 23:41 nedbd.d
Binary file
Binary file
Binary file
Binary file
Binary file
package/nesql.js CHANGED
@@ -33,15 +33,52 @@ const { spawn } = require("child_process");
33
33
  const path = require("path");
34
34
  const fs = require("fs");
35
35
 
36
+ // Keyed platform-arch, with the Linux legs split by libc.
37
+ //
38
+ // This table promised four platforms while the published package carried a
39
+ // binary for NONE of them (v8.0.0 through v9.0.0): the build that arch-named
40
+ // these files ran in a job that never uploaded them. The table was not the
41
+ // bug, but it was the thing that made the bug speak -- so it now covers every
42
+ // binary the release actually builds, rather than a subset chosen by hand.
36
43
  const SUPPORTED = {
37
44
  "linux-x64": "nesql-linux-x64",
45
+ "linux-arm64": "nesql-linux-arm64",
46
+ "linux-x64-musl": "nesql-linux-x64-musl",
47
+ "linux-arm64-musl": "nesql-linux-arm64-musl",
38
48
  "win32-x64": "nesql-win-x64.exe",
39
49
  "darwin-arm64": "nesql-darwin-arm64",
40
50
  "darwin-x64": "nesql-darwin-x64",
41
51
  };
42
52
 
53
+ // musl and glibc binaries are not interchangeable, and the failure when they
54
+ // are swapped is a loader error that names neither libc. Node reports the
55
+ // runtime glibc version in its process report; on musl the field is simply
56
+ // absent. That is the same probe napi-rs uses to pick an addon, so a musl
57
+ // Alpine container resolves the musl CLI for the same reason it resolves the
58
+ // musl addon.
59
+ function libcSuffix() {
60
+ if (process.platform !== "linux") return "";
61
+ try {
62
+ const rep = typeof process.report?.getReport === "function"
63
+ ? process.report.getReport()
64
+ : null;
65
+ if (rep && rep.header && !rep.header.glibcVersionRuntime) return "-musl";
66
+ } catch (err) {
67
+ // Named, not swallowed: if the probe itself breaks we fall through to the
68
+ // glibc name, and the reader needs to know that is a GUESS rather than a
69
+ // detection, because the resulting error will be a confusing loader
70
+ // failure rather than a clean "unsupported platform".
71
+ process.stderr.write(
72
+ `nesql: could not probe libc (${err.message}); assuming glibc. ` +
73
+ `If this is Alpine/musl and the next error is a loader failure, that ` +
74
+ `is why.\n`
75
+ );
76
+ }
77
+ return "";
78
+ }
79
+
43
80
  function main() {
44
- const key = `${process.platform}-${process.arch}`;
81
+ const key = `${process.platform}-${process.arch}${libcSuffix()}`;
45
82
  const name = SUPPORTED[key];
46
83
 
47
84
  if (!name) {
@@ -55,13 +92,21 @@ function main() {
55
92
 
56
93
  const binPath = path.join(__dirname, name);
57
94
  if (!fs.existsSync(binPath)) {
95
+ // The remedy list used to lead with `npm install --force nedb-engine`,
96
+ // which cannot work and wasted the reader's time: through v9.0.0 no
97
+ // published version contained a nesql binary for ANY platform, so
98
+ // reinstalling fetched the same incomplete tarball. Do not suggest a
99
+ // reinstall as a fix for a packaging gap -- name the gap.
58
100
  process.stderr.write(
59
- `nesql: the prebuilt binary is missing for this platform.\n` +
101
+ `nesql: the prebuilt binary is missing from this package.\n` +
60
102
  ` expected: ${binPath}\n` +
61
103
  ` platform: ${key}\n\n` +
62
- `This nedb-engine install did not include it. Fixes:\n` +
63
- ` npm install --force nedb-engine\n` +
64
- ` cargo install nesql # builds from source, any platform\n`
104
+ `This is a packaging gap, not a corrupt install -- reinstalling will\n` +
105
+ `fetch the same tarball. Working alternatives right now:\n\n` +
106
+ ` pip install nedb-engine && nesql --help # the wheel ships the CLI\n` +
107
+ ` cargo install nesql # builds from source\n\n` +
108
+ `Please report it with the two lines above:\n` +
109
+ ` https://github.com/Eth-Interchained/nedb/issues\n`
65
110
  );
66
111
  process.exit(5);
67
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nedb-engine",
3
- "version": "9.0.0",
3
+ "version": "9.0.2",
4
4
  "description": "NEDB \u2014 hash-chained, time-traveling, bi-temporal embedded database with Rust native core. SQL, Redis, MongoDB adapters. Causal Write Provenance. RESP2 wire protocol.",
5
5
  "main": "index.js",
6
6
  "exports": {