@sprucelabs/data-stores 28.3.275 → 28.3.277

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.
@@ -1,6 +1,6 @@
1
1
  import { Database, IndexWithFilter, TestConnect } from '../types/database.types';
2
2
  import { DataStore } from '../types/stores.types';
3
- declare const methods: readonly ["assertThrowsWithInvalidConnectionString", "assertThrowsWhenCantConnect", "assertThrowsWithBadDatabaseName", "assertKnowsIfConnectionClosed", "assertCanSortDesc", "assertCanSortAsc", "assertCanSortById", "assertCanQueryWithOr", "assertGeneratesIdDifferentEachTime", "assertInsertingGeneratesId", "assertCanCreateMany", "assertCanCreateWithObjectField", "assertCanCountOnId", "assertCanCount", "assertThrowsWhenUpdatingRecordNotFound", "assertCanUpdate", "assertCanUpdateMany", "assertCanPushOntoArrayValue", "assertCanUpdateWithObjectField", "assertCanUpdateFieldInObjectFieldWithTargettedWhere", "assertCanSaveAndGetNullAndUndefined", "assertUpdateReturnsMatchedCounts", "assertCanUpsertOne", "assertCanUpsertNull", "assertCanPushToArrayOnUpsert", "assertCanSyncUniqueIndexesWithFilterExpression", "assertEmptyDatabaseReturnsEmptyArray", "assertFindOneOnEmptyDatabaseReturnsNull", "assertCanLimitResults", "assertCanLimitResultsToZero", "assertCanFindWithBooleanField", "assertCanQueryByGtLtGteLteNe", "assertCanQueryPathWithDotSyntax", "assertCanReturnOnlySelectFields", "assertCanSearchByRegex", "assertCanFindWithNe", "assertCanFindWithIn", "assertCanDeleteRecord", "assertCanDeleteOne", "assertHasNoUniqueIndexToStart", "assertCanCreateUniqueIndex", "assertCanCreateMultiFieldUniqueIndex", "assertCantCreateUniqueIndexTwice", "assertCanDropUniqueIndex", "assertCanDropCompoundUniqueIndex", "assertCantDropUniqueIndexThatDoesntExist", "assertCantDropIndexWhenNoIndexExists", "assertCantDropCompoundUniqueIndexThatDoesntExist", "assertSyncingUniqueIndexsAddsMissingIndexes", "assertSyncingUniqueIndexsSkipsExistingIndexs", "assertSyncingUniqueIndexesRemovesExtraIndexes", "assertSyncingUniqueIndexesIsRaceProof", "assertSyncingIndexesDoesNotAddAndRemove", "assertUniqueIndexBlocksDuplicates", "assertDuplicateKeyThrowsOnInsert", "assertSettingUniqueIndexViolationThrowsSpruceError", "assertCanCreateUniqueIndexOnNestedField", "assertUpsertWithUniqueIndex", "assertNestedFieldIndexUpdates", "assertHasNoIndexToStart", "assertCanCreateIndex", "assertCantCreateSameIndexTwice", "assertCanCreateMultiFieldIndex", "assertCanDropIndex", "assertCanDropCompoundIndex", "assertCantDropCompoundIndexThatDoesNotExist", "assertSyncIndexesSkipsExisting", "assertSyncIndexesRemovesExtraIndexes", "assertSyncIndexesHandlesRaceConditions", "assertSyncIndexesDoesNotRemoveExisting", "assertDuplicateFieldsWithMultipleUniqueIndexesWorkAsExpected", "assertCanSyncIndexesWithoutPartialThenAgainWithProperlyUpdates"];
3
+ declare const methods: readonly ["assertThrowsWithInvalidConnectionString", "assertThrowsWhenCantConnect", "assertThrowsWithBadDatabaseName", "assertKnowsIfConnectionClosed", "assertCanSortDesc", "assertCanSortAsc", "assertCanSortById", "assertCanQueryWithOr", "assertGeneratesIdDifferentEachTime", "assertInsertingGeneratesId", "assertCanCreateMany", "assertCanCreateWithObjectField", "assertCanCountOnId", "assertCanCount", "assertThrowsWhenUpdatingRecordNotFound", "assertCanUpdate", "assertCanUpdateMany", "assertCanPushOntoArrayValue", "assertCanUpdateWithObjectField", "assertCanUpdateFieldInObjectFieldWithTargettedWhere", "assertCanSaveAndGetNullAndUndefined", "assertUpdateReturnsMatchedCounts", "assertCanUpsertOne", "assertCanUpsertNull", "assertCanPushToArrayOnUpsert", "assertCanSyncUniqueIndexesWithFilterExpression", "assertEmptyDatabaseReturnsEmptyArray", "assertFindOneOnEmptyDatabaseReturnsNull", "assertCanLimitResults", "assertCanLimitResultsToZero", "assertCanFindWithBooleanField", "assertCanQueryByGtLtGteLteNe", "assertCanQueryPathWithDotSyntax", "assertCanReturnOnlySelectFields", "assertCanSearchByRegex", "assertCanFindWithNe", "assertCanFindWithIn", "assertCanDeleteRecord", "assertCanDeleteOne", "assertHasNoUniqueIndexToStart", "assertCanCreateUniqueIndex", "assertCanCreateMultiFieldUniqueIndex", "assertCantCreateUniqueIndexTwice", "assertCanDropUniqueIndex", "assertCanDropCompoundUniqueIndex", "assertCantDropUniqueIndexThatDoesntExist", "assertCantDropIndexWhenNoIndexExists", "assertCantDropCompoundUniqueIndexThatDoesntExist", "assertSyncingUniqueIndexesAddsMissingIndexes", "assertSyncingUniqueIndexesSkipsExistingIndexes", "assertSyncingUniqueIndexesRemovesExtraIndexes", "assertSyncingUniqueIndexesIsRaceProof", "assertSyncingIndexesDoesNotAddAndRemove", "assertUniqueIndexBlocksDuplicates", "assertDuplicateKeyThrowsOnInsert", "assertSettingUniqueIndexViolationThrowsSpruceError", "assertCanCreateUniqueIndexOnNestedField", "assertUpsertWithUniqueIndex", "assertNestedFieldIndexUpdates", "assertHasNoIndexToStart", "assertCanCreateIndex", "assertCantCreateSameIndexTwice", "assertCanCreateMultiFieldIndex", "assertCanDropIndex", "assertCanDropCompoundIndex", "assertCantDropCompoundIndexThatDoesNotExist", "assertSyncIndexesSkipsExisting", "assertSyncIndexesRemovesExtraIndexes", "assertSyncIndexesHandlesRaceConditions", "assertSyncIndexesDoesNotRemoveExisting", "assertDuplicateFieldsWithMultipleUniqueIndexesWorkAsExpected", "assertCanSyncIndexesWithoutPartialThenAgainWithProperlyUpdates"];
4
4
  type OriginalMethods = (typeof methods)[number];
5
5
  type BangMethods = `!${OriginalMethods}`;
6
6
  export type DatabaseAssertionName = OriginalMethods | BangMethods;
@@ -39,8 +39,8 @@ declare const databaseAssertUtil: {
39
39
  assertDuplicateKeyThrowsOnInsert(connect: TestConnect): Promise<void>;
40
40
  assertSyncingIndexesDoesNotAddAndRemove(connect: TestConnect): Promise<void>;
41
41
  assertSyncingUniqueIndexesRemovesExtraIndexes(connect: TestConnect): Promise<void>;
42
- assertSyncingUniqueIndexsSkipsExistingIndexs(connect: TestConnect): Promise<void>;
43
- assertSyncingUniqueIndexsAddsMissingIndexes(connect: TestConnect): Promise<void>;
42
+ assertSyncingUniqueIndexesSkipsExistingIndexes(connect: TestConnect): Promise<void>;
43
+ assertSyncingUniqueIndexesAddsMissingIndexes(connect: TestConnect): Promise<void>;
44
44
  assertCantDropCompoundUniqueIndexThatDoesntExist(connect: TestConnect): Promise<void>;
45
45
  assertCantDropIndexWhenNoIndexExists(connect: TestConnect): Promise<void>;
46
46
  assertCantDropUniqueIndexThatDoesntExist(connect: TestConnect): Promise<void>;
@@ -68,8 +68,8 @@ const methods = [
68
68
  'assertCantDropUniqueIndexThatDoesntExist',
69
69
  'assertCantDropIndexWhenNoIndexExists',
70
70
  'assertCantDropCompoundUniqueIndexThatDoesntExist',
71
- 'assertSyncingUniqueIndexsAddsMissingIndexes',
72
- 'assertSyncingUniqueIndexsSkipsExistingIndexs',
71
+ 'assertSyncingUniqueIndexesAddsMissingIndexes',
72
+ 'assertSyncingUniqueIndexesSkipsExistingIndexes',
73
73
  'assertSyncingUniqueIndexesRemovesExtraIndexes',
74
74
  'assertSyncingUniqueIndexesIsRaceProof',
75
75
  'assertSyncingIndexesDoesNotAddAndRemove',
@@ -341,19 +341,19 @@ const databaseAssertUtil = {
341
341
  const matchedBeforeDelete = yield db.findOne(this.collectionName, {
342
342
  id: created.id,
343
343
  });
344
- assert.isTruthy(matchedBeforeDelete);
345
- assert.isEqual(matchedBeforeDelete.id, created.id);
344
+ assert.isTruthy(matchedBeforeDelete, 'findOne() did not return the record created!');
345
+ assert.isEqual(matchedBeforeDelete.id, created.id, 'findOne() returned id does not match what was sent to createOne');
346
346
  const numDeleted = yield db.delete(this.collectionName, {
347
347
  id: matchedBeforeDelete.id,
348
348
  });
349
- assert.isEqual(numDeleted, 1);
349
+ assert.isEqual(numDeleted, 1, 'delete() did not return the total recrods deleted!');
350
350
  const matchedAfterDelete = yield db.findOne(this.collectionName, {
351
351
  id: created.id,
352
352
  });
353
- assert.isFalsy(matchedAfterDelete, `Record with the id of ${created.id} was not deleted!`);
353
+ assert.isFalsy(matchedAfterDelete, `Record with the id of ${created.id} was not deleted with delete()!`);
354
354
  yield db.create(this.collectionName, [
355
355
  {
356
- name: 'a record',
356
+ name: 'another record',
357
357
  },
358
358
  {
359
359
  name: 'a record',
@@ -362,8 +362,12 @@ const databaseAssertUtil = {
362
362
  name: 'a record',
363
363
  },
364
364
  ]);
365
- const manyDeleted = yield db.delete(this.collectionName, {});
366
- assert.isEqual(manyDeleted, 3, `delete() did not return the total recrods deleted!`);
365
+ const manyDeleted = yield db.delete(this.collectionName, {
366
+ name: 'another record',
367
+ });
368
+ assert.isEqual(manyDeleted, 1, `delete() did not return the total records deleted!`);
369
+ const total = yield db.count(this.collectionName);
370
+ assert.isEqual(total, 2, 'delete() did not delete all records');
367
371
  yield this.shutdown(db);
368
372
  });
369
373
  },
@@ -791,11 +795,11 @@ const databaseAssertUtil = {
791
795
  },
792
796
  ]);
793
797
  indexes = yield db.getUniqueIndexes(this.collectionName);
794
- assert.isLength(indexes, 2, `Syncing unique indexs with filter is not removing extra indexes.`);
798
+ assert.isLength(indexes, 2, `Syncing unique indexes with filter is not removing extra indexes.`);
795
799
  yield this.shutdown(db);
796
800
  });
797
801
  },
798
- assertSyncingUniqueIndexsSkipsExistingIndexs(connect) {
802
+ assertSyncingUniqueIndexesSkipsExistingIndexes(connect) {
799
803
  return __awaiter(this, void 0, void 0, function* () {
800
804
  const db = yield connectToDabatase(connect);
801
805
  yield db.syncUniqueIndexes(this.collectionName, [['uniqueField']]);
@@ -811,7 +815,7 @@ const databaseAssertUtil = {
811
815
  yield this.shutdown(db);
812
816
  });
813
817
  },
814
- assertSyncingUniqueIndexsAddsMissingIndexes(connect) {
818
+ assertSyncingUniqueIndexesAddsMissingIndexes(connect) {
815
819
  return __awaiter(this, void 0, void 0, function* () {
816
820
  const db = yield connectToDabatase(connect);
817
821
  yield db.syncUniqueIndexes(this.collectionName, [['uniqueField']]);
@@ -825,7 +829,7 @@ const databaseAssertUtil = {
825
829
  ['someField'],
826
830
  ]);
827
831
  indexes = yield db.getUniqueIndexes(this.collectionName);
828
- assert.isLength(indexes, 2, 'There should still be 2 indexes after this syncUniqueIndexs(). First sync was a single field unique index, second sync was two indexes, but one was already there. So one should have been ignored, one should have been added.');
832
+ assert.isLength(indexes, 2, 'There should still be 2 indexes after this syncUniqueIndexes(). First sync was a single field unique index, second sync was two indexes, but one was already there. So one should have been ignored, one should have been added.');
829
833
  yield this.shutdown(db);
830
834
  });
831
835
  },
@@ -1,6 +1,6 @@
1
1
  import { Database, IndexWithFilter, TestConnect } from '../types/database.types';
2
2
  import { DataStore } from '../types/stores.types';
3
- declare const methods: readonly ["assertThrowsWithInvalidConnectionString", "assertThrowsWhenCantConnect", "assertThrowsWithBadDatabaseName", "assertKnowsIfConnectionClosed", "assertCanSortDesc", "assertCanSortAsc", "assertCanSortById", "assertCanQueryWithOr", "assertGeneratesIdDifferentEachTime", "assertInsertingGeneratesId", "assertCanCreateMany", "assertCanCreateWithObjectField", "assertCanCountOnId", "assertCanCount", "assertThrowsWhenUpdatingRecordNotFound", "assertCanUpdate", "assertCanUpdateMany", "assertCanPushOntoArrayValue", "assertCanUpdateWithObjectField", "assertCanUpdateFieldInObjectFieldWithTargettedWhere", "assertCanSaveAndGetNullAndUndefined", "assertUpdateReturnsMatchedCounts", "assertCanUpsertOne", "assertCanUpsertNull", "assertCanPushToArrayOnUpsert", "assertCanSyncUniqueIndexesWithFilterExpression", "assertEmptyDatabaseReturnsEmptyArray", "assertFindOneOnEmptyDatabaseReturnsNull", "assertCanLimitResults", "assertCanLimitResultsToZero", "assertCanFindWithBooleanField", "assertCanQueryByGtLtGteLteNe", "assertCanQueryPathWithDotSyntax", "assertCanReturnOnlySelectFields", "assertCanSearchByRegex", "assertCanFindWithNe", "assertCanFindWithIn", "assertCanDeleteRecord", "assertCanDeleteOne", "assertHasNoUniqueIndexToStart", "assertCanCreateUniqueIndex", "assertCanCreateMultiFieldUniqueIndex", "assertCantCreateUniqueIndexTwice", "assertCanDropUniqueIndex", "assertCanDropCompoundUniqueIndex", "assertCantDropUniqueIndexThatDoesntExist", "assertCantDropIndexWhenNoIndexExists", "assertCantDropCompoundUniqueIndexThatDoesntExist", "assertSyncingUniqueIndexsAddsMissingIndexes", "assertSyncingUniqueIndexsSkipsExistingIndexs", "assertSyncingUniqueIndexesRemovesExtraIndexes", "assertSyncingUniqueIndexesIsRaceProof", "assertSyncingIndexesDoesNotAddAndRemove", "assertUniqueIndexBlocksDuplicates", "assertDuplicateKeyThrowsOnInsert", "assertSettingUniqueIndexViolationThrowsSpruceError", "assertCanCreateUniqueIndexOnNestedField", "assertUpsertWithUniqueIndex", "assertNestedFieldIndexUpdates", "assertHasNoIndexToStart", "assertCanCreateIndex", "assertCantCreateSameIndexTwice", "assertCanCreateMultiFieldIndex", "assertCanDropIndex", "assertCanDropCompoundIndex", "assertCantDropCompoundIndexThatDoesNotExist", "assertSyncIndexesSkipsExisting", "assertSyncIndexesRemovesExtraIndexes", "assertSyncIndexesHandlesRaceConditions", "assertSyncIndexesDoesNotRemoveExisting", "assertDuplicateFieldsWithMultipleUniqueIndexesWorkAsExpected", "assertCanSyncIndexesWithoutPartialThenAgainWithProperlyUpdates"];
3
+ declare const methods: readonly ["assertThrowsWithInvalidConnectionString", "assertThrowsWhenCantConnect", "assertThrowsWithBadDatabaseName", "assertKnowsIfConnectionClosed", "assertCanSortDesc", "assertCanSortAsc", "assertCanSortById", "assertCanQueryWithOr", "assertGeneratesIdDifferentEachTime", "assertInsertingGeneratesId", "assertCanCreateMany", "assertCanCreateWithObjectField", "assertCanCountOnId", "assertCanCount", "assertThrowsWhenUpdatingRecordNotFound", "assertCanUpdate", "assertCanUpdateMany", "assertCanPushOntoArrayValue", "assertCanUpdateWithObjectField", "assertCanUpdateFieldInObjectFieldWithTargettedWhere", "assertCanSaveAndGetNullAndUndefined", "assertUpdateReturnsMatchedCounts", "assertCanUpsertOne", "assertCanUpsertNull", "assertCanPushToArrayOnUpsert", "assertCanSyncUniqueIndexesWithFilterExpression", "assertEmptyDatabaseReturnsEmptyArray", "assertFindOneOnEmptyDatabaseReturnsNull", "assertCanLimitResults", "assertCanLimitResultsToZero", "assertCanFindWithBooleanField", "assertCanQueryByGtLtGteLteNe", "assertCanQueryPathWithDotSyntax", "assertCanReturnOnlySelectFields", "assertCanSearchByRegex", "assertCanFindWithNe", "assertCanFindWithIn", "assertCanDeleteRecord", "assertCanDeleteOne", "assertHasNoUniqueIndexToStart", "assertCanCreateUniqueIndex", "assertCanCreateMultiFieldUniqueIndex", "assertCantCreateUniqueIndexTwice", "assertCanDropUniqueIndex", "assertCanDropCompoundUniqueIndex", "assertCantDropUniqueIndexThatDoesntExist", "assertCantDropIndexWhenNoIndexExists", "assertCantDropCompoundUniqueIndexThatDoesntExist", "assertSyncingUniqueIndexesAddsMissingIndexes", "assertSyncingUniqueIndexesSkipsExistingIndexes", "assertSyncingUniqueIndexesRemovesExtraIndexes", "assertSyncingUniqueIndexesIsRaceProof", "assertSyncingIndexesDoesNotAddAndRemove", "assertUniqueIndexBlocksDuplicates", "assertDuplicateKeyThrowsOnInsert", "assertSettingUniqueIndexViolationThrowsSpruceError", "assertCanCreateUniqueIndexOnNestedField", "assertUpsertWithUniqueIndex", "assertNestedFieldIndexUpdates", "assertHasNoIndexToStart", "assertCanCreateIndex", "assertCantCreateSameIndexTwice", "assertCanCreateMultiFieldIndex", "assertCanDropIndex", "assertCanDropCompoundIndex", "assertCantDropCompoundIndexThatDoesNotExist", "assertSyncIndexesSkipsExisting", "assertSyncIndexesRemovesExtraIndexes", "assertSyncIndexesHandlesRaceConditions", "assertSyncIndexesDoesNotRemoveExisting", "assertDuplicateFieldsWithMultipleUniqueIndexesWorkAsExpected", "assertCanSyncIndexesWithoutPartialThenAgainWithProperlyUpdates"];
4
4
  type OriginalMethods = (typeof methods)[number];
5
5
  type BangMethods = `!${OriginalMethods}`;
6
6
  export type DatabaseAssertionName = OriginalMethods | BangMethods;
@@ -39,8 +39,8 @@ declare const databaseAssertUtil: {
39
39
  assertDuplicateKeyThrowsOnInsert(connect: TestConnect): Promise<void>;
40
40
  assertSyncingIndexesDoesNotAddAndRemove(connect: TestConnect): Promise<void>;
41
41
  assertSyncingUniqueIndexesRemovesExtraIndexes(connect: TestConnect): Promise<void>;
42
- assertSyncingUniqueIndexsSkipsExistingIndexs(connect: TestConnect): Promise<void>;
43
- assertSyncingUniqueIndexsAddsMissingIndexes(connect: TestConnect): Promise<void>;
42
+ assertSyncingUniqueIndexesSkipsExistingIndexes(connect: TestConnect): Promise<void>;
43
+ assertSyncingUniqueIndexesAddsMissingIndexes(connect: TestConnect): Promise<void>;
44
44
  assertCantDropCompoundUniqueIndexThatDoesntExist(connect: TestConnect): Promise<void>;
45
45
  assertCantDropIndexWhenNoIndexExists(connect: TestConnect): Promise<void>;
46
46
  assertCantDropUniqueIndexThatDoesntExist(connect: TestConnect): Promise<void>;
@@ -64,8 +64,8 @@ const methods = [
64
64
  'assertCantDropUniqueIndexThatDoesntExist',
65
65
  'assertCantDropIndexWhenNoIndexExists',
66
66
  'assertCantDropCompoundUniqueIndexThatDoesntExist',
67
- 'assertSyncingUniqueIndexsAddsMissingIndexes',
68
- 'assertSyncingUniqueIndexsSkipsExistingIndexs',
67
+ 'assertSyncingUniqueIndexesAddsMissingIndexes',
68
+ 'assertSyncingUniqueIndexesSkipsExistingIndexes',
69
69
  'assertSyncingUniqueIndexesRemovesExtraIndexes',
70
70
  'assertSyncingUniqueIndexesIsRaceProof',
71
71
  'assertSyncingIndexesDoesNotAddAndRemove',
@@ -310,19 +310,19 @@ const databaseAssertUtil = {
310
310
  const matchedBeforeDelete = await db.findOne(this.collectionName, {
311
311
  id: created.id,
312
312
  });
313
- test_utils_1.assert.isTruthy(matchedBeforeDelete);
314
- test_utils_1.assert.isEqual(matchedBeforeDelete.id, created.id);
313
+ test_utils_1.assert.isTruthy(matchedBeforeDelete, 'findOne() did not return the record created!');
314
+ test_utils_1.assert.isEqual(matchedBeforeDelete.id, created.id, 'findOne() returned id does not match what was sent to createOne');
315
315
  const numDeleted = await db.delete(this.collectionName, {
316
316
  id: matchedBeforeDelete.id,
317
317
  });
318
- test_utils_1.assert.isEqual(numDeleted, 1);
318
+ test_utils_1.assert.isEqual(numDeleted, 1, 'delete() did not return the total recrods deleted!');
319
319
  const matchedAfterDelete = await db.findOne(this.collectionName, {
320
320
  id: created.id,
321
321
  });
322
- test_utils_1.assert.isFalsy(matchedAfterDelete, `Record with the id of ${created.id} was not deleted!`);
322
+ test_utils_1.assert.isFalsy(matchedAfterDelete, `Record with the id of ${created.id} was not deleted with delete()!`);
323
323
  await db.create(this.collectionName, [
324
324
  {
325
- name: 'a record',
325
+ name: 'another record',
326
326
  },
327
327
  {
328
328
  name: 'a record',
@@ -331,8 +331,12 @@ const databaseAssertUtil = {
331
331
  name: 'a record',
332
332
  },
333
333
  ]);
334
- const manyDeleted = await db.delete(this.collectionName, {});
335
- test_utils_1.assert.isEqual(manyDeleted, 3, `delete() did not return the total recrods deleted!`);
334
+ const manyDeleted = await db.delete(this.collectionName, {
335
+ name: 'another record',
336
+ });
337
+ test_utils_1.assert.isEqual(manyDeleted, 1, `delete() did not return the total records deleted!`);
338
+ const total = await db.count(this.collectionName);
339
+ test_utils_1.assert.isEqual(total, 2, 'delete() did not delete all records');
336
340
  await this.shutdown(db);
337
341
  },
338
342
  async assertCanLimitResultsToZero(connect) {
@@ -724,10 +728,10 @@ const databaseAssertUtil = {
724
728
  },
725
729
  ]);
726
730
  indexes = await db.getUniqueIndexes(this.collectionName);
727
- test_utils_1.assert.isLength(indexes, 2, `Syncing unique indexs with filter is not removing extra indexes.`);
731
+ test_utils_1.assert.isLength(indexes, 2, `Syncing unique indexes with filter is not removing extra indexes.`);
728
732
  await this.shutdown(db);
729
733
  },
730
- async assertSyncingUniqueIndexsSkipsExistingIndexs(connect) {
734
+ async assertSyncingUniqueIndexesSkipsExistingIndexes(connect) {
731
735
  const db = await connectToDabatase(connect);
732
736
  await db.syncUniqueIndexes(this.collectionName, [['uniqueField']]);
733
737
  let indexes = await db.getUniqueIndexes(this.collectionName);
@@ -741,7 +745,7 @@ const databaseAssertUtil = {
741
745
  test_utils_1.assert.isLength(indexes, 3);
742
746
  await this.shutdown(db);
743
747
  },
744
- async assertSyncingUniqueIndexsAddsMissingIndexes(connect) {
748
+ async assertSyncingUniqueIndexesAddsMissingIndexes(connect) {
745
749
  const db = await connectToDabatase(connect);
746
750
  await db.syncUniqueIndexes(this.collectionName, [['uniqueField']]);
747
751
  let indexes = await db.getUniqueIndexes(this.collectionName);
@@ -754,7 +758,7 @@ const databaseAssertUtil = {
754
758
  ['someField'],
755
759
  ]);
756
760
  indexes = await db.getUniqueIndexes(this.collectionName);
757
- test_utils_1.assert.isLength(indexes, 2, 'There should still be 2 indexes after this syncUniqueIndexs(). First sync was a single field unique index, second sync was two indexes, but one was already there. So one should have been ignored, one should have been added.');
761
+ test_utils_1.assert.isLength(indexes, 2, 'There should still be 2 indexes after this syncUniqueIndexes(). First sync was a single field unique index, second sync was two indexes, but one was already there. So one should have been ignored, one should have been added.');
758
762
  await this.shutdown(db);
759
763
  },
760
764
  async assertCantDropCompoundUniqueIndexThatDoesntExist(connect) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "28.3.275",
6
+ "version": "28.3.277",
7
7
  "files": [
8
8
  "build/**/*",
9
9
  "!build/__tests__",
@@ -67,8 +67,8 @@
67
67
  "@seald-io/nedb": "^4.0.4",
68
68
  "@sprucelabs/error": "^6.0.556",
69
69
  "@sprucelabs/globby": "^2.0.501",
70
- "@sprucelabs/schema": "^30.1.2",
71
- "@sprucelabs/spruce-skill-utils": "^31.1.6",
70
+ "@sprucelabs/schema": "^30.2.0",
71
+ "@sprucelabs/spruce-skill-utils": "^31.1.7",
72
72
  "just-clone": "^6.2.0",
73
73
  "lodash": "^4.17.21",
74
74
  "mongodb": "^6.12.0"