@goldstack/utils-log 0.2.8 → 0.2.9
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/dist/src/utilsLog.d.ts +2 -2
- package/dist/src/utilsLog.js +19 -19
- package/package.json +2 -2
package/dist/src/utilsLog.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const debug: (msg: any) => void;
|
|
2
|
-
export declare const fatal: (msg: string) => void;
|
|
1
|
+
export declare const debug: (msg: any) => void;
|
|
2
|
+
export declare const fatal: (msg: string) => void;
|
|
3
3
|
//# sourceMappingURL=utilsLog.d.ts.map
|
package/dist/src/utilsLog.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fatal = exports.debug = void 0;
|
|
4
|
-
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
|
-
};
|
|
11
|
-
exports.debug = debug;
|
|
12
|
-
const fatal = (msg) => {
|
|
13
|
-
if (isDebug) {
|
|
14
|
-
throw new Error(msg);
|
|
15
|
-
}
|
|
16
|
-
console.log(msg);
|
|
17
|
-
process.exit(1);
|
|
18
|
-
};
|
|
19
|
-
exports.fatal = fatal;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fatal = exports.debug = void 0;
|
|
4
|
+
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
|
+
};
|
|
11
|
+
exports.debug = debug;
|
|
12
|
+
const fatal = (msg) => {
|
|
13
|
+
if (isDebug) {
|
|
14
|
+
throw new Error(msg);
|
|
15
|
+
}
|
|
16
|
+
console.log(msg);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
};
|
|
19
|
+
exports.fatal = fatal;
|
|
20
20
|
//# sourceMappingURL=utilsLog.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goldstack/utils-log",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Utilities for emitting logs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"goldstack",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"version:apply:force": "yarn version $@ && yarn version apply"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@goldstack/utils-git": "0.1.
|
|
37
|
+
"@goldstack/utils-git": "0.1.29",
|
|
38
38
|
"@types/jest": "^27.0.2",
|
|
39
39
|
"@types/node": "^16.11.0",
|
|
40
40
|
"jest": "^26.6.3",
|