@naturalcycles/firestore-lib 2.13.1 → 2.14.0
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.
|
@@ -22,7 +22,6 @@ export class FirestoreShardedReadable extends Readable {
|
|
|
22
22
|
nextShard = 1;
|
|
23
23
|
cursorByShard = {};
|
|
24
24
|
queryIsRunningByShard = {};
|
|
25
|
-
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: ok
|
|
26
25
|
paused = false;
|
|
27
26
|
done = false;
|
|
28
27
|
doneShards = new Set();
|
|
@@ -156,7 +155,6 @@ export class FirestoreShardedReadable extends Readable {
|
|
|
156
155
|
rowsRetrieved: this.rowsRetrieved,
|
|
157
156
|
}, err);
|
|
158
157
|
this.destroy(err);
|
|
159
|
-
return;
|
|
160
158
|
}
|
|
161
159
|
}
|
|
162
160
|
findNextFreeShard() {
|
|
@@ -166,7 +164,6 @@ export class FirestoreShardedReadable extends Readable {
|
|
|
166
164
|
}
|
|
167
165
|
}
|
|
168
166
|
}
|
|
169
|
-
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: ok
|
|
170
167
|
_getNextShardAndMove() {
|
|
171
168
|
const shard = this.nextShard;
|
|
172
169
|
this.nextShard = shard === SHARDS ? 1 : shard + 1;
|
package/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"name": "@naturalcycles/firestore-lib",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@google-cloud/firestore": "^
|
|
5
|
+
"@google-cloud/firestore": "^8",
|
|
6
6
|
"@naturalcycles/db-lib": "^10",
|
|
7
7
|
"@naturalcycles/js-lib": "^15",
|
|
8
8
|
"@naturalcycles/nodejs-lib": "^15",
|
|
9
9
|
"tslib": "^2"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@types/node": "^
|
|
12
|
+
"@types/node": "^25",
|
|
13
13
|
"dotenv": "^17",
|
|
14
14
|
"firebase-admin": "^13",
|
|
15
15
|
"@naturalcycles/dev-lib": "18.4.2"
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"directory": "packages/firestore-lib"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
39
|
+
"node": ">=24.10.0"
|
|
40
40
|
},
|
|
41
|
-
"version": "2.
|
|
41
|
+
"version": "2.14.0",
|
|
42
42
|
"description": "Firestore implementation of CommonDB interface",
|
|
43
43
|
"author": "Natural Cycles Team",
|
|
44
44
|
"license": "MIT",
|
package/src/firestore.db.ts
CHANGED
|
@@ -582,7 +582,8 @@ export interface FirestoreDBStreamOptions extends FirestoreDBReadOptions {
|
|
|
582
582
|
|
|
583
583
|
export interface FirestoreDBOptions extends CommonDBOptions {}
|
|
584
584
|
export interface FirestoreDBReadOptions extends CommonDBReadOptions {}
|
|
585
|
-
export interface FirestoreDBSaveOptions<
|
|
586
|
-
extends
|
|
585
|
+
export interface FirestoreDBSaveOptions<
|
|
586
|
+
ROW extends ObjectWithId,
|
|
587
|
+
> extends CommonDBSaveOptions<ROW> {}
|
|
587
588
|
|
|
588
589
|
type SaveOp = 'create' | 'update' | 'set'
|
|
@@ -34,7 +34,7 @@ export class FirestoreShardedReadable<T extends ObjectWithId = any>
|
|
|
34
34
|
private nextShard = 1
|
|
35
35
|
private cursorByShard: StringMap = {}
|
|
36
36
|
private queryIsRunningByShard: StringMap<boolean> = {}
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
private paused = false
|
|
39
39
|
private done = false
|
|
40
40
|
private doneShards = new Set<PositiveInteger>()
|
|
@@ -214,7 +214,6 @@ export class FirestoreShardedReadable<T extends ObjectWithId = any>
|
|
|
214
214
|
err,
|
|
215
215
|
)
|
|
216
216
|
this.destroy(err as Error)
|
|
217
|
-
return
|
|
218
217
|
}
|
|
219
218
|
}
|
|
220
219
|
|
|
@@ -226,7 +225,6 @@ export class FirestoreShardedReadable<T extends ObjectWithId = any>
|
|
|
226
225
|
}
|
|
227
226
|
}
|
|
228
227
|
|
|
229
|
-
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: ok
|
|
230
228
|
private _getNextShardAndMove(): PositiveInteger {
|
|
231
229
|
const shard = this.nextShard
|
|
232
230
|
this.nextShard = shard === SHARDS ? 1 : shard + 1
|