pinokiod 2.1.15 → 2.1.17
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/package.json +1 -1
- package/server/index.js +1 -0
- package/server/views/editor.ejs +23 -12
package/package.json
CHANGED
package/server/index.js
CHANGED
package/server/views/editor.ejs
CHANGED
|
@@ -39,6 +39,15 @@ body.frozen {
|
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
height: 100%;
|
|
41
41
|
}
|
|
42
|
+
.terminal-container {
|
|
43
|
+
flex-grow: none !important;
|
|
44
|
+
}
|
|
45
|
+
.xterm {
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
48
|
+
.containers .terminal-container {
|
|
49
|
+
height: auto !important;
|
|
50
|
+
}
|
|
42
51
|
#table > table {
|
|
43
52
|
border-left: 2px solid black;
|
|
44
53
|
padding-left: 5px;
|
|
@@ -192,19 +201,20 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
192
201
|
document.querySelector(".run .starting").classList.add("hidden")
|
|
193
202
|
}
|
|
194
203
|
stop() {
|
|
204
|
+
debugger;
|
|
195
205
|
this.socket.run({
|
|
196
206
|
method: "kernel.api.stop",
|
|
197
207
|
params: {
|
|
198
|
-
|
|
199
|
-
uri: "~" + location.pathname
|
|
208
|
+
uri: "<%=execUrl%>",
|
|
209
|
+
//uri: "~" + location.pathname
|
|
200
210
|
}
|
|
201
211
|
}, (stream) => {
|
|
202
212
|
})
|
|
203
213
|
}
|
|
204
214
|
save() {
|
|
205
215
|
return new Promise((resolve, reject) => {
|
|
206
|
-
|
|
207
|
-
let cwd = "~" + location.pathname
|
|
216
|
+
let cwd = "<%=execUrl%>"
|
|
217
|
+
//let cwd = "~" + location.pathname
|
|
208
218
|
debugger
|
|
209
219
|
this.socket.close()
|
|
210
220
|
this.socket.run({
|
|
@@ -228,13 +238,14 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
228
238
|
await this.socket.close()
|
|
229
239
|
// document.querySelector(".terminal-container").classList.add("hidden")
|
|
230
240
|
let query = Object.fromEntries(new URLSearchParams(location.search))
|
|
241
|
+
document.querySelector(".containers").classList.add("running")
|
|
231
242
|
|
|
232
243
|
|
|
233
244
|
this.socket.run({
|
|
234
245
|
//uri: location.pathname.slice(1).replace("api/", ""),
|
|
235
246
|
//uri: "~" + location.pathname,
|
|
236
|
-
|
|
237
|
-
uri: "~" + location.pathname,
|
|
247
|
+
uri: "<%=execUrl%>",
|
|
248
|
+
//uri: "~" + location.pathname,
|
|
238
249
|
mode,
|
|
239
250
|
input: query,
|
|
240
251
|
client: {
|
|
@@ -244,7 +255,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
244
255
|
}, async (packet) => {
|
|
245
256
|
console.log("packet", packet)
|
|
246
257
|
if (packet.type === 'start') {
|
|
247
|
-
refreshParent(packet)
|
|
258
|
+
// refreshParent(packet)
|
|
248
259
|
reloadMemory()
|
|
249
260
|
if (packet.data && packet.data.description) {
|
|
250
261
|
if ('current' in packet.data) {
|
|
@@ -289,7 +300,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
289
300
|
document.querySelector(".run .starting").classList.add("hidden")
|
|
290
301
|
document.querySelector(".run .stop").classList.remove("hidden")
|
|
291
302
|
} else if (packet.type === 'disconnect') {
|
|
292
|
-
refreshParent(packet)
|
|
303
|
+
// refreshParent(packet)
|
|
293
304
|
reloadMemory()
|
|
294
305
|
this.term.write("\r\nNot connected...\r\n")
|
|
295
306
|
document.querySelector("footer").innerHTML = "<b>Ready</b>"
|
|
@@ -357,7 +368,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
357
368
|
}
|
|
358
369
|
*/
|
|
359
370
|
} else if (packet.type === "tab.open") {
|
|
360
|
-
refreshParent(packet)
|
|
371
|
+
// refreshParent(packet)
|
|
361
372
|
} else if (packet.type === "browser.open") {
|
|
362
373
|
/*
|
|
363
374
|
{
|
|
@@ -443,7 +454,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
443
454
|
n.Noty(payload)
|
|
444
455
|
}
|
|
445
456
|
} else if (packet.type === "result") {
|
|
446
|
-
refreshParent(packet)
|
|
457
|
+
// refreshParent(packet)
|
|
447
458
|
reloadMemory()
|
|
448
459
|
if (packet.data) {
|
|
449
460
|
// document.querySelector("#response").innerHTML = he.escape(JSON.stringify(packet.data, null, 2))
|
|
@@ -458,7 +469,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
458
469
|
// type: "error"
|
|
459
470
|
// })
|
|
460
471
|
this.socket.close()
|
|
461
|
-
refreshParent(packet)
|
|
472
|
+
// refreshParent(packet)
|
|
462
473
|
reloadMemory()
|
|
463
474
|
//document.querySelector("footer").innerHTML = `<b><i class="fa-solid fa-triangle-exclamation"></i> ERROR</b><pre>${packet.data}</pre>`
|
|
464
475
|
document.querySelector("footer .content").innerHTML = document.querySelector("footer .content").innerHTML + `<pre class='error'>${packet.data}</pre>`
|
|
@@ -805,7 +816,7 @@ const reloadMemory = async () => {
|
|
|
805
816
|
</div>
|
|
806
817
|
</div>
|
|
807
818
|
<% } else { %>
|
|
808
|
-
<div class='containers'>
|
|
819
|
+
<div class='containers running'>
|
|
809
820
|
<main>
|
|
810
821
|
<!--
|
|
811
822
|
<pre id='response'></pre>
|