Browse Source

chore: updates cjs build

e22m4u 1 year ago
parent
commit
34ed46f90b
2 changed files with 2 additions and 10 deletions
  1. 1 2
      src/adapter/adapter-loader.js
  2. 1 8
      src/adapter/adapter.js

+ 1 - 2
src/adapter/adapter-loader.js

@@ -1,6 +1,5 @@
 import {Adapter} from './adapter.js';
 import {Service} from '@e22m4u/js-service';
-import {ADAPTER_CLASS_NAME} from './adapter.js';
 import {InvalidArgumentError} from '../errors/index.js';
 
 /**
@@ -56,7 +55,7 @@ function findAdapterCtorInModule(module) {
   if (!module || typeof module !== 'object' || Array.isArray(module)) return;
   for (const ctor of Object.values(module)) {
     console.log(ctor);
-    if (typeof ctor === 'function' && ctor.kind === ADAPTER_CLASS_NAME) {
+    if (typeof ctor === 'function' && ctor.kind === Adapter.kind) {
       adapterCtor = ctor;
       break;
     }

+ 1 - 8
src/adapter/adapter.js

@@ -10,13 +10,6 @@ import {FieldsFilteringDecorator} from './decorator/index.js';
 import {DataTransformationDecorator} from './decorator/index.js';
 import {PropertyUniquenessDecorator} from './decorator/index.js';
 
-/**
- * Adapter class name.
- *
- * @type {string}
- */
-export const ADAPTER_CLASS_NAME = 'Adapter';
-
 /**
  * Adapter.
  */
@@ -26,7 +19,7 @@ export class Adapter extends Service {
    *
    * @type {string}
    */
-  static kind = ADAPTER_CLASS_NAME;
+  static kind = 'Adapter';
 
   /**
    * Settings.