@sprucelabs/data-stores 28.1.6 → 28.1.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.
package/build/esm/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './cursors/CursorPager';
|
|
|
21
21
|
export { default as CursorPagerFaker } from './cursors/CursorPagerFaker';
|
|
22
22
|
export * from './cursors/CursorPager';
|
|
23
23
|
export { default as DatabaseFieldMapperPlugin } from './plugins/DatabaseFieldMapperPlugin';
|
|
24
|
+
export { default as normalizeIndex } from './databases/normalizeIndex';
|
|
24
25
|
/**
|
|
25
26
|
* @deprecated databaseAssertUtil -> databaseAssert
|
|
26
27
|
*/
|
package/build/esm/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export * from './cursors/CursorPager.js';
|
|
|
21
21
|
export { default as CursorPagerFaker } from './cursors/CursorPagerFaker.js';
|
|
22
22
|
export * from './cursors/CursorPager.js';
|
|
23
23
|
export { default as DatabaseFieldMapperPlugin } from './plugins/DatabaseFieldMapperPlugin.js';
|
|
24
|
+
export { default as normalizeIndex } from './databases/normalizeIndex.js';
|
|
24
25
|
/**
|
|
25
26
|
* @deprecated databaseAssertUtil -> databaseAssert
|
|
26
27
|
*/
|
|
@@ -482,7 +482,8 @@ const databaseAssertUtil = {
|
|
|
482
482
|
const matched = yield db.findOne(this.collectionName, {
|
|
483
483
|
id: created.id,
|
|
484
484
|
});
|
|
485
|
-
assert.
|
|
485
|
+
assert.isTruthy(matched, `findOne() with id ${created.id} returned null`);
|
|
486
|
+
assert.isEqualDeep(matched.target, target, `field called "target" which is an object was not updated as expected.`, true);
|
|
486
487
|
yield this.shutdown(db);
|
|
487
488
|
});
|
|
488
489
|
},
|
package/build/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './cursors/CursorPager';
|
|
|
21
21
|
export { default as CursorPagerFaker } from './cursors/CursorPagerFaker';
|
|
22
22
|
export * from './cursors/CursorPager';
|
|
23
23
|
export { default as DatabaseFieldMapperPlugin } from './plugins/DatabaseFieldMapperPlugin';
|
|
24
|
+
export { default as normalizeIndex } from './databases/normalizeIndex';
|
|
24
25
|
/**
|
|
25
26
|
* @deprecated databaseAssertUtil -> databaseAssert
|
|
26
27
|
*/
|
package/build/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.BatchArrayCursor = exports.BatchCursorImpl = exports.storePluginAssert = exports.databaseAssert = exports.databaseAssertUtil = exports.DatabaseFieldMapperPlugin = exports.CursorPagerFaker = exports.CursorPager = exports.generateId = exports.DataStoresError = exports.mongoUtil = exports.NeDbDatabase = exports.MongoDatabase = exports.StoreLoader = exports.DatabaseFactory = exports.StoreFactory = exports.AbstractStore = exports.DatabaseFixture = exports.AbstractDatabaseTest = void 0;
|
|
20
|
+
exports.BatchArrayCursor = exports.BatchCursorImpl = exports.storePluginAssert = exports.databaseAssert = exports.databaseAssertUtil = exports.normalizeIndex = exports.DatabaseFieldMapperPlugin = exports.CursorPagerFaker = exports.CursorPager = exports.generateId = exports.DataStoresError = exports.mongoUtil = exports.NeDbDatabase = exports.MongoDatabase = exports.StoreLoader = exports.DatabaseFactory = exports.StoreFactory = exports.AbstractStore = exports.DatabaseFixture = exports.AbstractDatabaseTest = void 0;
|
|
21
21
|
var AbstractDatabaseTest_1 = require("./tests/AbstractDatabaseTest");
|
|
22
22
|
Object.defineProperty(exports, "AbstractDatabaseTest", { enumerable: true, get: function () { return __importDefault(AbstractDatabaseTest_1).default; } });
|
|
23
23
|
var DatabaseFixture_1 = require("./fixtures/DatabaseFixture");
|
|
@@ -55,6 +55,8 @@ Object.defineProperty(exports, "CursorPagerFaker", { enumerable: true, get: func
|
|
|
55
55
|
__exportStar(require("./cursors/CursorPager"), exports);
|
|
56
56
|
var DatabaseFieldMapperPlugin_1 = require("./plugins/DatabaseFieldMapperPlugin");
|
|
57
57
|
Object.defineProperty(exports, "DatabaseFieldMapperPlugin", { enumerable: true, get: function () { return __importDefault(DatabaseFieldMapperPlugin_1).default; } });
|
|
58
|
+
var normalizeIndex_1 = require("./databases/normalizeIndex");
|
|
59
|
+
Object.defineProperty(exports, "normalizeIndex", { enumerable: true, get: function () { return __importDefault(normalizeIndex_1).default; } });
|
|
58
60
|
/**
|
|
59
61
|
* @deprecated databaseAssertUtil -> databaseAssert
|
|
60
62
|
*/
|
|
@@ -437,7 +437,8 @@ const databaseAssertUtil = {
|
|
|
437
437
|
const matched = await db.findOne(this.collectionName, {
|
|
438
438
|
id: created.id,
|
|
439
439
|
});
|
|
440
|
-
test_utils_1.assert.
|
|
440
|
+
test_utils_1.assert.isTruthy(matched, `findOne() with id ${created.id} returned null`);
|
|
441
|
+
test_utils_1.assert.isEqualDeep(matched.target, target, `field called "target" which is an object was not updated as expected.`, true);
|
|
441
442
|
await this.shutdown(db);
|
|
442
443
|
},
|
|
443
444
|
async assertCanUpdateFieldInObjectFieldWithTargettedWhere(connect) {
|