pinokiod 3.2.238 → 3.2.239
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/index.js +2 -1
- package/package.json +1 -1
- package/server/index.js +1 -0
- package/server/views/index.ejs +18 -0
package/kernel/index.js
CHANGED
|
@@ -491,7 +491,7 @@ class Kernel {
|
|
|
491
491
|
})
|
|
492
492
|
|
|
493
493
|
// get env
|
|
494
|
-
let interval = setInterval(() => {
|
|
494
|
+
let interval = setInterval(async () => {
|
|
495
495
|
if (this.i) {
|
|
496
496
|
for(let api of this.i.api) {
|
|
497
497
|
let env_path = path.resolve(this.api.userdir, api.path)
|
|
@@ -519,6 +519,7 @@ class Kernel {
|
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
clearInterval(interval)
|
|
522
|
+
this.launch_complete = true
|
|
522
523
|
}
|
|
523
524
|
}, 1000)
|
|
524
525
|
}
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -3083,6 +3083,7 @@ class Server {
|
|
|
3083
3083
|
await this.kernel.getInfo()
|
|
3084
3084
|
console.timeEnd("getInfo")
|
|
3085
3085
|
let info = Object.assign({}, this.kernel.i)
|
|
3086
|
+
info.launch_complete = this.kernel.launch_complete
|
|
3086
3087
|
delete info.vars
|
|
3087
3088
|
delete info.shell_env
|
|
3088
3089
|
delete info.memory
|
package/server/views/index.ejs
CHANGED
|
@@ -1077,6 +1077,24 @@ if (document.querySelector("#genlog")) {
|
|
|
1077
1077
|
})
|
|
1078
1078
|
})
|
|
1079
1079
|
}
|
|
1080
|
+
fetch("/pinokio/info").then((res) => {
|
|
1081
|
+
return res.json()
|
|
1082
|
+
}).then((res) => {
|
|
1083
|
+
if (!res.launch_complete) {
|
|
1084
|
+
let interval = setInterval(async () => {
|
|
1085
|
+
let res = await fetch("/pinokio/info").then((res) => {
|
|
1086
|
+
return res.json()
|
|
1087
|
+
})
|
|
1088
|
+
if (res.launch_complete) {
|
|
1089
|
+
console.log("launched")
|
|
1090
|
+
clearInterval(interval)
|
|
1091
|
+
location.href = location.href
|
|
1092
|
+
} else {
|
|
1093
|
+
console.log("not yet launched")
|
|
1094
|
+
}
|
|
1095
|
+
}, 1000)
|
|
1096
|
+
}
|
|
1097
|
+
})
|
|
1080
1098
|
|
|
1081
1099
|
</script>
|
|
1082
1100
|
</body>
|