@reddb-io/sdk 1.28.3 → 1.28.4

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 CHANGED
@@ -33,7 +33,7 @@ import { connect } from 'npm:@reddb-io/sdk'
33
33
 
34
34
  The `red` binary ships as a per-platform package
35
35
  (`@reddb-io/red-linux-x64`, `-linux-x64-musl`, `-linux-arm64`,
36
- `-linux-arm64-musl`, `-linux-arm`, `-darwin-x64`, `-darwin-arm64`,
36
+ `-linux-arm64-musl`, `-darwin-arm64`,
37
37
  `-win32-x64`) listed as an `optionalDependency` of this package. Your package
38
38
  manager installs only the one matching your OS, CPU and libc, so there is **no
39
39
  install script and no download**: it works with `--ignore-scripts`, behind a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reddb-io/sdk",
3
- "version": "1.28.3",
3
+ "version": "1.28.4",
4
4
  "description": "Official embedded RedDB SDK — launches a local red binary over stdio JSON-RPC. The binary arrives as a per-platform optionalDependency — no install script. Use @reddb-io/client for remote HTTP, gRPC, and RedWire.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -43,14 +43,12 @@
43
43
  "url": "https://github.com/reddb-io/reddb/issues"
44
44
  },
45
45
  "optionalDependencies": {
46
- "@reddb-io/red-linux-x64": "1.28.3",
47
- "@reddb-io/red-linux-x64-musl": "1.28.3",
48
- "@reddb-io/red-linux-arm64": "1.28.3",
49
- "@reddb-io/red-linux-arm64-musl": "1.28.3",
50
- "@reddb-io/red-linux-arm": "1.28.3",
51
- "@reddb-io/red-darwin-x64": "1.28.3",
52
- "@reddb-io/red-darwin-arm64": "1.28.3",
53
- "@reddb-io/red-win32-x64": "1.28.3"
46
+ "@reddb-io/red-linux-x64": "1.28.4",
47
+ "@reddb-io/red-linux-x64-musl": "1.28.4",
48
+ "@reddb-io/red-linux-arm64": "1.28.4",
49
+ "@reddb-io/red-linux-arm64-musl": "1.28.4",
50
+ "@reddb-io/red-darwin-arm64": "1.28.4",
51
+ "@reddb-io/red-win32-x64": "1.28.4"
54
52
  },
55
53
  "scripts": {
56
54
  "test": "node --test test/ask.test.mjs test/cache.test.mjs test/db-helpers.test.mjs test/embedded-only.test.mjs test/helpers.test.mjs test/insert-ids.test.mjs test/kv.test.mjs test/params.test.mjs test/platform-binary.test.mjs test/native-engine.test.mjs test/queue.test.mjs test/redwire.params.test.mjs test/transaction.test.mjs test/url.test.mjs && node test/smoke.test.mjs && node test/conformance.test.mjs && node test/readme-examples.test.mjs"
package/src/binary.js CHANGED
@@ -43,9 +43,12 @@ export function resolveSdkBinary() {
43
43
  return packaged
44
44
  }
45
45
  const wanted = platformPackageNames()[0]
46
+ const expected = wanted
47
+ ? `the ${wanted} package (an optionalDependency of @reddb-io/sdk)`
48
+ : `no prebuilt package is published for ${process.platform}/${process.arch}`
46
49
  throw new Error(
47
50
  `reddb: binary "${defaultBinaryName()}" not found.\n` +
48
- ` expected: the ${wanted} package (an optionalDependency of @reddb-io/sdk)\n` +
51
+ ` expected: ${expected}\n` +
49
52
  ` override: set REDDB_BIN=/path/to/${defaultBinaryName()}\n` +
50
53
  ` fix: reinstall without --no-optional / --omit=optional, and make sure\n` +
51
54
  ` ${process.platform}/${process.arch} is a supported platform;\n` +
@@ -32,6 +32,11 @@ export function platformPackageNames({
32
32
  arch = process.arch,
33
33
  libc = detectLibc(platform),
34
34
  } = {}) {
35
+ const supported =
36
+ (platform === 'linux' && (arch === 'x64' || arch === 'arm64')) ||
37
+ (platform === 'darwin' && arch === 'arm64') ||
38
+ (platform === 'win32' && arch === 'x64')
39
+ if (!supported) return []
35
40
  const base = `@reddb-io/red-${platform}-${arch}`
36
41
  if (platform !== 'linux') return [base]
37
42
  return libc === 'musl' ? [`${base}-musl`, base] : [base, `${base}-musl`]