pinokiod 2.15.49 → 2.15.51

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.
@@ -26,8 +26,7 @@ class HF {
26
26
  delete params.path
27
27
  let chunks = unparse(params)
28
28
  let message = [
29
- `huggingface-cli download ${chunks.join(" ")}`,
30
- (kernel.platform === "win32" ? "dir" : "ls")
29
+ `huggingface-cli download ${chunks.join(" ")}` + (kernel.platform === "win32" ? " && dir" : " ; ls")
31
30
  ]
32
31
  console.log({ message, before: req.params.message })
33
32
  req.params.message = message
@@ -2,10 +2,16 @@ const fs = require('fs')
2
2
  const { rimraf } = require('rimraf')
3
3
  class Playwright {
4
4
  async install(req, ondata) {
5
+ let c
6
+ if (this.kernel.platform === "win32") {
7
+ c = `npm config set prefix ${this.kernel.bin.path("miniconda")}`
8
+ } else {
9
+ c = `npm config set prefix ${this.kernel.bin.path("miniconda/lib")}`
10
+ }
5
11
  await this.kernel.exec({
6
12
  message: [
7
13
  // "npm init -y",
8
- `npm config set prefix ${this.kernel.bin.path("miniconda")}`,
14
+ c
9
15
  ],
10
16
  path: this.kernel.bin.path("playwright"),
11
17
  env: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "2.15.49",
3
+ "version": "2.15.51",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -165,11 +165,17 @@ body {
165
165
  </div>
166
166
  <% }) %>
167
167
  </div>
168
- <form method="post" action="/pinokio/install">
168
+ <form id='install-form' method="post" action="/pinokio/install">
169
169
  <input type='hidden' name="requirements" value="<%=JSON.stringify(requirements)%>">
170
170
  <input type='hidden' name='callback' value="<%=current%>">
171
171
  <button class='btn'>Install</button>
172
172
  </form>
173
+ <div class='item'>
174
+ <div class='d'>Not working? <a id='del-bin'>Try a fresh install</a></div>
175
+ <div class='reset-bin-loading hidden'>
176
+ <i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
177
+ </div>
178
+ </div>
173
179
  </div>
174
180
  </div>
175
181
  <% } else { %>
@@ -227,6 +233,33 @@ document.addEventListener("DOMContentLoaded", async () => {
227
233
  }
228
234
  <% } %>
229
235
  <% } %>
236
+ if (document.querySelector("#del-bin")) {
237
+ document.querySelector("#del-bin").addEventListener("click", async (e) => {
238
+ console.log("del-bin")
239
+ let proceed = confirm("Are you sure you wish to delete the bin folder?")
240
+ if (proceed) {
241
+ document.querySelector(".reset-bin-loading").classList.remove("hidden")
242
+ document.querySelector("#del-bin").classList.add("hidden")
243
+ let res = await fetch("/pinokio/delete", {
244
+ method: "post",
245
+ headers: {
246
+ "Content-Type": "application/json"
247
+ },
248
+ body: JSON.stringify({ type: "bin" })
249
+ }).then((res) => {
250
+ return res.json()
251
+ })
252
+ console.log(res)
253
+ document.querySelector(".reset-bin-loading").classList.add("hidden")
254
+ if (res.error) {
255
+ alert(res.error)
256
+ } else {
257
+ //location.href = location.href
258
+ document.queyrSelector("#install-form").submit()
259
+ }
260
+ }
261
+ })
262
+ }
230
263
  })
231
264
  </script>
232
265
  </body>
@@ -89,6 +89,13 @@ td.key {
89
89
  header .runner {
90
90
  padding: 10px 0 0;
91
91
  }
92
+ #del-bin {
93
+ color: royalblue;
94
+ cursor: pointer;
95
+ font-weight: bold;
96
+ padding: 0 5px;
97
+ text-decoration: underline;
98
+ }
92
99
  </style>
93
100
  <script>
94
101
  document.addEventListener("DOMContentLoaded", async () => {
@@ -742,6 +749,33 @@ document.addEventListener("DOMContentLoaded", async () => {
742
749
  document.querySelector("#close-error-screen").addEventListener('click', (e) => {
743
750
  document.querySelector("#error-screen").classList.add("hidden")
744
751
  })
752
+ if (document.querySelector("#del-bin")) {
753
+ document.querySelector("#del-bin").addEventListener("click", async (e) => {
754
+ console.log("del-bin")
755
+ let proceed = confirm("Are you sure you wish to delete the bin folder?")
756
+ if (proceed) {
757
+ document.querySelector(".reset-bin-loading").classList.remove("hidden")
758
+ document.querySelector("#del-bin").classList.add("hidden")
759
+ let res = await fetch("/pinokio/delete", {
760
+ method: "post",
761
+ headers: {
762
+ "Content-Type": "application/json"
763
+ },
764
+ body: JSON.stringify({ type: "bin" })
765
+ }).then((res) => {
766
+ return res.json()
767
+ })
768
+ console.log(res)
769
+ document.querySelector(".reset-bin-loading").classList.add("hidden")
770
+ if (res.error) {
771
+ alert(res.error)
772
+ } else {
773
+ document.queyrSelector("#install-form").submit()
774
+ //location.href = location.href
775
+ }
776
+ }
777
+ })
778
+ }
745
779
  /*
746
780
  document.querySelector("#open-log").addEventListener("click", async (e) => {
747
781
  let logs = await fetch("/getlog?logpath=<%=logpath%>").then((res) => {
@@ -842,11 +876,17 @@ const reloadMemory = async () => {
842
876
  </div>
843
877
  <% }) %>
844
878
  </div>
845
- <form method="post" action="/pinokio/install">
879
+ <form id='install-form' method="post" action="/pinokio/install">
846
880
  <input type='hidden' name="requirements" value="<%=JSON.stringify(requirements)%>">
847
881
  <input type='hidden' name='callback' value="<%=current%>">
848
882
  <button class='btn'>Install</button>
849
883
  </form>
884
+ <div class='item'>
885
+ <div class='d'>Not working? <a id='del-bin'>Try a fresh install</a></div>
886
+ <div class='reset-bin-loading hidden'>
887
+ <i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
888
+ </div>
889
+ </div>
850
890
  </div>
851
891
  </div>
852
892
  <% } else { %>
@@ -98,6 +98,13 @@ header {
98
98
  .btn {
99
99
  background: royalblue;
100
100
  }
101
+ #del-bin {
102
+ color: royalblue;
103
+ cursor: pointer;
104
+ font-weight: bold;
105
+ padding: 0 5px;
106
+ text-decoration: underline;
107
+ }
101
108
  </style>
102
109
  <script>
103
110
  document.addEventListener("DOMContentLoaded", async () => {
@@ -711,6 +718,33 @@ document.addEventListener("DOMContentLoaded", async () => {
711
718
  document.querySelector("#close-error-screen").addEventListener('click', (e) => {
712
719
  document.querySelector("#error-screen").classList.add("hidden")
713
720
  })
721
+ if (document.querySelector("#del-bin")) {
722
+ document.querySelector("#del-bin").addEventListener("click", async (e) => {
723
+ console.log("del-bin")
724
+ let proceed = confirm("Are you sure you wish to delete the bin folder?")
725
+ if (proceed) {
726
+ document.querySelector(".reset-bin-loading").classList.remove("hidden")
727
+ document.querySelector("#del-bin").classList.add("hidden")
728
+ let res = await fetch("/pinokio/delete", {
729
+ method: "post",
730
+ headers: {
731
+ "Content-Type": "application/json"
732
+ },
733
+ body: JSON.stringify({ type: "bin" })
734
+ }).then((res) => {
735
+ return res.json()
736
+ })
737
+ console.log(res)
738
+ document.querySelector(".reset-bin-loading").classList.add("hidden")
739
+ if (res.error) {
740
+ alert(res.error)
741
+ } else {
742
+ //location.href = location.href
743
+ document.queyrSelector("#install-form").submit()
744
+ }
745
+ }
746
+ })
747
+ }
714
748
  // document.querySelector("#open-log").addEventListener("click", async (e) => {
715
749
  // let logs = await fetch("/getlog?logpath=<%=logpath%>").then((res) => {
716
750
  // return res.text()
@@ -794,11 +828,17 @@ const reloadMemory = async () => {
794
828
  </div>
795
829
  <% }) %>
796
830
  </div>
797
- <form method="post" action="/pinokio/install">
831
+ <form id='install-form' method="post" action="/pinokio/install">
798
832
  <input type='hidden' name="requirements" value="<%=JSON.stringify(requirements)%>">
799
833
  <input type='hidden' name='callback' value="<%=current%>">
800
834
  <button class='btn'>Install</button>
801
835
  </form>
836
+ <div class='item'>
837
+ <div class='d'>Not working? <a id='del-bin'>Try a fresh install</a></div>
838
+ <div class='reset-bin-loading hidden'>
839
+ <i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
840
+ </div>
841
+ </div>
802
842
  </div>
803
843
  </div>
804
844
  <% } else { %>