pinokiod 3.9.0 → 3.9.3
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/:w +1247 -0
- package/kernel/api/filepicker/index.js +59 -0
- package/kernel/api/fs/index.js +6 -4
- package/kernel/api/index.js +123 -37
- package/kernel/api/input/index.js +2 -0
- package/kernel/api/web/index.js +6 -0
- package/kernel/bin/caddy.js +127 -0
- package/kernel/bin/cloudflared.js +1 -0
- package/kernel/bin/conda.js +10 -2
- package/kernel/bin/cuda.js +0 -16
- package/kernel/bin/ffmpeg.js +4 -6
- package/kernel/bin/git.js +55 -29
- package/kernel/bin/gxx.js +8 -6
- package/kernel/bin/huggingface.js +4 -5
- package/kernel/bin/index.js +347 -88
- package/kernel/bin/node.js +13 -6
- package/kernel/bin/py.js +1 -1
- package/kernel/bin/setup.js +146 -0
- package/kernel/bin/uv.js +4 -5
- package/kernel/bin/zip.js +7 -8
- package/kernel/connect/index.js +25 -0
- package/kernel/connect/providers/github/README.md +11 -0
- package/kernel/connect/providers/x/README.md +96 -0
- package/kernel/connect/providers/x/index.js +152 -0
- package/kernel/environment.js +50 -1
- package/kernel/index.js +152 -32
- package/kernel/info.js +4 -2
- package/kernel/kv.js +38 -0
- package/kernel/loader.js +13 -3
- package/kernel/peer.js +161 -0
- package/kernel/procs.js +116 -0
- package/kernel/prototype.js +62 -0
- package/kernel/router/common.js +42 -0
- package/kernel/router/connector.js +81 -0
- package/kernel/router/index.js +235 -0
- package/kernel/router/localhost_home_router.js +84 -0
- package/kernel/router/localhost_port_router.js +15 -0
- package/kernel/router/localhost_variable_router.js +37 -0
- package/kernel/router/peer_home_router.js +15 -0
- package/kernel/router/peer_peer_router.js +26 -0
- package/kernel/router/peer_port_router.js +45 -0
- package/kernel/router/peer_variable_router.js +46 -0
- package/kernel/router/processor.js +31 -0
- package/kernel/shell.js +141 -60
- package/kernel/shells.js +32 -17
- package/kernel/store.js +58 -0
- package/kernel/sysinfo.js +0 -1
- package/kernel/util.js +143 -36
- package/package.json +4 -1
- package/pipe/index.js +0 -2
- package/script/index.js +12 -0
- package/server/index.js +1473 -553
- package/server/public/Socket.js +5 -1
- package/server/public/SourceCodePro-Regular.ttf +0 -0
- package/server/public/SpaceMono-Bold.ttf +0 -0
- package/server/public/SpaceMono-BoldItalic.ttf +0 -0
- package/server/public/SpaceMono-Italic.ttf +0 -0
- package/server/public/SpaceMono-Regular.ttf +0 -0
- package/server/public/commander.js +40 -0
- package/server/public/common.js +60 -0
- package/server/public/dropzone-min.js +2 -0
- package/server/public/dropzone.css +1 -0
- package/server/public/filepond-plugin-file-validate-type.min.js +9 -0
- package/server/public/filepond-plugin-image-crop.min.js +9 -0
- package/server/public/filepond-plugin-image-edit.min.css +8 -0
- package/server/public/filepond-plugin-image-edit.min.js +9 -0
- package/server/public/filepond-plugin-image-exif-orientation.min.js +9 -0
- package/server/public/filepond-plugin-image-preview.min.css +8 -0
- package/server/public/filepond-plugin-image-preview.min.js +9 -0
- package/server/public/filepond-plugin-image-resize.min.js +9 -0
- package/server/public/filepond-plugin-image-transform.min.js +9 -0
- package/server/public/filepond.min.css +8 -0
- package/server/public/filepond.min.js +9 -0
- package/server/public/fscreator.js +174 -0
- package/server/public/fseditor.js +212 -0
- package/server/public/github.png +0 -0
- package/server/public/highlight-js.js +81 -0
- package/server/public/highlight.css +9 -0
- package/server/public/highlight.js +1244 -0
- package/server/public/install.js +17 -20
- package/server/public/modalinput.js +105 -9
- package/server/public/opener.js +3 -1
- package/server/public/pinokio-black.png +0 -0
- package/server/public/pinokio-black2.png +0 -0
- package/server/public/redoc.standalone.js +1832 -0
- package/server/public/style.css +215 -17
- package/server/public/swagger-ui-bundle.js +2 -0
- package/server/public/swagger-ui.css +3 -0
- package/server/public/x.js +63 -0
- package/server/socket.js +136 -39
- package/server/views/404.ejs +0 -1
- package/server/views/app.ejs +368 -98
- package/server/views/bootstrap.ejs +22 -19
- package/server/views/connect/x.ejs +324 -0
- package/server/views/connect.ejs +197 -0
- package/server/views/download.ejs +7 -1
- package/server/views/editor.ejs +68 -9
- package/server/views/explore.ejs +13 -10
- package/server/views/file_explorer.ejs +10 -37
- package/server/views/github.ejs +218 -0
- package/server/views/help.ejs +4 -3
- package/server/views/index.ejs +275 -121
- package/server/views/install.ejs +56 -29
- package/server/views/keys.ejs +276 -0
- package/server/views/network.ejs +889 -0
- package/server/views/partials/dynamic.ejs +9 -0
- package/server/views/partials/menu.ejs +7 -1
- package/server/views/prototype/index.ejs +311 -0
- package/server/views/prototype/show.ejs +383 -0
- package/server/views/redoc.ejs +18 -0
- package/server/views/required_env_editor.ejs +11 -2
- package/server/views/settings.ejs +38 -10
- package/server/views/setup.ejs +254 -0
- package/server/views/setup_home.ejs +192 -0
- package/server/views/shell.ejs +781 -0
- package/server/views/swaggerui.ejs +19 -0
- package/server/views/terminal.ejs +174 -42
- package/LICENSE +0 -7
- package/server/views/proxy.ejs +0 -405
package/kernel/bin/git.js
CHANGED
|
@@ -4,43 +4,69 @@ const fetch = require('cross-fetch')
|
|
|
4
4
|
const { rimraf } = require('rimraf')
|
|
5
5
|
const path = require("path")
|
|
6
6
|
class Git {
|
|
7
|
+
cmd() {
|
|
8
|
+
if (this.kernel.platform === "darwin") {
|
|
9
|
+
return "git git-lfs"
|
|
10
|
+
} else {
|
|
11
|
+
return "git git-lfs gh"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
async install(req, ondata) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// check if gitconfig exists
|
|
21
|
-
let exists = await this.kernel.api.exists(gitconfig_path)
|
|
22
|
-
// if not, create one
|
|
23
|
-
if (!exists) {
|
|
24
|
-
await fs.promises.copyFile(
|
|
25
|
-
path.resolve(__dirname, "..", "gitconfig_template"),
|
|
26
|
-
gitconfig_path
|
|
27
|
-
)
|
|
28
|
-
}
|
|
15
|
+
if (this.kernel.platform === "darwin") {
|
|
16
|
+
await this.kernel.bin.exec({
|
|
17
|
+
conda: { skip: true },
|
|
18
|
+
message: "brew install gh",
|
|
19
|
+
}, ondata)
|
|
20
|
+
} else {
|
|
21
|
+
await this.kernel.bin.exec({
|
|
22
|
+
message: [
|
|
23
|
+
"conda clean -y --all",
|
|
24
|
+
`conda install -y -c conda-forge ${this.cmd()}`
|
|
25
|
+
]
|
|
26
|
+
}, ondata)
|
|
29
27
|
}
|
|
28
|
+
await fs.promises.mkdir(this.kernel.path("config/gh"), { recursive: true }).catch((e) => { })
|
|
29
|
+
// if (this.kernel.platform === 'win32') {
|
|
30
|
+
// let gitconfig_path = path.resolve(this.kernel.homedir, "gitconfig")
|
|
31
|
+
// // check if gitconfig exists
|
|
32
|
+
// let exists = await this.kernel.api.exists(gitconfig_path)
|
|
33
|
+
// // if not, create one
|
|
34
|
+
// if (!exists) {
|
|
35
|
+
// await fs.promises.copyFile(
|
|
36
|
+
// path.resolve(__dirname, "..", "gitconfig_template"),
|
|
37
|
+
// gitconfig_path
|
|
38
|
+
// )
|
|
39
|
+
// }
|
|
40
|
+
// }
|
|
30
41
|
}
|
|
31
42
|
async installed() {
|
|
32
|
-
|
|
43
|
+
if (this.kernel.platform === "darwin") {
|
|
44
|
+
let gh_config_exists = await this.kernel.exists("config/gh")
|
|
45
|
+
console.log("conda installed", this.kernel.bin.installed.conda)
|
|
46
|
+
return this.kernel.bin.installed.conda && this.kernel.bin.installed.conda.has("git") && this.kernel.bin.installed.brew.has("gh") && gh_config_exists
|
|
47
|
+
} else {
|
|
48
|
+
let gh_config_exists = await this.kernel.exists("config/gh")
|
|
49
|
+
console.log("conda installed", this.kernel.bin.installed.conda)
|
|
50
|
+
return this.kernel.bin.installed.conda && this.kernel.bin.installed.conda.has("git") && this.kernel.bin.installed.conda.has("gh") && gh_config_exists
|
|
51
|
+
}
|
|
33
52
|
}
|
|
34
53
|
async uninstall(req, ondata) {
|
|
35
|
-
|
|
54
|
+
if (this.kernel.platform === "darwin") {
|
|
55
|
+
await this.kernel.bin.exec({ message: "conda remove git" }, ondata)
|
|
56
|
+
await this.kernel.bin.exec({
|
|
57
|
+
conda: { skip: true },
|
|
58
|
+
message: "brew uninstall gh",
|
|
59
|
+
})
|
|
60
|
+
} else {
|
|
61
|
+
await this.kernel.bin.exec({ message: "conda remove git gh" }, ondata)
|
|
62
|
+
}
|
|
36
63
|
}
|
|
37
64
|
env() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// }
|
|
65
|
+
let gitconfig_path = path.resolve(this.kernel.homedir, "gitconfig")
|
|
66
|
+
return {
|
|
67
|
+
GIT_CONFIG_GLOBAL: gitconfig_path,
|
|
68
|
+
GH_CONFIG_DIR: this.kernel.path("config/gh")
|
|
69
|
+
}
|
|
44
70
|
}
|
|
45
71
|
async requires() {
|
|
46
72
|
return ["conda"]
|
package/kernel/bin/gxx.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
class GXX {
|
|
2
|
+
cmd() {
|
|
3
|
+
if (this.kernel.platform === "linux") {
|
|
4
|
+
return "'gxx<12'"
|
|
5
|
+
} else {
|
|
6
|
+
return ""
|
|
7
|
+
}
|
|
8
|
+
}
|
|
2
9
|
async install(req, ondata) {
|
|
3
10
|
await this.kernel.bin.exec({
|
|
4
|
-
//message: "conda install -y nodejs=22.12.0 -c conda-forge"
|
|
5
11
|
message: [
|
|
6
12
|
"conda clean -y --all",
|
|
7
|
-
|
|
13
|
+
`conda install -y -c conda-forge ${this.cmd()}`
|
|
8
14
|
]
|
|
9
|
-
// conda: {
|
|
10
|
-
// name: "base",
|
|
11
|
-
// activate: "minimal"
|
|
12
|
-
// }
|
|
13
15
|
}, ondata)
|
|
14
16
|
}
|
|
15
17
|
async installed() {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
class Huggingface {
|
|
2
|
+
cmd() {
|
|
3
|
+
return "huggingface_hub"
|
|
4
|
+
}
|
|
2
5
|
async install(req, ondata) {
|
|
3
6
|
await this.kernel.bin.exec({
|
|
4
7
|
message: [
|
|
5
8
|
"conda clean -y --all",
|
|
6
|
-
|
|
9
|
+
`conda install -y -c conda-forge ${this.cmd()}`
|
|
7
10
|
]
|
|
8
|
-
// conda: {
|
|
9
|
-
// name: "base",
|
|
10
|
-
// activate: "minimal"
|
|
11
|
-
// }
|
|
12
11
|
}, ondata)
|
|
13
12
|
}
|
|
14
13
|
async installed() {
|