90dc-core 1.2.8 → 1.2.10

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.
@@ -4,6 +4,7 @@ export interface UserTypes {
4
4
  firstName: string;
5
5
  lastName: string;
6
6
  avatar: string;
7
+ role: string;
7
8
  }
8
9
  export interface UserInfoModel {
9
10
  userUuid: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/models/UserInterfaces.ts"],"sourcesContent":["export interface UserTypes {\n userUuid: string;\n email: string;\n firstName: string;\n lastName: string;\n avatar: string;\n}\n\nexport interface UserInfoModel {\n userUuid: string;\n height: string;\n weight: string;\n}\n\nexport interface LoginRequest {\n email: string;\n password: string;\n}\n\nexport interface UserPhotoRequest {\n base64: string;\n}\n\nexport interface ProgressPhoto {\n date: Date;\n progressPhoto: string;\n userUuid: string;\n}\n\nexport interface ForgotPassword {\n uuid: string;\n userUuid: string;\n token: string;\n date: Date;\n}\n\nexport interface RefreshPayload {\n userUuid: string;\n}\n\nexport interface TokenRequest {\n token: string;\n}\n\nexport interface RefreshRequest {\n refreshToken: string;\n}\n\nexport interface UuidRequest {\n userUuid: string;\n}\n\nexport interface EmailRequest {\n email: string;\n}\n\nexport interface TitleRequest {\n title: string;\n}\n\nexport interface UserPhoto {\n base64: string;\n title: string;\n}\n\nexport default interface AuthenticationToken {\n type: string;\n contents: string;\n}\n\nexport interface RestorePasswordRequest {\n email: string;\n}\n\nexport interface BeforeSubscriptionOptions {\n firstName: string;\n lastName: string;\n sex: string;\n goal: string;\n weightGoal: string;\n level: string;\n type: string;\n days: number;\n}\n\nexport interface AfterSubscriptionOptions {\n dateOfBirth: string;\n metricSystem: string;\n height: string;\n weight: string;\n}\n"],"names":[],"mappings":"AAAA,WA0FC"}
1
+ {"version":3,"sources":["../../../src/lib/models/UserInterfaces.ts"],"sourcesContent":["export interface UserTypes {\n userUuid: string;\n email: string;\n firstName: string;\n lastName: string;\n avatar: string;\n role: string;\n}\n\nexport interface UserInfoModel {\n userUuid: string;\n height: string;\n weight: string;\n}\n\nexport interface LoginRequest {\n email: string;\n password: string;\n}\n\nexport interface UserPhotoRequest {\n base64: string;\n}\n\nexport interface ProgressPhoto {\n date: Date;\n progressPhoto: string;\n userUuid: string;\n}\n\nexport interface ForgotPassword {\n uuid: string;\n userUuid: string;\n token: string;\n date: Date;\n}\n\nexport interface RefreshPayload {\n userUuid: string;\n}\n\nexport interface TokenRequest {\n token: string;\n}\n\nexport interface RefreshRequest {\n refreshToken: string;\n}\n\nexport interface UuidRequest {\n userUuid: string;\n}\n\nexport interface EmailRequest {\n email: string;\n}\n\nexport interface TitleRequest {\n title: string;\n}\n\nexport interface UserPhoto {\n base64: string;\n title: string;\n}\n\nexport default interface AuthenticationToken {\n type: string;\n contents: string;\n}\n\nexport interface RestorePasswordRequest {\n email: string;\n}\n\nexport interface BeforeSubscriptionOptions {\n firstName: string;\n lastName: string;\n sex: string;\n goal: string;\n weightGoal: string;\n level: string;\n type: string;\n days: number;\n}\n\nexport interface AfterSubscriptionOptions {\n dateOfBirth: string;\n metricSystem: string;\n height: string;\n weight: string;\n}\n"],"names":[],"mappings":"AAAA,WA2FC"}
@@ -24,7 +24,7 @@ class Logger {
24
24
  winston.addColors(colors);
25
25
  const format = winston.format.combine(winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss:ms' }), winston.format.colorize({ all: true }), winston.format.printf(
26
26
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
27
- (info) => `${info.timestamp}@[${serviceName.toUpperCase()}:${info.level}]: ${info.message}`));
27
+ (info) => `\n${serviceName.toUpperCase()}: ${info.message}\n`));
28
28
  const transports = [
29
29
  new winston.transports.Console(),
30
30
  ];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/utils/Logger.ts"],"sourcesContent":["import winston from 'winston'\n\nclass Logger {\n\n public static getLogger(serviceName: string){\n const levels = {\n error: 0,\n warn: 1,\n info: 2,\n http: 3,\n debug: 4,\n }\n\n const level = () => {\n const env = process.env.NODE_ENV || 'development'\n const isDevelopment = env === 'development'\n return isDevelopment ? 'debug' : 'warn'\n }\n\n const colors = {\n error: 'red',\n warn: 'yellow',\n info: 'green',\n http: 'magenta',\n debug: 'white',\n serviceName: 'magenta'\n }\n\n winston.addColors(colors)\n\n const format: winston.Logform.Format = winston.format.combine(\n winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss:ms' }),\n winston.format.colorize({ all: true }),\n winston.format.printf(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n (info) => `${info.timestamp}@[${serviceName.toUpperCase()}:${info.level}]: ${info.message}`,\n ),\n )\n\n const transports = [\n new winston.transports.Console(),\n ]\n return winston.createLogger({\n level: level(),\n levels,\n format,\n transports,\n })\n\n }\n}\n\n\nexport default Logger"],"names":["winston","Logger","getLogger","serviceName","levels","error","warn","info","http","debug","level","env","process","NODE_ENV","isDevelopment","colors","addColors","format","combine","timestamp","colorize","all","printf","toUpperCase","message","transports","Console","createLogger"],"mappings":"AAAA,OAAOA,aAAa,UAAS;AAE7B,MAAMC;IAEJ,OAAcC,UAAUC,WAAmB,EAAC;QAC1C,MAAMC,SAAS;YACbC,OAAO;YACPC,MAAM;YACNC,MAAM;YACNC,MAAM;YACNC,OAAO;QACT;QAEA,MAAMC,QAAQ,IAAM;YAClB,MAAMC,MAAMC,QAAQD,GAAG,CAACE,QAAQ,IAAI;YACpC,MAAMC,gBAAgBH,QAAQ;YAC9B,OAAOG,gBAAgB,UAAU,MAAM;QACzC;QAEA,MAAMC,SAAS;YACbV,OAAO;YACPC,MAAM;YACNC,MAAM;YACNC,MAAM;YACNC,OAAO;YACPN,aAAa;QACf;QAEAH,QAAQgB,SAAS,CAACD;QAElB,MAAME,SAAiCjB,QAAQiB,MAAM,CAACC,OAAO,CAC3DlB,QAAQiB,MAAM,CAACE,SAAS,CAAC;YAAEF,QAAQ;QAAyB,IAC5DjB,QAAQiB,MAAM,CAACG,QAAQ,CAAC;YAAEC,KAAK,IAAI;QAAC,IACpCrB,QAAQiB,MAAM,CAACK,MAAM,CACnB,4EAA4E;QAC5E,CAACf,OAAS,CAAC,EAAEA,KAAKY,SAAS,CAAC,EAAE,EAAEhB,YAAYoB,WAAW,GAAG,CAAC,EAAEhB,KAAKG,KAAK,CAAC,GAAG,EAAEH,KAAKiB,OAAO,CAAC,CAAC;QAI/F,MAAMC,aAAa;YACjB,IAAIzB,QAAQyB,UAAU,CAACC,OAAO;SAC/B;QACD,OAAO1B,QAAQ2B,YAAY,CAAC;YAC1BjB,OAAOA;YACPN;YACAa;YACAQ;QACF;IAEF;AACF;AAGA,eAAexB,OAAM"}
1
+ {"version":3,"sources":["../../../src/lib/utils/Logger.ts"],"sourcesContent":["import winston from 'winston'\n\nclass Logger {\n\n public static getLogger(serviceName: string){\n const levels = {\n error: 0,\n warn: 1,\n info: 2,\n http: 3,\n debug: 4,\n }\n\n const level = () => {\n const env = process.env.NODE_ENV || 'development'\n const isDevelopment = env === 'development'\n return isDevelopment ? 'debug' : 'warn'\n }\n\n const colors = {\n error: 'red',\n warn: 'yellow',\n info: 'green',\n http: 'magenta',\n debug: 'white',\n serviceName: 'magenta'\n }\n\n winston.addColors(colors)\n\n const format: winston.Logform.Format = winston.format.combine(\n winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss:ms' }),\n winston.format.colorize({ all: true }),\n winston.format.printf(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n (info) => `\\n${serviceName.toUpperCase()}: ${info.message}\\n`,\n ),\n )\n\n const transports = [\n new winston.transports.Console(),\n ]\n return winston.createLogger({\n level: level(),\n levels,\n format,\n transports,\n })\n\n }\n}\n\n\nexport default Logger"],"names":["winston","Logger","getLogger","serviceName","levels","error","warn","info","http","debug","level","env","process","NODE_ENV","isDevelopment","colors","addColors","format","combine","timestamp","colorize","all","printf","toUpperCase","message","transports","Console","createLogger"],"mappings":"AAAA,OAAOA,aAAa,UAAS;AAE7B,MAAMC;IAEJ,OAAcC,UAAUC,WAAmB,EAAC;QAC1C,MAAMC,SAAS;YACbC,OAAO;YACPC,MAAM;YACNC,MAAM;YACNC,MAAM;YACNC,OAAO;QACT;QAEA,MAAMC,QAAQ,IAAM;YAClB,MAAMC,MAAMC,QAAQD,GAAG,CAACE,QAAQ,IAAI;YACpC,MAAMC,gBAAgBH,QAAQ;YAC9B,OAAOG,gBAAgB,UAAU,MAAM;QACzC;QAEA,MAAMC,SAAS;YACbV,OAAO;YACPC,MAAM;YACNC,MAAM;YACNC,MAAM;YACNC,OAAO;YACPN,aAAa;QACf;QAEAH,QAAQgB,SAAS,CAACD;QAElB,MAAME,SAAiCjB,QAAQiB,MAAM,CAACC,OAAO,CAC3DlB,QAAQiB,MAAM,CAACE,SAAS,CAAC;YAAEF,QAAQ;QAAyB,IAC5DjB,QAAQiB,MAAM,CAACG,QAAQ,CAAC;YAAEC,KAAK,IAAI;QAAC,IACpCrB,QAAQiB,MAAM,CAACK,MAAM,CACnB,4EAA4E;QAC7E,CAACf,OAAS,CAAC,EAAE,EAAEJ,YAAYoB,WAAW,GAAG,EAAE,EAAEhB,KAAKiB,OAAO,CAAC,EAAE,CAAC;QAIhE,MAAMC,aAAa;YACjB,IAAIzB,QAAQyB,UAAU,CAACC,OAAO;SAC/B;QACD,OAAO1B,QAAQ2B,YAAY,CAAC;YAC1BjB,OAAOA;YACPN;YACAa;YACAQ;QACF;IAEF;AACF;AAGA,eAAexB,OAAM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "90dc-core",
3
- "version": "1.2.8",
3
+ "version": "1.2.10",
4
4
  "description": "A package that contains utils and interfaces used to create 90dc",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -4,6 +4,7 @@ export interface UserTypes {
4
4
  firstName: string;
5
5
  lastName: string;
6
6
  avatar: string;
7
+ role: string;
7
8
  }
8
9
 
9
10
  export interface UserInfoModel {
@@ -33,7 +33,7 @@ class Logger {
33
33
  winston.format.colorize({ all: true }),
34
34
  winston.format.printf(
35
35
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
36
- (info) => `${info.timestamp}@[${serviceName.toUpperCase()}:${info.level}]: ${info.message}`,
36
+ (info) => `\n${serviceName.toUpperCase()}: ${info.message}\n`,
37
37
  ),
38
38
  )
39
39