@pi-r/mongodb 0.10.2 → 0.11.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.
Files changed (2) hide show
  1. package/client/index.js +3 -3
  2. package/package.json +5 -5
package/client/index.js CHANGED
@@ -532,7 +532,7 @@ async function initCollection(target, item) {
532
532
  await Promise.all((!Array.isArray(item.command) ? [item.command] : item.command).map(async (cmd) => db.command(document, cmd)))
533
533
  .then(items => {
534
534
  for (const output of items) {
535
- this.addLog(this.statusType.INFO, output, "mongodb", 'runCommand');
535
+ this.addLog(4, output, "mongodb", 'runCommand');
536
536
  }
537
537
  });
538
538
  }
@@ -540,10 +540,10 @@ async function initCollection(target, item) {
540
540
  await target.bulkWrite(item.bulkWrite, item.client?.bulkWrite).then(result => {
541
541
  if (result.acknowledged) {
542
542
  const { insertedCount, upsertedCount, matchedCount, modifiedCount, deletedCount } = result;
543
- this.addLog(this.statusType.INFO, `inserted: ${insertedCount}, upserted: ${upsertedCount}, matched: ${matchedCount}, modified: ${modifiedCount}, deleted: ${deletedCount}`, "mongodb", 'bulkWrite');
543
+ this.addLog(4, `inserted: ${insertedCount}, upserted: ${upsertedCount}, matched: ${matchedCount}, modified: ${modifiedCount}, deleted: ${deletedCount}`, "mongodb", 'bulkWrite');
544
544
  }
545
545
  else {
546
- this.addLog(this.statusType.WARN, 'Operation was not acknowledged', "mongodb", 'bulkWrite');
546
+ this.addLog(3, 'Operation was not acknowledged', "mongodb", 'bulkWrite');
547
547
  }
548
548
  });
549
549
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/mongodb",
3
- "version": "0.10.2",
3
+ "version": "0.11.0",
4
4
  "description": "MongoDB client driver for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "types": "client/index.d.ts",
@@ -20,9 +20,9 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/pi-r#readme",
22
22
  "dependencies": {
23
- "@e-mc/db": "^0.12.5",
24
- "@e-mc/request": "^0.12.5",
25
- "@e-mc/types": "^0.12.5",
26
- "mongodb": "^6.18.0"
23
+ "@e-mc/db": "^0.13.0",
24
+ "@e-mc/request": "^0.13.0",
25
+ "@e-mc/types": "^0.13.0",
26
+ "mongodb": "^6.20.0"
27
27
  }
28
28
  }