@aneuhold/be-ts-db-lib 1.0.69 → 1.0.71
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseRepository.d.ts","sourceRoot":"","sources":["../../src/repositories/BaseRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAEL,eAAe,EACf,UAAU,EACV,YAAY,EACZ,MAAM,EAEN,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,UAAU,MAAM,6BAA6B,CAAC;AAErD,OAAgC,EAC9B,aAAa,EACd,MAAM,qCAAqC,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,cAAc,CAAC,SAAS,SAAS,YAAY;IAkBvE,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,aAAa,CAAC;IACtB,OAAO,CAAC,oBAAoB,CAAC;IAnB/B,SAAS,CAAC,cAAc,EAAE,MAAM,CAAC;IAEjC,OAAO,CAAC,UAAU,CAAC,CAAwB;IAE3C,SAAS,CAAC,WAAW,2EACwC;IAE7D;;;;;;;OAOG;gBAED,cAAc,EAAE,MAAM,EACd,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,EAChC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"BaseRepository.d.ts","sourceRoot":"","sources":["../../src/repositories/BaseRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAEL,eAAe,EACf,UAAU,EACV,YAAY,EACZ,MAAM,EAEN,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,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AAE,CAAC;IAQjD,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC;IAQ9C,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IAW3D;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC;IAKxC;;;;OAIG;IACG,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;IAiBnE;;;;OAIG;IACG,UAAU,CACd,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GACrC,OAAO,CAAC,eAAe,CAAC;IAwB3B;;;;;OAKG;IACH,SAAS,CAAC,oBAAoB,CAC5B,MAAM,GAAE,MAAM,CAAC,QAAQ,CAAM,GAC5B,MAAM,CAAC,QAAQ,CAAC;IAOnB,SAAS,CAAC,sBAAsB,CAC9B,MAAM,EAAE,QAAQ,EAAE,EAClB,MAAM,EAAE,QAAQ,EAAE,GACjB,OAAO;IAOV;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;CAO1B"}
|
package/lib/tests/testsUtil.js
CHANGED
|
@@ -3,7 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.TEST_USER_NAME_PREFIX = void 0;
|
|
7
|
+
exports.expectToThrow = expectToThrow;
|
|
8
|
+
exports.getTestUserName = getTestUserName;
|
|
9
|
+
exports.cleanupDoc = cleanupDoc;
|
|
10
|
+
exports.cleanupDocs = cleanupDocs;
|
|
7
11
|
const crypto_1 = __importDefault(require("crypto"));
|
|
8
12
|
/**
|
|
9
13
|
* A random series of characters for tests to help identify test users.
|
|
@@ -19,7 +23,6 @@ async function expectToThrow(func) {
|
|
|
19
23
|
}
|
|
20
24
|
expect(threwError).toBeTruthy();
|
|
21
25
|
}
|
|
22
|
-
exports.expectToThrow = expectToThrow;
|
|
23
26
|
/**
|
|
24
27
|
* Gets a test user name with a standardized prefix so that they can all be
|
|
25
28
|
* identified and deleted if anything goes wrong in the tests.
|
|
@@ -29,7 +32,6 @@ function getTestUserName(username) {
|
|
|
29
32
|
return `${exports.TEST_USER_NAME_PREFIX}-${crypto_1.default.randomUUID()}`;
|
|
30
33
|
return `${exports.TEST_USER_NAME_PREFIX}-${username}`;
|
|
31
34
|
}
|
|
32
|
-
exports.getTestUserName = getTestUserName;
|
|
33
35
|
/**
|
|
34
36
|
* Removes the provided doc from the DB
|
|
35
37
|
*/
|
|
@@ -39,7 +41,6 @@ async function cleanupDoc(repo, doc) {
|
|
|
39
41
|
const findResult = await repo.get({ _id: doc._id });
|
|
40
42
|
expect(findResult).toBeNull();
|
|
41
43
|
}
|
|
42
|
-
exports.cleanupDoc = cleanupDoc;
|
|
43
44
|
async function cleanupDocs(repo, docs) {
|
|
44
45
|
const idsToDelete = docs.map((doc) => doc._id);
|
|
45
46
|
const deleteResult = await repo.deleteList(idsToDelete);
|
|
@@ -47,4 +48,3 @@ async function cleanupDocs(repo, docs) {
|
|
|
47
48
|
const findResult = await repo.getList(idsToDelete);
|
|
48
49
|
expect(findResult.length).toBe(0);
|
|
49
50
|
}
|
|
50
|
-
exports.cleanupDocs = cleanupDocs;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aneuhold/be-ts-db-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.71",
|
|
4
4
|
"description": "A backend database library meant to actually interact with various databases in personal projects",
|
|
5
5
|
"author": "Anton G Neuhold Jr <agneuhold@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"types": "lib/index.d.ts",
|
|
9
|
-
"packageManager": "yarn@4.
|
|
9
|
+
"packageManager": "yarn@4.3.1",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git+https://github.com/aneuhold/be-ts-db-lib.git"
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
"lint": "eslint"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@aneuhold/be-ts-lib": "^1.0.
|
|
46
|
-
"@aneuhold/core-ts-db-lib": "^1.0.
|
|
47
|
-
"@aneuhold/core-ts-lib": "^1.1.
|
|
45
|
+
"@aneuhold/be-ts-lib": "^1.0.38",
|
|
46
|
+
"@aneuhold/core-ts-db-lib": "^1.0.87",
|
|
47
|
+
"@aneuhold/core-ts-lib": "^1.1.28",
|
|
48
48
|
"bson": "^6.2.0",
|
|
49
49
|
"mongodb": "^6.3.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@aneuhold/eslint-config": "^1.0.
|
|
52
|
+
"@aneuhold/eslint-config": "^1.0.17",
|
|
53
53
|
"@types/jest": "^29.5.12",
|
|
54
|
-
"@types/node": "^20.14.
|
|
54
|
+
"@types/node": "^20.14.9",
|
|
55
55
|
"@types/node-fetch": "^2.6.11",
|
|
56
56
|
"eslint": "^9.5.0",
|
|
57
57
|
"jest": "^29.7.0",
|
|
58
58
|
"prettier": "^3.3.2",
|
|
59
|
-
"ts-jest": "^29.1.
|
|
59
|
+
"ts-jest": "^29.1.5",
|
|
60
60
|
"ts-node": "^10.9.2",
|
|
61
|
-
"typescript": "^5.
|
|
61
|
+
"typescript": "^5.5.2"
|
|
62
62
|
}
|
|
63
63
|
}
|