@dnax/core 0.64.9 → 0.65.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.
@@ -9,6 +9,7 @@ import {
9
9
  ClientSession,
10
10
  MongoClient,
11
11
  ObjectId,
12
+ type ChangeStreamOptions,
12
13
  type FilterOperations,
13
14
  } from "mongodb";
14
15
  import { contextError, fn, toJson, dotJson, getEntryBykeys } from "../../utils";
@@ -2060,10 +2061,15 @@ class useRest {
2060
2061
  return await this.#tenant.database.db?.stats().then((e) => e);
2061
2062
  }
2062
2063
 
2063
- watch(collection: string, pipeline: Array<any>): ChangeStream {
2064
- return this.#tenant.database.db
2065
- ?.collection(collection)
2066
- .watch(pipeline) as ChangeStream;
2064
+ watch(
2065
+ collection: string,
2066
+ pipeline: Array<any>,
2067
+ options: ChangeStreamOptions
2068
+ ): ChangeStream {
2069
+ return this.#tenant.database.db?.collection(collection).watch(pipeline, {
2070
+ allowDiskUse: true,
2071
+ ...options,
2072
+ }) as ChangeStream;
2067
2073
  }
2068
2074
  }
2069
2075
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.64.9",
3
+ "version": "0.65.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {
package/types/index.ts CHANGED
@@ -278,6 +278,9 @@ export type ctxApi = {
278
278
  update?: updateParams;
279
279
  };
280
280
 
281
+
282
+
283
+
281
284
  export type Collection = {
282
285
  init?: (ctx: {
283
286
  rest: InstanceType<typeof useRest>;