@dnax/core 0.72.0 → 0.73.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.
@@ -2623,13 +2623,20 @@ const restActivity = {
2623
2623
  pipeline: Array<object>,
2624
2624
  options?: { cleanDeep?: boolean }
2625
2625
  ): Promise<any> => {
2626
- pipeline = options?.cleanDeep ? cleanDeep(pipeline) : pipeline;
2627
- return await tenant.database.db
2628
- ?.collection("_activity_")
2629
- .aggregate(toBson(pipeline), {
2630
- allowDiskUse: true,
2631
- })
2632
- .toArray();
2626
+ return new Promise(async (resolve, reject) => {
2627
+ try {
2628
+ pipeline = options?.cleanDeep ? cleanDeep(pipeline) : pipeline;
2629
+ let res = await tenant.database.db
2630
+ ?.collection("_activity_")
2631
+ .aggregate(toBson(pipeline), {
2632
+ allowDiskUse: true,
2633
+ })
2634
+ .toArray();
2635
+ return resolve(toJson(res));
2636
+ } catch (err) {
2637
+ return reject(err);
2638
+ }
2639
+ });
2633
2640
  },
2634
2641
  save: async (tenant: Tenant, activity: activityInput) => {
2635
2642
  return await tenant.database.db
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.72.0",
3
+ "version": "0.73.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {},