@goldstack/utils-log 0.3.7 → 0.3.10

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,3 +1,5 @@
1
- export declare const debug: (msg: any) => void;
1
+ export declare function debug(msg: string): void;
2
+ export declare function info(msg: string): void;
3
+ export declare function error(msg: string): void;
2
4
  export declare const fatal: (msg: string) => void;
3
5
  //# sourceMappingURL=utilsLog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utilsLog.d.ts","sourceRoot":"","sources":["../../src/utilsLog.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,QAAS,GAAG,KAAG,IAIhC,CAAC;AAEF,eAAO,MAAM,KAAK,QAAS,MAAM,KAAG,IAMnC,CAAC"}
1
+ {"version":3,"file":"utilsLog.d.ts","sourceRoot":"","sources":["../../src/utilsLog.ts"],"names":[],"mappings":"AAIA,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEtC;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED,eAAO,MAAM,KAAK,QAAS,MAAM,KAAG,IAMnC,CAAC"}
@@ -1,19 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fatal = exports.debug = void 0;
3
+ exports.fatal = exports.error = exports.info = exports.debug = void 0;
4
+ const utils_cli_1 = require("@goldstack/utils-cli");
4
5
  const isDebug = process.env.GOLDSTACK_DEBUG || process.env.DEBUG;
5
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
- const debug = (msg) => {
7
- if (isDebug) {
8
- console.log(msg);
9
- }
10
- };
6
+ function debug(msg) {
7
+ (0, utils_cli_1.logger)().debug(msg);
8
+ }
11
9
  exports.debug = debug;
10
+ function info(msg) {
11
+ (0, utils_cli_1.logger)().info(msg);
12
+ }
13
+ exports.info = info;
14
+ function error(msg) {
15
+ (0, utils_cli_1.logger)().error(msg);
16
+ }
17
+ exports.error = error;
12
18
  const fatal = (msg) => {
13
19
  if (isDebug) {
14
20
  throw new Error(msg);
15
21
  }
16
- console.log(msg);
22
+ (0, utils_cli_1.logger)().error(msg);
17
23
  process.exit(1);
18
24
  };
19
25
  exports.fatal = fatal;
@@ -1 +1 @@
1
- {"version":3,"file":"utilsLog.js","sourceRoot":"","sources":["../../src/utilsLog.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;AAEjE,8DAA8D;AACvD,MAAM,KAAK,GAAG,CAAC,GAAQ,EAAQ,EAAE;IACtC,IAAI,OAAO,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KAClB;AACH,CAAC,CAAC;AAJW,QAAA,KAAK,SAIhB;AAEK,MAAM,KAAK,GAAG,CAAC,GAAW,EAAQ,EAAE;IACzC,IAAI,OAAO,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;KACtB;IACD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC;AANW,QAAA,KAAK,SAMhB"}
1
+ {"version":3,"file":"utilsLog.js","sourceRoot":"","sources":["../../src/utilsLog.ts"],"names":[],"mappings":";;;AAAA,oDAA8C;AAE9C,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;AAEjE,SAAgB,KAAK,CAAC,GAAW;IAC/B,IAAA,kBAAM,GAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACtB,CAAC;AAFD,sBAEC;AAED,SAAgB,IAAI,CAAC,GAAW;IAC9B,IAAA,kBAAM,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAFD,oBAEC;AAED,SAAgB,KAAK,CAAC,GAAW;IAC/B,IAAA,kBAAM,GAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACtB,CAAC;AAFD,sBAEC;AAEM,MAAM,KAAK,GAAG,CAAC,GAAW,EAAQ,EAAE;IACzC,IAAI,OAAO,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;KACtB;IACD,IAAA,kBAAM,GAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC;AANW,QAAA,KAAK,SAMhB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goldstack/utils-log",
3
- "version": "0.3.7",
3
+ "version": "0.3.10",
4
4
  "description": "Utilities for emitting logs.",
5
5
  "keywords": [
6
6
  "goldstack",
@@ -33,10 +33,13 @@
33
33
  "version:apply": "utils-git changed --exec \"yarn version $@ && yarn version apply\"",
34
34
  "version:apply:force": "yarn version $@ && yarn version apply"
35
35
  },
36
+ "dependencies": {
37
+ "@goldstack/utils-cli": "0.3.10"
38
+ },
36
39
  "devDependencies": {
37
- "@goldstack/utils-git": "0.2.7",
38
- "@swc/core": "^1.3.55",
39
- "@swc/jest": "^0.2.26",
40
+ "@goldstack/utils-git": "0.2.9",
41
+ "@swc/core": "^1.3.74",
42
+ "@swc/jest": "^0.2.27",
40
43
  "@types/jest": "^29.0.1",
41
44
  "@types/node": "^18.7.13",
42
45
  "jest": "^29.3.1",