@cley_faye/boilerplate 3.9.0 → 3.9.1

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.
@@ -1,7 +1,7 @@
1
1
  import expressWinston, { BaseLoggerOptions } from "express-winston";
2
2
  import { Request, Router } from "express";
3
3
  import { LogOptions, UserFromReqFunc } from "./pipelinebuilder.js";
4
- export declare type LoggerOptions = expressWinston.LoggerOptions | boolean;
4
+ export declare type LoggerOptions = expressWinston.BaseLoggerOptions | boolean;
5
5
  interface ErrorLoggerConfiguration {
6
6
  collapseNodeModules?: boolean;
7
7
  }
@@ -16,7 +16,7 @@ export interface RequestWithLoggingData extends Request {
16
16
  };
17
17
  }
18
18
  /** Return the default value for route logger is it is set as `true` */
19
- export declare const defaultRouteLoggerConfig: (userFromReq?: UserFromReqFunc | undefined) => BaseLoggerOptions;
20
- export declare const registerRouteLogger: (app: Router, logOptions?: LogOptions | undefined) => void;
21
- export declare const registerErrorLogger: (app: Router, logOptions?: LogOptions | undefined) => void;
19
+ export declare const defaultRouteLoggerConfig: (userFromReq?: UserFromReqFunc) => BaseLoggerOptions;
20
+ export declare const registerRouteLogger: (app: Router, logOptions?: LogOptions) => void;
21
+ export declare const registerErrorLogger: (app: Router, logOptions?: LogOptions) => void;
22
22
  export {};
@@ -6,4 +6,4 @@ export interface ExtraLoggingOptions {
6
6
  /** Do not expose the "hidden" body props */
7
7
  noHiddenBodyProps?: boolean;
8
8
  }
9
- export declare const bodyLogger: (bodyProps?: string[] | undefined, extraLoggingData?: ExtraLoggingData | undefined, options?: ExtraLoggingOptions) => (req: Request, res: Response, next: NextFunction) => void;
9
+ export declare const bodyLogger: (bodyProps?: Array<string>, extraLoggingData?: ExtraLoggingData, options?: ExtraLoggingOptions) => (req: Request, res: Response, next: NextFunction) => void;
package/lib/express.d.ts CHANGED
@@ -99,11 +99,11 @@ import { PipelineSettings, LogFunction } from "./express/pipelinebuilder.js";
99
99
  * @return
100
100
  * The returned object can be used
101
101
  */
102
- export declare const createPipeline: (settings: PipelineSettings, debugLog?: LogFunction | undefined) => express.Router;
102
+ export declare const createPipeline: (settings: PipelineSettings, debugLog?: LogFunction) => express.Router;
103
103
  /**
104
104
  * Configure the views rendering engine for an ExpressJS App
105
105
  */
106
- export declare const setViewEngine: (app: express.Express, viewEngine: string, viewsDirectory: string, extraLocals?: Record<string, string | number> | undefined) => void;
106
+ export declare const setViewEngine: (app: express.Express, viewEngine: string, viewsDirectory: string, extraLocals?: Record<string, string | number>) => void;
107
107
  export interface StartDefinition {
108
108
  app: express.Application;
109
109
  /** @deprecated use listenInterface instead */
@@ -85,7 +85,7 @@ export declare type HandlerFunction = (gruntConfig: GruntConfig, targetName: str
85
85
  * @return
86
86
  * List of tasks to build the application
87
87
  */
88
- export declare const reactApp: (gruntConfig: GruntConfig, targetName?: string, options?: ReactAppOptions | undefined) => Array<string>;
88
+ export declare const reactApp: (gruntConfig: GruntConfig, targetName?: string, options?: ReactAppOptions) => Array<string>;
89
89
  export interface HelperOptions {
90
90
  production?: boolean;
91
91
  watch?: boolean | number;
package/lib/winston.js CHANGED
@@ -70,7 +70,7 @@ const logConfig = {
70
70
  collapseNodeModules: true,
71
71
  };
72
72
  const customFormat = winston_1.default.format.printf((info) => {
73
- const message = ("stack" in info) ? info.stack : info.message;
73
+ const message = (("stack" in info) ? info.stack : info.message);
74
74
  const filteredMessage = logConfig.collapseNodeModules
75
75
  ? [...(0, exports.filterNodeModules)(message)].join("\n")
76
76
  : message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cley_faye/boilerplate",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "description": "Boilerplate code generator for generic projects",
5
5
  "repository": {
6
6
  "type": "git",