pinokiod 3.8.0 → 3.8.5
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/fs/index.js +6 -4
- package/kernel/api/index.js +102 -31
- package/kernel/bin/cuda.js +7 -0
- package/kernel/bin/index.js +143 -4
- package/kernel/bin/node.js +9 -0
- package/kernel/index.js +32 -1
- package/kernel/info.js +1 -0
- package/kernel/prototype.js +47 -0
- package/kernel/shell.js +110 -54
- package/kernel/shells.js +16 -7
- package/kernel/store.js +58 -0
- package/kernel/util.js +106 -35
- package/package.json +1 -1
- package/script/index.js +12 -0
- package/server/index.js +466 -250
- 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/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 +160 -0
- package/server/public/fseditor.js +189 -0
- package/server/public/github.png +0 -0
- 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/style.css +131 -9
- package/server/socket.js +123 -37
- package/server/views/app.ejs +184 -11
- package/server/views/editor.ejs +12 -2
- package/server/views/explore.ejs +4 -3
- package/server/views/help.ejs +4 -2
- package/server/views/index.ejs +218 -80
- package/server/views/install.ejs +1 -1
- package/server/views/local_editor.ejs +282 -0
- package/server/views/minterm.ejs +687 -0
- package/server/views/partials/menu.ejs +7 -1
- package/server/views/prototypes.ejs +463 -0
- package/server/views/proxy.ejs +10 -4
- package/server/views/settings.ejs +4 -3
- package/server/views/terminal.ejs +99 -15
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
<html class='columns'>
|
|
2
|
+
<head>
|
|
3
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
|
4
|
+
<script src="/hotkeys.min.js"></script>
|
|
5
|
+
<script src="/ace/ace.js"></script>
|
|
6
|
+
<script src="/noty.js"></script>
|
|
7
|
+
<script src="/notyq.js"></script>
|
|
8
|
+
<script src="/xterm.js"></script>
|
|
9
|
+
<script src="/xterm-addon-fit.js"></script>
|
|
10
|
+
<script src="/xterm-addon-web-links.js"></script>
|
|
11
|
+
<script src="/xterm-theme.js"></script>
|
|
12
|
+
<script src="/xterm-addon-search.js"></script>
|
|
13
|
+
<script src="/xterm-addon-search-bar.js"></script>
|
|
14
|
+
<script src="/sweetalert2.js"></script>
|
|
15
|
+
<script src="/Socket.js"></script>
|
|
16
|
+
<script src="/common.js"></script>
|
|
17
|
+
<script src="/he.js"></script>
|
|
18
|
+
<script src="/opener.js"></script>
|
|
19
|
+
<script src="/nav.js"></script>
|
|
20
|
+
<script src="/autoexpand.js"></script>
|
|
21
|
+
<script src="/modalinput.js"></script>
|
|
22
|
+
<script src="/simplemodal.js"></script>
|
|
23
|
+
<script src="/waitmodal.js"></script>
|
|
24
|
+
<script src="/notifyinput.js"></script>
|
|
25
|
+
<script src="/report.js"></script>
|
|
26
|
+
<link href="/xterm.min.css" rel="stylesheet" />
|
|
27
|
+
<link href="/css/fontawesome.min.css" rel="stylesheet">
|
|
28
|
+
<link href="/css/solid.min.css" rel="stylesheet">
|
|
29
|
+
<link href="/css/regular.min.css" rel="stylesheet">
|
|
30
|
+
<link href="/css/brands.min.css" rel="stylesheet">
|
|
31
|
+
<link href="/style.css" rel="stylesheet"/>
|
|
32
|
+
<link href="/noty.css" rel="stylesheet"/>
|
|
33
|
+
<% if (agent === "electron") { %>
|
|
34
|
+
<link href="/electron.css" rel="stylesheet"/>
|
|
35
|
+
<% } %>
|
|
36
|
+
<style>
|
|
37
|
+
body.frozen {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
height: 100%;
|
|
41
|
+
}
|
|
42
|
+
#table > table {
|
|
43
|
+
border-left: 2px solid black;
|
|
44
|
+
padding-left: 5px;
|
|
45
|
+
margin: 10px 0;
|
|
46
|
+
}
|
|
47
|
+
.highlight {
|
|
48
|
+
background: yellow;
|
|
49
|
+
width: 100px;
|
|
50
|
+
}
|
|
51
|
+
th {
|
|
52
|
+
background: rgba(0,0,0,0.1);
|
|
53
|
+
padding: 10px;
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
}
|
|
56
|
+
td {
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
padding: 10px;
|
|
59
|
+
}
|
|
60
|
+
td.val {
|
|
61
|
+
background: rgba(0,0,0,0.06);
|
|
62
|
+
}
|
|
63
|
+
td.key {
|
|
64
|
+
background: rgba(0,0,0,0.1);
|
|
65
|
+
}
|
|
66
|
+
.button {
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
background: rgba(0,0,0,0.8);
|
|
69
|
+
color: white;
|
|
70
|
+
padding: 5px 10px;
|
|
71
|
+
border-radius: 4px;
|
|
72
|
+
}
|
|
73
|
+
.button:hover {
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
main {
|
|
77
|
+
width: 100%;
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
max-width: 600px;
|
|
80
|
+
padding: 20px;
|
|
81
|
+
margin: 0 auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
header .btn {
|
|
85
|
+
font-family: Sans-serif;
|
|
86
|
+
display: block;
|
|
87
|
+
margin-left: 10px;
|
|
88
|
+
font-style: normal;
|
|
89
|
+
font-size: 12px;
|
|
90
|
+
font-weight: normal;
|
|
91
|
+
padding: 5px 10px;
|
|
92
|
+
}
|
|
93
|
+
.disabled {
|
|
94
|
+
opacity: 0.7;
|
|
95
|
+
}
|
|
96
|
+
body.dark .env-item input[type=text] {
|
|
97
|
+
background: white;
|
|
98
|
+
}
|
|
99
|
+
.env-item input[type=text] {
|
|
100
|
+
margin-top: 5px;
|
|
101
|
+
width: 100%;
|
|
102
|
+
padding: 10px;
|
|
103
|
+
box-sizing: border-box;
|
|
104
|
+
border: none;
|
|
105
|
+
background: rgba(0,0,100, 0.1);
|
|
106
|
+
}
|
|
107
|
+
body.dark .env-item label {
|
|
108
|
+
color: cornflowerblue;
|
|
109
|
+
}
|
|
110
|
+
.env-item label {
|
|
111
|
+
color: royalblue;
|
|
112
|
+
display: block;
|
|
113
|
+
margin-bottom: 5px;
|
|
114
|
+
font-weight: bold;
|
|
115
|
+
font-size: 18px;
|
|
116
|
+
}
|
|
117
|
+
.env-item.highlighted {
|
|
118
|
+
border: 5px solid red;
|
|
119
|
+
}
|
|
120
|
+
.env-item {
|
|
121
|
+
/*
|
|
122
|
+
padding-top: 10px;
|
|
123
|
+
padding-bottom: 30px;
|
|
124
|
+
*/
|
|
125
|
+
margin-bottom: 20px;
|
|
126
|
+
}
|
|
127
|
+
body.dark .comment {
|
|
128
|
+
border-left: 2px solid white;
|
|
129
|
+
}
|
|
130
|
+
.comment {
|
|
131
|
+
opacity: 0.8;
|
|
132
|
+
border-left: 2px solid black;
|
|
133
|
+
padding-left: 10px;
|
|
134
|
+
}
|
|
135
|
+
#save {
|
|
136
|
+
background: royalblue;
|
|
137
|
+
width: 100%;
|
|
138
|
+
box-sizing: border-box;
|
|
139
|
+
text-align: center;
|
|
140
|
+
}
|
|
141
|
+
a#customize {
|
|
142
|
+
text-decoration: underline;
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
}
|
|
145
|
+
.e {
|
|
146
|
+
padding: 10px 0;
|
|
147
|
+
}
|
|
148
|
+
#editor {
|
|
149
|
+
padding: 20px 0;
|
|
150
|
+
}
|
|
151
|
+
.center {
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
justify-content: center;
|
|
155
|
+
}
|
|
156
|
+
body {
|
|
157
|
+
display: block;
|
|
158
|
+
}
|
|
159
|
+
.card {
|
|
160
|
+
display: flex;
|
|
161
|
+
padding: 10px 0;
|
|
162
|
+
box-sizing: border-box;
|
|
163
|
+
}
|
|
164
|
+
.card img {
|
|
165
|
+
width: 100px;
|
|
166
|
+
border-radius: 10px;
|
|
167
|
+
}
|
|
168
|
+
.card .description {
|
|
169
|
+
opacity: 0.8;
|
|
170
|
+
}
|
|
171
|
+
.card .title {
|
|
172
|
+
font-weight: bold;
|
|
173
|
+
font-size: 30px;
|
|
174
|
+
letter-spacing: -1px;
|
|
175
|
+
}
|
|
176
|
+
.card .col {
|
|
177
|
+
padding-left: 10px;
|
|
178
|
+
}
|
|
179
|
+
h1 {
|
|
180
|
+
text-align: center;
|
|
181
|
+
font-size: 50px;
|
|
182
|
+
padding-bottom: 20px;
|
|
183
|
+
}
|
|
184
|
+
footer {
|
|
185
|
+
background: none;
|
|
186
|
+
padding: 0;
|
|
187
|
+
text-align: right;
|
|
188
|
+
display: flex;
|
|
189
|
+
margin: 10px 0 20px 0;
|
|
190
|
+
}
|
|
191
|
+
footer .btn {
|
|
192
|
+
margin-left: 10px;
|
|
193
|
+
display: inline-block;
|
|
194
|
+
-webkit-appearance: button;
|
|
195
|
+
-moz-appearance: button;
|
|
196
|
+
appearance: button;
|
|
197
|
+
|
|
198
|
+
}
|
|
199
|
+
footer .btn.go-home {
|
|
200
|
+
margin-left: 0px;
|
|
201
|
+
}
|
|
202
|
+
.btn.home-button {
|
|
203
|
+
background: none !important;
|
|
204
|
+
margin: 0 !important;
|
|
205
|
+
font-size: 16px !important;
|
|
206
|
+
}
|
|
207
|
+
#editor {
|
|
208
|
+
height: auto;
|
|
209
|
+
}
|
|
210
|
+
.env-title {
|
|
211
|
+
font-weight: bold;
|
|
212
|
+
}
|
|
213
|
+
.env-description {
|
|
214
|
+
margin-bottom: 10px;
|
|
215
|
+
}
|
|
216
|
+
.subtitle {
|
|
217
|
+
text-align: center;
|
|
218
|
+
}
|
|
219
|
+
.head {
|
|
220
|
+
text-align: center;
|
|
221
|
+
}
|
|
222
|
+
.head img {
|
|
223
|
+
padding: 10px;
|
|
224
|
+
}
|
|
225
|
+
</style>
|
|
226
|
+
<script>
|
|
227
|
+
document.addEventListener("DOMContentLoaded", async () => {
|
|
228
|
+
const n = new N()
|
|
229
|
+
document.querySelector("#save").addEventListener("click", async (e) => {
|
|
230
|
+
// save
|
|
231
|
+
const vals = {}
|
|
232
|
+
const els = document.querySelectorAll(".env-item")
|
|
233
|
+
for(let el of els) {
|
|
234
|
+
let input = el.querySelector("input[type=text]")
|
|
235
|
+
vals[input.id] = input.value
|
|
236
|
+
}
|
|
237
|
+
console.log("vals", vals)
|
|
238
|
+
let res = await fetch("/prototypes/<%=type%>", {
|
|
239
|
+
method: "POST",
|
|
240
|
+
headers: {
|
|
241
|
+
"Content-Type": "application/json"
|
|
242
|
+
},
|
|
243
|
+
body: JSON.stringify(vals)
|
|
244
|
+
}).then((res) => {
|
|
245
|
+
return res.json()
|
|
246
|
+
})
|
|
247
|
+
if (res.error) {
|
|
248
|
+
alert(res.error)
|
|
249
|
+
} else {
|
|
250
|
+
location.href = `/pinokio/browser/${res.success}`
|
|
251
|
+
}
|
|
252
|
+
})
|
|
253
|
+
})
|
|
254
|
+
</script>
|
|
255
|
+
</head>
|
|
256
|
+
<body class='<%=theme%> center'>
|
|
257
|
+
<main>
|
|
258
|
+
<div class='head'>
|
|
259
|
+
<img src="<%=script.icon%>"/>
|
|
260
|
+
<h1><%=script.title%></h1>
|
|
261
|
+
<div class='subtitle'><%=script.description%></div>
|
|
262
|
+
</div>
|
|
263
|
+
<div id='editor'>
|
|
264
|
+
<% items.forEach((item, i) => { %>
|
|
265
|
+
<div class='env-item'>
|
|
266
|
+
<label for="<%=item.env%>"><%=item.env%></label>
|
|
267
|
+
<% if (item.title) { %>
|
|
268
|
+
<div class='env-title'><%=item.title%></div>
|
|
269
|
+
<% } %>
|
|
270
|
+
<% if (item.description) { %>
|
|
271
|
+
<div class='env-description'><%=item.description%></div>
|
|
272
|
+
<% } %>
|
|
273
|
+
<input id="<%=item.id%>" type="text" <%=i===0 ? 'autofocus' : ''%>>
|
|
274
|
+
</div>
|
|
275
|
+
<% }) %>
|
|
276
|
+
<div id='save' class='btn'>
|
|
277
|
+
<span class='save'><i class="fa-solid fa-check"></i> Create</span>
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
</main>
|
|
281
|
+
</body>
|
|
282
|
+
</html>
|