@strapi/logger 0.0.0-next.f7babb775ed9a7e18d8351cb7f74c63e016323c4 → 0.0.0-next.f86041c89a8c1545c6437a881dc613e98bc52bd7

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.
Files changed (68) hide show
  1. package/LICENSE +18 -3
  2. package/dist/configs/default-configuration.d.ts +1 -0
  3. package/dist/configs/default-configuration.d.ts.map +1 -0
  4. package/dist/configs/default-configuration.js +19 -12
  5. package/dist/configs/default-configuration.js.map +1 -1
  6. package/dist/configs/default-configuration.mjs +19 -0
  7. package/dist/configs/default-configuration.mjs.map +1 -0
  8. package/dist/configs/index.d.ts +1 -0
  9. package/dist/configs/index.d.ts.map +1 -0
  10. package/dist/configs/index.js +10 -11
  11. package/dist/configs/index.js.map +1 -1
  12. package/dist/configs/index.mjs +3 -0
  13. package/dist/configs/index.mjs.map +1 -0
  14. package/dist/configs/output-file-configuration.d.ts +3 -2
  15. package/dist/configs/output-file-configuration.d.ts.map +1 -0
  16. package/dist/configs/output-file-configuration.js +24 -14
  17. package/dist/configs/output-file-configuration.js.map +1 -1
  18. package/dist/configs/output-file-configuration.mjs +25 -0
  19. package/dist/configs/output-file-configuration.mjs.map +1 -0
  20. package/dist/constants.d.ts +1 -0
  21. package/dist/constants.d.ts.map +1 -0
  22. package/dist/constants.js +9 -9
  23. package/dist/constants.js.map +1 -1
  24. package/dist/constants.mjs +8 -0
  25. package/dist/constants.mjs.map +1 -0
  26. package/dist/formats/detailed-log.d.ts +7 -0
  27. package/dist/formats/detailed-log.d.ts.map +1 -0
  28. package/dist/formats/detailed-log.js +18 -0
  29. package/dist/formats/detailed-log.js.map +1 -0
  30. package/dist/formats/detailed-log.mjs +16 -0
  31. package/dist/formats/detailed-log.mjs.map +1 -0
  32. package/dist/formats/exclude-colors.d.ts +1 -0
  33. package/dist/formats/exclude-colors.d.ts.map +1 -0
  34. package/dist/formats/exclude-colors.js +9 -8
  35. package/dist/formats/exclude-colors.js.map +1 -1
  36. package/dist/formats/exclude-colors.mjs +15 -0
  37. package/dist/formats/exclude-colors.mjs.map +1 -0
  38. package/dist/formats/index.d.ts +4 -1
  39. package/dist/formats/index.d.ts.map +1 -0
  40. package/dist/formats/index.js +14 -13
  41. package/dist/formats/index.js.map +1 -1
  42. package/dist/formats/index.mjs +5 -0
  43. package/dist/formats/index.mjs.map +1 -0
  44. package/dist/formats/level-filter.d.ts +1 -0
  45. package/dist/formats/level-filter.d.ts.map +1 -0
  46. package/dist/formats/level-filter.js +10 -7
  47. package/dist/formats/level-filter.js.map +1 -1
  48. package/dist/formats/level-filter.mjs +8 -0
  49. package/dist/formats/level-filter.mjs.map +1 -0
  50. package/dist/formats/log-errors.d.ts +1 -0
  51. package/dist/formats/log-errors.d.ts.map +1 -0
  52. package/dist/formats/log-errors.js +12 -7
  53. package/dist/formats/log-errors.js.map +1 -1
  54. package/dist/formats/log-errors.mjs +14 -0
  55. package/dist/formats/log-errors.mjs.map +1 -0
  56. package/dist/formats/pretty-print.d.ts +1 -0
  57. package/dist/formats/pretty-print.d.ts.map +1 -0
  58. package/dist/formats/pretty-print.js +16 -17
  59. package/dist/formats/pretty-print.js.map +1 -1
  60. package/dist/formats/pretty-print.mjs +27 -0
  61. package/dist/formats/pretty-print.mjs.map +1 -0
  62. package/dist/index.d.ts +2 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +34 -35
  65. package/dist/index.js.map +1 -1
  66. package/dist/index.mjs +16 -0
  67. package/dist/index.mjs.map +1 -0
  68. package/package.json +15 -13
package/LICENSE CHANGED
@@ -2,7 +2,21 @@ Copyright (c) 2015-present Strapi Solutions SAS
2
2
 
3
3
  Portions of the Strapi software are licensed as follows:
4
4
 
5
- * All software that resides under an "ee/" directory (the “EE Software”), if that directory exists, is licensed under the license defined in "ee/LICENSE".
5
+ * All software that resides under an "ee/" directory (the “EE Software”), if that directory exists, is licensed under the license defined below.
6
+
7
+ Enterprise License
8
+
9
+ If you or the company you represent has entered into a written agreement referencing the Enterprise Edition of the Strapi source code available at
10
+ https://github.com/strapi/strapi, then such agreement applies to your use of the Enterprise Edition of the Strapi Software. If you or the company you
11
+ represent is using the Enterprise Edition of the Strapi Software in connection with a subscription to our cloud offering, then the agreement you have
12
+ agreed to with respect to our cloud offering and the licenses included in such agreement apply to your use of the Enterprise Edition of the Strapi Software.
13
+ Otherwise, the Strapi Enterprise Software License Agreement (found here https://strapi.io/enterprise-terms) applies to your use of the Enterprise Edition of the Strapi Software.
14
+
15
+ BY ACCESSING OR USING THE ENTERPRISE EDITION OF THE STRAPI SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE RELEVANT REFERENCED AGREEMENT.
16
+ IF YOU ARE NOT AUTHORIZED TO ACCEPT THESE TERMS ON BEHALF OF THE COMPANY YOU REPRESENT OR IF YOU DO NOT AGREE TO ALL OF THE RELEVANT TERMS AND CONDITIONS REFERENCED AND YOU
17
+ HAVE NOT OTHERWISE EXECUTED A WRITTEN AGREEMENT WITH STRAPI, YOU ARE NOT AUTHORIZED TO ACCESS OR USE OR ALLOW ANY USER TO ACCESS OR USE ANY PART OF
18
+ THE ENTERPRISE EDITION OF THE STRAPI SOFTWARE. YOUR ACCESS RIGHTS ARE CONDITIONAL ON YOUR CONSENT TO THE RELEVANT REFERENCED TERMS TO THE EXCLUSION OF ALL OTHER TERMS;
19
+ IF THE RELEVANT REFERENCED TERMS ARE CONSIDERED AN OFFER BY YOU, ACCEPTANCE IS EXPRESSLY LIMITED TO THE RELEVANT REFERENCED TERMS.
6
20
 
7
21
  * All software outside of the above-mentioned directories or restrictions above is available under the "MIT Expat" license as set forth below.
8
22
 
@@ -18,5 +32,6 @@ furnished to do so, subject to the following conditions:
18
32
  The above copyright notice and this permission notice shall be included in all
19
33
  copies or substantial portions of the Software.
20
34
 
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
35
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,3 +1,4 @@
1
1
  import { LoggerOptions } from 'winston';
2
2
  declare const _default: () => LoggerOptions;
3
3
  export default _default;
4
+ //# sourceMappingURL=default-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-configuration.d.ts","sourceRoot":"","sources":["../../src/configs/default-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAE,MAAM,SAAS,CAAC;8BAIjC,aAAa;AAAhC,wBAOE"}
@@ -1,14 +1,21 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const winston_1 = require("winston");
4
- const constants_1 = require("../constants");
5
- const formats_1 = require("../formats");
6
- exports.default = () => {
1
+ 'use strict';
2
+
3
+ var winston = require('winston');
4
+ var constants = require('../constants.js');
5
+ var prettyPrint = require('../formats/pretty-print.js');
6
+ require('../formats/exclude-colors.js');
7
+ require('../formats/detailed-log.js');
8
+
9
+ var defaultConfiguration = (()=>{
7
10
  return {
8
- level: constants_1.LEVEL_LABEL,
9
- levels: constants_1.LEVELS,
10
- format: (0, formats_1.prettyPrint)(),
11
- transports: [new winston_1.transports.Console()],
11
+ level: constants.LEVEL_LABEL,
12
+ levels: constants.LEVELS,
13
+ format: prettyPrint(),
14
+ transports: [
15
+ new winston.transports.Console()
16
+ ]
12
17
  };
13
- };
14
- //# sourceMappingURL=default-configuration.js.map
18
+ });
19
+
20
+ module.exports = defaultConfiguration;
21
+ //# sourceMappingURL=default-configuration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-configuration.js","sourceRoot":"","sources":["../../src/configs/default-configuration.ts"],"names":[],"mappings":";;AAAA,qCAAoD;AACpD,4CAAmD;AACnD,wCAAyC;AAEzC,kBAAe,GAAkB,EAAE;IACjC,OAAO;QACL,KAAK,EAAE,uBAAW;QAClB,MAAM,EAAE,kBAAM;QACd,MAAM,EAAE,IAAA,qBAAW,GAAE;QACrB,UAAU,EAAE,CAAC,IAAI,oBAAU,CAAC,OAAO,EAAE,CAAC;KACvC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"default-configuration.js","sources":["../../src/configs/default-configuration.ts"],"sourcesContent":["import { transports, LoggerOptions } from 'winston';\nimport { LEVEL_LABEL, LEVELS } from '../constants';\nimport { prettyPrint } from '../formats';\n\nexport default (): LoggerOptions => {\n return {\n level: LEVEL_LABEL,\n levels: LEVELS,\n format: prettyPrint(),\n transports: [new transports.Console()],\n };\n};\n"],"names":["level","LEVEL_LABEL","levels","LEVELS","format","prettyPrint","transports","Console"],"mappings":";;;;;;;;AAIA,2BAAe,CAAA,IAAA;IACb,OAAO;QACLA,KAAOC,EAAAA,qBAAAA;QACPC,MAAQC,EAAAA,gBAAAA;QACRC,MAAQC,EAAAA,WAAAA,EAAAA;QACRC,UAAY,EAAA;AAAC,YAAA,IAAIA,mBAAWC,OAAO;AAAG;AACxC,KAAA;AACF,CAAA;;;;"}
@@ -0,0 +1,19 @@
1
+ import { transports } from 'winston';
2
+ import { LEVEL_LABEL, LEVELS } from '../constants.mjs';
3
+ import prettyPrint from '../formats/pretty-print.mjs';
4
+ import '../formats/exclude-colors.mjs';
5
+ import '../formats/detailed-log.mjs';
6
+
7
+ var defaultConfiguration = (()=>{
8
+ return {
9
+ level: LEVEL_LABEL,
10
+ levels: LEVELS,
11
+ format: prettyPrint(),
12
+ transports: [
13
+ new transports.Console()
14
+ ]
15
+ };
16
+ });
17
+
18
+ export { defaultConfiguration as default };
19
+ //# sourceMappingURL=default-configuration.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-configuration.mjs","sources":["../../src/configs/default-configuration.ts"],"sourcesContent":["import { transports, LoggerOptions } from 'winston';\nimport { LEVEL_LABEL, LEVELS } from '../constants';\nimport { prettyPrint } from '../formats';\n\nexport default (): LoggerOptions => {\n return {\n level: LEVEL_LABEL,\n levels: LEVELS,\n format: prettyPrint(),\n transports: [new transports.Console()],\n };\n};\n"],"names":["level","LEVEL_LABEL","levels","LEVELS","format","prettyPrint","transports","Console"],"mappings":";;;;;;AAIA,2BAAe,CAAA,IAAA;IACb,OAAO;QACLA,KAAOC,EAAAA,WAAAA;QACPC,MAAQC,EAAAA,MAAAA;QACRC,MAAQC,EAAAA,WAAAA,EAAAA;QACRC,UAAY,EAAA;AAAC,YAAA,IAAIA,WAAWC,OAAO;AAAG;AACxC,KAAA;AACF,CAAA;;;;"}
@@ -1,2 +1,3 @@
1
1
  export { default as createDefaultConfiguration } from './default-configuration';
2
2
  export { default as createOutputFileConfiguration } from './output-file-configuration';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,6BAA6B,CAAC"}
@@ -1,11 +1,10 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createOutputFileConfiguration = exports.createDefaultConfiguration = void 0;
7
- var default_configuration_1 = require("./default-configuration");
8
- Object.defineProperty(exports, "createDefaultConfiguration", { enumerable: true, get: function () { return __importDefault(default_configuration_1).default; } });
9
- var output_file_configuration_1 = require("./output-file-configuration");
10
- Object.defineProperty(exports, "createOutputFileConfiguration", { enumerable: true, get: function () { return __importDefault(output_file_configuration_1).default; } });
11
- //# sourceMappingURL=index.js.map
1
+ 'use strict';
2
+
3
+ var defaultConfiguration = require('./default-configuration.js');
4
+ var outputFileConfiguration = require('./output-file-configuration.js');
5
+
6
+
7
+
8
+ exports.createDefaultConfiguration = defaultConfiguration;
9
+ exports.createOutputFileConfiguration = outputFileConfiguration;
10
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/configs/index.ts"],"names":[],"mappings":";;;;;;AAAA,iEAAgF;AAAvE,oJAAA,OAAO,OAA8B;AAC9C,yEAAuF;AAA9E,2JAAA,OAAO,OAAiC"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ export { default as createDefaultConfiguration } from './default-configuration.mjs';
2
+ export { default as createOutputFileConfiguration } from './output-file-configuration.mjs';
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,3 +1,4 @@
1
- import { LoggerOptions } from 'winston';
2
- declare const _default: (filename: string) => LoggerOptions;
1
+ import { transports, LoggerOptions } from 'winston';
2
+ declare const _default: (filename: string, fileTransportOptions?: transports.FileTransportOptions) => LoggerOptions;
3
3
  export default _default;
4
+ //# sourceMappingURL=output-file-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-file-configuration.d.ts","sourceRoot":"","sources":["../../src/configs/output-file-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;mCAMxC,MAAM,yBACM,WAAW,oBAAoB,KACpD,aAAa;AAHhB,wBAkBE"}
@@ -1,17 +1,27 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const winston_1 = require("winston");
4
- const constants_1 = require("../constants");
5
- const formats_1 = require("../formats");
6
- exports.default = (filename) => {
1
+ 'use strict';
2
+
3
+ var winston = require('winston');
4
+ var constants = require('../constants.js');
5
+ var prettyPrint = require('../formats/pretty-print.js');
6
+ var excludeColors = require('../formats/exclude-colors.js');
7
+ require('../formats/detailed-log.js');
8
+
9
+ var outputFileConfiguration = ((filename, fileTransportOptions = {})=>{
7
10
  return {
8
- level: constants_1.LEVEL_LABEL,
9
- levels: constants_1.LEVELS,
10
- format: (0, formats_1.prettyPrint)(),
11
+ level: constants.LEVEL_LABEL,
12
+ levels: constants.LEVELS,
13
+ format: prettyPrint(),
11
14
  transports: [
12
- new winston_1.transports.Console(),
13
- new winston_1.transports.File({ level: 'error', filename, format: formats_1.excludeColors }),
14
- ],
15
+ new winston.transports.Console(),
16
+ new winston.transports.File({
17
+ level: 'error',
18
+ filename,
19
+ format: excludeColors,
20
+ ...fileTransportOptions
21
+ })
22
+ ]
15
23
  };
16
- };
17
- //# sourceMappingURL=output-file-configuration.js.map
24
+ });
25
+
26
+ module.exports = outputFileConfiguration;
27
+ //# sourceMappingURL=output-file-configuration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"output-file-configuration.js","sourceRoot":"","sources":["../../src/configs/output-file-configuration.ts"],"names":[],"mappings":";;AAAA,qCAAoD;AAEpD,4CAAmD;AACnD,wCAAwD;AAExD,kBAAe,CAAC,QAAgB,EAAiB,EAAE;IACjD,OAAO;QACL,KAAK,EAAE,uBAAW;QAClB,MAAM,EAAE,kBAAM;QACd,MAAM,EAAE,IAAA,qBAAW,GAAE;QACrB,UAAU,EAAE;YACV,IAAI,oBAAU,CAAC,OAAO,EAAE;YACxB,IAAI,oBAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,uBAAa,EAAE,CAAC;SACzE;KACF,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"output-file-configuration.js","sources":["../../src/configs/output-file-configuration.ts"],"sourcesContent":["import { transports, LoggerOptions } from 'winston';\n\nimport { LEVEL_LABEL, LEVELS } from '../constants';\nimport { prettyPrint, excludeColors } from '../formats';\n\nexport default (\n filename: string,\n fileTransportOptions: transports.FileTransportOptions = {}\n): LoggerOptions => {\n return {\n level: LEVEL_LABEL,\n levels: LEVELS,\n format: prettyPrint(),\n transports: [\n new transports.Console(),\n new transports.File({\n level: 'error',\n filename,\n format: excludeColors,\n ...fileTransportOptions,\n }),\n ],\n };\n};\n"],"names":["filename","fileTransportOptions","level","LEVEL_LABEL","levels","LEVELS","format","prettyPrint","transports","Console","File","excludeColors"],"mappings":";;;;;;;;AAKA,8BAAe,CAAA,CACbA,QACAC,EAAAA,oBAAAA,GAAwD,EAAE,GAAA;IAE1D,OAAO;QACLC,KAAOC,EAAAA,qBAAAA;QACPC,MAAQC,EAAAA,gBAAAA;QACRC,MAAQC,EAAAA,WAAAA,EAAAA;QACRC,UAAY,EAAA;AACV,YAAA,IAAIA,mBAAWC,OAAO,EAAA;YACtB,IAAID,kBAAAA,CAAWE,IAAI,CAAC;gBAClBR,KAAO,EAAA,OAAA;AACPF,gBAAAA,QAAAA;gBACAM,MAAQK,EAAAA,aAAAA;AACR,gBAAA,GAAGV;AACL,aAAA;AACD;AACH,KAAA;AACF,CAAA;;;;"}
@@ -0,0 +1,25 @@
1
+ import { transports } from 'winston';
2
+ import { LEVEL_LABEL, LEVELS } from '../constants.mjs';
3
+ import prettyPrint from '../formats/pretty-print.mjs';
4
+ import excludeColors from '../formats/exclude-colors.mjs';
5
+ import '../formats/detailed-log.mjs';
6
+
7
+ var outputFileConfiguration = ((filename, fileTransportOptions = {})=>{
8
+ return {
9
+ level: LEVEL_LABEL,
10
+ levels: LEVELS,
11
+ format: prettyPrint(),
12
+ transports: [
13
+ new transports.Console(),
14
+ new transports.File({
15
+ level: 'error',
16
+ filename,
17
+ format: excludeColors,
18
+ ...fileTransportOptions
19
+ })
20
+ ]
21
+ };
22
+ });
23
+
24
+ export { outputFileConfiguration as default };
25
+ //# sourceMappingURL=output-file-configuration.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-file-configuration.mjs","sources":["../../src/configs/output-file-configuration.ts"],"sourcesContent":["import { transports, LoggerOptions } from 'winston';\n\nimport { LEVEL_LABEL, LEVELS } from '../constants';\nimport { prettyPrint, excludeColors } from '../formats';\n\nexport default (\n filename: string,\n fileTransportOptions: transports.FileTransportOptions = {}\n): LoggerOptions => {\n return {\n level: LEVEL_LABEL,\n levels: LEVELS,\n format: prettyPrint(),\n transports: [\n new transports.Console(),\n new transports.File({\n level: 'error',\n filename,\n format: excludeColors,\n ...fileTransportOptions,\n }),\n ],\n };\n};\n"],"names":["filename","fileTransportOptions","level","LEVEL_LABEL","levels","LEVELS","format","prettyPrint","transports","Console","File","excludeColors"],"mappings":";;;;;;AAKA,8BAAe,CAAA,CACbA,QACAC,EAAAA,oBAAAA,GAAwD,EAAE,GAAA;IAE1D,OAAO;QACLC,KAAOC,EAAAA,WAAAA;QACPC,MAAQC,EAAAA,MAAAA;QACRC,MAAQC,EAAAA,WAAAA,EAAAA;QACRC,UAAY,EAAA;AACV,YAAA,IAAIA,WAAWC,OAAO,EAAA;YACtB,IAAID,UAAAA,CAAWE,IAAI,CAAC;gBAClBR,KAAO,EAAA,OAAA;AACPF,gBAAAA,QAAAA;gBACAM,MAAQK,EAAAA,aAAAA;AACR,gBAAA,GAAGV;AACL,aAAA;AACD;AACH,KAAA;AACF,CAAA;;;;"}
@@ -3,3 +3,4 @@ declare const LEVELS: config.NpmConfigSetLevels;
3
3
  declare const LEVEL_LABEL = "silly";
4
4
  declare const LEVEL: number;
5
5
  export { LEVEL, LEVEL_LABEL, LEVELS };
6
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,QAAA,MAAM,MAAM,2BAAoB,CAAC;AACjC,QAAA,MAAM,WAAW,UAAU,CAAC;AAC5B,QAAA,MAAM,KAAK,QAAsB,CAAC;AAElC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC"}
package/dist/constants.js CHANGED
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LEVELS = exports.LEVEL_LABEL = exports.LEVEL = void 0;
4
- const winston_1 = require("winston");
5
- const LEVELS = winston_1.config.npm.levels;
6
- exports.LEVELS = LEVELS;
1
+ 'use strict';
2
+
3
+ var winston = require('winston');
4
+
5
+ const LEVELS = winston.config.npm.levels;
7
6
  const LEVEL_LABEL = 'silly';
7
+ LEVELS[LEVEL_LABEL];
8
+
9
+ exports.LEVELS = LEVELS;
8
10
  exports.LEVEL_LABEL = LEVEL_LABEL;
9
- const LEVEL = LEVELS[LEVEL_LABEL];
10
- exports.LEVEL = LEVEL;
11
- //# sourceMappingURL=constants.js.map
11
+ //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AAEjC,MAAM,MAAM,GAAG,gBAAM,CAAC,GAAG,CAAC,MAAM,CAAC;AAIJ,wBAAM;AAHnC,MAAM,WAAW,GAAG,OAAO,CAAC;AAGZ,kCAAW;AAF3B,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAEzB,sBAAK"}
1
+ {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["import { config } from 'winston';\n\nconst LEVELS = config.npm.levels;\nconst LEVEL_LABEL = 'silly';\nconst LEVEL = LEVELS[LEVEL_LABEL];\n\nexport { LEVEL, LEVEL_LABEL, LEVELS };\n"],"names":["LEVELS","config","npm","levels","LEVEL_LABEL"],"mappings":";;;;AAEA,MAAMA,MAASC,GAAAA,cAAAA,CAAOC,GAAG,CAACC;AAC1B,MAAMC,WAAc,GAAA;AACNJ,MAAM,CAACI,WAAY;;;;;"}
@@ -0,0 +1,8 @@
1
+ import { config } from 'winston';
2
+
3
+ const LEVELS = config.npm.levels;
4
+ const LEVEL_LABEL = 'silly';
5
+ LEVELS[LEVEL_LABEL];
6
+
7
+ export { LEVELS, LEVEL_LABEL };
8
+ //# sourceMappingURL=constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.mjs","sources":["../src/constants.ts"],"sourcesContent":["import { config } from 'winston';\n\nconst LEVELS = config.npm.levels;\nconst LEVEL_LABEL = 'silly';\nconst LEVEL = LEVELS[LEVEL_LABEL];\n\nexport { LEVEL, LEVEL_LABEL, LEVELS };\n"],"names":["LEVELS","config","npm","levels","LEVEL_LABEL"],"mappings":";;AAEA,MAAMA,MAASC,GAAAA,MAAAA,CAAOC,GAAG,CAACC;AAC1B,MAAMC,WAAc,GAAA;AACNJ,MAAM,CAACI,WAAY;;;;"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This will remove the chalk color codes from the message provided.
3
+ * It's used to log plain text in the log file
4
+ */
5
+ declare const _default: import("logform").Format;
6
+ export default _default;
7
+ //# sourceMappingURL=detailed-log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detailed-log.d.ts","sourceRoot":"","sources":["../../src/formats/detailed-log.ts"],"names":[],"mappings":"AAEA;;;GAGG;;AACH,wBAYG"}
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ var winston = require('winston');
4
+
5
+ /**
6
+ * This will remove the chalk color codes from the message provided.
7
+ * It's used to log plain text in the log file
8
+ */ var detailedLog = winston.format.printf(({ message, level, timestamp })=>{
9
+ if (typeof message !== 'string') {
10
+ return message;
11
+ }
12
+ const newMessage = `[${timestamp}] ${level}: ${message}`;
13
+ return newMessage.replace(// eslint-disable-next-line no-control-regex
14
+ /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, '');
15
+ });
16
+
17
+ module.exports = detailedLog;
18
+ //# sourceMappingURL=detailed-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detailed-log.js","sources":["../../src/formats/detailed-log.ts"],"sourcesContent":["import { format } from 'winston';\n\n/**\n * This will remove the chalk color codes from the message provided.\n * It's used to log plain text in the log file\n */\nexport default format.printf(({ message, level, timestamp }) => {\n if (typeof message !== 'string') {\n return message;\n }\n\n const newMessage = `[${timestamp as string}] ${level}: ${message as string}`;\n\n return newMessage.replace(\n // eslint-disable-next-line no-control-regex\n /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,\n ''\n );\n});\n"],"names":["format","printf","message","level","timestamp","newMessage","replace"],"mappings":";;;;AAEA;;;IAIA,kBAAeA,cAAOC,CAAAA,MAAM,CAAC,CAAC,EAAEC,OAAO,EAAEC,KAAK,EAAEC,SAAS,EAAE,GAAA;IACzD,IAAI,OAAOF,YAAY,QAAU,EAAA;QAC/B,OAAOA,OAAAA;AACT;IAEA,MAAMG,UAAAA,GAAa,CAAC,CAAC,EAAED,SAAAA,CAAoB,EAAE,EAAED,KAAAA,CAAM,EAAE,EAAED,OAAmB,CAAA,CAAA;IAE5E,OAAOG,UAAAA,CAAWC,OAAO;IAEvB,6EACA,EAAA,EAAA,CAAA;AAEJ,CAAG,CAAA;;;;"}
@@ -0,0 +1,16 @@
1
+ import { format } from 'winston';
2
+
3
+ /**
4
+ * This will remove the chalk color codes from the message provided.
5
+ * It's used to log plain text in the log file
6
+ */ var detailedLog = format.printf(({ message, level, timestamp })=>{
7
+ if (typeof message !== 'string') {
8
+ return message;
9
+ }
10
+ const newMessage = `[${timestamp}] ${level}: ${message}`;
11
+ return newMessage.replace(// eslint-disable-next-line no-control-regex
12
+ /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, '');
13
+ });
14
+
15
+ export { detailedLog as default };
16
+ //# sourceMappingURL=detailed-log.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detailed-log.mjs","sources":["../../src/formats/detailed-log.ts"],"sourcesContent":["import { format } from 'winston';\n\n/**\n * This will remove the chalk color codes from the message provided.\n * It's used to log plain text in the log file\n */\nexport default format.printf(({ message, level, timestamp }) => {\n if (typeof message !== 'string') {\n return message;\n }\n\n const newMessage = `[${timestamp as string}] ${level}: ${message as string}`;\n\n return newMessage.replace(\n // eslint-disable-next-line no-control-regex\n /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,\n ''\n );\n});\n"],"names":["format","printf","message","level","timestamp","newMessage","replace"],"mappings":";;AAEA;;;IAIA,kBAAeA,MAAOC,CAAAA,MAAM,CAAC,CAAC,EAAEC,OAAO,EAAEC,KAAK,EAAEC,SAAS,EAAE,GAAA;IACzD,IAAI,OAAOF,YAAY,QAAU,EAAA;QAC/B,OAAOA,OAAAA;AACT;IAEA,MAAMG,UAAAA,GAAa,CAAC,CAAC,EAAED,SAAAA,CAAoB,EAAE,EAAED,KAAAA,CAAM,EAAE,EAAED,OAAmB,CAAA,CAAA;IAE5E,OAAOG,UAAAA,CAAWC,OAAO;IAEvB,6EACA,EAAA,EAAA,CAAA;AAEJ,CAAG,CAAA;;;;"}
@@ -4,3 +4,4 @@
4
4
  */
5
5
  declare const _default: import("logform").Format;
6
6
  export default _default;
7
+ //# sourceMappingURL=exclude-colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exclude-colors.d.ts","sourceRoot":"","sources":["../../src/formats/exclude-colors.ts"],"names":[],"mappings":"AAEA;;;GAGG;;AACH,wBAUG"}
@@ -1,16 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const winston_1 = require("winston");
1
+ 'use strict';
2
+
3
+ var winston = require('winston');
4
+
4
5
  /**
5
6
  * This will remove the chalk color codes from the message provided.
6
7
  * It's used to log plain text in the log file
7
- */
8
- exports.default = winston_1.format.printf(({ message }) => {
8
+ */ var excludeColors = winston.format.printf(({ message })=>{
9
9
  if (typeof message !== 'string') {
10
10
  return message;
11
11
  }
12
- return message.replace(
13
- // eslint-disable-next-line no-control-regex
12
+ return message.replace(// eslint-disable-next-line no-control-regex
14
13
  /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, '');
15
14
  });
16
- //# sourceMappingURL=exclude-colors.js.map
15
+
16
+ module.exports = excludeColors;
17
+ //# sourceMappingURL=exclude-colors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exclude-colors.js","sourceRoot":"","sources":["../../src/formats/exclude-colors.ts"],"names":[],"mappings":";;AAAA,qCAAiC;AAEjC;;;GAGG;AACH,kBAAe,gBAAM,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IAC3C,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,OAAO,OAAO,CAAC;KAChB;IAED,OAAO,OAAO,CAAC,OAAO;IACpB,4CAA4C;IAC5C,6EAA6E,EAC7E,EAAE,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"exclude-colors.js","sources":["../../src/formats/exclude-colors.ts"],"sourcesContent":["import { format } from 'winston';\n\n/**\n * This will remove the chalk color codes from the message provided.\n * It's used to log plain text in the log file\n */\nexport default format.printf(({ message }) => {\n if (typeof message !== 'string') {\n return message;\n }\n\n return message.replace(\n // eslint-disable-next-line no-control-regex\n /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,\n ''\n );\n});\n"],"names":["format","printf","message","replace"],"mappings":";;;;AAEA;;;AAGC,IACD,oBAAeA,cAAOC,CAAAA,MAAM,CAAC,CAAC,EAAEC,OAAO,EAAE,GAAA;IACvC,IAAI,OAAOA,YAAY,QAAU,EAAA;QAC/B,OAAOA,OAAAA;AACT;IAEA,OAAOA,OAAAA,CAAQC,OAAO;IAEpB,6EACA,EAAA,EAAA,CAAA;AAEJ,CAAG,CAAA;;;;"}
@@ -0,0 +1,15 @@
1
+ import { format } from 'winston';
2
+
3
+ /**
4
+ * This will remove the chalk color codes from the message provided.
5
+ * It's used to log plain text in the log file
6
+ */ var excludeColors = format.printf(({ message })=>{
7
+ if (typeof message !== 'string') {
8
+ return message;
9
+ }
10
+ return message.replace(// eslint-disable-next-line no-control-regex
11
+ /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, '');
12
+ });
13
+
14
+ export { excludeColors as default };
15
+ //# sourceMappingURL=exclude-colors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exclude-colors.mjs","sources":["../../src/formats/exclude-colors.ts"],"sourcesContent":["import { format } from 'winston';\n\n/**\n * This will remove the chalk color codes from the message provided.\n * It's used to log plain text in the log file\n */\nexport default format.printf(({ message }) => {\n if (typeof message !== 'string') {\n return message;\n }\n\n return message.replace(\n // eslint-disable-next-line no-control-regex\n /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,\n ''\n );\n});\n"],"names":["format","printf","message","replace"],"mappings":";;AAEA;;;AAGC,IACD,oBAAeA,MAAOC,CAAAA,MAAM,CAAC,CAAC,EAAEC,OAAO,EAAE,GAAA;IACvC,IAAI,OAAOA,YAAY,QAAU,EAAA;QAC/B,OAAOA,OAAAA;AACT;IAEA,OAAOA,OAAAA,CAAQC,OAAO;IAEpB,6EACA,EAAA,EAAA,CAAA;AAEJ,CAAG,CAAA;;;;"}
@@ -1,3 +1,6 @@
1
- export { default as prettyPrint, PrettyPrintOptions } from './pretty-print';
1
+ export { default as prettyPrint } from './pretty-print';
2
+ export type { PrettyPrintOptions } from './pretty-print';
2
3
  export { default as levelFilter } from './level-filter';
3
4
  export { default as excludeColors } from './exclude-colors';
5
+ export { default as detailedLogs } from './detailed-log';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/formats/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,13 +1,14 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.excludeColors = exports.levelFilter = exports.prettyPrint = void 0;
7
- var pretty_print_1 = require("./pretty-print");
8
- Object.defineProperty(exports, "prettyPrint", { enumerable: true, get: function () { return __importDefault(pretty_print_1).default; } });
9
- var level_filter_1 = require("./level-filter");
10
- Object.defineProperty(exports, "levelFilter", { enumerable: true, get: function () { return __importDefault(level_filter_1).default; } });
11
- var exclude_colors_1 = require("./exclude-colors");
12
- Object.defineProperty(exports, "excludeColors", { enumerable: true, get: function () { return __importDefault(exclude_colors_1).default; } });
13
- //# sourceMappingURL=index.js.map
1
+ 'use strict';
2
+
3
+ var prettyPrint = require('./pretty-print.js');
4
+ var levelFilter = require('./level-filter.js');
5
+ var excludeColors = require('./exclude-colors.js');
6
+ var detailedLog = require('./detailed-log.js');
7
+
8
+
9
+
10
+ exports.prettyPrint = prettyPrint;
11
+ exports.levelFilter = levelFilter;
12
+ exports.excludeColors = excludeColors;
13
+ exports.detailedLogs = detailedLog;
14
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/formats/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA4E;AAAnE,4HAAA,OAAO,OAAe;AAC/B,+CAAwD;AAA/C,4HAAA,OAAO,OAAe;AAC/B,mDAA4D;AAAnD,gIAAA,OAAO,OAAiB"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -0,0 +1,5 @@
1
+ export { default as prettyPrint } from './pretty-print.mjs';
2
+ export { default as levelFilter } from './level-filter.mjs';
3
+ export { default as excludeColors } from './exclude-colors.mjs';
4
+ export { default as detailedLogs } from './detailed-log.mjs';
5
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,2 +1,3 @@
1
1
  declare const _default: (...levels: string[]) => import("logform").Format;
2
2
  export default _default;
3
+ //# sourceMappingURL=level-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"level-filter.d.ts","sourceRoot":"","sources":["../../src/formats/level-filter.ts"],"names":[],"mappings":"oCAE2B,MAAM,EAAE;AAAnC,wBAEE"}
@@ -1,7 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const winston_1 = require("winston");
4
- exports.default = (...levels) => {
5
- return (0, winston_1.format)((info) => (levels.some((level) => info.level.includes(level)) ? info : false))();
6
- };
7
- //# sourceMappingURL=level-filter.js.map
1
+ 'use strict';
2
+
3
+ var winston = require('winston');
4
+
5
+ var levelFilter = ((...levels)=>{
6
+ return winston.format((info)=>levels.some((level)=>info.level.includes(level)) ? info : false)();
7
+ });
8
+
9
+ module.exports = levelFilter;
10
+ //# sourceMappingURL=level-filter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"level-filter.js","sourceRoot":"","sources":["../../src/formats/level-filter.ts"],"names":[],"mappings":";;AAAA,qCAAiC;AAEjC,kBAAe,CAAC,GAAG,MAAgB,EAAE,EAAE;IACrC,OAAO,IAAA,gBAAM,EAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;AACjG,CAAC,CAAC"}
1
+ {"version":3,"file":"level-filter.js","sources":["../../src/formats/level-filter.ts"],"sourcesContent":["import { format } from 'winston';\n\nexport default (...levels: string[]) => {\n return format((info) => (levels.some((level) => info.level.includes(level)) ? info : false))();\n};\n"],"names":["levels","format","info","some","level","includes"],"mappings":";;;;AAEA,kBAAe,CAAA,CAAC,GAAGA,MAAAA,GAAAA;AACjB,IAAA,OAAOC,cAAO,CAAA,CAACC,IAAUF,GAAAA,MAAAA,CAAOG,IAAI,CAAC,CAACC,KAAUF,GAAAA,IAAAA,CAAKE,KAAK,CAACC,QAAQ,CAACD,UAAUF,IAAO,GAAA,KAAA,CAAA,EAAA;AACvF,CAAA;;;;"}
@@ -0,0 +1,8 @@
1
+ import { format } from 'winston';
2
+
3
+ var levelFilter = ((...levels)=>{
4
+ return format((info)=>levels.some((level)=>info.level.includes(level)) ? info : false)();
5
+ });
6
+
7
+ export { levelFilter as default };
8
+ //# sourceMappingURL=level-filter.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"level-filter.mjs","sources":["../../src/formats/level-filter.ts"],"sourcesContent":["import { format } from 'winston';\n\nexport default (...levels: string[]) => {\n return format((info) => (levels.some((level) => info.level.includes(level)) ? info : false))();\n};\n"],"names":["levels","format","info","some","level","includes"],"mappings":";;AAEA,kBAAe,CAAA,CAAC,GAAGA,MAAAA,GAAAA;AACjB,IAAA,OAAOC,MAAO,CAAA,CAACC,IAAUF,GAAAA,MAAAA,CAAOG,IAAI,CAAC,CAACC,KAAUF,GAAAA,IAAAA,CAAKE,KAAK,CAACC,QAAQ,CAACD,UAAUF,IAAO,GAAA,KAAA,CAAA,EAAA;AACvF,CAAA;;;;"}
@@ -1,3 +1,4 @@
1
1
  import { Logform } from 'winston';
2
2
  declare const logErrors: Logform.FormatWrap;
3
3
  export default logErrors;
4
+ //# sourceMappingURL=log-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-errors.d.ts","sourceRoot":"","sources":["../../src/formats/log-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,OAAO,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,SAAS,EAAE,OAAO,CAAC,UAMvB,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -1,11 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const winston_1 = require("winston");
4
- const logErrors = (0, winston_1.format)((info) => {
1
+ 'use strict';
2
+
3
+ var winston = require('winston');
4
+
5
+ const logErrors = winston.format((info)=>{
5
6
  if (info instanceof Error) {
6
- return { ...info, message: `${info.message}${info.stack ? `\n${info.stack}` : ''}` };
7
+ return {
8
+ ...info,
9
+ message: `${info.message}${info.stack ? `\n${info.stack}` : ''}`
10
+ };
7
11
  }
8
12
  return info;
9
13
  });
10
- exports.default = logErrors;
11
- //# sourceMappingURL=log-errors.js.map
14
+
15
+ module.exports = logErrors;
16
+ //# sourceMappingURL=log-errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"log-errors.js","sourceRoot":"","sources":["../../src/formats/log-errors.ts"],"names":[],"mappings":";;AAAA,qCAA0C;AAE1C,MAAM,SAAS,GAAuB,IAAA,gBAAM,EAAC,CAAC,IAAI,EAAE,EAAE;IACpD,IAAI,IAAI,YAAY,KAAK,EAAE;QACzB,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,OAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC;KAChG;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC,CAAC;AAEH,kBAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"log-errors.js","sources":["../../src/formats/log-errors.ts"],"sourcesContent":["import { format, Logform } from 'winston';\n\nconst logErrors: Logform.FormatWrap = format((info) => {\n if (info instanceof Error) {\n return { ...info, message: `${info.message as string}${info.stack ? `\\n${info.stack}` : ''}` };\n }\n\n return info;\n});\n\nexport default logErrors;\n"],"names":["logErrors","format","info","Error","message","stack"],"mappings":";;;;AAEMA,MAAAA,SAAAA,GAAgCC,eAAO,CAACC,IAAAA,GAAAA;AAC5C,IAAA,IAAIA,gBAAgBC,KAAO,EAAA;QACzB,OAAO;AAAE,YAAA,GAAGD,IAAI;AAAEE,YAAAA,OAAAA,EAAS,CAAGF,EAAAA,IAAAA,CAAKE,OAAO,CAAA,EAAaF,KAAKG,KAAK,GAAG,CAAC,EAAE,EAAEH,IAAAA,CAAKG,KAAK,CAAA,CAAE,GAAG,EAAI,CAAA;AAAC,SAAA;AAC/F;IAEA,OAAOH,IAAAA;AACT,CAAA;;;;"}
@@ -0,0 +1,14 @@
1
+ import { format } from 'winston';
2
+
3
+ const logErrors = format((info)=>{
4
+ if (info instanceof Error) {
5
+ return {
6
+ ...info,
7
+ message: `${info.message}${info.stack ? `\n${info.stack}` : ''}`
8
+ };
9
+ }
10
+ return info;
11
+ });
12
+
13
+ export { logErrors as default };
14
+ //# sourceMappingURL=log-errors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-errors.mjs","sources":["../../src/formats/log-errors.ts"],"sourcesContent":["import { format, Logform } from 'winston';\n\nconst logErrors: Logform.FormatWrap = format((info) => {\n if (info instanceof Error) {\n return { ...info, message: `${info.message as string}${info.stack ? `\\n${info.stack}` : ''}` };\n }\n\n return info;\n});\n\nexport default logErrors;\n"],"names":["logErrors","format","info","Error","message","stack"],"mappings":";;AAEMA,MAAAA,SAAAA,GAAgCC,OAAO,CAACC,IAAAA,GAAAA;AAC5C,IAAA,IAAIA,gBAAgBC,KAAO,EAAA;QACzB,OAAO;AAAE,YAAA,GAAGD,IAAI;AAAEE,YAAAA,OAAAA,EAAS,CAAGF,EAAAA,IAAAA,CAAKE,OAAO,CAAA,EAAaF,KAAKG,KAAK,GAAG,CAAC,EAAE,EAAEH,IAAAA,CAAKG,KAAK,CAAA,CAAE,GAAG,EAAI,CAAA;AAAC,SAAA;AAC/F;IAEA,OAAOH,IAAAA;AACT,CAAA;;;;"}
@@ -15,3 +15,4 @@ export interface PrettyPrintOptions {
15
15
  */
16
16
  declare const _default: (options?: PrettyPrintOptions) => Logform.Format;
17
17
  export default _default;
18
+ //# sourceMappingURL=pretty-print.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pretty-print.d.ts","sourceRoot":"","sources":["../../src/formats/pretty-print.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,OAAO,EAAE,MAAM,SAAS,CAAC;AAK1C,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;IAC1D;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;mCACsB,kBAAkB,KAAQ,QAAQ,MAAM;AAAjE,wBA0BE"}
@@ -1,30 +1,29 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const winston_1 = require("winston");
7
- const log_errors_1 = __importDefault(require("./log-errors"));
1
+ 'use strict';
2
+
3
+ var winston = require('winston');
4
+ var logErrors = require('./log-errors.js');
5
+
8
6
  const defaultTimestampFormat = 'YYYY-MM-DD HH:mm:ss.SSS';
9
7
  /**
10
8
  * Create a pretty print formatter for a winston logger
11
9
  * @param options
12
- */
13
- exports.default = (options = {}) => {
10
+ */ var prettyPrint = ((options = {})=>{
14
11
  const { timestamps = true, colors = true } = options;
15
12
  const handlers = [];
16
13
  if (timestamps) {
17
- handlers.push(winston_1.format.timestamp({
18
- format: timestamps === true ? defaultTimestampFormat : timestamps,
14
+ handlers.push(winston.format.timestamp({
15
+ format: timestamps === true ? defaultTimestampFormat : timestamps
19
16
  }));
20
17
  }
21
18
  if (colors) {
22
- handlers.push(winston_1.format.colorize());
19
+ handlers.push(winston.format.colorize());
23
20
  }
24
- handlers.push((0, log_errors_1.default)());
25
- handlers.push(winston_1.format.printf(({ level, message, timestamp }) => {
21
+ handlers.push(logErrors());
22
+ handlers.push(winston.format.printf(({ level, message, timestamp })=>{
26
23
  return `${timestamps ? `[${timestamp}] ` : ''}${level}: ${message}`;
27
24
  }));
28
- return winston_1.format.combine(...handlers);
29
- };
30
- //# sourceMappingURL=pretty-print.js.map
25
+ return winston.format.combine(...handlers);
26
+ });
27
+
28
+ module.exports = prettyPrint;
29
+ //# sourceMappingURL=pretty-print.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pretty-print.js","sourceRoot":"","sources":["../../src/formats/pretty-print.ts"],"names":[],"mappings":";;;;;AAAA,qCAA0C;AAC1C,8DAAqC;AAErC,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AAazD;;;GAGG;AACH,kBAAe,CAAC,UAA8B,EAAE,EAAkB,EAAE;IAClE,MAAM,EAAE,UAAU,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAErD,MAAM,QAAQ,GAAqB,EAAE,CAAC;IAEtC,IAAI,UAAU,EAAE;QACd,QAAQ,CAAC,IAAI,CACX,gBAAM,CAAC,SAAS,CAAC;YACf,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,UAAU;SAClE,CAAC,CACH,CAAC;KACH;IAED,IAAI,MAAM,EAAE;QACV,QAAQ,CAAC,IAAI,CAAC,gBAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;KAClC;IAED,QAAQ,CAAC,IAAI,CAAC,IAAA,oBAAS,GAAE,CAAC,CAAC;IAE3B,QAAQ,CAAC,IAAI,CACX,gBAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;QAC9C,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,SAAmB,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,KAAK,OAAiB,EAAE,CAAC;IAC1F,CAAC,CAAC,CACH,CAAC;IAEF,OAAO,gBAAM,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;AACrC,CAAC,CAAC"}
1
+ {"version":3,"file":"pretty-print.js","sources":["../../src/formats/pretty-print.ts"],"sourcesContent":["import { format, Logform } from 'winston';\nimport logErrors from './log-errors';\n\nconst defaultTimestampFormat = 'YYYY-MM-DD HH:mm:ss.SSS';\n\nexport interface PrettyPrintOptions {\n /**\n * Enable or disable timestamps print if it's a boolean value. Use the given format for the timestamps if it's a string\n */\n timestamps?: Logform.TimestampOptions['format'] | boolean;\n /**\n * Enable or disable the use of colors for the log level\n */\n colors?: boolean;\n}\n\n/**\n * Create a pretty print formatter for a winston logger\n * @param options\n */\nexport default (options: PrettyPrintOptions = {}): Logform.Format => {\n const { timestamps = true, colors = true } = options;\n\n const handlers: Logform.Format[] = [];\n\n if (timestamps) {\n handlers.push(\n format.timestamp({\n format: timestamps === true ? defaultTimestampFormat : timestamps,\n })\n );\n }\n\n if (colors) {\n handlers.push(format.colorize());\n }\n\n handlers.push(logErrors());\n\n handlers.push(\n format.printf(({ level, message, timestamp }) => {\n return `${timestamps ? `[${timestamp as string}] ` : ''}${level}: ${message as string}`;\n })\n );\n\n return format.combine(...handlers);\n};\n"],"names":["defaultTimestampFormat","options","timestamps","colors","handlers","push","format","timestamp","colorize","logErrors","printf","level","message","combine"],"mappings":";;;;;AAGA,MAAMA,sBAAyB,GAAA,yBAAA;AAa/B;;;AAGC,IACD,kBAAe,CAAA,CAACC,OAAAA,GAA8B,EAAE,GAAA;AAC9C,IAAA,MAAM,EAAEC,UAAa,GAAA,IAAI,EAAEC,MAAS,GAAA,IAAI,EAAE,GAAGF,OAAAA;AAE7C,IAAA,MAAMG,WAA6B,EAAE;AAErC,IAAA,IAAIF,UAAY,EAAA;AACdE,QAAAA,QAAAA,CAASC,IAAI,CACXC,cAAOC,CAAAA,SAAS,CAAC;YACfD,MAAQJ,EAAAA,UAAAA,KAAe,OAAOF,sBAAyBE,GAAAA;AACzD,SAAA,CAAA,CAAA;AAEJ;AAEA,IAAA,IAAIC,MAAQ,EAAA;QACVC,QAASC,CAAAA,IAAI,CAACC,cAAAA,CAAOE,QAAQ,EAAA,CAAA;AAC/B;AAEAJ,IAAAA,QAAAA,CAASC,IAAI,CAACI,SAAAA,EAAAA,CAAAA;AAEdL,IAAAA,QAAAA,CAASC,IAAI,CACXC,cAAOI,CAAAA,MAAM,CAAC,CAAC,EAAEC,KAAK,EAAEC,OAAO,EAAEL,SAAS,EAAE,GAAA;AAC1C,QAAA,OAAO,CAAGL,EAAAA,UAAAA,GAAa,CAAC,CAAC,EAAEK,SAAAA,CAAoB,EAAE,CAAC,GAAG,EAAA,CAAA,EAAKI,KAAM,CAAA,EAAE,EAAEC,OAAmB,CAAA,CAAA;AACzF,KAAA,CAAA,CAAA;IAGF,OAAON,cAAAA,CAAOO,OAAO,CAAIT,GAAAA,QAAAA,CAAAA;AAC3B,CAAA;;;;"}
@@ -0,0 +1,27 @@
1
+ import { format } from 'winston';
2
+ import logErrors from './log-errors.mjs';
3
+
4
+ const defaultTimestampFormat = 'YYYY-MM-DD HH:mm:ss.SSS';
5
+ /**
6
+ * Create a pretty print formatter for a winston logger
7
+ * @param options
8
+ */ var prettyPrint = ((options = {})=>{
9
+ const { timestamps = true, colors = true } = options;
10
+ const handlers = [];
11
+ if (timestamps) {
12
+ handlers.push(format.timestamp({
13
+ format: timestamps === true ? defaultTimestampFormat : timestamps
14
+ }));
15
+ }
16
+ if (colors) {
17
+ handlers.push(format.colorize());
18
+ }
19
+ handlers.push(logErrors());
20
+ handlers.push(format.printf(({ level, message, timestamp })=>{
21
+ return `${timestamps ? `[${timestamp}] ` : ''}${level}: ${message}`;
22
+ }));
23
+ return format.combine(...handlers);
24
+ });
25
+
26
+ export { prettyPrint as default };
27
+ //# sourceMappingURL=pretty-print.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pretty-print.mjs","sources":["../../src/formats/pretty-print.ts"],"sourcesContent":["import { format, Logform } from 'winston';\nimport logErrors from './log-errors';\n\nconst defaultTimestampFormat = 'YYYY-MM-DD HH:mm:ss.SSS';\n\nexport interface PrettyPrintOptions {\n /**\n * Enable or disable timestamps print if it's a boolean value. Use the given format for the timestamps if it's a string\n */\n timestamps?: Logform.TimestampOptions['format'] | boolean;\n /**\n * Enable or disable the use of colors for the log level\n */\n colors?: boolean;\n}\n\n/**\n * Create a pretty print formatter for a winston logger\n * @param options\n */\nexport default (options: PrettyPrintOptions = {}): Logform.Format => {\n const { timestamps = true, colors = true } = options;\n\n const handlers: Logform.Format[] = [];\n\n if (timestamps) {\n handlers.push(\n format.timestamp({\n format: timestamps === true ? defaultTimestampFormat : timestamps,\n })\n );\n }\n\n if (colors) {\n handlers.push(format.colorize());\n }\n\n handlers.push(logErrors());\n\n handlers.push(\n format.printf(({ level, message, timestamp }) => {\n return `${timestamps ? `[${timestamp as string}] ` : ''}${level}: ${message as string}`;\n })\n );\n\n return format.combine(...handlers);\n};\n"],"names":["defaultTimestampFormat","options","timestamps","colors","handlers","push","format","timestamp","colorize","logErrors","printf","level","message","combine"],"mappings":";;;AAGA,MAAMA,sBAAyB,GAAA,yBAAA;AAa/B;;;AAGC,IACD,kBAAe,CAAA,CAACC,OAAAA,GAA8B,EAAE,GAAA;AAC9C,IAAA,MAAM,EAAEC,UAAa,GAAA,IAAI,EAAEC,MAAS,GAAA,IAAI,EAAE,GAAGF,OAAAA;AAE7C,IAAA,MAAMG,WAA6B,EAAE;AAErC,IAAA,IAAIF,UAAY,EAAA;AACdE,QAAAA,QAAAA,CAASC,IAAI,CACXC,MAAOC,CAAAA,SAAS,CAAC;YACfD,MAAQJ,EAAAA,UAAAA,KAAe,OAAOF,sBAAyBE,GAAAA;AACzD,SAAA,CAAA,CAAA;AAEJ;AAEA,IAAA,IAAIC,MAAQ,EAAA;QACVC,QAASC,CAAAA,IAAI,CAACC,MAAAA,CAAOE,QAAQ,EAAA,CAAA;AAC/B;AAEAJ,IAAAA,QAAAA,CAASC,IAAI,CAACI,SAAAA,EAAAA,CAAAA;AAEdL,IAAAA,QAAAA,CAASC,IAAI,CACXC,MAAOI,CAAAA,MAAM,CAAC,CAAC,EAAEC,KAAK,EAAEC,OAAO,EAAEL,SAAS,EAAE,GAAA;AAC1C,QAAA,OAAO,CAAGL,EAAAA,UAAAA,GAAa,CAAC,CAAC,EAAEK,SAAAA,CAAoB,EAAE,CAAC,GAAG,EAAA,CAAA,EAAKI,KAAM,CAAA,EAAE,EAAEC,OAAmB,CAAA,CAAA;AACzF,KAAA,CAAA,CAAA;IAGF,OAAON,MAAAA,CAAOO,OAAO,CAAIT,GAAAA,QAAAA,CAAAA;AAC3B,CAAA;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as winston from 'winston';
2
2
  import * as configs from './configs';
3
3
  export * as formats from './formats';
4
+ export type Logger = winston.Logger;
4
5
  declare const createLogger: (userConfiguration?: winston.LoggerOptions) => winston.Logger;
5
6
  export { createLogger, winston, configs };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,MAAM,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AAEpC,QAAA,MAAM,YAAY,uBAAuB,QAAQ,aAAa,KAAQ,cAMrE,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,38 +1,37 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.configs = exports.winston = exports.createLogger = exports.formats = void 0;
27
- const winston = __importStar(require("winston"));
28
- exports.winston = winston;
29
- const configs = __importStar(require("./configs"));
30
- exports.configs = configs;
31
- exports.formats = __importStar(require("./formats"));
32
- const createLogger = (userConfiguration = {}) => {
33
- const configuration = configs.createDefaultConfiguration();
1
+ 'use strict';
2
+
3
+ var winston = require('winston');
4
+ var index = require('./configs/index.js');
5
+ var index$1 = require('./formats/index.js');
6
+ var defaultConfiguration = require('./configs/default-configuration.js');
7
+
8
+ function _interopNamespaceDefault(e) {
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n.default = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var winston__namespace = /*#__PURE__*/_interopNamespaceDefault(winston);
26
+
27
+ const createLogger = (userConfiguration = {})=>{
28
+ const configuration = defaultConfiguration();
34
29
  Object.assign(configuration, userConfiguration);
35
- return winston.createLogger(configuration);
30
+ return winston__namespace.createLogger(configuration);
36
31
  };
32
+
33
+ exports.winston = winston__namespace;
34
+ exports.configs = index;
35
+ exports.formats = index$1;
37
36
  exports.createLogger = createLogger;
38
- //# sourceMappingURL=index.js.map
37
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAaZ,0BAAO;AAZ9B,mDAAqC;AAYL,0BAAO;AAVvC,qDAAqC;AAErC,MAAM,YAAY,GAAG,CAAC,oBAA2C,EAAE,EAAkB,EAAE;IACrF,MAAM,aAAa,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC;IAE3D,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;IAEhD,OAAO,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEO,oCAAY"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import * as winston from 'winston';\nimport * as configs from './configs';\n\nexport * as formats from './formats';\n\nexport type Logger = winston.Logger;\n\nconst createLogger = (userConfiguration: winston.LoggerOptions = {}): winston.Logger => {\n const configuration = configs.createDefaultConfiguration();\n\n Object.assign(configuration, userConfiguration);\n\n return winston.createLogger(configuration);\n};\n\nexport { createLogger, winston, configs };\n"],"names":["createLogger","userConfiguration","configuration","configs","Object","assign","winston"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAMA,YAAe,GAAA,CAACC,iBAA2C,GAAA,EAAE,GAAA;IACjE,MAAMC,aAAAA,GAAgBC,oBAAkC,EAAA;IAExDC,MAAOC,CAAAA,MAAM,CAACH,aAAeD,EAAAA,iBAAAA,CAAAA;IAE7B,OAAOK,kBAAAA,CAAQN,YAAY,CAACE,aAAAA,CAAAA;AAC9B;;;;;;;"}
package/dist/index.mjs ADDED
@@ -0,0 +1,16 @@
1
+ import * as winston from 'winston';
2
+ export { winston };
3
+ import * as index from './configs/index.mjs';
4
+ export { index as configs };
5
+ import * as index$1 from './formats/index.mjs';
6
+ export { index$1 as formats };
7
+ import defaultConfiguration from './configs/default-configuration.mjs';
8
+
9
+ const createLogger = (userConfiguration = {})=>{
10
+ const configuration = defaultConfiguration();
11
+ Object.assign(configuration, userConfiguration);
12
+ return winston.createLogger(configuration);
13
+ };
14
+
15
+ export { createLogger };
16
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import * as winston from 'winston';\nimport * as configs from './configs';\n\nexport * as formats from './formats';\n\nexport type Logger = winston.Logger;\n\nconst createLogger = (userConfiguration: winston.LoggerOptions = {}): winston.Logger => {\n const configuration = configs.createDefaultConfiguration();\n\n Object.assign(configuration, userConfiguration);\n\n return winston.createLogger(configuration);\n};\n\nexport { createLogger, winston, configs };\n"],"names":["createLogger","userConfiguration","configuration","configs","Object","assign","winston"],"mappings":";;;;;;;;AAOA,MAAMA,YAAe,GAAA,CAACC,iBAA2C,GAAA,EAAE,GAAA;IACjE,MAAMC,aAAAA,GAAgBC,oBAAkC,EAAA;IAExDC,MAAOC,CAAAA,MAAM,CAACH,aAAeD,EAAAA,iBAAAA,CAAAA;IAE7B,OAAOK,OAAAA,CAAQN,YAAY,CAACE,aAAAA,CAAAA;AAC9B;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/logger",
3
- "version": "0.0.0-next.f7babb775ed9a7e18d8351cb7f74c63e016323c4",
3
+ "version": "0.0.0-next.f86041c89a8c1545c6437a881dc613e98bc52bd7",
4
4
  "description": "Strapi's logger",
5
5
  "homepage": "https://strapi.io",
6
6
  "bugs": {
@@ -24,29 +24,31 @@
24
24
  }
25
25
  ],
26
26
  "main": "./dist/index.js",
27
+ "module": "./dist/index.mjs",
28
+ "source": "./src/index.ts",
27
29
  "types": "./dist/index.d.ts",
28
30
  "files": [
29
- "./dist"
31
+ "dist/"
30
32
  ],
31
33
  "scripts": {
32
- "build": "run -T tsc",
33
- "build:ts": "run -T tsc",
34
- "watch": "run -T tsc -w --preserveWatchOutput",
34
+ "build": "run -T npm-run-all clean --parallel build:code build:types",
35
+ "build:code": "run -T rollup -c",
36
+ "build:types": "run -T tsc -p tsconfig.build.json --emitDeclarationOnly",
35
37
  "clean": "run -T rimraf ./dist",
36
- "prepublishOnly": "yarn clean && yarn build",
37
- "lint": "run -T eslint ."
38
+ "lint": "run -T eslint .",
39
+ "test:ts": "run -T tsc --noEmit",
40
+ "watch": "run -T rollup -c -w"
38
41
  },
39
42
  "dependencies": {
40
43
  "lodash": "4.17.21",
41
- "winston": "3.9.0"
44
+ "winston": "3.10.0"
42
45
  },
43
46
  "devDependencies": {
44
- "eslint-config-custom": "0.0.0-next.f7babb775ed9a7e18d8351cb7f74c63e016323c4",
45
- "tsconfig": "0.0.0-next.f7babb775ed9a7e18d8351cb7f74c63e016323c4"
47
+ "eslint-config-custom": "0.0.0-next.f86041c89a8c1545c6437a881dc613e98bc52bd7",
48
+ "tsconfig": "0.0.0-next.f86041c89a8c1545c6437a881dc613e98bc52bd7"
46
49
  },
47
50
  "engines": {
48
- "node": ">=16.0.0 <=20.x.x",
51
+ "node": ">=20.0.0 <=24.x.x",
49
52
  "npm": ">=6.0.0"
50
- },
51
- "gitHead": "f7babb775ed9a7e18d8351cb7f74c63e016323c4"
53
+ }
52
54
  }