@cley_faye/boilerplate 3.11.0 → 3.11.2

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.
@@ -134,10 +134,8 @@ const getOutputToWatch = (webpackOptions, targetName) => {
134
134
  if (webpackOptions.output) {
135
135
  return null;
136
136
  }
137
- const entries = webpackOptions.entry
138
- ? Object.keys(webpackOptions.entry)
139
- : [targetName];
140
- return entries.map(entryName => (0, path_1.join)("dist", targetName, "js", `${entryName}.js`));
137
+ // Watch all output directory, since webpack generate chunks
138
+ return [(0, path_1.join)("dist", targetName, "js", "*.js")];
141
139
  };
142
140
  const getWatchTasks = (webpackOptions, targetName) => {
143
141
  const outputToWatch = getOutputToWatch(webpackOptions, targetName);
package/lib/winston.d.ts CHANGED
@@ -16,7 +16,7 @@ export interface LogConfig {
16
16
  stacktraceFilter?: Array<RegExp> | RegExp;
17
17
  }
18
18
  interface ExtendedErrorFields {
19
- cause?: Error;
19
+ cause?: unknown;
20
20
  response?: {
21
21
  data?: string | Record<string, unknown>;
22
22
  };
package/lib/winston.js CHANGED
@@ -137,6 +137,19 @@ const addHttpErrorContent = (error) => {
137
137
  return;
138
138
  return `HttpError status: ${error.statusCode}`;
139
139
  };
140
+ const getCause = (error) => {
141
+ const cause = error.cause;
142
+ if (cause === undefined)
143
+ return;
144
+ if (cause instanceof Error)
145
+ return cause;
146
+ try {
147
+ return new Error(cause.toString());
148
+ }
149
+ catch {
150
+ return new Error("Unknown cause");
151
+ }
152
+ };
140
153
  /** Return a string with the full error and stacktrace, including causes */
141
154
  const filterError = (error, collapseStacktrace = true, extraFilter) => {
142
155
  const resultRows = [];
@@ -164,7 +177,7 @@ const filterError = (error, collapseStacktrace = true, extraFilter) => {
164
177
  const httpErrorsContent = addHttpErrorContent(cursor);
165
178
  if (httpErrorsContent)
166
179
  resultRows.push(indent(httpErrorsContent, indentLevel));
167
- cursor = cursor.cause;
180
+ cursor = getCause(cursor);
168
181
  ++indentLevel;
169
182
  }
170
183
  return resultRows.join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cley_faye/boilerplate",
3
- "version": "3.11.0",
3
+ "version": "3.11.2",
4
4
  "description": "Boilerplate code generator for generic projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,12 +21,12 @@
21
21
  "@types/express": "^4.17.14",
22
22
  "@types/grunt": "^0.4.27",
23
23
  "@types/http-errors": "^1.8.2",
24
- "@types/node": "^16.11.59",
25
- "@typescript-eslint/eslint-plugin": "^5.38.0",
26
- "@typescript-eslint/parser": "^5.38.0",
27
- "eslint": "^8.23.1",
24
+ "@types/node": "^16.18.0",
25
+ "@typescript-eslint/eslint-plugin": "^5.41.0",
26
+ "@typescript-eslint/parser": "^5.41.0",
27
+ "eslint": "^8.26.0",
28
28
  "eslint-plugin-import": "^2.26.0",
29
- "eslint-plugin-promise": "^6.0.1",
29
+ "eslint-plugin-promise": "^6.1.1",
30
30
  "eslint-webpack-plugin": "^3.2.0",
31
31
  "express-winston": "^4.2.0",
32
32
  "grunt": "^1.5.3",
@@ -35,7 +35,7 @@
35
35
  "grunt-run": "^0.8.1",
36
36
  "load-grunt-tasks": "^5.1.0",
37
37
  "logform": "^2.4.2",
38
- "typescript": "^4.8.3",
38
+ "typescript": "^4.8.4",
39
39
  "winston": "^3.8.2"
40
40
  },
41
41
  "peerDependencies": {
@@ -57,7 +57,7 @@
57
57
  "grunt-webpack": "5.x",
58
58
  "resolve-typescript-plugin": "^1.2.0",
59
59
  "sass": "1.x",
60
- "ts-loader": "^9.4.0",
60
+ "ts-loader": "^9.4.1",
61
61
  "winston": "3.x"
62
62
  },
63
63
  "peerDependenciesMeta": {