@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.
package/lib/express/logger.d.ts
CHANGED
|
@@ -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.
|
|
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
|
|
20
|
-
export declare const registerRouteLogger: (app: Router, logOptions?: LogOptions
|
|
21
|
-
export declare const registerErrorLogger: (app: Router, logOptions?: LogOptions
|
|
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
|
|
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
|
|
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>
|
|
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 */
|
package/lib/grunt/reactapp.d.ts
CHANGED
|
@@ -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
|
|
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;
|