@pi-r/mongodb 0.10.3 → 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.
- package/client/index.js +3 -3
- 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(
|
|
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(
|
|
543
|
+
this.addLog(4, `inserted: ${insertedCount}, upserted: ${upsertedCount}, matched: ${matchedCount}, modified: ${modifiedCount}, deleted: ${deletedCount}`, "mongodb", 'bulkWrite');
|
|
544
544
|
}
|
|
545
545
|
else {
|
|
546
|
-
this.addLog(
|
|
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.
|
|
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.
|
|
24
|
-
"@e-mc/request": "^0.
|
|
25
|
-
"@e-mc/types": "^0.
|
|
26
|
-
"mongodb": "^6.
|
|
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
|
}
|