pinokiod 2.15.49 → 2.15.50
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/hf/index.js
CHANGED
|
@@ -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
|
package/kernel/bin/playwright.js
CHANGED
|
@@ -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
|
-
|
|
14
|
+
c
|
|
9
15
|
],
|
|
10
16
|
path: this.kernel.bin.path("playwright"),
|
|
11
17
|
env: {
|
package/package.json
CHANGED
package/server/views/editor.ejs
CHANGED
|
@@ -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,32 @@ 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
|
+
location.href = location.href
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
})
|
|
777
|
+
}
|
|
745
778
|
/*
|
|
746
779
|
document.querySelector("#open-log").addEventListener("click", async (e) => {
|
|
747
780
|
let logs = await fetch("/getlog?logpath=<%=logpath%>").then((res) => {
|
|
@@ -847,6 +880,12 @@ const reloadMemory = async () => {
|
|
|
847
880
|
<input type='hidden' name='callback' value="<%=current%>">
|
|
848
881
|
<button class='btn'>Install</button>
|
|
849
882
|
</form>
|
|
883
|
+
<div class='item'>
|
|
884
|
+
<div class='d'>Not working? <a id='del-bin'>Try a fresh install</a></div>
|
|
885
|
+
<div class='reset-bin-loading hidden'>
|
|
886
|
+
<i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
|
|
887
|
+
</div>
|
|
888
|
+
</div>
|
|
850
889
|
</div>
|
|
851
890
|
</div>
|
|
852
891
|
<% } 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,32 @@ 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
|
+
}
|
|
744
|
+
}
|
|
745
|
+
})
|
|
746
|
+
}
|
|
714
747
|
// document.querySelector("#open-log").addEventListener("click", async (e) => {
|
|
715
748
|
// let logs = await fetch("/getlog?logpath=<%=logpath%>").then((res) => {
|
|
716
749
|
// return res.text()
|
|
@@ -799,6 +832,12 @@ const reloadMemory = async () => {
|
|
|
799
832
|
<input type='hidden' name='callback' value="<%=current%>">
|
|
800
833
|
<button class='btn'>Install</button>
|
|
801
834
|
</form>
|
|
835
|
+
<div class='item'>
|
|
836
|
+
<div class='d'>Not working? <a id='del-bin'>Try a fresh install</a></div>
|
|
837
|
+
<div class='reset-bin-loading hidden'>
|
|
838
|
+
<i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
|
|
839
|
+
</div>
|
|
840
|
+
</div>
|
|
802
841
|
</div>
|
|
803
842
|
</div>
|
|
804
843
|
<% } else { %>
|