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.
@@ -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: "npm uninstall -g @browserless/cli"
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: "npm install -g @browserless/cli"
10
+ message: "pnpm install -g @browserless/cli"
11
11
  }, ondata)
12
12
  }
13
13
  async installed() {
@@ -44,7 +44,7 @@ module.exports = {
44
44
  conda_requirements.push("cuda")
45
45
  }
46
46
  requirements = requirements.concat([
47
- { name: "cloudflared" },
47
+ // { name: "cloudflared" },
48
48
  // { name: "playwright" },
49
49
  { name: "huggingface" },
50
50
  { name: "uv" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.215.0",
3
+ "version": "3.217.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
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
- res.json({ success: true })
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
  }
@@ -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) {