pinokiod 3.215.0 → 3.217.0
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/bin/browserless.js +2 -2
- package/kernel/bin/setup.js +1 -1
- package/package.json +1 -1
- package/server/index.js +7 -2
- package/server/views/install.ejs +19 -0
|
@@ -2,12 +2,12 @@ class Browserless {
|
|
|
2
2
|
description = "The headless Chrome/Chromium driver"
|
|
3
3
|
async uninstall(req, ondata) {
|
|
4
4
|
await this.kernel.bin.exec({
|
|
5
|
-
message: "
|
|
5
|
+
message: "pnpm uninstall -g @browserless/cli"
|
|
6
6
|
}, ondata)
|
|
7
7
|
}
|
|
8
8
|
async install(req, ondata) {
|
|
9
9
|
await this.kernel.bin.exec({
|
|
10
|
-
message: "
|
|
10
|
+
message: "pnpm install -g @browserless/cli"
|
|
11
11
|
}, ondata)
|
|
12
12
|
}
|
|
13
13
|
async installed() {
|
package/kernel/bin/setup.js
CHANGED
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -7989,9 +7989,14 @@ class Server {
|
|
|
7989
7989
|
res.json({ success: true })
|
|
7990
7990
|
}
|
|
7991
7991
|
}))
|
|
7992
|
-
this.app.get("/bin_ready", ex((req, res) => {
|
|
7992
|
+
this.app.get("/bin_ready", ex(async (req, res) => {
|
|
7993
7993
|
if (this.kernel.bin && !this.kernel.bin.requirements_pending) {
|
|
7994
|
-
|
|
7994
|
+
let code_exists = await this.kernel.exists("plugin/code")
|
|
7995
|
+
if (code_exists) {
|
|
7996
|
+
res.json({ success: true })
|
|
7997
|
+
} else {
|
|
7998
|
+
res.json({ success: false })
|
|
7999
|
+
}
|
|
7995
8000
|
} else {
|
|
7996
8001
|
res.json({ success: false })
|
|
7997
8002
|
}
|
package/server/views/install.ejs
CHANGED
|
@@ -356,6 +356,24 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
356
356
|
}
|
|
357
357
|
})
|
|
358
358
|
})
|
|
359
|
+
const LoadingDialog = {
|
|
360
|
+
start: (msg) => {
|
|
361
|
+
Swal.fire({
|
|
362
|
+
html: `<i class="fa-solid fa-circle-notch fa-spin"></i> ${msg}`,
|
|
363
|
+
customClass: {
|
|
364
|
+
container: "loader-container",
|
|
365
|
+
popup: "loader-popup",
|
|
366
|
+
htmlContainer: "loader-dialog",
|
|
367
|
+
footer: "hidden",
|
|
368
|
+
actions: "hidden"
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
},
|
|
372
|
+
end: () => {
|
|
373
|
+
Swal.close()
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
LoadingDialog.start("Restarting...")
|
|
359
377
|
fetch("/restart", {
|
|
360
378
|
method: "post"
|
|
361
379
|
}, () => {
|
|
@@ -367,6 +385,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
367
385
|
})
|
|
368
386
|
if (res.success) {
|
|
369
387
|
//location.href = location.href
|
|
388
|
+
LoadingDialog.end()
|
|
370
389
|
location.href = document.querySelector("#callback").value
|
|
371
390
|
}
|
|
372
391
|
} catch (e) {
|