odm-client 0.0.5 → 0.0.7

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.
Files changed (45) hide show
  1. package/dist/client/cloudbase-client.d.ts +1 -0
  2. package/dist/client/mongodb-client.d.ts +1 -0
  3. package/dist/{cloudbase-index.cjs → cloudbase.cjs} +1 -1
  4. package/dist/cloudbase.d.ts +1 -0
  5. package/dist/{cloudbase-index.js → cloudbase.js} +37 -25
  6. package/dist/{index2.cjs → generate.cjs} +6 -5
  7. package/dist/generate.d.ts +1 -0
  8. package/dist/{index2.js → generate.js} +17 -16
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.d.ts +0 -3
  11. package/dist/index.js +13 -19
  12. package/dist/{mongodb-index.cjs → mongodb.cjs} +2 -2
  13. package/dist/mongodb.d.ts +1 -0
  14. package/dist/{mongodb-index.js → mongodb.js} +8 -4
  15. package/package.json +16 -1
  16. /package/dist/deps/{_commonjsHelpers-KaVRbhAgd4-5e44xjkup.js → _commonjsHelpers-KaVRbhAgd4-70zzshp9b.js} +0 -0
  17. /package/dist/deps/{_commonjsHelpers-KaVRbhAgd4-bqfwq0htn.js → _commonjsHelpers-KaVRbhAgd4-res8ony5t.js} +0 -0
  18. /package/dist/deps/{acorn-DYjaOAP8Gz-c1zv3fupp.js → acorn-DYjaOAP8Gz-fpcmmyt75.js} +0 -0
  19. /package/dist/deps/{acorn-DYjaOAP8Gz-yd9wbp0u1.js → acorn-DYjaOAP8Gz-l01xlmx0w.js} +0 -0
  20. /package/dist/deps/{angular-1bp1uAROl4-8g0c11l56.js → angular-1bp1uAROl4-chbuw4r6h.js} +0 -0
  21. /package/dist/deps/{angular-1bp1uAROl4-9ivn4c5b3.js → angular-1bp1uAROl4-xjez32hd5.js} +0 -0
  22. /package/dist/deps/{babel-_P9jsDBVVy-h9th63jz9.js → babel-_P9jsDBVVy-2yg3c3b7n.js} +0 -0
  23. /package/dist/deps/{babel-_P9jsDBVVy-89klf6zkq.js → babel-_P9jsDBVVy-gh7w5yta8.js} +0 -0
  24. /package/dist/deps/{estree-Q-oFBmJEml-bwlnamlux.js → estree-Q-oFBmJEml-fsfbvfibz.js} +0 -0
  25. /package/dist/deps/{estree-Q-oFBmJEml-rqdkbjor8.js → estree-Q-oFBmJEml-vi8e4c16l.js} +0 -0
  26. /package/dist/deps/{flow-j77MFvzLrn-bw2xq88jp.js → flow-j77MFvzLrn-ljbwxlbx6.js} +0 -0
  27. /package/dist/deps/{flow-j77MFvzLrn-9l22ilt66.js → flow-j77MFvzLrn-rz2mp7fwm.js} +0 -0
  28. /package/dist/deps/{glimmer-ewQPb5nTUl-l9fzegsk9.js → glimmer-ewQPb5nTUl-swqp20fyl.js} +0 -0
  29. /package/dist/deps/{glimmer-ewQPb5nTUl-0skyrfotb.js → glimmer-ewQPb5nTUl-wafxvcg8d.js} +0 -0
  30. /package/dist/deps/{graphql-8EXR1_taGG-mope94e2h.js → graphql-8EXR1_taGG-072rubu6y.js} +0 -0
  31. /package/dist/deps/{graphql-8EXR1_taGG-10lynn1ml.js → graphql-8EXR1_taGG-i3wmfpne3.js} +0 -0
  32. /package/dist/deps/{html-dGbiW_CFWL-1tqgharao.js → html-dGbiW_CFWL-bp9vlk1kr.js} +0 -0
  33. /package/dist/deps/{html-dGbiW_CFWL-zmtfculbf.js → html-dGbiW_CFWL-k3g9oy2c5.js} +0 -0
  34. /package/dist/deps/{markdown-vAYIRClyWZ-z48qcj07n.js → markdown-vAYIRClyWZ-c7vkwmbjh.js} +0 -0
  35. /package/dist/deps/{markdown-vAYIRClyWZ-qeglajr0z.js → markdown-vAYIRClyWZ-z6hbtj81z.js} +0 -0
  36. /package/dist/deps/{meriyah-d5_qqf88x--ayvczp9za.js → meriyah-d5_qqf88x--1vh4l145g.js} +0 -0
  37. /package/dist/deps/{meriyah-d5_qqf88x--s495t5yup.js → meriyah-d5_qqf88x--r70sg2xzw.js} +0 -0
  38. /package/dist/deps/{postcss-Vz5bDQ3hJO-jsw4ivkia.js → postcss-Vz5bDQ3hJO-a81conqgc.js} +0 -0
  39. /package/dist/deps/{postcss-Vz5bDQ3hJO-75l8k0pnu.js → postcss-Vz5bDQ3hJO-hu3djwl2q.js} +0 -0
  40. /package/dist/deps/{query-builder-h6B2D2BCoQ-hi672ju0i.js → query-builder-h6B2D2BCoQ-md9vwh2qw.js} +0 -0
  41. /package/dist/deps/{query-builder-h6B2D2BCoQ-33f97qk7e.js → query-builder-h6B2D2BCoQ-zzx9xwrhd.js} +0 -0
  42. /package/dist/deps/{typescript-2hCq12HCbJ-kcwi4a0yz.js → typescript-2hCq12HCbJ-i2im1m0zb.js} +0 -0
  43. /package/dist/deps/{typescript-2hCq12HCbJ-q6p9eige4.js → typescript-2hCq12HCbJ-n3fmg7w0v.js} +0 -0
  44. /package/dist/deps/{yaml-I5o0CrcX7J-93fx0pyvm.js → yaml-I5o0CrcX7J-fi8ekhimn.js} +0 -0
  45. /package/dist/deps/{yaml-I5o0CrcX7J-d0drtacrr.js → yaml-I5o0CrcX7J-lsxhbyw7g.js} +0 -0
@@ -0,0 +1 @@
1
+ export { createMongoDBClient } from './client/mongodb-index';
@@ -1,7 +1,7 @@
1
1
  var Zl = Object.defineProperty;
2
2
  var $l = (e, t, r) => t in e ? Zl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var se = (e, t, r) => $l(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { Q as Sr, a as e2, b as t2 } from "./deps/query-builder-h6B2D2BCoQ-33f97qk7e.js";
4
+ import { Q as Sr, a as e2, b as t2 } from "./deps/query-builder-h6B2D2BCoQ-zzx9xwrhd.js";
5
5
  import gn from "timers";
6
6
  import Mc from "crypto";
7
7
  import D1 from "fs";
@@ -13,7 +13,7 @@ import i2 from "util";
13
13
  import Fc from "timers/promises";
14
14
  import T1 from "dns";
15
15
  import Rc from "os";
16
- import { g as Ar, c as xt } from "./deps/_commonjsHelpers-KaVRbhAgd4-bqfwq0htn.js";
16
+ import { g as Ar, c as xt } from "./deps/_commonjsHelpers-KaVRbhAgd4-res8ony5t.js";
17
17
  import o2 from "url";
18
18
  import Nc from "zlib";
19
19
  import B1 from "net";
@@ -71079,9 +71079,12 @@ class Z4 {
71079
71079
  throw console.error("count error:", n), n;
71080
71080
  }
71081
71081
  }
71082
+ async aggregate(t, r) {
71083
+ return await this.getCollection(t).aggregate(r, { session: this.session }).toArray();
71084
+ }
71082
71085
  }
71083
71086
  function ql(e, t, r, n) {
71084
- const i = new Z4(e, t, r, n), o = {};
71087
+ const i = new Z4(e, t, r, n), o = { $dbClient: e };
71085
71088
  return Object.keys(t).forEach((u) => {
71086
71089
  o[u] = {
71087
71090
  findUnique: (c) => i.findUnique(u, c),
@@ -71093,7 +71096,8 @@ function ql(e, t, r, n) {
71093
71096
  create: (c) => i.create(u, c),
71094
71097
  update: (c) => i.update(u, c),
71095
71098
  delete: (c) => i.delete(u, c),
71096
- count: (c) => i.count(u, c)
71099
+ count: (c) => i.count(u, c),
71100
+ aggregate: (c) => i.aggregate(u, c)
71097
71101
  };
71098
71102
  }), o.$transaction = async (u) => {
71099
71103
  const c = e.startSession();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "odm-client",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -10,6 +10,21 @@
10
10
  "import": "./dist/index.js",
11
11
  "require": "./dist/index.cjs",
12
12
  "types": "./dist/index.d.ts"
13
+ },
14
+ "./generate": {
15
+ "import": "./dist/generate.js",
16
+ "require": "./dist/generate.cjs",
17
+ "types": "./dist/generate.d.ts"
18
+ },
19
+ "./cloudbase": {
20
+ "import": "./dist/cloudbase.js",
21
+ "require": "./dist/cloudbase.cjs",
22
+ "types": "./dist/cloudbase.d.ts"
23
+ },
24
+ "./mongodb": {
25
+ "import": "./dist/mongodb.js",
26
+ "require": "./dist/mongodb.cjs",
27
+ "types": "./dist/mongodb.d.ts"
13
28
  }
14
29
  },
15
30
  "scripts": {