pinokiod 7.1.7 → 7.1.8
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/setup.js +6 -2
- package/kernel/bin/tmux.js +11 -32
- package/package.json +1 -1
package/kernel/bin/setup.js
CHANGED
|
@@ -52,10 +52,12 @@ module.exports = {
|
|
|
52
52
|
// { name: "playwright" },
|
|
53
53
|
{ name: "huggingface" },
|
|
54
54
|
{ name: "uv" },
|
|
55
|
-
{ name: "tmux" },
|
|
56
55
|
{ name: "py" },
|
|
57
56
|
// browserless disabled for now (keep module for later re-enable)
|
|
58
57
|
])
|
|
58
|
+
if (platform !== "win32") {
|
|
59
|
+
requirements.push({ name: "tmux" })
|
|
60
|
+
}
|
|
59
61
|
return {
|
|
60
62
|
icon: "fa-solid fa-brain",
|
|
61
63
|
title: "AI",
|
|
@@ -164,10 +166,12 @@ module.exports = {
|
|
|
164
166
|
{ name: "uv", },
|
|
165
167
|
{ name: "py", },
|
|
166
168
|
{ name: "huggingface" },
|
|
167
|
-
{ name: "tmux" },
|
|
168
169
|
{ name: "ffmpeg", },
|
|
169
170
|
// browserless disabled for now (keep module for later re-enable)
|
|
170
171
|
])
|
|
172
|
+
if (platform !== "win32") {
|
|
173
|
+
requirements.push({ name: "tmux" })
|
|
174
|
+
}
|
|
171
175
|
let conda_requirements = [
|
|
172
176
|
zip_cmd,
|
|
173
177
|
"uv",
|
package/kernel/bin/tmux.js
CHANGED
|
@@ -1,50 +1,29 @@
|
|
|
1
|
-
const path = require("path")
|
|
2
|
-
|
|
3
1
|
class Tmux {
|
|
4
|
-
windowsUrl = "https://github.com/itefixnet/itmux/releases/download/v1.1.0/itmux_1.1.0_x64_free.zip"
|
|
5
|
-
|
|
6
2
|
cmd() {
|
|
7
3
|
return "tmux"
|
|
8
4
|
}
|
|
9
5
|
async install(req, ondata) {
|
|
10
6
|
if (this.kernel.platform === "win32") {
|
|
11
|
-
|
|
12
|
-
throw new Error(`itmux only has a Windows x64 release (current arch: ${this.kernel.arch})`)
|
|
13
|
-
}
|
|
14
|
-
const dest = path.basename(new URL(this.windowsUrl).pathname)
|
|
15
|
-
await this.kernel.bin.rm("tmux", ondata)
|
|
16
|
-
await this.kernel.bin.download(this.windowsUrl, dest, ondata)
|
|
17
|
-
await this.kernel.bin.unzip(dest, this.kernel.bin.path("tmux"), null, ondata)
|
|
18
|
-
await this.kernel.bin.rm(dest, ondata)
|
|
19
|
-
} else {
|
|
20
|
-
await this.kernel.bin.exec({
|
|
21
|
-
message: [
|
|
22
|
-
"conda clean -y --all",
|
|
23
|
-
`conda install -y -c conda-forge ${this.cmd()}`
|
|
24
|
-
]
|
|
25
|
-
}, ondata)
|
|
7
|
+
throw new Error("tmux is only supported on macOS and Linux")
|
|
26
8
|
}
|
|
9
|
+
await this.kernel.bin.exec({
|
|
10
|
+
message: [
|
|
11
|
+
"conda clean -y --all",
|
|
12
|
+
`conda install -y -c conda-forge ${this.cmd()}`
|
|
13
|
+
]
|
|
14
|
+
}, ondata)
|
|
27
15
|
}
|
|
28
16
|
async installed() {
|
|
29
17
|
if (this.kernel.platform === "win32") {
|
|
30
|
-
return
|
|
31
|
-
} else {
|
|
32
|
-
return this.kernel.bin.installed.conda.has("tmux")
|
|
18
|
+
return false
|
|
33
19
|
}
|
|
20
|
+
return this.kernel.bin.installed.conda.has("tmux")
|
|
34
21
|
}
|
|
35
22
|
async uninstall(req, ondata) {
|
|
36
23
|
if (this.kernel.platform === "win32") {
|
|
37
|
-
|
|
38
|
-
} else {
|
|
39
|
-
await this.kernel.bin.exec({ message: "conda remove tmux" }, ondata)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
env() {
|
|
43
|
-
if (this.kernel.platform === "win32") {
|
|
44
|
-
return {
|
|
45
|
-
PATH: [this.kernel.bin.path("tmux/bin")]
|
|
46
|
-
}
|
|
24
|
+
return
|
|
47
25
|
}
|
|
26
|
+
await this.kernel.bin.exec({ message: "conda remove tmux" }, ondata)
|
|
48
27
|
}
|
|
49
28
|
}
|
|
50
29
|
|