pinokiod 3.2.251 → 3.2.254
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/fs/index.js +0 -5
- package/kernel/bin/index.js +1 -1
- package/kernel/index.js +5 -8
- package/kernel/shell.js +0 -1
- package/kernel/shells.js +0 -3
- package/package.json +1 -1
- package/server/index.js +1 -0
- package/server/views/index.ejs +16 -22
- package/server/views/install.ejs +21 -2
package/kernel/api/fs/index.js
CHANGED
|
@@ -94,7 +94,6 @@ class FS {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
async share(req, ondata, kernel) {
|
|
97
|
-
|
|
98
97
|
/////////////////////////////////////////////////////////////////////////////
|
|
99
98
|
//
|
|
100
99
|
// 1. peer to peer shared drive
|
|
@@ -160,10 +159,6 @@ class FS {
|
|
|
160
159
|
//
|
|
161
160
|
/////////////////////////////////////////////////////////////////////////////
|
|
162
161
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
162
|
ondata({ raw: "\r\ncreating a shared drive:\r\n" + JSON.stringify(req.params, null, 2).replace(/\n/g, "\r\n") })
|
|
168
163
|
|
|
169
164
|
|
package/kernel/bin/index.js
CHANGED
|
@@ -552,7 +552,7 @@ class Bin {
|
|
|
552
552
|
if (m.name === name) {
|
|
553
553
|
//await m.mod.install(this, ondata)
|
|
554
554
|
const message = `${m.mod.description ? '<br>' + m.mod.description : ''}`
|
|
555
|
-
ondata({ html: `<b
|
|
555
|
+
ondata({ html: `<b><i class="fas fa-circle-notch fa-spin"></i> ${progress} Installing ${name}</b>${message}` }, "notify")
|
|
556
556
|
console.log("## Before m.mod.install", requirement)
|
|
557
557
|
await m.mod.install(requirement, ondata, this.kernel)
|
|
558
558
|
|
package/kernel/index.js
CHANGED
|
@@ -89,7 +89,7 @@ class Kernel {
|
|
|
89
89
|
}
|
|
90
90
|
return Environment.get2(folderpath, this)
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
userAgent(browser) {
|
|
93
93
|
if (browser) {
|
|
94
94
|
return randomUseragent.getRandom((ua) => {
|
|
95
95
|
return ua.browserName === browser;
|
|
@@ -520,13 +520,10 @@ class Kernel {
|
|
|
520
520
|
}
|
|
521
521
|
console.log("clear Interval")
|
|
522
522
|
clearInterval(interval)
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
resolve()
|
|
528
|
-
}, 1000)
|
|
529
|
-
})
|
|
523
|
+
setTimeout(() => {
|
|
524
|
+
this.launch_complete = true
|
|
525
|
+
console.log("SETTING launch complete", this.launch_complete)
|
|
526
|
+
}, 2000)
|
|
530
527
|
}
|
|
531
528
|
}, 1000)
|
|
532
529
|
}
|
package/kernel/shell.js
CHANGED
|
@@ -798,7 +798,6 @@ class Shell {
|
|
|
798
798
|
async exec(params) {
|
|
799
799
|
params = await this.activate(params)
|
|
800
800
|
this.cmd = this.build(params)
|
|
801
|
-
console.log("this.cmd", this.cmd)
|
|
802
801
|
let res = await new Promise((resolve, reject) => {
|
|
803
802
|
this.resolve = resolve
|
|
804
803
|
this.reject = reject
|
package/kernel/shells.js
CHANGED
|
@@ -27,7 +27,6 @@ class Shells {
|
|
|
27
27
|
}
|
|
28
28
|
*/
|
|
29
29
|
async init() {
|
|
30
|
-
console.log("SHELLS>INIT")
|
|
31
30
|
// iterate through all the envs
|
|
32
31
|
let sh = new Shell(this.kernel)
|
|
33
32
|
let m
|
|
@@ -60,10 +59,8 @@ class Shells {
|
|
|
60
59
|
// if array, duplicate the action
|
|
61
60
|
if (Array.isArray(params.message)) {
|
|
62
61
|
let res
|
|
63
|
-
console.log("params.message", params.message)
|
|
64
62
|
for(let i=0; i<params.message.length; i++) {
|
|
65
63
|
let message = params.message[i]
|
|
66
|
-
console.log("Processing message", { message, i })
|
|
67
64
|
let params_dup = Object.assign({}, params)
|
|
68
65
|
params_dup.message = message
|
|
69
66
|
res = await this._launch(params_dup, options, ondata)
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -1361,6 +1361,7 @@ class Server {
|
|
|
1361
1361
|
if (meta) {
|
|
1362
1362
|
items = running.concat(notRunning)
|
|
1363
1363
|
res.render("index", {
|
|
1364
|
+
launch_complete: this.kernel.launch_complete,
|
|
1364
1365
|
home_url: `http://localhost:${this.port}`,
|
|
1365
1366
|
proxy: home_proxy,
|
|
1366
1367
|
cloudflare_pub: this.cloudflare_pub,
|
package/server/views/index.ejs
CHANGED
|
@@ -735,29 +735,23 @@ if (document.querySelector("form input[type=search]")) {
|
|
|
735
735
|
})
|
|
736
736
|
}
|
|
737
737
|
<% if (ishome) { %>
|
|
738
|
+
// if launch_complete is true => already finished launching so no need to refresh
|
|
739
|
+
// if launch_complete is false => not finished launching. wait until it's complete, and then refresh
|
|
738
740
|
// autolaunch display update
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
clearInterval(interval)
|
|
754
|
-
location.href = location.href
|
|
755
|
-
} else {
|
|
756
|
-
console.log("not yet launched")
|
|
757
|
-
}
|
|
758
|
-
}, 1000)
|
|
759
|
-
}
|
|
760
|
-
})
|
|
741
|
+
<% if (!launch_complete) { %>
|
|
742
|
+
let interval = setInterval(async () => {
|
|
743
|
+
let res = await fetch("/pinokio/info").then((res) => {
|
|
744
|
+
return res.json()
|
|
745
|
+
})
|
|
746
|
+
if (res.launch_complete) {
|
|
747
|
+
console.log("launched")
|
|
748
|
+
clearInterval(interval)
|
|
749
|
+
location.href = location.href
|
|
750
|
+
} else {
|
|
751
|
+
console.log("not yet launched")
|
|
752
|
+
}
|
|
753
|
+
}, 1000)
|
|
754
|
+
<% } %>
|
|
761
755
|
document.addEventListener("keydown", (e) => {
|
|
762
756
|
e = e || window.event;
|
|
763
757
|
if (e.key === "ArrowUp") {
|
package/server/views/install.ejs
CHANGED
|
@@ -94,6 +94,21 @@ body {
|
|
|
94
94
|
.timestamp {
|
|
95
95
|
color: rgba(0,0,0,0.5);
|
|
96
96
|
}
|
|
97
|
+
#status-screen {
|
|
98
|
+
padding: 10px;
|
|
99
|
+
box-sizing: border-box;
|
|
100
|
+
width: 100%;
|
|
101
|
+
margin: 0;
|
|
102
|
+
background: royalblue;
|
|
103
|
+
overflow: auto;
|
|
104
|
+
color: white;
|
|
105
|
+
/*
|
|
106
|
+
color: rgb(27, 28, 29);
|
|
107
|
+
*/
|
|
108
|
+
}
|
|
109
|
+
#status-screen b {
|
|
110
|
+
color: white;
|
|
111
|
+
}
|
|
97
112
|
</style>
|
|
98
113
|
<script src="/hotkeys.min.js"></script>
|
|
99
114
|
<script src="/sweetalert2.js"></script>
|
|
@@ -113,7 +128,10 @@ body {
|
|
|
113
128
|
</head>
|
|
114
129
|
<body class='<%=theme%>'>
|
|
115
130
|
<header class='grabbable'></header>
|
|
116
|
-
<div id='
|
|
131
|
+
<div id='status-screen'></div>
|
|
132
|
+
<div class='terminal-container'>
|
|
133
|
+
<div id='terminal'></div>
|
|
134
|
+
</div>
|
|
117
135
|
<input id='requirements' type='hidden' value="<%=requirements%>">
|
|
118
136
|
<input id='callback' type='hidden' value="<%=callback%>">
|
|
119
137
|
<script>
|
|
@@ -221,7 +239,8 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
221
239
|
if (packet.data.type) {
|
|
222
240
|
payload.type = packet.data.type
|
|
223
241
|
}
|
|
224
|
-
n.Noty(payload)
|
|
242
|
+
// n.Noty(payload)
|
|
243
|
+
document.querySelector("#status-screen").innerHTML = packet.data.html
|
|
225
244
|
}
|
|
226
245
|
}
|
|
227
246
|
})
|