@volcanicminds/tools 0.0.2 → 0.0.3

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 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../lib/util/logger.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,CAAC,IAAI,KAAA,QAEzB;AAED,wBAAgB,KAAK,CAAC,IAAI,KAAA,QAEzB;AAED,wBAAgB,IAAI,CAAC,IAAI,KAAA,QAExB;AAED,wBAAgB,IAAI,CAAC,IAAI,KAAA,QAExB;AAED,wBAAgB,KAAK,CAAC,IAAI,KAAA,QAEzB;AAED,wBAAgB,KAAK,CAAC,IAAI,KAAA,QAEzB"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../lib/util/logger.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,CAAC,IAAI,KAAA,QAIzB;AAED,wBAAgB,KAAK,CAAC,IAAI,KAAA,QAIzB;AAED,wBAAgB,IAAI,CAAC,IAAI,KAAA,QAIxB;AAED,wBAAgB,IAAI,CAAC,IAAI,KAAA,QAIxB;AAED,wBAAgB,KAAK,CAAC,IAAI,KAAA,QAIzB;AAED,wBAAgB,KAAK,CAAC,IAAI,KAAA,QAIzB"}
@@ -1,19 +1,31 @@
1
1
  export function trace(data) {
2
- global.isLoggingEnabled && global.log?.trace && global.log.trace(data);
2
+ if (global.isLoggingEnabled && global.log?.trace) {
3
+ global.log.trace(data);
4
+ }
3
5
  }
4
6
  export function debug(data) {
5
- global.isLoggingEnabled && global.log?.debug && global.log.debug(data);
7
+ if (global.isLoggingEnabled && global.log?.debug) {
8
+ global.log.debug(data);
9
+ }
6
10
  }
7
11
  export function info(data) {
8
- global.isLoggingEnabled && global.log?.info && global.log.info(data);
12
+ if (global.isLoggingEnabled && global.log?.info) {
13
+ global.log.info(data);
14
+ }
9
15
  }
10
16
  export function warn(data) {
11
- global.isLoggingEnabled && global.log?.warn && global.log.warn(data);
17
+ if (global.isLoggingEnabled && global.log?.warn) {
18
+ global.log.warn(data);
19
+ }
12
20
  }
13
21
  export function error(data) {
14
- global.isLoggingEnabled && global.log?.error && global.log.error(data);
22
+ if (global.isLoggingEnabled && global.log?.error) {
23
+ global.log.error(data);
24
+ }
15
25
  }
16
26
  export function fatal(data) {
17
- global.isLoggingEnabled && global.log?.fatal && global.log.fatal(data);
27
+ if (global.isLoggingEnabled && global.log?.fatal) {
28
+ global.log.fatal(data);
29
+ }
18
30
  }
19
31
  //# sourceMappingURL=logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../lib/util/logger.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAC,IAAI;IACxB,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AACxE,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,IAAI;IACxB,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AACxE,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,IAAI;IACvB,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACtE,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,IAAI;IACvB,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACtE,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,IAAI;IACxB,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,MAAM,CA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G,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,IAAI;IACxB,IAAI,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC;QACjD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC;AACH,CAAC"}
@@ -1,23 +1,35 @@
1
1
  export function trace(data) {
2
- global.isLoggingEnabled && global.log?.trace && global.log.trace(data)
2
+ if (global.isLoggingEnabled && global.log?.trace) {
3
+ global.log.trace(data)
4
+ }
3
5
  }
4
6
 
5
7
  export function debug(data) {
6
- global.isLoggingEnabled && global.log?.debug && global.log.debug(data)
8
+ if (global.isLoggingEnabled && global.log?.debug) {
9
+ global.log.debug(data)
10
+ }
7
11
  }
8
12
 
9
13
  export function info(data) {
10
- global.isLoggingEnabled && global.log?.info && global.log.info(data)
14
+ if (global.isLoggingEnabled && global.log?.info) {
15
+ global.log.info(data)
16
+ }
11
17
  }
12
18
 
13
19
  export function warn(data) {
14
- global.isLoggingEnabled && global.log?.warn && global.log.warn(data)
20
+ if (global.isLoggingEnabled && global.log?.warn) {
21
+ global.log.warn(data)
22
+ }
15
23
  }
16
24
 
17
25
  export function error(data) {
18
- global.isLoggingEnabled && global.log?.error && global.log.error(data)
26
+ if (global.isLoggingEnabled && global.log?.error) {
27
+ global.log.error(data)
28
+ }
19
29
  }
20
30
 
21
31
  export function fatal(data) {
22
- global.isLoggingEnabled && global.log?.fatal && global.log.fatal(data)
32
+ if (global.isLoggingEnabled && global.log?.fatal) {
33
+ global.log.fatal(data)
34
+ }
23
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volcanicminds/tools",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Tools for the volcanic (minds) backend",
5
5
  "keywords": [
6
6
  "volcanic",
@@ -62,6 +62,10 @@
62
62
  "build": "tsc",
63
63
  "reset": "npm install && npm update && npm run build",
64
64
  "upgrade-deps": "npx npm-check-updates -u",
65
+ "lint": "eslint .",
66
+ "lint:fix": "eslint . --fix",
67
+ "type-check": "tsc --noEmit",
68
+ "check-all": "npm run lint && npm run type-check",
65
69
  "combine": "node combine.js"
66
70
  },
67
71
  "dependencies": {
@@ -69,10 +73,14 @@
69
73
  "qrcode": "^1.5.4"
70
74
  },
71
75
  "devDependencies": {
76
+ "@eslint/js": "^9.39.1",
72
77
  "@types/node": "^24.10.1",
73
78
  "@types/qrcode": "^1.5.5",
79
+ "eslint": "^9.39.1",
80
+ "globals": "^16.5.0",
74
81
  "tsx": "^4.19.2",
75
- "typescript": "^5.9.3"
82
+ "typescript": "^5.9.3",
83
+ "typescript-eslint": "^8.48.0"
76
84
  },
77
85
  "engines": {
78
86
  "node": ">=24"