@e22m4u/js-repository 0.1.22 → 0.1.23
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
|
@@ -5611,11 +5611,11 @@ var init_adapter = __esm({
|
|
|
5611
5611
|
init_decorator();
|
|
5612
5612
|
Adapter = class _Adapter extends Service {
|
|
5613
5613
|
/**
|
|
5614
|
-
*
|
|
5614
|
+
* Kind.
|
|
5615
5615
|
*
|
|
5616
5616
|
* @type {string}
|
|
5617
5617
|
*/
|
|
5618
|
-
get
|
|
5618
|
+
get kind() {
|
|
5619
5619
|
return _Adapter.name;
|
|
5620
5620
|
}
|
|
5621
5621
|
/**
|
|
@@ -6202,7 +6202,7 @@ function findAdapterCtorInModule(module2) {
|
|
|
6202
6202
|
if (!module2 || typeof module2 !== "object" || Array.isArray(module2)) return;
|
|
6203
6203
|
for (const ctor of Object.values(module2)) {
|
|
6204
6204
|
console.log(ctor);
|
|
6205
|
-
if (typeof ctor === "function" && ctor.prototype && typeof ctor.prototype === "object" && ctor.prototype.
|
|
6205
|
+
if (typeof ctor === "function" && ctor.prototype && typeof ctor.prototype === "object" && ctor.prototype.kind === Adapter.name) {
|
|
6206
6206
|
adapterCtor = ctor;
|
|
6207
6207
|
break;
|
|
6208
6208
|
}
|
package/package.json
CHANGED
|
@@ -59,7 +59,7 @@ function findAdapterCtorInModule(module) {
|
|
|
59
59
|
typeof ctor === 'function' &&
|
|
60
60
|
ctor.prototype &&
|
|
61
61
|
typeof ctor.prototype === 'object' &&
|
|
62
|
-
ctor.prototype.
|
|
62
|
+
ctor.prototype.kind === Adapter.name
|
|
63
63
|
) {
|
|
64
64
|
adapterCtor = ctor;
|
|
65
65
|
break;
|
package/src/adapter/adapter.js
CHANGED
|
@@ -15,11 +15,11 @@ import {PropertyUniquenessDecorator} from './decorator/index.js';
|
|
|
15
15
|
*/
|
|
16
16
|
export class Adapter extends Service {
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Kind.
|
|
19
19
|
*
|
|
20
20
|
* @type {string}
|
|
21
21
|
*/
|
|
22
|
-
get
|
|
22
|
+
get kind() {
|
|
23
23
|
return Adapter.name;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -15,6 +15,12 @@ import {PropertyUniquenessDecorator} from './decorator/index.js';
|
|
|
15
15
|
const sandbox = chai.spy.sandbox();
|
|
16
16
|
|
|
17
17
|
describe('Adapter', function () {
|
|
18
|
+
it('exposes kind getter', function () {
|
|
19
|
+
const adapter = new Adapter();
|
|
20
|
+
expect(adapter.kind).to.be.eq('Adapter');
|
|
21
|
+
expect(Adapter.prototype.kind).to.be.eq('Adapter');
|
|
22
|
+
});
|
|
23
|
+
|
|
18
24
|
describe('constructor', function () {
|
|
19
25
|
afterEach(function () {
|
|
20
26
|
sandbox.restore();
|