@quatrain/auth 1.1.14 → 1.1.16

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/lib/Auth.d.ts CHANGED
@@ -28,8 +28,9 @@ export type AuthRegistry<T extends AbstractAuthAdapter> = {
28
28
  };
29
29
  export declare class Auth extends Core {
30
30
  static defaultProvider: string;
31
+ static logger: any;
32
+ static ERROR_EMAIL_EXISTS: string;
31
33
  protected static _providers: AuthRegistry<any>;
32
34
  static addProvider(provider: AbstractAuthAdapter, alias: string, setDefault?: boolean): void;
33
35
  static getProvider<T extends AbstractAuthAdapter>(alias?: string): T;
34
- static log(message: any, src?: string): void;
35
36
  }
package/lib/Auth.js CHANGED
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  exports.Auth = exports.AuthAction = void 0;
4
5
  const core_1 = require("@quatrain/core");
@@ -23,10 +24,10 @@ class Auth extends core_1.Core {
23
24
  throw new Error(`Unknown provider alias: '${alias}'`);
24
25
  }
25
26
  }
26
- static log(message, src = 'Auth') {
27
- super.log(message, src);
28
- }
29
27
  }
30
28
  exports.Auth = Auth;
29
+ _a = Auth;
31
30
  Auth.defaultProvider = 'default';
31
+ Auth.logger = _a.addLogger('Auth');
32
+ Auth.ERROR_EMAIL_EXISTS = `User email already exists`;
32
33
  Auth._providers = {};
@@ -1,5 +1,5 @@
1
1
  import { AuthAction } from '../Auth';
2
- import { User } from '@quatrain/core';
2
+ import { User } from '@quatrain/backend';
3
3
  export default interface AuthMiddleware {
4
4
  execute: (user: User, action: AuthAction) => void;
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/auth",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "license": "MIT",
5
5
  "description": "Auth adapters commons",
6
6
  "main": "lib/index.js",
@@ -11,7 +11,8 @@
11
11
  ],
12
12
  "author": "Quatrain Développement SAS <developers@quatrain.com>",
13
13
  "dependencies": {
14
- "@quatrain/core": "^1.1.11"
14
+ "@quatrain/backend": "^1.1.13",
15
+ "@quatrain/core": "^1.1.15"
15
16
  },
16
17
  "devDependencies": {
17
18
  "@tsconfig/recommended": "^1.0.1",