@goldstack/utils-log 0.2.17 → 0.3.0
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/README.md +3 -3
- package/dist/src/utilsLog.d.ts +2 -2
- package/dist/src/utilsLog.js +19 -19
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Goldstack Log Utilities
|
|
2
|
-
|
|
3
|
-
Very simple log utility used in the [Goldstack template framework](https://github.com/goldstack/goldstack/tree/master/workspaces/templates-lib#goldstack-template-framework).
|
|
1
|
+
# Goldstack Log Utilities
|
|
2
|
+
|
|
3
|
+
Very simple log utility used in the [Goldstack template framework](https://github.com/goldstack/goldstack/tree/master/workspaces/templates-lib#goldstack-template-framework).
|
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.
|
|
3
|
+
"version": "0.3.0",
|
|
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.
|
|
37
|
+
"@goldstack/utils-git": "0.2.0",
|
|
38
38
|
"@types/jest": "^28.1.8",
|
|
39
39
|
"@types/node": "^18.7.13",
|
|
40
40
|
"jest": "^28.1.0",
|