tigerbeetle-node 0.12.48 → 0.12.50

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
@@ -1,6 +1,9 @@
1
+ ---
2
+ title: Node.js
3
+ ---
4
+
1
5
  This file is generated by
2
6
  [src/clients/docs_generate.zig](/src/clients/docs_generate.zig).
3
-
4
7
  # tigerbeetle-node
5
8
 
6
9
  The TigerBeetle client for Node.js.
@@ -8,13 +11,9 @@ The TigerBeetle client for Node.js.
8
11
  ### Prerequisites
9
12
 
10
13
  Linux >= 5.6 is the only production environment we
11
- support. But for ease of development we support macOS and
12
- Windows unless otherwise noted.
13
-
14
+ support. But for ease of development we also support macOS.
14
15
  * NodeJS >= `14`
15
16
 
16
- > Windows support is not yet available for the Node client.
17
-
18
17
  ## Setup
19
18
 
20
19
  Run:
@@ -49,6 +48,17 @@ steps that are run in CI to test support:
49
48
  * [Ubuntu](https://github.com/tigerbeetledb/tigerbeetle/blob/main/src/clients/node/scripts/scripts/test_install_on_ubuntu.sh)
50
49
  * [RHEL](https://github.com/tigerbeetledb/tigerbeetle/blob/main/src/clients/node/scripts/scripts/test_install_on_rhelubi.sh)
51
50
 
51
+ ## Example projects
52
+
53
+ This document is primarily a reference guide to
54
+ the client. Below are various sample projects demonstrating
55
+ features of TigerBeetle.
56
+
57
+ * [Basic](/src/clients/node/samples/basic/): Create two accounts and
58
+ transfer an amount between them.
59
+ * [Two-Phase Transfer](/src/clients/node/samples/two-phase/): Create two
60
+ accounts and start a pending transfer between them, then
61
+ post the transfer.
52
62
  ### Sidenote: `BigInt`
53
63
  TigerBeetle uses 64-bit integers for many fields while JavaScript's
54
64
  builtin `Number` maximum value is `2^53-1`. The `n` suffix in JavaScript
@@ -280,6 +290,14 @@ for (let i = 0; i < transfers.length; i += BATCH_SIZE) {
280
290
  }
281
291
  ```
282
292
 
293
+ ### Queues and Workers
294
+
295
+ If you are making requests to TigerBeetle from workers
296
+ pulling jobs from a queue, you can batch requests to
297
+ TigerBeetle by having the worker act on multiple jobs from
298
+ the queue at once rather than one at a time. i.e. pulling
299
+ multiple jobs from the queue rather than just one.
300
+
283
301
  ## Transfer Flags
284
302
 
285
303
  The transfer `flags` value is a bitfield. See details for these flags in
@@ -463,5 +481,5 @@ $ [ "$TEST" = "true" ] && mvn test || echo "Skipping client unit tests"
463
481
 
464
482
  ### On Windows
465
483
 
466
- Unsupported.
484
+ Not yet supported.
467
485
 
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tigerbeetle-node",
3
- "version": "0.12.48",
3
+ "version": "0.12.50",
4
4
  "description": "TigerBeetle Node.js client",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",