pinokiod 3.9.2 → 3.9.12
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/index.js +150 -67
- package/kernel/api/rm/index.js +3 -2
- package/kernel/api/set/index.js +4 -2
- package/kernel/bin/caddy.js +0 -2
- package/kernel/bin/index.js +13 -0
- package/kernel/index.js +10 -8
- package/kernel/info.js +3 -0
- package/kernel/plugin.js +34 -0
- package/kernel/router/index.js +1 -1
- package/kernel/router/localhost_variable_router.js +1 -1
- package/kernel/router/peer_variable_router.js +1 -1
- package/kernel/shell.js +14 -0
- package/kernel/util.js +19 -1
- package/package.json +1 -1
- package/server/index.js +296 -98
- package/server/public/modalinput.js +7 -2
- package/server/public/opener.js +32 -0
- package/server/public/style.css +37 -2
- package/server/socket.js +7 -3
- package/server/views/app.ejs +199 -79
- package/server/views/env_editor.ejs +1 -0
- package/server/views/file_explorer.ejs +1 -1
- package/server/views/index.ejs +66 -43
- package/server/views/partials/dynamic.ejs +54 -6
- package/server/views/partials/menu.ejs +11 -6
- package/server/views/prototype/index.ejs +366 -31
- package/server/views/prototype/show.ejs +386 -30
- package/server/views/required_env_editor.ejs +1 -0
- package/server/views/settings.ejs +58 -43
- package/server/views/terminal.ejs +6 -0
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
<style>
|
|
21
21
|
main {
|
|
22
22
|
max-width: 800px;
|
|
23
|
+
/*
|
|
23
24
|
margin: 0 auto;
|
|
25
|
+
*/
|
|
24
26
|
}
|
|
25
27
|
.doc {
|
|
26
28
|
padding: 20px;
|
|
@@ -33,6 +35,9 @@ main {
|
|
|
33
35
|
padding: 20px;
|
|
34
36
|
margin-top: 20px;
|
|
35
37
|
}
|
|
38
|
+
#readme ol, #readme ul {
|
|
39
|
+
padding-inline-start: 18px;
|
|
40
|
+
}
|
|
36
41
|
.line2 {
|
|
37
42
|
display: flex;
|
|
38
43
|
align-items: center;
|
|
@@ -183,6 +188,9 @@ body.dark .browser-options-row {
|
|
|
183
188
|
display: flex;
|
|
184
189
|
align-items: flex-start;
|
|
185
190
|
}
|
|
191
|
+
.meta-action {
|
|
192
|
+
padding: 10px 0;
|
|
193
|
+
}
|
|
186
194
|
.meta-content {
|
|
187
195
|
padding: 10px;
|
|
188
196
|
}
|
|
@@ -208,6 +216,326 @@ body.dark .browser-options-row {
|
|
|
208
216
|
padding: 0;
|
|
209
217
|
}
|
|
210
218
|
}
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
.online {
|
|
228
|
+
width: 10px;
|
|
229
|
+
height: 10px;
|
|
230
|
+
background: yellowgreen;
|
|
231
|
+
border-radius: 10px;
|
|
232
|
+
}
|
|
233
|
+
#menu {
|
|
234
|
+
display: flex;
|
|
235
|
+
}
|
|
236
|
+
#menu i {
|
|
237
|
+
display: block;
|
|
238
|
+
}
|
|
239
|
+
#menu img {
|
|
240
|
+
display: none;
|
|
241
|
+
height: 30px;
|
|
242
|
+
object-fit: contain;
|
|
243
|
+
/*
|
|
244
|
+
border-radius: 20px
|
|
245
|
+
*/
|
|
246
|
+
}
|
|
247
|
+
#menu.margin {
|
|
248
|
+
/*
|
|
249
|
+
padding: 5px;
|
|
250
|
+
*/
|
|
251
|
+
}
|
|
252
|
+
#menu.margin i {
|
|
253
|
+
display: none;
|
|
254
|
+
}
|
|
255
|
+
#menu.margin img {
|
|
256
|
+
display: block;
|
|
257
|
+
}
|
|
258
|
+
html, body {
|
|
259
|
+
width: 100%;
|
|
260
|
+
height: 100%;
|
|
261
|
+
margin: 0;
|
|
262
|
+
}
|
|
263
|
+
body {
|
|
264
|
+
display: flex;
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
}
|
|
267
|
+
.menu {
|
|
268
|
+
overflow: auto;
|
|
269
|
+
}
|
|
270
|
+
body.dark .m {
|
|
271
|
+
border-top: 1px solid rgba(255,255,255,0.04);
|
|
272
|
+
}
|
|
273
|
+
.m {
|
|
274
|
+
border-top: 1px solid rgba(0,0,0,0.04);
|
|
275
|
+
}
|
|
276
|
+
.container {
|
|
277
|
+
position: relative;
|
|
278
|
+
display: flex;
|
|
279
|
+
flex-direction: column;
|
|
280
|
+
flex-grow: 1;
|
|
281
|
+
}
|
|
282
|
+
body aside {
|
|
283
|
+
/*
|
|
284
|
+
background: var(--light-bg);
|
|
285
|
+
*/
|
|
286
|
+
border-right: 1px solid rgba(0,0,0,0.04);
|
|
287
|
+
height: 100%;
|
|
288
|
+
}
|
|
289
|
+
body.dark aside {
|
|
290
|
+
background: var(--dark-bg);
|
|
291
|
+
border-right: 1px solid rgba(255,255,255,0.04);
|
|
292
|
+
}
|
|
293
|
+
aside {
|
|
294
|
+
display: flex;
|
|
295
|
+
flex-direction: column;
|
|
296
|
+
width: 200px;
|
|
297
|
+
overflow: auto;
|
|
298
|
+
box-sizing: border-box;
|
|
299
|
+
flex-shrink: 0;
|
|
300
|
+
}
|
|
301
|
+
main {
|
|
302
|
+
flex-grow: 1;
|
|
303
|
+
min-height: 0;
|
|
304
|
+
/*
|
|
305
|
+
height: 100%;
|
|
306
|
+
*/
|
|
307
|
+
}
|
|
308
|
+
main iframe[name^=http] {
|
|
309
|
+
background: white;
|
|
310
|
+
}
|
|
311
|
+
main iframe {
|
|
312
|
+
width: 100%;
|
|
313
|
+
height: 100%;
|
|
314
|
+
border: none;
|
|
315
|
+
}
|
|
316
|
+
.header-item {
|
|
317
|
+
/*
|
|
318
|
+
display: block;
|
|
319
|
+
*/
|
|
320
|
+
display: flex;
|
|
321
|
+
font-size: 12px;
|
|
322
|
+
text-decoration: none;
|
|
323
|
+
align-items: center;
|
|
324
|
+
border-radius: 0;
|
|
325
|
+
cursor: pointer;
|
|
326
|
+
}
|
|
327
|
+
.header-item.selected {
|
|
328
|
+
}
|
|
329
|
+
.header-item .btn2 {
|
|
330
|
+
margin: 0;
|
|
331
|
+
border: none;
|
|
332
|
+
padding: 5px;
|
|
333
|
+
/*
|
|
334
|
+
color: var(--light-color);
|
|
335
|
+
*/
|
|
336
|
+
}
|
|
337
|
+
body.dark .header-item .btn2 {
|
|
338
|
+
/*
|
|
339
|
+
color: var(--darkt-color);
|
|
340
|
+
*/
|
|
341
|
+
}
|
|
342
|
+
.bar .btn2 i {
|
|
343
|
+
display: block;
|
|
344
|
+
margin-right: 5px;
|
|
345
|
+
}
|
|
346
|
+
.header-item > * {
|
|
347
|
+
display: block;
|
|
348
|
+
}
|
|
349
|
+
.header-item img {
|
|
350
|
+
/*
|
|
351
|
+
width: 60px;
|
|
352
|
+
*/
|
|
353
|
+
height: 80px;
|
|
354
|
+
width: 80px;
|
|
355
|
+
/*
|
|
356
|
+
border-radius: 10px;
|
|
357
|
+
*/
|
|
358
|
+
object-fit: contain;
|
|
359
|
+
display: inline-block;
|
|
360
|
+
/*
|
|
361
|
+
border-radius: 30px;
|
|
362
|
+
*/
|
|
363
|
+
}
|
|
364
|
+
body.dark .header-item.btn {
|
|
365
|
+
/*
|
|
366
|
+
color: white;
|
|
367
|
+
*/
|
|
368
|
+
color: var(--dark-color);
|
|
369
|
+
}
|
|
370
|
+
.header-item.btn {
|
|
371
|
+
padding: 10px;
|
|
372
|
+
background: none !important;
|
|
373
|
+
color: var(--light-color);
|
|
374
|
+
}
|
|
375
|
+
.logo {
|
|
376
|
+
font-size: 20px;
|
|
377
|
+
padding: 20px;
|
|
378
|
+
}
|
|
379
|
+
body .logo {
|
|
380
|
+
color: var(--light-color);
|
|
381
|
+
}
|
|
382
|
+
body.dark .logo {
|
|
383
|
+
color: var(--dark-btn-color);
|
|
384
|
+
/*
|
|
385
|
+
color: white;
|
|
386
|
+
*/
|
|
387
|
+
}
|
|
388
|
+
body #new-window {
|
|
389
|
+
color: var(--light-color);
|
|
390
|
+
}
|
|
391
|
+
body.dark #new-window {
|
|
392
|
+
color: var(--dark-btn-color);
|
|
393
|
+
/*
|
|
394
|
+
color: white;
|
|
395
|
+
*/
|
|
396
|
+
}
|
|
397
|
+
/*
|
|
398
|
+
.dark .app-info {
|
|
399
|
+
background: rgba(255,255,255,0.04);
|
|
400
|
+
}
|
|
401
|
+
*/
|
|
402
|
+
.app-info {
|
|
403
|
+
|
|
404
|
+
/*
|
|
405
|
+
display: flex;
|
|
406
|
+
*/
|
|
407
|
+
box-sizing: border-box;
|
|
408
|
+
text-align: center;;
|
|
409
|
+
font-weight: bold;
|
|
410
|
+
align-items: center;
|
|
411
|
+
/*
|
|
412
|
+
background: rgba(0,0,0,0.04);
|
|
413
|
+
*/
|
|
414
|
+
}
|
|
415
|
+
.folderbuttons {
|
|
416
|
+
display: grid;
|
|
417
|
+
grid-template-columns: repeat(4, 1fr);
|
|
418
|
+
gap: 0px;
|
|
419
|
+
}
|
|
420
|
+
.header-btns {
|
|
421
|
+
padding: 0 !important;
|
|
422
|
+
}
|
|
423
|
+
body.dark .header-btns {
|
|
424
|
+
border-top: 1px solid rgba(255,255,255,0.04);
|
|
425
|
+
}
|
|
426
|
+
.app-info-edit {
|
|
427
|
+
text-decoration: none;
|
|
428
|
+
color: black;
|
|
429
|
+
border-bottom: 1px solid rgba(255,255,255,0.1);
|
|
430
|
+
}
|
|
431
|
+
/*
|
|
432
|
+
.dark .app-info-edit {
|
|
433
|
+
border-top: 1px solid rgba(255,255,255,0.2);
|
|
434
|
+
border-bottom: 1px solid rgba(255,255,255,0.2);
|
|
435
|
+
}
|
|
436
|
+
*/
|
|
437
|
+
.dark .app-info-edit:hover {
|
|
438
|
+
background: rgba(0,0,0,0.2);
|
|
439
|
+
}
|
|
440
|
+
.app-info-edit:hover{
|
|
441
|
+
background: rgba(0,0,0,0.05);
|
|
442
|
+
}
|
|
443
|
+
.app-info-edit i{
|
|
444
|
+
display: block;
|
|
445
|
+
}
|
|
446
|
+
.app-info-edit, .app-info-copy {
|
|
447
|
+
font-weight: normal;
|
|
448
|
+
|
|
449
|
+
/*
|
|
450
|
+
border-radius: 20px;
|
|
451
|
+
*/
|
|
452
|
+
font-size: 12px;
|
|
453
|
+
padding: 15px 5px;
|
|
454
|
+
/*
|
|
455
|
+
margin: 10px 20px 0;
|
|
456
|
+
*/
|
|
457
|
+
}
|
|
458
|
+
.app-info-card {
|
|
459
|
+
padding: 10px !important;
|
|
460
|
+
}
|
|
461
|
+
.app-info .btn {
|
|
462
|
+
width: 100%;
|
|
463
|
+
}
|
|
464
|
+
.app-info-card > * {
|
|
465
|
+
padding: 5px;
|
|
466
|
+
color: var(--light-color);
|
|
467
|
+
text-decoration: none;
|
|
468
|
+
box-sizing: border-box;
|
|
469
|
+
}
|
|
470
|
+
body.dark .app-info-card > * {
|
|
471
|
+
color: var(--dark-color);
|
|
472
|
+
}
|
|
473
|
+
.appcanvas {
|
|
474
|
+
display: flex;
|
|
475
|
+
flex-grow: 1;
|
|
476
|
+
border-top: 1px solid rgba(0, 0,0 ,0.04);
|
|
477
|
+
}
|
|
478
|
+
body.dark .appcanvas {
|
|
479
|
+
border-top: 1px solid rgba(255,255,255,0.04);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
@media only screen and (max-width: 480px) {
|
|
483
|
+
nav .btn2 {
|
|
484
|
+
width: auto !important;
|
|
485
|
+
min-width: 40px;
|
|
486
|
+
border-right: none;
|
|
487
|
+
flex-direction: column;
|
|
488
|
+
}
|
|
489
|
+
.app-info {
|
|
490
|
+
display: flex;
|
|
491
|
+
padding: 10px;
|
|
492
|
+
}
|
|
493
|
+
.app-info img {
|
|
494
|
+
width: 60px;
|
|
495
|
+
height: 60px;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.header-item {
|
|
499
|
+
font-size: 16px;
|
|
500
|
+
}
|
|
501
|
+
aside.active {
|
|
502
|
+
width: 100%;
|
|
503
|
+
z-index: 10000000;
|
|
504
|
+
}
|
|
505
|
+
aside:not(.active) {
|
|
506
|
+
display: none;
|
|
507
|
+
}
|
|
508
|
+
.container {
|
|
509
|
+
display: none;
|
|
510
|
+
}
|
|
511
|
+
.container.active {
|
|
512
|
+
display: block;
|
|
513
|
+
position: absolute;
|
|
514
|
+
z-index: 10000000;
|
|
515
|
+
width: 100%;
|
|
516
|
+
height: 100%;
|
|
517
|
+
}
|
|
518
|
+
/*
|
|
519
|
+
.grid-btns {
|
|
520
|
+
display: none;
|
|
521
|
+
}
|
|
522
|
+
*/
|
|
523
|
+
#menu {
|
|
524
|
+
display: none;
|
|
525
|
+
}
|
|
526
|
+
#menu-mobile {
|
|
527
|
+
display: flex;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
body.dark .header-item.cursor.header-top {
|
|
531
|
+
background: none !important;
|
|
532
|
+
}
|
|
533
|
+
.header-item.cursor.header-top {
|
|
534
|
+
background: none !important;
|
|
535
|
+
}
|
|
536
|
+
.header-item.header-top {
|
|
537
|
+
display: block;
|
|
538
|
+
}
|
|
211
539
|
</style>
|
|
212
540
|
<script src="/hotkeys.min.js"></script>
|
|
213
541
|
<script src="/sweetalert2.js"></script>
|
|
@@ -240,6 +568,10 @@ body.dark .browser-options-row {
|
|
|
240
568
|
<a class='home' href="/"><i class="fa-solid fa-house"></i></a>
|
|
241
569
|
<button class='btn2' id='back'><div><i class="fa-solid fa-chevron-left"></i></div><div>Prev</div></button>
|
|
242
570
|
<button class='btn2' id='forward'><div><i class="fa-solid fa-chevron-right"></i></div><div>Next</div></button>
|
|
571
|
+
<a class='btn2 create-new' id='create-new-folder'><div><i class='fa-solid fa-plus'></i></div><div>New</div></a>
|
|
572
|
+
<a class='btn2' id='explore' href="/?mode=explore"><div><i class="fa-solid fa-globe"></i></div><div>Discover</div></a>
|
|
573
|
+
<a href="/network" class='btn2'><div><i class="fa-solid fa-wifi"></i></div><div>Network</div></a>
|
|
574
|
+
<a href="/connect" class='btn2'><div><i class="fa-solid fa-circle-user"></i></div><div>Connect</div></a>
|
|
243
575
|
<div class='flexible'></div>
|
|
244
576
|
<div class='nav-btns'>
|
|
245
577
|
<a href="/network" class='btn2'><div><i class="fa-solid fa-wifi"></i></div><div>Network</div></a>
|
|
@@ -256,45 +588,68 @@ body.dark .browser-options-row {
|
|
|
256
588
|
</div>
|
|
257
589
|
</h1>
|
|
258
590
|
</header>
|
|
259
|
-
<
|
|
260
|
-
<
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
<
|
|
591
|
+
<div class='appcanvas'>
|
|
592
|
+
<aside class='active'>
|
|
593
|
+
<div class='header-top header-item'>
|
|
594
|
+
<div class='app-info'>
|
|
595
|
+
<div class='app-info-card'>
|
|
596
|
+
<% if (config.icon) { %>
|
|
597
|
+
<img src="<%=config.icon%>"/>
|
|
598
|
+
<% } else { %>
|
|
599
|
+
<i class="fa-regular fa-circle-dot"></i>
|
|
600
|
+
<% } %>
|
|
601
|
+
<div><%=config.title%></div>
|
|
602
|
+
<div class="folderpath"><%=config.web_path%></div>
|
|
270
603
|
</div>
|
|
271
604
|
</div>
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
605
|
+
</div>
|
|
606
|
+
</aside>
|
|
607
|
+
<main>
|
|
608
|
+
<!--
|
|
609
|
+
<div class='prototype-header'>
|
|
610
|
+
<div class='filepond-wrapper'>
|
|
611
|
+
<div class='avatar-field'>
|
|
612
|
+
<input id='new-folder-image' type="file" class="filepond" name="avatar" accept="image/png, image/jpeg, image/gif" />
|
|
275
613
|
</div>
|
|
276
|
-
<div class='folder-
|
|
277
|
-
<
|
|
278
|
-
|
|
614
|
+
<div class='folder-rows'>
|
|
615
|
+
<div class='folder-row'>
|
|
616
|
+
<label for='new-folder-path'>Folder Path</label>
|
|
617
|
+
<div class='field-row'>
|
|
618
|
+
<input id="new-folder-path" placeholder="Folder Path" autofocus />
|
|
619
|
+
</div>
|
|
620
|
+
</div>
|
|
621
|
+
<div class='folder-row'>
|
|
622
|
+
<label for='new-folder-title'>Title (optional)</label>
|
|
623
|
+
<input id="new-folder-title" placeholder="Enter the display name" />
|
|
624
|
+
</div>
|
|
625
|
+
<div class='folder-row'>
|
|
626
|
+
<label for='new-folder-description'>Description (optional)</label>
|
|
627
|
+
<textarea id="new-folder-description" placeholder="Enter the project description"></textarea>
|
|
628
|
+
</div>
|
|
279
629
|
</div>
|
|
280
630
|
</div>
|
|
631
|
+
<div class='footer'>
|
|
632
|
+
<button class='btn' id='create'>Create</button>
|
|
633
|
+
</div>
|
|
281
634
|
</div>
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
<div class='
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
635
|
+
-->
|
|
636
|
+
<div class='doc'>
|
|
637
|
+
<div class='meta'>
|
|
638
|
+
<img src="<%=icon%>">
|
|
639
|
+
<div class='meta-content'>
|
|
640
|
+
<h2><%=title%></h2>
|
|
641
|
+
<div class='meta-description'><%=description%></div>
|
|
642
|
+
<div class='meta-action'>
|
|
643
|
+
<a href="/prototype/run/<%=name%>?path=<%=path%>" class='btn'><i class="fa-solid fa-play"></i> Run</a>
|
|
644
|
+
</div>
|
|
645
|
+
</div>
|
|
292
646
|
</div>
|
|
647
|
+
<div id='readme'><%-readme%></div>
|
|
293
648
|
</div>
|
|
294
|
-
|
|
649
|
+
</main>
|
|
295
650
|
</div>
|
|
296
|
-
</main>
|
|
297
651
|
<script>
|
|
652
|
+
/*
|
|
298
653
|
let textareas = document.querySelectorAll("textarea")
|
|
299
654
|
for(let textarea of textareas) {
|
|
300
655
|
textarea.style.height = 'auto';
|
|
@@ -364,7 +719,7 @@ let pond = FilePond.create(
|
|
|
364
719
|
onprocessfile(error, file) {
|
|
365
720
|
console.log({ file })
|
|
366
721
|
if (!error) {
|
|
367
|
-
location.href = `/prototype/run/<%=prototype_path%>?
|
|
722
|
+
location.href = `/prototype/run/<%=prototype_path%>?path=${path}`
|
|
368
723
|
}
|
|
369
724
|
},
|
|
370
725
|
files: [
|
|
@@ -378,6 +733,7 @@ let pond = FilePond.create(
|
|
|
378
733
|
document.querySelector("#create").addEventListener("click", async (e) => {
|
|
379
734
|
pond.processFile()
|
|
380
735
|
})
|
|
736
|
+
*/
|
|
381
737
|
</script>
|
|
382
738
|
</body>
|
|
383
739
|
</html>
|