All files / src keys.ts

100% Statements 25/25
100% Branches 12/12
100% Functions 6/6
100% Lines 25/25

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55  1x         1x 1x   1x 1x 1x 1x 1x       1x     1x 1x   1x 1x   1x 1x 1x   1x 1x     1x     1x         1x 1x     1x     1x 1x        
import {TokenService, UserService} from '@loopback/authentication';
import {BindingKey} from '@loopback/core';
import {loginType} from './controllers/types';
import {User} from './models';
import {PasswordHasher} from './services/hash.password';
import {FileUploadHandler} from './types';
import {MiddlewareGroups,} from '@loopback/express';
export const CORS = MiddlewareGroups.CORS;
 
export namespace ControllerKey {
  export const AUTH_CONTROLLER = 'auth.controller';
  export const PAYMENT_CONTROLLER = 'payment.controller';
  export const ACCOUNTS_CONTROLLER = 'accounts.controller';
  export const CLOSE_COMPONENT = 'close.component';
}
 
 
export const FILE_UPLOAD_SERVICE = BindingKey.create<FileUploadHandler>(
  'services.FileUpload',
);
export const STORAGE_DIRECTORY = BindingKey.create<string>('storage.directory');
export const ASSETS_DIRECTORY = BindingKey.create<string>('assets.directory');
 
export namespace LoggerServiceBindings {
  export const LOGGER_SERVICE = 'logger.service';
}
export namespace TokenServiceConstants {
  export const TOKEN_SECRET_VALUE = '138asda8213';
  export const TOKEN_EXPIRES_IN_VALUE = '7h';
}
export namespace TokenServiceBindings {
  export const TOKEN_SECRET = BindingKey.create<string>(
    'authentication.jwt.secret',
  );
  export const TOKEN_EXPIRES_IN = BindingKey.create<string>(
    'authentication.jwt.expiresIn',
  );
  export const TOKEN_SERVICE = BindingKey.create<TokenService>(
    'services.jwt.service',
  );
}
 
export namespace PasswordHasherBindings {
  export const PASSWORD_HASHER = BindingKey.create<PasswordHasher>(
    'services.hasher',
  );
  export const ROUNDS = BindingKey.create<number>('services.hasher.rounds');
}
 
export namespace UserServiceBindings {
  export const USER_SERVICE = BindingKey.create<UserService<loginType, User>>(
    'services.user.service',
  );
}