@sprucelabs/data-stores 28.3.0 → 28.3.2
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.
@@ -342,6 +342,9 @@ class MongoDatabase {
|
|
342
342
|
var _a;
|
343
343
|
const currentIndexes = await this.getIndexes(collectionName, shouldIncludeUnique);
|
344
344
|
const indexesToDelete = (0, database_utilities_1.pluckMissingIndexes)(currentIndexes, indexes);
|
345
|
+
for (const extra of indexesToDelete) {
|
346
|
+
await this.dropIndex(collectionName, extra);
|
347
|
+
}
|
345
348
|
for (const index of indexes) {
|
346
349
|
if (!this.doesInclude(currentIndexes, this.normalizeIndex(index))) {
|
347
350
|
try {
|
@@ -354,9 +357,6 @@ class MongoDatabase {
|
|
354
357
|
}
|
355
358
|
}
|
356
359
|
}
|
357
|
-
for (const extra of indexesToDelete) {
|
358
|
-
await this.dropIndex(collectionName, extra);
|
359
|
-
}
|
360
360
|
}
|
361
361
|
async createUniqueIndex(collection, index) {
|
362
362
|
const currentIndexes = await this.getUniqueIndexes(collection);
|
@@ -378,6 +378,9 @@ export default class MongoDatabase {
|
|
378
378
|
var _a;
|
379
379
|
const currentIndexes = yield this.getIndexes(collectionName, shouldIncludeUnique);
|
380
380
|
const indexesToDelete = pluckMissingIndexes(currentIndexes, indexes);
|
381
|
+
for (const extra of indexesToDelete) {
|
382
|
+
yield this.dropIndex(collectionName, extra);
|
383
|
+
}
|
381
384
|
for (const index of indexes) {
|
382
385
|
if (!this.doesInclude(currentIndexes, this.normalizeIndex(index))) {
|
383
386
|
try {
|
@@ -390,9 +393,6 @@ export default class MongoDatabase {
|
|
390
393
|
}
|
391
394
|
}
|
392
395
|
}
|
393
|
-
for (const extra of indexesToDelete) {
|
394
|
-
yield this.dropIndex(collectionName, extra);
|
395
|
-
}
|
396
396
|
});
|
397
397
|
}
|
398
398
|
createUniqueIndex(collection, index) {
|
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"publishConfig": {
|
4
4
|
"access": "public"
|
5
5
|
},
|
6
|
-
"version": "28.3.
|
6
|
+
"version": "28.3.2",
|
7
7
|
"files": [
|
8
8
|
"build/**/*",
|
9
9
|
"!build/__tests__",
|
@@ -64,22 +64,22 @@
|
|
64
64
|
"watch.tsc": "tsc -w"
|
65
65
|
},
|
66
66
|
"dependencies": {
|
67
|
-
"@sprucelabs/error": "^6.0.
|
68
|
-
"@sprucelabs/globby": "^2.0.
|
69
|
-
"@sprucelabs/schema": "^30.0.
|
70
|
-
"@sprucelabs/spruce-skill-utils": "^31.0.
|
67
|
+
"@sprucelabs/error": "^6.0.346",
|
68
|
+
"@sprucelabs/globby": "^2.0.307",
|
69
|
+
"@sprucelabs/schema": "^30.0.394",
|
70
|
+
"@sprucelabs/spruce-skill-utils": "^31.0.413",
|
71
71
|
"just-clone": "^6.2.0",
|
72
72
|
"lodash": "^4.17.21",
|
73
73
|
"mongodb": "^6.9.0",
|
74
74
|
"nedb": "^1.8.0"
|
75
75
|
},
|
76
76
|
"devDependencies": {
|
77
|
-
"@sprucelabs/esm-postbuild": "^6.0.
|
78
|
-
"@sprucelabs/jest-json-reporter": "^8.0.
|
79
|
-
"@sprucelabs/resolve-path-aliases": "^2.0.
|
77
|
+
"@sprucelabs/esm-postbuild": "^6.0.330",
|
78
|
+
"@sprucelabs/jest-json-reporter": "^8.0.347",
|
79
|
+
"@sprucelabs/resolve-path-aliases": "^2.0.325",
|
80
80
|
"@sprucelabs/semantic-release": "^5.0.2",
|
81
81
|
"@sprucelabs/test": "^9.0.45",
|
82
|
-
"@sprucelabs/test-utils": "^5.1.
|
82
|
+
"@sprucelabs/test-utils": "^5.1.292",
|
83
83
|
"@types/lodash": "^4.17.7",
|
84
84
|
"@types/nedb": "^1.8.16",
|
85
85
|
"@types/node": "^22.5.4",
|