@aztec/wsdb 0.0.1-commit.017a351

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 ADDED
@@ -0,0 +1,29 @@
1
+ # @aztec/wsdb
2
+
3
+ Generated TypeScript IPC package for the Wsdb service.
4
+
5
+ ```ts
6
+ import { WsdbService } from '@aztec/wsdb';
7
+
8
+ const service = await WsdbService.spawn({ transport: 'uds' });
9
+ try {
10
+ const response = await service.bytes({ data: new Uint8Array([1, 2, 3]) });
11
+ } finally {
12
+ await service.destroy();
13
+ }
14
+ ```
15
+
16
+ The package resolves `aztec-wsdb` from `AZTEC_WSDB_PATH`,
17
+ an explicit `binaryPath`, or an installed/prepared arch package.
18
+
19
+ ## Build
20
+
21
+ The package shell (package.json, tsconfig, src/index.ts, scripts/) is
22
+ generated; build through the owning project's `./bootstrap.sh`, which
23
+ regenerates and then runs `npm install --omit=optional && npm run build`.
24
+
25
+ To prepare per-architecture binary packages:
26
+
27
+ ```sh
28
+ npm run prepare_arch_packages -- linux-x64=/path/to/aztec-wsdb
29
+ ```
package/dest/bin.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
package/dest/bin.js ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import { findWsdbBinary } from './platform.js';
4
+ const binaryPath = findWsdbBinary();
5
+ if (!binaryPath) {
6
+ console.error("aztec-wsdb: native binary not found. Install the matching " +
7
+ "'@aztec/wsdb-<platform>' package, set AZTEC_WSDB_PATH, or pass its path.");
8
+ process.exit(1);
9
+ }
10
+ const result = spawnSync(binaryPath, process.argv.slice(2), { stdio: 'inherit' });
11
+ if (result.error) {
12
+ console.error(result.error.message);
13
+ process.exit(1);
14
+ }
15
+ process.exit(result.status ?? 1);