pinokiod 3.4.29 → 3.4.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.
- package/kernel/api/log/index.js +1 -10
- package/kernel/bin/index.js +3 -3
- package/package.json +1 -1
- package/server/views/terminal.ejs +0 -2
package/kernel/api/log/index.js
CHANGED
|
@@ -5,12 +5,10 @@ module.exports = async (req, ondata, kernel) => {
|
|
|
5
5
|
params: {
|
|
6
6
|
raw: <raw string (including ANSI)>,
|
|
7
7
|
json: <object>, // single line
|
|
8
|
-
json2: <object> // multiline
|
|
9
|
-
img: <image file path>
|
|
8
|
+
json2: <object> // multiline
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
11
|
*/
|
|
13
|
-
console.log("log req.params", req.params)
|
|
14
12
|
if (req.params) {
|
|
15
13
|
if (typeof req.params.raw !== "undefined") {
|
|
16
14
|
ondata({
|
|
@@ -28,13 +26,6 @@ module.exports = async (req, ondata, kernel) => {
|
|
|
28
26
|
ondata({
|
|
29
27
|
raw: JSON.stringify(req.params.json2, null, 2).replace(/\n/g, "\r\n")
|
|
30
28
|
})
|
|
31
|
-
// } else if (typeof req.params.img !== "undefined") {
|
|
32
|
-
// let cwd = (req.cwd ? req.cwd : kernel.api.userdir)
|
|
33
|
-
// let filepath = kernel.api.filePath(req.params.img, cwd)
|
|
34
|
-
// let { img, ...options } = req.params
|
|
35
|
-
// let data = await kernel.bin.img2Txt(filepath, options)
|
|
36
|
-
// console.log("### imgData", { data })
|
|
37
|
-
// ondata({ raw: data })
|
|
38
29
|
}
|
|
39
30
|
ondata({
|
|
40
31
|
raw: "\r\n"
|
package/kernel/bin/index.js
CHANGED
|
@@ -548,15 +548,15 @@ class Bin {
|
|
|
548
548
|
(!gpu || gpu === current_gpu) ) {
|
|
549
549
|
if (type === "conda") {
|
|
550
550
|
const message = (install ? install : `conda install ${name} -y ${args}`)
|
|
551
|
-
ondata({ html: `<b>${progress} Installing ${name}</b><br>${message}` }, "
|
|
551
|
+
ondata({ html: `<b>${progress} Installing ${name}</b><br>${message}` }, "notify2")
|
|
552
552
|
await this.exec({ message }, ondata)
|
|
553
553
|
} else if (type === "pip") {
|
|
554
554
|
const message = (install ? install : `pip install ${name} ${args}`)
|
|
555
|
-
ondata({ html: `<b>${progress} Installing ${name}</b><br>${message}` }, "
|
|
555
|
+
ondata({ html: `<b>${progress} Installing ${name}</b><br>${message}` }, "notify2")
|
|
556
556
|
await this.exec({ message }, ondata)
|
|
557
557
|
} else if (type === "brew") {
|
|
558
558
|
const message = (install ? install : `brew install ${name} ${args}`)
|
|
559
|
-
ondata({ html: `<b>${progress} Installing ${name}</b><br>${message}` }, "
|
|
559
|
+
ondata({ html: `<b>${progress} Installing ${name}</b><br>${message}` }, "notify2")
|
|
560
560
|
await this.exec({ message }, ondata)
|
|
561
561
|
} else {
|
|
562
562
|
// find the mod
|
package/package.json
CHANGED
|
@@ -203,7 +203,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
203
203
|
rows: this.term.rows,
|
|
204
204
|
}
|
|
205
205
|
}, async (packet) => {
|
|
206
|
-
console.log({ packet })
|
|
207
206
|
if (packet.type === 'start') {
|
|
208
207
|
refreshParent(packet)
|
|
209
208
|
reloadMemory()
|
|
@@ -236,7 +235,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
236
235
|
}
|
|
237
236
|
} else if (packet.type === "stream") {
|
|
238
237
|
if (packet.data.raw) {
|
|
239
|
-
console.log("write", packet.data.raw)
|
|
240
238
|
this.write(packet.data.raw)
|
|
241
239
|
} else if (packet.data.json) {
|
|
242
240
|
this.write(JSON.stringify(packet.data.json).replace(/\n/g, "\r\n"))
|