odm-client 0.0.6 → 0.0.8

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 (39) hide show
  1. package/dist/client/cloudbase-client.d.ts +5 -0
  2. package/dist/client/mongodb-client.d.ts +5 -0
  3. package/dist/cloudbase.cjs +1 -1
  4. package/dist/cloudbase.js +79 -62
  5. package/dist/generate.cjs +6 -4
  6. package/dist/generate.js +18 -16
  7. package/dist/mongodb.cjs +5 -5
  8. package/dist/mongodb.js +707 -698
  9. package/package.json +1 -1
  10. /package/dist/deps/{_commonjsHelpers-KaVRbhAgd4-yb1md3dwe.js → _commonjsHelpers-KaVRbhAgd4-luyi60el4.js} +0 -0
  11. /package/dist/deps/{_commonjsHelpers-KaVRbhAgd4-wjnejzmz6.js → _commonjsHelpers-KaVRbhAgd4-uxdx7xq2m.js} +0 -0
  12. /package/dist/deps/{acorn-DYjaOAP8Gz-lcyky5srw.js → acorn-DYjaOAP8Gz-fc8a5vd6f.js} +0 -0
  13. /package/dist/deps/{acorn-DYjaOAP8Gz-vkxnlrhwa.js → acorn-DYjaOAP8Gz-mmbac6k56.js} +0 -0
  14. /package/dist/deps/{angular-1bp1uAROl4-apximaw11.js → angular-1bp1uAROl4-392hcgq9j.js} +0 -0
  15. /package/dist/deps/{angular-1bp1uAROl4-9fefttljf.js → angular-1bp1uAROl4-nu7ubqcdq.js} +0 -0
  16. /package/dist/deps/{babel-_P9jsDBVVy-ufr8nd82k.js → babel-_P9jsDBVVy-ny5fugicw.js} +0 -0
  17. /package/dist/deps/{babel-_P9jsDBVVy-om3seubsy.js → babel-_P9jsDBVVy-oseohiw1b.js} +0 -0
  18. /package/dist/deps/{estree-Q-oFBmJEml-hhewirwmi.js → estree-Q-oFBmJEml-d2f6a4nek.js} +0 -0
  19. /package/dist/deps/{estree-Q-oFBmJEml-0wyzrfhg9.js → estree-Q-oFBmJEml-vqrstqunn.js} +0 -0
  20. /package/dist/deps/{flow-j77MFvzLrn-w44sbl0aq.js → flow-j77MFvzLrn-6tjv6t0kh.js} +0 -0
  21. /package/dist/deps/{flow-j77MFvzLrn-piniwui6t.js → flow-j77MFvzLrn-bzfofy2wu.js} +0 -0
  22. /package/dist/deps/{glimmer-ewQPb5nTUl-5sajfp57j.js → glimmer-ewQPb5nTUl-79i0tvwqi.js} +0 -0
  23. /package/dist/deps/{glimmer-ewQPb5nTUl-ec1331ul8.js → glimmer-ewQPb5nTUl-f3nhh3bgt.js} +0 -0
  24. /package/dist/deps/{graphql-8EXR1_taGG-unrztobpq.js → graphql-8EXR1_taGG-hplrxo4fy.js} +0 -0
  25. /package/dist/deps/{graphql-8EXR1_taGG-udhm78gd4.js → graphql-8EXR1_taGG-lws2cspdc.js} +0 -0
  26. /package/dist/deps/{html-dGbiW_CFWL-poyjuvdaa.js → html-dGbiW_CFWL-0lmlt42z5.js} +0 -0
  27. /package/dist/deps/{html-dGbiW_CFWL-2oof56m2q.js → html-dGbiW_CFWL-ney778lgh.js} +0 -0
  28. /package/dist/deps/{markdown-vAYIRClyWZ-429ctefsk.js → markdown-vAYIRClyWZ-e7ndhqf52.js} +0 -0
  29. /package/dist/deps/{markdown-vAYIRClyWZ-1cemrbb6a.js → markdown-vAYIRClyWZ-o2ueqpioi.js} +0 -0
  30. /package/dist/deps/{meriyah-d5_qqf88x--o4esm3k5x.js → meriyah-d5_qqf88x--v93a4a260.js} +0 -0
  31. /package/dist/deps/{meriyah-d5_qqf88x--0mlax9uei.js → meriyah-d5_qqf88x--vl5irnno3.js} +0 -0
  32. /package/dist/deps/{postcss-Vz5bDQ3hJO-mo89mpl0m.js → postcss-Vz5bDQ3hJO-kz4viqh8k.js} +0 -0
  33. /package/dist/deps/{postcss-Vz5bDQ3hJO-pqn1dpwii.js → postcss-Vz5bDQ3hJO-rtvn3lj4a.js} +0 -0
  34. /package/dist/deps/{query-builder-h6B2D2BCoQ-zi2f107p9.js → query-builder-h6B2D2BCoQ-cdzloxcwh.js} +0 -0
  35. /package/dist/deps/{query-builder-h6B2D2BCoQ-xgzrq0az6.js → query-builder-h6B2D2BCoQ-uo54lu0fc.js} +0 -0
  36. /package/dist/deps/{typescript-2hCq12HCbJ-q59kbise6.js → typescript-2hCq12HCbJ-deifaq0ac.js} +0 -0
  37. /package/dist/deps/{typescript-2hCq12HCbJ-bwx78hlqe.js → typescript-2hCq12HCbJ-yk0uhwb78.js} +0 -0
  38. /package/dist/deps/{yaml-I5o0CrcX7J-ocpa2wi40.js → yaml-I5o0CrcX7J-89hx547ee.js} +0 -0
  39. /package/dist/deps/{yaml-I5o0CrcX7J-mr5s5j83i.js → yaml-I5o0CrcX7J-jmlyfocsv.js} +0 -0
package/dist/generate.js CHANGED
@@ -26,7 +26,7 @@ import process4 from "process";
26
26
  import assert2, { ok, strictEqual } from "assert";
27
27
  import v8 from "v8";
28
28
  import require$$0$2, { format, inspect } from "util";
29
- import { c as commonjsGlobal, a as getDefaultExportFromCjs } from "./deps/_commonjsHelpers-KaVRbhAgd4-wjnejzmz6.js";
29
+ import { c as commonjsGlobal, a as getDefaultExportFromCjs } from "./deps/_commonjsHelpers-KaVRbhAgd4-uxdx7xq2m.js";
30
30
  import require$$0$1 from "os";
31
31
  import require$$6 from "inspector";
32
32
  import require$$3 from "node:fs";
@@ -9117,7 +9117,7 @@ async function loadConfigFromPackageYaml(u) {
9117
9117
  var parseYaml;
9118
9118
  async function loadYaml(u) {
9119
9119
  const l = await read_file_default(u);
9120
- parseYaml || ({ __parsePrettierYamlConfig: parseYaml } = await import("./deps/yaml-I5o0CrcX7J-ocpa2wi40.js"));
9120
+ parseYaml || ({ __parsePrettierYamlConfig: parseYaml } = await import("./deps/yaml-I5o0CrcX7J-89hx547ee.js"));
9121
9121
  try {
9122
9122
  return parseYaml(l);
9123
9123
  } catch (D) {
@@ -13433,7 +13433,7 @@ function createParsersAndPrinters(u) {
13433
13433
  }
13434
13434
  var estreePlugin = createParsersAndPrinters([
13435
13435
  {
13436
- importPlugin: () => import("./deps/estree-Q-oFBmJEml-hhewirwmi.js"),
13436
+ importPlugin: () => import("./deps/estree-Q-oFBmJEml-d2f6a4nek.js"),
13437
13437
  printers: ["estree", "estree-json"]
13438
13438
  }
13439
13439
  ]), options7 = {
@@ -13454,11 +13454,11 @@ var estreePlugin = createParsersAndPrinters([
13454
13454
  ...languages_evaluate_default8
13455
13455
  ], { parsers, printers } = createParsersAndPrinters([
13456
13456
  {
13457
- importPlugin: () => import("./deps/acorn-DYjaOAP8Gz-lcyky5srw.js"),
13457
+ importPlugin: () => import("./deps/acorn-DYjaOAP8Gz-fc8a5vd6f.js"),
13458
13458
  parsers: ["acorn", "espree"]
13459
13459
  },
13460
13460
  {
13461
- importPlugin: () => import("./deps/angular-1bp1uAROl4-9fefttljf.js"),
13461
+ importPlugin: () => import("./deps/angular-1bp1uAROl4-nu7ubqcdq.js"),
13462
13462
  parsers: [
13463
13463
  "__ng_action",
13464
13464
  "__ng_binding",
@@ -13467,7 +13467,7 @@ var estreePlugin = createParsersAndPrinters([
13467
13467
  ]
13468
13468
  },
13469
13469
  {
13470
- importPlugin: () => import("./deps/babel-_P9jsDBVVy-ufr8nd82k.js"),
13470
+ importPlugin: () => import("./deps/babel-_P9jsDBVVy-ny5fugicw.js"),
13471
13471
  parsers: [
13472
13472
  "babel",
13473
13473
  "babel-flow",
@@ -13486,44 +13486,44 @@ var estreePlugin = createParsersAndPrinters([
13486
13486
  ]
13487
13487
  },
13488
13488
  {
13489
- importPlugin: () => import("./deps/flow-j77MFvzLrn-piniwui6t.js"),
13489
+ importPlugin: () => import("./deps/flow-j77MFvzLrn-bzfofy2wu.js"),
13490
13490
  parsers: ["flow"]
13491
13491
  },
13492
13492
  {
13493
- importPlugin: () => import("./deps/glimmer-ewQPb5nTUl-5sajfp57j.js"),
13493
+ importPlugin: () => import("./deps/glimmer-ewQPb5nTUl-79i0tvwqi.js"),
13494
13494
  parsers: ["glimmer"],
13495
13495
  printers: ["glimmer"]
13496
13496
  },
13497
13497
  {
13498
- importPlugin: () => import("./deps/graphql-8EXR1_taGG-udhm78gd4.js"),
13498
+ importPlugin: () => import("./deps/graphql-8EXR1_taGG-lws2cspdc.js"),
13499
13499
  parsers: ["graphql"],
13500
13500
  printers: ["graphql"]
13501
13501
  },
13502
13502
  {
13503
- importPlugin: () => import("./deps/html-dGbiW_CFWL-poyjuvdaa.js"),
13503
+ importPlugin: () => import("./deps/html-dGbiW_CFWL-0lmlt42z5.js"),
13504
13504
  parsers: ["html", "angular", "vue", "lwc", "mjml"],
13505
13505
  printers: ["html"]
13506
13506
  },
13507
13507
  {
13508
- importPlugin: () => import("./deps/markdown-vAYIRClyWZ-429ctefsk.js"),
13508
+ importPlugin: () => import("./deps/markdown-vAYIRClyWZ-e7ndhqf52.js"),
13509
13509
  parsers: ["markdown", "mdx", "remark"],
13510
13510
  printers: ["mdast"]
13511
13511
  },
13512
13512
  {
13513
- importPlugin: () => import("./deps/meriyah-d5_qqf88x--o4esm3k5x.js"),
13513
+ importPlugin: () => import("./deps/meriyah-d5_qqf88x--v93a4a260.js"),
13514
13514
  parsers: ["meriyah"]
13515
13515
  },
13516
13516
  {
13517
- importPlugin: () => import("./deps/postcss-Vz5bDQ3hJO-mo89mpl0m.js"),
13517
+ importPlugin: () => import("./deps/postcss-Vz5bDQ3hJO-kz4viqh8k.js"),
13518
13518
  parsers: ["css", "less", "scss"],
13519
13519
  printers: ["postcss"]
13520
13520
  },
13521
13521
  {
13522
- importPlugin: () => import("./deps/typescript-2hCq12HCbJ-bwx78hlqe.js"),
13522
+ importPlugin: () => import("./deps/typescript-2hCq12HCbJ-yk0uhwb78.js"),
13523
13523
  parsers: ["typescript"]
13524
13524
  },
13525
13525
  {
13526
- importPlugin: () => import("./deps/yaml-I5o0CrcX7J-ocpa2wi40.js"),
13526
+ importPlugin: () => import("./deps/yaml-I5o0CrcX7J-89hx547ee.js"),
13527
13527
  parsers: ["yaml"],
13528
13528
  printers: ["yaml"]
13529
13529
  }
@@ -241582,8 +241582,10 @@ interface BaseClient<WhereUniqueInput, Select, Schema, WhereInput, ORDER_BY, Cre
241582
241582
  ): Promise<PageResult<Result>>;
241583
241583
  create<T extends { data: CreateData }>(options: T): Promise<{ _id: string }>;
241584
241584
  update<T extends { where: WhereUniqueInput; data: UpdateData }>(options: T): Promise<void>;
241585
+ updateAndReturn<T extends { where: WhereInput; data: UpdateData }>(options: T): Promise<Schema | null>;
241585
241586
  delete<T extends { where: WhereUniqueInput }>(options: T): Promise<void>;
241586
241587
  count(where?: WhereInput): Promise<number>;
241588
+ aggregate(pipeline: any[]): Promise<any[]>;
241587
241589
  }
241588
241590
 
241589
241591
  `), W.push("interface ODMClientBase {");
@@ -241600,7 +241602,7 @@ interface BaseClient<WhereUniqueInput, Select, Schema, WhereInput, ORDER_BY, Cre
241600
241602
  ` ${Y}: Omit<BaseClient<WhereIdInput, ${le}Select, ${le}Schema, WhereIdInput, ${le}OrderByInput, ${le}CreateData, ${le}UpdateData>, ODMClientTransactionOmitMethod>;`
241601
241603
  );
241602
241604
  }
241603
- W.push("}"), W.push(""), W.push("export interface ODMClient extends ODMClientBase {"), W.push(" $transaction<R>(fn: (tx: ODMClientTransactionBase) => Promise<R>): Promise<R>;"), W.push("}");
241605
+ W.push("}"), W.push(""), W.push("export interface ODMClient extends ODMClientBase {"), W.push(" $transaction<R>(fn: (tx: ODMClientTransactionBase) => Promise<R>): Promise<R>;"), W.push(" $dbClient: any;"), W.push("}");
241604
241606
  const z = path$c.dirname(D);
241605
241607
  fs$a.existsSync(z) || fs$a.mkdirSync(z, { recursive: !0 });
241606
241608
  const U = await N.format(W.join(`