pinokiod 1.2.44 → 1.2.45
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/kernel/api/index.js +16 -0
- package/package.json +1 -1
package/kernel/api/index.js
CHANGED
|
@@ -106,8 +106,24 @@ class Api {
|
|
|
106
106
|
// 1. set the "stop" flag for the uri, so the next execution in the queue for the uri will NOT queue another task
|
|
107
107
|
// 2. stream a message closing the socket
|
|
108
108
|
|
|
109
|
+
|
|
110
|
+
|
|
109
111
|
let requestPath = this.filePath(req.params.uri)
|
|
110
112
|
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
let { cwd, script } = await this.resolveScript(requestPath)
|
|
116
|
+
console.log("script", script)
|
|
117
|
+
if (script.on) {
|
|
118
|
+
if (script.on.stop) {
|
|
119
|
+
console.log("BEFORE STOP")
|
|
120
|
+
await this.process(script.on.stop)
|
|
121
|
+
console.log("AFTER STOP")
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
111
127
|
// stop all shell processes connected to the uri
|
|
112
128
|
this.kernel.shell.kill({ group: requestPath })
|
|
113
129
|
|