@ruspetsarhac/client 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/client.js +5 -5
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@ruspetsarhac/client",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "main": "src/client.js",
5
5
  "bin": {
6
6
  "client": "./client.js"
7
7
  },
8
8
  "scripts": {
9
9
  "build": "pkg client.js --targets node14-win-x64 --output client.exe",
10
- "pub": "npm version patch && git add . && git commit -m \"Updates\" && npm publish && git push"
10
+ "pub": "git add . && git commit -m \"Updates\" && npm version patch && npm publish && git push"
11
11
  },
12
12
  "author": "spetsar",
13
13
  "license": "ISC"
package/src/client.js CHANGED
@@ -148,16 +148,16 @@ function startClient(debug = false) {
148
148
  }, debug);
149
149
 
150
150
  setInterval(() => {
151
- updateCodeFromRepository(debug);
151
+ updateDependencies(debug);
152
152
  }, 60000);
153
153
  }
154
154
 
155
- function updateCodeFromRepository(debug) {
156
- exec('git pull', (error, stdout, stderr) => {
155
+ function updateDependencies(debug) {
156
+ exec('npm update', (error, stdout, stderr) => {
157
157
  if (error) {
158
- log(`Error updating code from repository: ${stderr}`, debug);
158
+ log(`Error updating dependencies: ${stderr}`, debug);
159
159
  } else {
160
- log(`Code updated from repository: ${stdout}`, debug);
160
+ log(`Dependencies updated: ${stdout}`, debug);
161
161
  }
162
162
  });
163
163
  }