expresso-macchiato 0.3.8-dev.1 → 0.3.8-dev.3

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/index.d.mts CHANGED
@@ -2,6 +2,7 @@ import { Request, Response as Response$1, RequestHandler, Router, Express } from
2
2
  import { BaseEntity, MixedList, EntitySchema } from 'typeorm';
3
3
  import { Socket, Namespace, Server as Server$1, ServerOptions } from 'socket.io';
4
4
  import http from 'http';
5
+ import * as utils_logger_av from 'utils-logger-av';
5
6
  import { Logger } from 'utils-logger-av';
6
7
 
7
8
  type BackgroundServiceConstructor = {
@@ -515,7 +516,7 @@ type StarterOptions = {
515
516
  beforeStartListening?: (app: Express, httpServer?: http.Server, socketIoServerInstance?: Server$1) => void;
516
517
  sockets?: {
517
518
  wrappers: Array<SocketWrapper>;
518
- options?: ServerOptions;
519
+ options?: Partial<ServerOptions>;
519
520
  };
520
521
  tokenOptions?: {
521
522
  tokenInstance: Token;
@@ -644,6 +645,8 @@ declare class MyLogger extends Logger {
644
645
  fullLogNok: (service: string, ...args: any[]) => void;
645
646
  }
646
647
  declare const log: MyLogger;
648
+ declare const i: Record<utils_logger_av.Icons, string>;
649
+ declare const c: (color: utils_logger_av.LogColors, message: any) => string;
647
650
  declare const fullLogOk: (service: string, message: string) => void;
648
651
  declare const fullLogNok: (service: string, ...args: any[]) => void;
649
652
  declare const apiOk: (res: any, status?: number, contentType?: string) => ExpressReturn;
@@ -654,4 +657,4 @@ declare const socketNok: (message: string) => SocketConnectionNok;
654
657
  declare const sleep: (ms: number) => Promise<unknown>;
655
658
  declare const getCompiledPath: (__filename: string, __dirname: string, pathsWithoutExtension: string[]) => string[];
656
659
 
657
- export { type ApiKeySecurity, BackgroundService, type BaseFormatContrainedParameter, type BaseOAuthSecurity, type BaseParameter, type BaseSchema, type BaseSecurity, type BasicAuthenticationSecurity, type BodyParameter, type Components, type ConnectedSocketClient, type Contact, type DefaultTokenPayload, type DynamicDbRouterOptions, type DynamicSwaggerOperation, type DynamicSwaggerOperationBody, type DynamicSwaggerPath, type DynamicSwaggerRequestBodyOperation, type ErrorsMapping, type ExpressReturn, type ExternalDocs, type FormDataParameter, type GenericFormat, type Header, type HeaderParameter, type Info, type IntegerFormat, type License, type ListOptions, type MethodPathHandling, type Methods, type NumberFormat, type OAuth2AccessCodeSecurity, type OAuth2ApplicationSecurity, type OAuth2ImplicitSecurity, type OAuth2PasswordSecurity, type OAuthScope, type Operation, type Parameter, type ParameterCollectionFormat, type ParameterType, type Path, type PathParameter, type ProjectConfigs, type QueryParameter, type Reference, type RequestBodyOperation, type Response, RouterWrapper, type RouterWrapperInterface, type Schema, type SchemaFormatConstraints, type SchemaV3, type SearchQuery, type SecureTokenConfig, type Security, type Server, type SocketConnectionMiddleware, type SocketConnectionNok, type SocketConnectionOk, SocketWrapper, type SocketWrapperConstructor, type Spec, Starter, type StarterOptions, type StringFormat, Swagger, type SwaggerMetadataInterface, type Tag, Token, type TokenApiOptions, type TokenConstructor, type XML, apiNok, apiOk, errorCatcher, fullLogNok, fullLogOk, getCompiledPath, log, sleep, socketNok, socketOk };
660
+ export { type ApiKeySecurity, BackgroundService, type BaseFormatContrainedParameter, type BaseOAuthSecurity, type BaseParameter, type BaseSchema, type BaseSecurity, type BasicAuthenticationSecurity, type BodyParameter, type Components, type ConnectedSocketClient, type Contact, type DefaultTokenPayload, type DynamicDbRouterOptions, type DynamicSwaggerOperation, type DynamicSwaggerOperationBody, type DynamicSwaggerPath, type DynamicSwaggerRequestBodyOperation, type ErrorsMapping, type ExpressReturn, type ExternalDocs, type FormDataParameter, type GenericFormat, type Header, type HeaderParameter, type Info, type IntegerFormat, type License, type ListOptions, type MethodPathHandling, type Methods, type NumberFormat, type OAuth2AccessCodeSecurity, type OAuth2ApplicationSecurity, type OAuth2ImplicitSecurity, type OAuth2PasswordSecurity, type OAuthScope, type Operation, type Parameter, type ParameterCollectionFormat, type ParameterType, type Path, type PathParameter, type ProjectConfigs, type QueryParameter, type Reference, type RequestBodyOperation, type Response, RouterWrapper, type RouterWrapperInterface, type Schema, type SchemaFormatConstraints, type SchemaV3, type SearchQuery, type SecureTokenConfig, type Security, type Server, type SocketConnectionMiddleware, type SocketConnectionNok, type SocketConnectionOk, SocketWrapper, type SocketWrapperConstructor, type Spec, Starter, type StarterOptions, type StringFormat, Swagger, type SwaggerMetadataInterface, type Tag, Token, type TokenApiOptions, type TokenConstructor, type XML, apiNok, apiOk, c, errorCatcher, fullLogNok, fullLogOk, getCompiledPath, i, log, sleep, socketNok, socketOk };
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { Request, Response as Response$1, RequestHandler, Router, Express } from
2
2
  import { BaseEntity, MixedList, EntitySchema } from 'typeorm';
3
3
  import { Socket, Namespace, Server as Server$1, ServerOptions } from 'socket.io';
4
4
  import http from 'http';
5
+ import * as utils_logger_av from 'utils-logger-av';
5
6
  import { Logger } from 'utils-logger-av';
6
7
 
7
8
  type BackgroundServiceConstructor = {
@@ -515,7 +516,7 @@ type StarterOptions = {
515
516
  beforeStartListening?: (app: Express, httpServer?: http.Server, socketIoServerInstance?: Server$1) => void;
516
517
  sockets?: {
517
518
  wrappers: Array<SocketWrapper>;
518
- options?: ServerOptions;
519
+ options?: Partial<ServerOptions>;
519
520
  };
520
521
  tokenOptions?: {
521
522
  tokenInstance: Token;
@@ -644,6 +645,8 @@ declare class MyLogger extends Logger {
644
645
  fullLogNok: (service: string, ...args: any[]) => void;
645
646
  }
646
647
  declare const log: MyLogger;
648
+ declare const i: Record<utils_logger_av.Icons, string>;
649
+ declare const c: (color: utils_logger_av.LogColors, message: any) => string;
647
650
  declare const fullLogOk: (service: string, message: string) => void;
648
651
  declare const fullLogNok: (service: string, ...args: any[]) => void;
649
652
  declare const apiOk: (res: any, status?: number, contentType?: string) => ExpressReturn;
@@ -654,4 +657,4 @@ declare const socketNok: (message: string) => SocketConnectionNok;
654
657
  declare const sleep: (ms: number) => Promise<unknown>;
655
658
  declare const getCompiledPath: (__filename: string, __dirname: string, pathsWithoutExtension: string[]) => string[];
656
659
 
657
- export { type ApiKeySecurity, BackgroundService, type BaseFormatContrainedParameter, type BaseOAuthSecurity, type BaseParameter, type BaseSchema, type BaseSecurity, type BasicAuthenticationSecurity, type BodyParameter, type Components, type ConnectedSocketClient, type Contact, type DefaultTokenPayload, type DynamicDbRouterOptions, type DynamicSwaggerOperation, type DynamicSwaggerOperationBody, type DynamicSwaggerPath, type DynamicSwaggerRequestBodyOperation, type ErrorsMapping, type ExpressReturn, type ExternalDocs, type FormDataParameter, type GenericFormat, type Header, type HeaderParameter, type Info, type IntegerFormat, type License, type ListOptions, type MethodPathHandling, type Methods, type NumberFormat, type OAuth2AccessCodeSecurity, type OAuth2ApplicationSecurity, type OAuth2ImplicitSecurity, type OAuth2PasswordSecurity, type OAuthScope, type Operation, type Parameter, type ParameterCollectionFormat, type ParameterType, type Path, type PathParameter, type ProjectConfigs, type QueryParameter, type Reference, type RequestBodyOperation, type Response, RouterWrapper, type RouterWrapperInterface, type Schema, type SchemaFormatConstraints, type SchemaV3, type SearchQuery, type SecureTokenConfig, type Security, type Server, type SocketConnectionMiddleware, type SocketConnectionNok, type SocketConnectionOk, SocketWrapper, type SocketWrapperConstructor, type Spec, Starter, type StarterOptions, type StringFormat, Swagger, type SwaggerMetadataInterface, type Tag, Token, type TokenApiOptions, type TokenConstructor, type XML, apiNok, apiOk, errorCatcher, fullLogNok, fullLogOk, getCompiledPath, log, sleep, socketNok, socketOk };
660
+ export { type ApiKeySecurity, BackgroundService, type BaseFormatContrainedParameter, type BaseOAuthSecurity, type BaseParameter, type BaseSchema, type BaseSecurity, type BasicAuthenticationSecurity, type BodyParameter, type Components, type ConnectedSocketClient, type Contact, type DefaultTokenPayload, type DynamicDbRouterOptions, type DynamicSwaggerOperation, type DynamicSwaggerOperationBody, type DynamicSwaggerPath, type DynamicSwaggerRequestBodyOperation, type ErrorsMapping, type ExpressReturn, type ExternalDocs, type FormDataParameter, type GenericFormat, type Header, type HeaderParameter, type Info, type IntegerFormat, type License, type ListOptions, type MethodPathHandling, type Methods, type NumberFormat, type OAuth2AccessCodeSecurity, type OAuth2ApplicationSecurity, type OAuth2ImplicitSecurity, type OAuth2PasswordSecurity, type OAuthScope, type Operation, type Parameter, type ParameterCollectionFormat, type ParameterType, type Path, type PathParameter, type ProjectConfigs, type QueryParameter, type Reference, type RequestBodyOperation, type Response, RouterWrapper, type RouterWrapperInterface, type Schema, type SchemaFormatConstraints, type SchemaV3, type SearchQuery, type SecureTokenConfig, type Security, type Server, type SocketConnectionMiddleware, type SocketConnectionNok, type SocketConnectionOk, SocketWrapper, type SocketWrapperConstructor, type Spec, Starter, type StarterOptions, type StringFormat, Swagger, type SwaggerMetadataInterface, type Tag, Token, type TokenApiOptions, type TokenConstructor, type XML, apiNok, apiOk, c, errorCatcher, fullLogNok, fullLogOk, getCompiledPath, i, log, sleep, socketNok, socketOk };
package/dist/index.js CHANGED
@@ -13,14 +13,16 @@ var MyLogger = class extends _utilsloggerav.Logger {
13
13
  };
14
14
  this.fullLogNok = (service, ...args) => {
15
15
  let finalString = `[${service.toUpperCase()}]: `;
16
- for (let i = 0; i < args.length; i++) if (i === args.length - 1) finalString += _nullishCoalesce(_optionalChain([args, 'access', _2 => _2[i], 'optionalAccess', _3 => _3.message]), () => ( args[i]));
17
- else finalString += args[i] + " ";
16
+ for (let i2 = 0; i2 < args.length; i2++) if (i2 === args.length - 1) finalString += _nullishCoalesce(_optionalChain([args, 'access', _2 => _2[i2], 'optionalAccess', _3 => _3.message]), () => ( args[i2]));
17
+ else finalString += args[i2] + " ";
18
18
  this.nok(`[${service.toUpperCase()}]: ${finalString}`);
19
19
  this.file(`[${service.toUpperCase()}]: ${finalString}`, "error");
20
20
  };
21
21
  }
22
22
  };
23
23
  var log = new MyLogger({ primaryColor: "cyan", logFilePath: process.env.ERROR_FILE_PATH });
24
+ var i = _utilsloggerav.Logger.icons;
25
+ var c = _utilsloggerav.getStringedColor;
24
26
  var { fullLogOk, fullLogNok } = log;
25
27
  var apiOk = (res, status = 200, contentType) => ({ result: res, status, contentType, isOk: true });
26
28
  var apiNok = (err, status = 500) => ({ result: err, status, isOk: false });
@@ -961,4 +963,6 @@ var Token = class {
961
963
 
962
964
 
963
965
 
964
- exports.BackgroundService = BackgroundService; exports.RouterWrapper = RouterWrapper; exports.SocketWrapper = SocketWrapper; exports.Starter = Starter; exports.Swagger = Swagger; exports.Token = Token; exports.apiNok = apiNok; exports.apiOk = apiOk; exports.errorCatcher = errorCatcher; exports.fullLogNok = fullLogNok; exports.fullLogOk = fullLogOk; exports.getCompiledPath = getCompiledPath; exports.log = log; exports.sleep = sleep; exports.socketNok = socketNok; exports.socketOk = socketOk;
966
+
967
+
968
+ exports.BackgroundService = BackgroundService; exports.RouterWrapper = RouterWrapper; exports.SocketWrapper = SocketWrapper; exports.Starter = Starter; exports.Swagger = Swagger; exports.Token = Token; exports.apiNok = apiNok; exports.apiOk = apiOk; exports.c = c; exports.errorCatcher = errorCatcher; exports.fullLogNok = fullLogNok; exports.fullLogOk = fullLogOk; exports.getCompiledPath = getCompiledPath; exports.i = i; exports.log = log; exports.sleep = sleep; exports.socketNok = socketNok; exports.socketOk = socketOk;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/_utils.ts
2
2
  import path from "path";
3
- import { Logger } from "utils-logger-av";
3
+ import { Logger, getStringedColor } from "utils-logger-av";
4
4
  var MyLogger = class extends Logger {
5
5
  constructor() {
6
6
  super(...arguments);
@@ -13,14 +13,16 @@ var MyLogger = class extends Logger {
13
13
  };
14
14
  this.fullLogNok = (service, ...args) => {
15
15
  let finalString = `[${service.toUpperCase()}]: `;
16
- for (let i = 0; i < args.length; i++) if (i === args.length - 1) finalString += args[i]?.message ?? args[i];
17
- else finalString += args[i] + " ";
16
+ for (let i2 = 0; i2 < args.length; i2++) if (i2 === args.length - 1) finalString += args[i2]?.message ?? args[i2];
17
+ else finalString += args[i2] + " ";
18
18
  this.nok(`[${service.toUpperCase()}]: ${finalString}`);
19
19
  this.file(`[${service.toUpperCase()}]: ${finalString}`, "error");
20
20
  };
21
21
  }
22
22
  };
23
23
  var log = new MyLogger({ primaryColor: "cyan", logFilePath: process.env.ERROR_FILE_PATH });
24
+ var i = Logger.icons;
25
+ var c = getStringedColor;
24
26
  var { fullLogOk, fullLogNok } = log;
25
27
  var apiOk = (res, status = 200, contentType) => ({ result: res, status, contentType, isOk: true });
26
28
  var apiNok = (err, status = 500) => ({ result: err, status, isOk: false });
@@ -953,10 +955,12 @@ export {
953
955
  Token,
954
956
  apiNok,
955
957
  apiOk,
958
+ c,
956
959
  errorCatcher,
957
960
  fullLogNok,
958
961
  fullLogOk,
959
962
  getCompiledPath,
963
+ i,
960
964
  log,
961
965
  sleep,
962
966
  socketNok,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expresso-macchiato",
3
- "version": "0.3.8-dev.1",
3
+ "version": "0.3.8-dev.3",
4
4
  "author": "Alessio Velluso",
5
5
  "license": "MIT",
6
6
  "description": "Description",
@@ -18,7 +18,7 @@ export type StarterOptions = {
18
18
  beforeStartListening?:(app:Express, httpServer?:http.Server, socketIoServerInstance?:Server) => void,
19
19
  sockets?: {
20
20
  wrappers:Array<SocketWrapper>,
21
- options?:ServerOptions
21
+ options?:Partial<ServerOptions>
22
22
  },
23
23
  tokenOptions?: {
24
24
  tokenInstance: Token,