pinokiod 2.15.19 → 2.15.21
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 +18 -3
- package/kernel/api/index.js +2 -6
- package/kernel/api/json/index.js +112 -0
- package/kernel/api/local/index.js +0 -2
- package/kernel/api/rm/index.js +32 -5
- package/kernel/api/set/index.js +63 -38
- package/kernel/bin/index.js +0 -4
- package/kernel/bin/uv.js +20 -0
- package/kernel/index.js +2 -1
- package/kernel/shell.js +6 -6
- package/kernel/shells.js +9 -1
- package/package.json +2 -2
- package/server/index.js +314 -164
- package/server/public/style.css +55 -2
- package/server/public/term-dark.png +0 -0
- package/server/public/term-white.png +0 -0
- package/server/public/term.png +0 -0
- package/server/views/env_editor.ejs +31 -7
- package/server/views/fullscreen_editor.ejs +9 -0
- package/server/views/index.ejs +30 -1
- package/server/views/pre.ejs +38 -4
- package/server/views/proxy.ejs +9 -3
- package/server/views/required_env_editor.ejs +275 -0
- package/server/views/settings.ejs +0 -2
- package/server/views/share_editor.ejs +0 -2
- package/server/views/{disposable.ejs → task.ejs} +19 -15
|
@@ -178,8 +178,6 @@ body {
|
|
|
178
178
|
}
|
|
179
179
|
h1 {
|
|
180
180
|
font-size: 50px;
|
|
181
|
-
font-family: georgia;
|
|
182
|
-
font-style: italic;
|
|
183
181
|
padding-bottom: 20px;
|
|
184
182
|
}
|
|
185
183
|
footer {
|
|
@@ -234,20 +232,14 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
234
232
|
return res.json()
|
|
235
233
|
})
|
|
236
234
|
console.log("res" ,res)
|
|
237
|
-
|
|
238
|
-
location.href = "/pinokio/browser/<%=name%>"
|
|
239
|
-
<% } else { %>
|
|
240
|
-
n.Noty({
|
|
241
|
-
text: `Updated!`
|
|
242
|
-
})
|
|
243
|
-
<% } %>
|
|
235
|
+
location.href = "<%=path%>"
|
|
244
236
|
})
|
|
245
237
|
<% if (init) { %>
|
|
246
|
-
/*
|
|
247
238
|
document.querySelector("#customize").addEventListener("click", (e) => {
|
|
248
239
|
e.preventDefault()
|
|
249
240
|
e.stopPropagation()
|
|
250
241
|
document.querySelector("#editor").classList.toggle("hidden")
|
|
242
|
+
document.querySelector("body").classList.toggle("center")
|
|
251
243
|
})
|
|
252
244
|
let editor = ace.edit("editor");
|
|
253
245
|
editor.setTheme("ace/theme/nord_dark");
|
|
@@ -257,7 +249,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
257
249
|
});
|
|
258
250
|
editor.session.setMode("ace/mode/javascript");
|
|
259
251
|
editor.clearSelection()
|
|
260
|
-
*/
|
|
261
252
|
<% } %>
|
|
262
253
|
})
|
|
263
254
|
</script>
|
|
@@ -266,25 +257,38 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
266
257
|
<main>
|
|
267
258
|
<% if (init) { %>
|
|
268
259
|
<div>
|
|
269
|
-
<h1>Run</h1>
|
|
270
260
|
<% if (config) { %>
|
|
271
261
|
<div class='card'>
|
|
272
262
|
<% if (config.icon) { %>
|
|
273
263
|
<img src="<%=config.icon%>">
|
|
264
|
+
<% } else { %>
|
|
265
|
+
<img src="/term.png">
|
|
274
266
|
<% } %>
|
|
275
267
|
<div class='col'>
|
|
276
268
|
<div class='title'><%=config.title%></div>
|
|
277
269
|
<div class='description'><%=config.description%></div>
|
|
278
270
|
</div>
|
|
279
271
|
</div>
|
|
272
|
+
<div class='env-form'>
|
|
273
|
+
<% items.forEach((item) => { %>
|
|
274
|
+
<% if (item.type === "comment") { %>
|
|
275
|
+
<div class='comment'><%=item.val.replaceAll(/^[ #]+/g, "")%></div>
|
|
276
|
+
<% } else { %>
|
|
277
|
+
<div class='env-item'>
|
|
278
|
+
<label for="<%=item.key%>"><%=item.key%></label>
|
|
279
|
+
<input id="<%=item.key%>" type="text" value="<%=item.val%>">
|
|
280
|
+
</div>
|
|
281
|
+
<% } %>
|
|
282
|
+
<% }) %>
|
|
283
|
+
</div>
|
|
280
284
|
<% } %>
|
|
281
285
|
<footer>
|
|
282
286
|
<a href="/" class='btn go-home'><i class='fa-solid fa-home'></i> home</a>
|
|
283
287
|
<div class='flexible'></div>
|
|
284
|
-
<a id='customize' class='btn' target="_blank" href='<%=_path%>'><i class='fa-solid fa-code'></i> View Script</a>
|
|
285
288
|
<!--
|
|
286
|
-
<
|
|
289
|
+
<a id='customize' class='btn' target="_blank" href='<%=_path%>'><i class='fa-solid fa-code'></i> View Script</a>
|
|
287
290
|
-->
|
|
291
|
+
<button id='customize' class='btn'><i class="fa-solid fa-code"></i> View Script</button>
|
|
288
292
|
<a id='save' href="<%=path%>" class='btn'>
|
|
289
293
|
<span class='save'><i class="fa-solid fa-check"></i> Run</span>
|
|
290
294
|
</a>
|
|
@@ -307,7 +311,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
307
311
|
</h1>
|
|
308
312
|
</header>
|
|
309
313
|
<% } %>
|
|
310
|
-
<div id='editor' class='<%=init ? "hidden" : ''%>'><%=str%></div>
|
|
311
314
|
</main>
|
|
315
|
+
<div id='editor' class='<%=init ? "hidden" : ''%>'><%=str%></div>
|
|
312
316
|
</body>
|
|
313
317
|
</html>
|