@e22m4u/js-repository 0.1.20 → 0.1.22
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/dist/cjs/index.cjs
CHANGED
|
@@ -5610,6 +5610,14 @@ var init_adapter = __esm({
|
|
|
5610
5610
|
init_decorator();
|
|
5611
5611
|
init_decorator();
|
|
5612
5612
|
Adapter = class _Adapter extends Service {
|
|
5613
|
+
/**
|
|
5614
|
+
* Class name.
|
|
5615
|
+
*
|
|
5616
|
+
* @type {string}
|
|
5617
|
+
*/
|
|
5618
|
+
get className() {
|
|
5619
|
+
return _Adapter.name;
|
|
5620
|
+
}
|
|
5613
5621
|
/**
|
|
5614
5622
|
* Settings.
|
|
5615
5623
|
*
|
|
@@ -6193,7 +6201,8 @@ function findAdapterCtorInModule(module2) {
|
|
|
6193
6201
|
let adapterCtor;
|
|
6194
6202
|
if (!module2 || typeof module2 !== "object" || Array.isArray(module2)) return;
|
|
6195
6203
|
for (const ctor of Object.values(module2)) {
|
|
6196
|
-
|
|
6204
|
+
console.log(ctor);
|
|
6205
|
+
if (typeof ctor === "function" && ctor.prototype && typeof ctor.prototype === "object" && ctor.prototype.className === Adapter.name) {
|
|
6197
6206
|
adapterCtor = ctor;
|
|
6198
6207
|
break;
|
|
6199
6208
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e22m4u/js-repository",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "Модуль для работы с базами данных для Node.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"lint": "tsc && eslint ./src",
|
|
19
19
|
"lint:fix": "tsc && eslint ./src --fix",
|
|
20
20
|
"format": "prettier --write \"./src/**/*.js\"",
|
|
21
|
-
"test": "npm run lint && c8 --reporter=text-summary mocha",
|
|
22
|
-
"test:coverage": "npm run lint && c8 --reporter=text mocha",
|
|
21
|
+
"test": "npm run lint && c8 --reporter=text-summary mocha --bail",
|
|
22
|
+
"test:coverage": "npm run lint && c8 --reporter=text mocha --bail",
|
|
23
23
|
"build:cjs": "node build-cjs.js",
|
|
24
24
|
"prepare": "husky"
|
|
25
25
|
},
|
|
@@ -54,7 +54,13 @@ function findAdapterCtorInModule(module) {
|
|
|
54
54
|
let adapterCtor;
|
|
55
55
|
if (!module || typeof module !== 'object' || Array.isArray(module)) return;
|
|
56
56
|
for (const ctor of Object.values(module)) {
|
|
57
|
-
|
|
57
|
+
console.log(ctor);
|
|
58
|
+
if (
|
|
59
|
+
typeof ctor === 'function' &&
|
|
60
|
+
ctor.prototype &&
|
|
61
|
+
typeof ctor.prototype === 'object' &&
|
|
62
|
+
ctor.prototype.className === Adapter.name
|
|
63
|
+
) {
|
|
58
64
|
adapterCtor = ctor;
|
|
59
65
|
break;
|
|
60
66
|
}
|
package/src/adapter/adapter.js
CHANGED
|
@@ -14,6 +14,15 @@ import {PropertyUniquenessDecorator} from './decorator/index.js';
|
|
|
14
14
|
* Adapter.
|
|
15
15
|
*/
|
|
16
16
|
export class Adapter extends Service {
|
|
17
|
+
/**
|
|
18
|
+
* Class name.
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
*/
|
|
22
|
+
get className() {
|
|
23
|
+
return Adapter.name;
|
|
24
|
+
}
|
|
25
|
+
|
|
17
26
|
/**
|
|
18
27
|
* Settings.
|
|
19
28
|
*
|