@durable-streams/state 0.1.1 → 0.1.3

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/dist/index.cjs CHANGED
@@ -484,7 +484,7 @@ function createStreamDB(options) {
484
484
  });
485
485
  let batchCount = 0;
486
486
  let lastBatchTime = Date.now();
487
- streamResponse.subscribeJson(async (batch) => {
487
+ streamResponse.subscribeJson((batch) => {
488
488
  try {
489
489
  batchCount++;
490
490
  lastBatchTime = Date.now();
@@ -503,6 +503,7 @@ function createStreamDB(options) {
503
503
  dispatcher.rejectAll(error);
504
504
  abortController.abort();
505
505
  }
506
+ return Promise.resolve();
506
507
  });
507
508
  const healthCheck = setInterval(() => {
508
509
  const timeSinceLastBatch = Date.now() - lastBatchTime;
package/dist/index.js CHANGED
@@ -460,7 +460,7 @@ function createStreamDB(options) {
460
460
  });
461
461
  let batchCount = 0;
462
462
  let lastBatchTime = Date.now();
463
- streamResponse.subscribeJson(async (batch) => {
463
+ streamResponse.subscribeJson((batch) => {
464
464
  try {
465
465
  batchCount++;
466
466
  lastBatchTime = Date.now();
@@ -479,6 +479,7 @@ function createStreamDB(options) {
479
479
  dispatcher.rejectAll(error);
480
480
  abortController.abort();
481
481
  }
482
+ return Promise.resolve();
482
483
  });
483
484
  const healthCheck = setInterval(() => {
484
485
  const timeSinceLastBatch = Date.now() - lastBatchTime;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@durable-streams/state",
3
3
  "description": "State change event protocol for Durable Streams",
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "author": "Durable Stream contributors",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -19,8 +19,10 @@
19
19
  "typescript"
20
20
  ],
21
21
  "type": "module",
22
+ "main": "./dist/index.cjs",
23
+ "module": "./dist/index.js",
24
+ "types": "./dist/index.d.ts",
22
25
  "exports": {
23
- "./package.json": "./package.json",
24
26
  ".": {
25
27
  "import": {
26
28
  "types": "./dist/index.d.ts",
@@ -30,26 +32,24 @@
30
32
  "types": "./dist/index.d.cts",
31
33
  "default": "./dist/index.cjs"
32
34
  }
33
- }
35
+ },
36
+ "./package.json": "./package.json"
34
37
  },
38
+ "sideEffects": false,
35
39
  "files": [
36
40
  "dist",
37
41
  "src",
38
42
  "state-protocol.schema.json",
39
43
  "STATE-PROTOCOL.md"
40
44
  ],
41
- "main": "./dist/index.cjs",
42
- "module": "./dist/index.js",
43
- "types": "./dist/index.d.ts",
44
- "sideEffects": false,
45
45
  "dependencies": {
46
46
  "@standard-schema/spec": "^1.0.0",
47
47
  "@tanstack/db": "latest",
48
- "@durable-streams/client": "0.1.1"
48
+ "@durable-streams/client": "0.1.3"
49
49
  },
50
50
  "devDependencies": {
51
51
  "tsdown": "^0.9.0",
52
- "@durable-streams/server": "0.1.1"
52
+ "@durable-streams/server": "0.1.4"
53
53
  },
54
54
  "engines": {
55
55
  "node": ">=18.0.0"
package/src/stream-db.ts CHANGED
@@ -823,7 +823,7 @@ export function createStreamDB<
823
823
  let lastBatchTime = Date.now()
824
824
 
825
825
  // Process events as they come in
826
- streamResponse.subscribeJson(async (batch) => {
826
+ streamResponse.subscribeJson((batch) => {
827
827
  try {
828
828
  batchCount++
829
829
  lastBatchTime = Date.now()
@@ -863,6 +863,7 @@ export function createStreamDB<
863
863
  abortController.abort()
864
864
  // Don't rethrow - we've already rejected the promise
865
865
  }
866
+ return Promise.resolve()
866
867
  })
867
868
 
868
869
  // Health check to detect silent stalls