pinokiod 3.40.0 → 3.42.0
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/browser/index.js +3 -1
- package/kernel/api/cloudflare/index.js +3 -3
- package/kernel/api/index.js +187 -51
- package/kernel/api/loading/index.js +15 -0
- package/kernel/api/process/index.js +7 -0
- package/kernel/api/shell/index.js +0 -2
- package/kernel/bin/browserless.js +22 -0
- package/kernel/bin/caddy.js +36 -4
- package/kernel/bin/index.js +4 -1
- package/kernel/bin/setup.js +38 -5
- package/kernel/connect/backend.js +110 -0
- package/kernel/connect/config.js +171 -0
- package/kernel/connect/index.js +18 -7
- package/kernel/connect/providers/huggingface/index.js +98 -0
- package/kernel/connect/providers/x/index.js +0 -1
- package/kernel/environment.js +91 -19
- package/kernel/git.js +46 -3
- package/kernel/index.js +119 -39
- package/kernel/peer.js +40 -5
- package/kernel/plugin.js +3 -2
- package/kernel/procs.js +27 -20
- package/kernel/prototype.js +30 -16
- package/kernel/router/common.js +1 -1
- package/kernel/router/connector.js +1 -3
- package/kernel/router/index.js +38 -4
- package/kernel/router/localhost_home_router.js +5 -1
- package/kernel/router/localhost_port_router.js +27 -1
- package/kernel/router/localhost_static_router.js +93 -0
- package/kernel/router/localhost_variable_router.js +14 -9
- package/kernel/router/peer_peer_router.js +3 -0
- package/kernel/router/peer_static_router.js +43 -0
- package/kernel/router/peer_variable_router.js +15 -14
- package/kernel/router/processor.js +26 -1
- package/kernel/router/rewriter.js +59 -0
- package/kernel/scripts/git/commit +11 -1
- package/kernel/shell.js +8 -3
- package/kernel/util.js +65 -6
- package/package.json +2 -1
- package/server/index.js +1048 -970
- package/server/public/common.js +382 -1
- package/server/public/fscreator.js +0 -1
- package/server/public/loading.js +17 -0
- package/server/public/notifyinput.js +0 -1
- package/server/public/opener.js +4 -2
- package/server/public/style.css +310 -11
- package/server/socket.js +7 -1
- package/server/views/app.ejs +1747 -351
- package/server/views/columns.ejs +338 -0
- package/server/views/connect/huggingface.ejs +353 -0
- package/server/views/connect/index.ejs +410 -0
- package/server/views/connect/x.ejs +43 -9
- package/server/views/connect.ejs +709 -49
- package/server/views/container.ejs +357 -0
- package/server/views/d.ejs +251 -62
- package/server/views/download.ejs +54 -10
- package/server/views/editor.ejs +11 -0
- package/server/views/explore.ejs +40 -15
- package/server/views/file_explorer.ejs +25 -246
- package/server/views/form.ejs +44 -1
- package/server/views/frame.ejs +39 -1
- package/server/views/github.ejs +48 -11
- package/server/views/help.ejs +48 -7
- package/server/views/index.ejs +119 -58
- package/server/views/index2.ejs +3 -4
- package/server/views/init/index.ejs +651 -197
- package/server/views/install.ejs +1 -1
- package/server/views/mini.ejs +47 -18
- package/server/views/net.ejs +199 -67
- package/server/views/network.ejs +229 -93
- package/server/views/network2.ejs +3 -4
- package/server/views/old_network.ejs +3 -3
- package/server/views/prototype/index.ejs +48 -11
- package/server/views/review.ejs +1005 -0
- package/server/views/rows.ejs +341 -0
- package/server/views/screenshots.ejs +1020 -0
- package/server/views/settings.ejs +160 -23
- package/server/views/setup.ejs +49 -7
- package/server/views/setup_home.ejs +43 -10
- package/server/views/shell.ejs +7 -1
- package/server/views/start.ejs +14 -9
- package/server/views/terminal.ejs +13 -2
- package/server/views/tools.ejs +1015 -0
package/server/public/style.css
CHANGED
|
@@ -47,7 +47,10 @@
|
|
|
47
47
|
--light-btn-bg: #7f5bf3;
|
|
48
48
|
--light-btn-color: white;
|
|
49
49
|
|
|
50
|
+
--dark-btn-bg: rgba(255,255,255,0.07);
|
|
51
|
+
/*
|
|
50
52
|
--dark-btn-bg: rgba(0,0,0,0.8);
|
|
53
|
+
*/
|
|
51
54
|
/*
|
|
52
55
|
--dark-btn-color: #b7a1ff;
|
|
53
56
|
*/
|
|
@@ -154,17 +157,23 @@ body.dark .dynamic.selected {
|
|
|
154
157
|
background: rgba(0,0,0,0.05);
|
|
155
158
|
*/
|
|
156
159
|
}
|
|
157
|
-
.submenu {
|
|
158
|
-
|
|
160
|
+
aside .tab.submenu {
|
|
161
|
+
padding-left: 25px;
|
|
159
162
|
box-sizing: border-box;
|
|
160
163
|
}
|
|
164
|
+
#genlog, #downloadlogs {
|
|
165
|
+
cursor: pointer;
|
|
166
|
+
}
|
|
161
167
|
|
|
162
168
|
.url-bar {
|
|
163
169
|
font-family: verdana;
|
|
164
170
|
font-size: 12px;
|
|
165
|
-
padding: 0
|
|
171
|
+
padding: 0 20px;
|
|
166
172
|
font-weight: normal;
|
|
167
173
|
flex-grow: 1;
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
justify-content: center;
|
|
168
177
|
}
|
|
169
178
|
.url-bar .http-url:hover {
|
|
170
179
|
color: royalblue;
|
|
@@ -208,7 +217,7 @@ body.dark .loader-container {
|
|
|
208
217
|
background: rgba(0,0,0,0.3) !important;
|
|
209
218
|
}
|
|
210
219
|
.loader-dialog {
|
|
211
|
-
padding:
|
|
220
|
+
padding: 10px !important;
|
|
212
221
|
}
|
|
213
222
|
body.dark .loader-popup {
|
|
214
223
|
background: rgba(255,255,255,0.07) !important;
|
|
@@ -218,7 +227,9 @@ body.dark .loader-popup {
|
|
|
218
227
|
font-size: 12px;
|
|
219
228
|
letter-spacing: 1px;
|
|
220
229
|
background: rgba(0,0,0,0.6);
|
|
230
|
+
/*
|
|
221
231
|
width: 200px !important;
|
|
232
|
+
*/
|
|
222
233
|
border-radius: 50px !important;
|
|
223
234
|
color: white;
|
|
224
235
|
}
|
|
@@ -737,7 +748,10 @@ form.search {
|
|
|
737
748
|
gap: 5px;
|
|
738
749
|
}
|
|
739
750
|
.btn-tab .btn {
|
|
751
|
+
display: flex;
|
|
740
752
|
text-align: center;
|
|
753
|
+
align-items: center;
|
|
754
|
+
gap: 5px;
|
|
741
755
|
box-sizing: border-box;
|
|
742
756
|
}
|
|
743
757
|
body.dark form.search input[type=search] {
|
|
@@ -897,6 +911,7 @@ body.columns .containers {
|
|
|
897
911
|
.menu-btns {
|
|
898
912
|
display: flex;
|
|
899
913
|
align-items: flex-start;
|
|
914
|
+
flex-wrap: wrap;
|
|
900
915
|
}
|
|
901
916
|
.terminal-container {
|
|
902
917
|
/*
|
|
@@ -1073,6 +1088,9 @@ header small:empty {
|
|
|
1073
1088
|
}
|
|
1074
1089
|
header h1 {
|
|
1075
1090
|
display: flex;
|
|
1091
|
+
/*
|
|
1092
|
+
align-items: stretch;
|
|
1093
|
+
*/
|
|
1076
1094
|
align-items: center;
|
|
1077
1095
|
flex-wrap: wrap;
|
|
1078
1096
|
}
|
|
@@ -1322,6 +1340,7 @@ body.dark .line .avatar i {
|
|
|
1322
1340
|
font-size: 13px;
|
|
1323
1341
|
opacity: 0.8;
|
|
1324
1342
|
margin-bottom: 5px;
|
|
1343
|
+
word-break: break-word;
|
|
1325
1344
|
}
|
|
1326
1345
|
body.dark a.line {
|
|
1327
1346
|
color: var(--dark-color);
|
|
@@ -1391,6 +1410,7 @@ body.dark .line.align-top h3 .col .uri {
|
|
|
1391
1410
|
color: rgba(0,0,0,0.4);
|
|
1392
1411
|
font-size: 12px;
|
|
1393
1412
|
font-family: verdana;
|
|
1413
|
+
word-break: break-word;
|
|
1394
1414
|
}
|
|
1395
1415
|
body.dark .line.align-top h3 .col .title a {
|
|
1396
1416
|
color: var(--dark-link-color);
|
|
@@ -1444,6 +1464,8 @@ body.dark .line.align-top h3 .col .title i {
|
|
|
1444
1464
|
.line.align-top h3 .col .btn {
|
|
1445
1465
|
padding: 4px 10px;
|
|
1446
1466
|
margin-right: 5px;
|
|
1467
|
+
margin-bottom: 5px;
|
|
1468
|
+
word-break: break-word;
|
|
1447
1469
|
}
|
|
1448
1470
|
body.dark .line.align-top h3 .col .btn.label {
|
|
1449
1471
|
background: rgba(255,255,255,0.05);
|
|
@@ -1502,6 +1524,12 @@ body.dark .line.align-top h3 .col .btn.label {
|
|
|
1502
1524
|
button {
|
|
1503
1525
|
cursor: pointer;
|
|
1504
1526
|
}
|
|
1527
|
+
body.dark .btn-tab .btn, .btn-tab .btn {
|
|
1528
|
+
/*
|
|
1529
|
+
background: #3c5bb9 !important;
|
|
1530
|
+
background: royalblue !important;
|
|
1531
|
+
*/
|
|
1532
|
+
}
|
|
1505
1533
|
body.dark .btn {
|
|
1506
1534
|
color: var(--dark-btn-color);
|
|
1507
1535
|
/*
|
|
@@ -1929,6 +1957,7 @@ body.dark .browser-options {
|
|
|
1929
1957
|
*/
|
|
1930
1958
|
}
|
|
1931
1959
|
.btn2 {
|
|
1960
|
+
padding: 0 10px;
|
|
1932
1961
|
background: none;
|
|
1933
1962
|
font-weight: normal;
|
|
1934
1963
|
/*
|
|
@@ -1937,7 +1966,6 @@ body.dark .browser-options {
|
|
|
1937
1966
|
color: var(--light-color);
|
|
1938
1967
|
text-transform: uppercase;
|
|
1939
1968
|
border-radius: 5px;
|
|
1940
|
-
padding: 0px 5px;
|
|
1941
1969
|
text-align: center;
|
|
1942
1970
|
|
|
1943
1971
|
cursor: pointer;
|
|
@@ -1947,7 +1975,12 @@ body.dark .browser-options {
|
|
|
1947
1975
|
/*
|
|
1948
1976
|
font-weight: bold;
|
|
1949
1977
|
*/
|
|
1978
|
+
/*
|
|
1950
1979
|
display: inline-block;
|
|
1980
|
+
*/
|
|
1981
|
+
display: flex;
|
|
1982
|
+
flex-direction: column;
|
|
1983
|
+
justify-content: center;
|
|
1951
1984
|
|
|
1952
1985
|
text-rendering: auto;
|
|
1953
1986
|
letter-spacing: normal;
|
|
@@ -1963,10 +1996,12 @@ body.dark .browser-options {
|
|
|
1963
1996
|
.btn2 i {
|
|
1964
1997
|
margin: 2px 0;
|
|
1965
1998
|
display: inline-block;
|
|
1966
|
-
font-size:
|
|
1999
|
+
font-size: 14px;
|
|
1967
2000
|
}
|
|
1968
2001
|
.nav-btns {
|
|
2002
|
+
/*
|
|
1969
2003
|
padding: 10px 0;
|
|
2004
|
+
*/
|
|
1970
2005
|
display: flex;
|
|
1971
2006
|
}
|
|
1972
2007
|
/*
|
|
@@ -2050,14 +2085,12 @@ footer.status {
|
|
|
2050
2085
|
background: black;
|
|
2051
2086
|
}
|
|
2052
2087
|
*/
|
|
2053
|
-
body.dark .btn.red {
|
|
2054
|
-
color: rgba(230,0,0,1) !important;
|
|
2055
|
-
border: 1px solid rgba(210,0,0,0.7) !important;
|
|
2056
|
-
}
|
|
2057
2088
|
.btn.red {
|
|
2058
|
-
color:
|
|
2089
|
+
color: #bf411d !important;
|
|
2090
|
+
/*
|
|
2059
2091
|
border: 1px solid rgba(210,0,0,0.3);
|
|
2060
2092
|
background: none;
|
|
2093
|
+
*/
|
|
2061
2094
|
}
|
|
2062
2095
|
|
|
2063
2096
|
#error-screen {
|
|
@@ -2186,3 +2219,269 @@ mark{
|
|
|
2186
2219
|
padding: unset !important;
|
|
2187
2220
|
font-size: unset !important;
|
|
2188
2221
|
}
|
|
2222
|
+
|
|
2223
|
+
|
|
2224
|
+
.dropdown {
|
|
2225
|
+
z-index: 1000000000;
|
|
2226
|
+
position: relative;
|
|
2227
|
+
padding: 0 !important;
|
|
2228
|
+
}
|
|
2229
|
+
.dropdown .btn2 {
|
|
2230
|
+
height: 100%;
|
|
2231
|
+
}
|
|
2232
|
+
/* Dropdown content */
|
|
2233
|
+
body.dark .dropdown-content {
|
|
2234
|
+
border: none;
|
|
2235
|
+
}
|
|
2236
|
+
body.dark .dropdown .btn2 {
|
|
2237
|
+
background: none;
|
|
2238
|
+
color: white;
|
|
2239
|
+
}
|
|
2240
|
+
body.dark .dropdown-content .btn2 {
|
|
2241
|
+
background: rgba(0,0,0,0.85);
|
|
2242
|
+
color: white;
|
|
2243
|
+
}
|
|
2244
|
+
.dropdown-content {
|
|
2245
|
+
z-index: 1000000000;
|
|
2246
|
+
display: none;
|
|
2247
|
+
position: absolute;
|
|
2248
|
+
background: #fff;
|
|
2249
|
+
min-width: 200px;
|
|
2250
|
+
box-shadow: 0 8px 16px rgba(0,0,0,0.2);
|
|
2251
|
+
border-radius: 4px;
|
|
2252
|
+
z-index: 1000;
|
|
2253
|
+
top: 100%;
|
|
2254
|
+
right: 0;
|
|
2255
|
+
border: 1px solid #dee2e6;
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
.dropdown-content.show {
|
|
2259
|
+
display: block;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
.dropdown-content .btn2 div {
|
|
2263
|
+
display: flex;
|
|
2264
|
+
align-items: center;
|
|
2265
|
+
gap: 5px;
|
|
2266
|
+
}
|
|
2267
|
+
.dropdown-content .btn2 {
|
|
2268
|
+
width: 100%;
|
|
2269
|
+
text-align: left;
|
|
2270
|
+
border: none;
|
|
2271
|
+
border-radius: 0;
|
|
2272
|
+
padding: 12px 16px;
|
|
2273
|
+
margin: 0;
|
|
2274
|
+
background: transparent;
|
|
2275
|
+
color: #495057;
|
|
2276
|
+
min-width: unset;
|
|
2277
|
+
height: auto;
|
|
2278
|
+
justify-content: flex-start;
|
|
2279
|
+
box-sizing: border-box;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
.dropdown-content .btn2:first-child {
|
|
2283
|
+
border-radius: 4px 4px 0 0;
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
.dropdown-content .btn2:last-child {
|
|
2287
|
+
border-radius: 0 0 4px 4px;
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
.dropdown-content .btn2:hover {
|
|
2291
|
+
background: #f8f9fa;
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
.dropdown-content .btn2 div {
|
|
2295
|
+
justify-content: flex-start;
|
|
2296
|
+
width: 100%;
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
/* Active state for dropdown trigger */
|
|
2300
|
+
.dropdown.active .btn2 {
|
|
2301
|
+
background: #e9ecef;
|
|
2302
|
+
border-color: #adb5bd;
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
body.dark .mode-selector .btn2.selected {
|
|
2306
|
+
background: royalblue;
|
|
2307
|
+
color: white;
|
|
2308
|
+
}
|
|
2309
|
+
.mode-selector .btn2.selected {
|
|
2310
|
+
background: royalblue;
|
|
2311
|
+
color: white;
|
|
2312
|
+
border-radius: 4px;
|
|
2313
|
+
}
|
|
2314
|
+
.mode-selector {
|
|
2315
|
+
display: flex;
|
|
2316
|
+
align-items: center;
|
|
2317
|
+
justify-content: center;
|
|
2318
|
+
gap: 3px;
|
|
2319
|
+
flex-grow: 1;
|
|
2320
|
+
/*
|
|
2321
|
+
background: rgba(0,0,0,0.04);
|
|
2322
|
+
*/
|
|
2323
|
+
padding: 5px;
|
|
2324
|
+
margin: 0 10px;
|
|
2325
|
+
border-radius: 10px;
|
|
2326
|
+
}
|
|
2327
|
+
.mode-selector .btn2 {
|
|
2328
|
+
display: flex;
|
|
2329
|
+
align-items: center;
|
|
2330
|
+
flex-direction: row;
|
|
2331
|
+
justify-content: center;
|
|
2332
|
+
padding: 5px 10px;
|
|
2333
|
+
box-sizing: border-box;
|
|
2334
|
+
width: 100px;
|
|
2335
|
+
gap: 5px;
|
|
2336
|
+
border-radius: 5px;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
.urlbar {
|
|
2340
|
+
flex-grow: 1;
|
|
2341
|
+
margin: 0 20px;
|
|
2342
|
+
}
|
|
2343
|
+
body.dark .urlbar input[type=url] {
|
|
2344
|
+
background: rgba(255,255,255,0.1);
|
|
2345
|
+
color: white;
|
|
2346
|
+
}
|
|
2347
|
+
.urlbar input[type=url] {
|
|
2348
|
+
background: rgba(0,0,0,0.05);
|
|
2349
|
+
border-radius: 6px;
|
|
2350
|
+
border: none;
|
|
2351
|
+
padding: 10px;
|
|
2352
|
+
width: 100%;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
|
|
2356
|
+
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
body.minimized {
|
|
2360
|
+
display: flex;
|
|
2361
|
+
flex-direction: row;
|
|
2362
|
+
}
|
|
2363
|
+
body.minimized header .dropdown-content {
|
|
2364
|
+
position: relative;
|
|
2365
|
+
min-width: unset;
|
|
2366
|
+
top: unset;
|
|
2367
|
+
left: unset;
|
|
2368
|
+
}
|
|
2369
|
+
body.minimized header h1 #close-window {
|
|
2370
|
+
order: 0;
|
|
2371
|
+
}
|
|
2372
|
+
body.minimized header .home {
|
|
2373
|
+
display: block;
|
|
2374
|
+
}
|
|
2375
|
+
body.minimized header {
|
|
2376
|
+
padding: 10px 0 0;
|
|
2377
|
+
overflow: auto;
|
|
2378
|
+
flex-shrink: 0;
|
|
2379
|
+
}
|
|
2380
|
+
body.minimized header h1 .urlbar {
|
|
2381
|
+
display: none;
|
|
2382
|
+
}
|
|
2383
|
+
body.minimized header h1 .btn2 {
|
|
2384
|
+
padding: 10px;
|
|
2385
|
+
width: 100%;
|
|
2386
|
+
box-sizing: border-box;
|
|
2387
|
+
}
|
|
2388
|
+
body.minimized header h1 {
|
|
2389
|
+
height: 100%;
|
|
2390
|
+
overflow: auto;
|
|
2391
|
+
display: block;
|
|
2392
|
+
}
|
|
2393
|
+
body.minimized .mode-selector {
|
|
2394
|
+
flex-direction: column;
|
|
2395
|
+
padding: 0;
|
|
2396
|
+
margin: 0;
|
|
2397
|
+
border-radius: 0;
|
|
2398
|
+
align-items: stretch;
|
|
2399
|
+
gap: 0;
|
|
2400
|
+
}
|
|
2401
|
+
body.minimized .mode-selector .btn2 {
|
|
2402
|
+
width: unset;
|
|
2403
|
+
padding: 10px;
|
|
2404
|
+
border-radius: 0 !important;
|
|
2405
|
+
}
|
|
2406
|
+
body.minimized .mode-selector .caption {
|
|
2407
|
+
display: none;
|
|
2408
|
+
}
|
|
2409
|
+
/*
|
|
2410
|
+
body.minimized .appcanvas, body.minimized main {
|
|
2411
|
+
*/
|
|
2412
|
+
body.minimized .appcanvas {
|
|
2413
|
+
padding-top: 20px;
|
|
2414
|
+
}
|
|
2415
|
+
body.minimized main .container {
|
|
2416
|
+
margin-left: 0;
|
|
2417
|
+
}
|
|
2418
|
+
body.minimized .app-icon {
|
|
2419
|
+
display: block;
|
|
2420
|
+
}
|
|
2421
|
+
body.minimized aside {
|
|
2422
|
+
display: none;
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
@media only screen and (max-width: 800px) {
|
|
2426
|
+
header .dropdown-content {
|
|
2427
|
+
position: relative;
|
|
2428
|
+
min-width: unset;
|
|
2429
|
+
top: unset;
|
|
2430
|
+
left: unset;
|
|
2431
|
+
}
|
|
2432
|
+
header h1 #close-window {
|
|
2433
|
+
order: 0;
|
|
2434
|
+
}
|
|
2435
|
+
header {
|
|
2436
|
+
padding: 10px 0 0;
|
|
2437
|
+
overflow: auto;
|
|
2438
|
+
flex-shrink: 0;
|
|
2439
|
+
}
|
|
2440
|
+
header .home {
|
|
2441
|
+
display: block;
|
|
2442
|
+
}
|
|
2443
|
+
header h1 .btn2 {
|
|
2444
|
+
padding: 10px;
|
|
2445
|
+
width: 100%;
|
|
2446
|
+
box-sizing: border-box;
|
|
2447
|
+
}
|
|
2448
|
+
header h1 {
|
|
2449
|
+
height: 100%;
|
|
2450
|
+
overflow: auto;
|
|
2451
|
+
display: block;
|
|
2452
|
+
}
|
|
2453
|
+
header h1 .urlbar {
|
|
2454
|
+
display: none;
|
|
2455
|
+
}
|
|
2456
|
+
.mode-selector {
|
|
2457
|
+
flex-direction: column;
|
|
2458
|
+
padding: 0;
|
|
2459
|
+
margin: 0;
|
|
2460
|
+
border-radius: 0;
|
|
2461
|
+
align-items: stretch;
|
|
2462
|
+
gap: 0;
|
|
2463
|
+
}
|
|
2464
|
+
.mode-selector .btn2 {
|
|
2465
|
+
width: unset;
|
|
2466
|
+
padding: 10px;
|
|
2467
|
+
border-radius: 0 !important;
|
|
2468
|
+
}
|
|
2469
|
+
.mode-selector .caption {
|
|
2470
|
+
display: none;
|
|
2471
|
+
}
|
|
2472
|
+
/*
|
|
2473
|
+
.appcanvas, main {
|
|
2474
|
+
*/
|
|
2475
|
+
.appcanvas {
|
|
2476
|
+
padding-top: 20px;
|
|
2477
|
+
}
|
|
2478
|
+
main .container {
|
|
2479
|
+
margin-left: 0;
|
|
2480
|
+
}
|
|
2481
|
+
.app-icon {
|
|
2482
|
+
display: block;
|
|
2483
|
+
}
|
|
2484
|
+
aside {
|
|
2485
|
+
display: none;
|
|
2486
|
+
}
|
|
2487
|
+
}
|
package/server/socket.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const WebSocket = require('ws');
|
|
2
2
|
const path = require('path')
|
|
3
3
|
const Util = require("../kernel/util")
|
|
4
|
+
const Environment = require("../kernel/environment")
|
|
4
5
|
class Socket {
|
|
5
6
|
constructor(parent) {
|
|
6
7
|
this.buffer = {}
|
|
@@ -323,10 +324,11 @@ class Socket {
|
|
|
323
324
|
*/
|
|
324
325
|
let paramStr = m[0]
|
|
325
326
|
let cwd = new URL("http://localhost" + paramStr).searchParams.get("cwd")
|
|
327
|
+
let root = await Environment.get_root({ path: cwd }, this.parent.kernel)
|
|
328
|
+
cwd = root.root
|
|
326
329
|
let session = this.sessions[key]
|
|
327
330
|
let logpath = path.resolve(cwd, "logs/dev", path.parse(relative).base)
|
|
328
331
|
await Util.log(logpath, buf, session)
|
|
329
|
-
|
|
330
332
|
}
|
|
331
333
|
} else if (relative.startsWith("api")) {
|
|
332
334
|
// api
|
|
@@ -338,6 +340,8 @@ class Socket {
|
|
|
338
340
|
*/
|
|
339
341
|
let filepath_chunks = relative.split(path.sep).slice(2)
|
|
340
342
|
let cwd = this.parent.kernel.path(...relative.split(path.sep).slice(0, 2))
|
|
343
|
+
let root = await Environment.get_root({ path: cwd }, this.parent.kernel)
|
|
344
|
+
cwd = root.root
|
|
341
345
|
let session = this.sessions[key]
|
|
342
346
|
let logpath = path.resolve(cwd, "logs/api", ...filepath_chunks)
|
|
343
347
|
await Util.log(logpath, buf, session)
|
|
@@ -361,6 +365,8 @@ class Socket {
|
|
|
361
365
|
let native_path_exists = await new Promise(r=>fs.access(native_path, fs.constants.F_OK, e => r(!e)))
|
|
362
366
|
if (native_path_exists) {
|
|
363
367
|
let cwd = native_path
|
|
368
|
+
let root = await Environment.get_root({ path: cwd }, this.parent.kernel)
|
|
369
|
+
cwd = root.root
|
|
364
370
|
let session = this.sessions[key]
|
|
365
371
|
let logpath = path.resolve(cwd, "logs/shell")
|
|
366
372
|
await Util.log(logpath, buf, session)
|