pinokiod 1.2.28 → 1.2.30

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.
@@ -102,6 +102,7 @@ class Api {
102
102
  return result
103
103
  }
104
104
  async stop(req, ondata) {
105
+ console.log("API.STOP", req)
105
106
  // 1. set the "stop" flag for the uri, so the next execution in the queue for the uri will NOT queue another task
106
107
  // 2. stream a message closing the socket
107
108
 
@@ -9,8 +9,7 @@ class Script {
9
9
  "branch": <git branch>,
10
10
  "latest": true|false,
11
11
  "uri": <script uri>,
12
- "params": {
13
- }
12
+ "params": <script args>
14
13
  }
15
14
  }
16
15
 
@@ -43,12 +42,20 @@ class Script {
43
42
 
44
43
  // switch branch
45
44
  if (req.params.branch) {
45
+ await kernel.bin.sh({
46
+ message: `git pull`,
47
+ path: kernel.path("api", folderName)
48
+ }, ondata)
46
49
  await kernel.bin.sh({
47
50
  message: `git switch ${req.params.branch}`,
48
51
  path: kernel.path("api", folderName)
49
52
  }, ondata)
50
53
  }
51
54
  if (req.params.hash) {
55
+ await kernel.bin.sh({
56
+ message: `git pull`,
57
+ path: kernel.path("api", folderName)
58
+ }, ondata)
52
59
  await kernel.bin.sh({
53
60
  message: `git switch --detach ${req.params.hash}`,
54
61
  path: kernel.path("api", folderName)
package/kernel/index.js CHANGED
@@ -117,7 +117,7 @@ class Kernel {
117
117
  }
118
118
  }
119
119
  } catch (e) {
120
- console.log(e)
120
+ // console.log(e)
121
121
  }
122
122
  }
123
123
  }
@@ -268,6 +268,7 @@ class Kernel {
268
268
  let info = sysinfo.info
269
269
  this.template.update(info)
270
270
  this.sysinfo = info
271
+ console.log("running", this.api.running)
271
272
  } catch (e) {
272
273
  console.log("sysinfo error", e)
273
274
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.2.28",
3
+ "version": "1.2.30",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {