pinokiod 3.18.9 → 3.19.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/index.js +0 -1
- package/kernel/prototype.js +34 -35
- package/kernel/shell.js +0 -1
- package/package.json +2 -2
- package/server/index.js +6 -7
- package/server/views/prototype/init.ejs +27 -11
- package/kernel/proto/PINOKIO.md +0 -6886
- package/kernel/proto/cli/icon.png +0 -0
- package/kernel/proto/cli/installable/README.md +0 -6
- package/kernel/proto/cli/installable/index.js +0 -54
- package/kernel/proto/cli/installable/static/AGENTS.md +0 -24
- package/kernel/proto/cli/installable/static/gitignore +0 -10
- package/kernel/proto/cli/installable/static/pinokio.js +0 -34
- package/kernel/proto/cli/instant/README.md +0 -5
- package/kernel/proto/cli/instant/index.js +0 -36
- package/kernel/proto/cli/instant/static/AGENTS.md +0 -24
- package/kernel/proto/cli/instant/static/gitignore +0 -10
- package/kernel/proto/cli/instant/static/pinokio.js +0 -11
- package/kernel/proto/documentation/new/README.md +0 -9
- package/kernel/proto/documentation/new/icon.png +0 -0
- package/kernel/proto/documentation/new/index.js +0 -39
- package/kernel/proto/documentation/new/static/AGENTS.md +0 -24
- package/kernel/proto/documentation/new/static/docs/docsify.min.js +0 -1
- package/kernel/proto/documentation/new/static/docs/index.html +0 -75
- package/kernel/proto/documentation/new/static/docs/style.css +0 -212
- package/kernel/proto/documentation/new/static/docs/vue.css +0 -1
- package/kernel/proto/documentation/new/static/gitignore +0 -10
- package/kernel/proto/documentation/new/static/pinokio.js +0 -28
- package/kernel/proto/documentation/new/static/start.js +0 -54
- package/kernel/proto/empty/clone/README.md +0 -14
- package/kernel/proto/empty/clone/index.js +0 -18
- package/kernel/proto/empty/clone/static/AGENTS.md +0 -28
- package/kernel/proto/empty/clone/static/gitignore +0 -11
- package/kernel/proto/empty/clone/static/install.js +0 -13
- package/kernel/proto/empty/clone/static/pinokio.js +0 -76
- package/kernel/proto/empty/clone/static/pinokio.json +0 -3
- package/kernel/proto/empty/clone/static/reset.js +0 -8
- package/kernel/proto/empty/clone/static/start.js +0 -35
- package/kernel/proto/empty/clone/static/update.js +0 -23
- package/kernel/proto/empty/icon.png +0 -0
- package/kernel/proto/empty/new/README.md +0 -14
- package/kernel/proto/empty/new/index.js +0 -18
- package/kernel/proto/empty/new/static/AGENTS.md +0 -28
- package/kernel/proto/empty/new/static/app/.gitkeep +0 -0
- package/kernel/proto/empty/new/static/gitignore +0 -10
- package/kernel/proto/empty/new/static/install.js +0 -13
- package/kernel/proto/empty/new/static/pinokio.js +0 -76
- package/kernel/proto/empty/new/static/pinokio.json +0 -3
- package/kernel/proto/empty/new/static/reset.js +0 -8
- package/kernel/proto/empty/new/static/start.js +0 -35
- package/kernel/proto/empty/new/static/update.js +0 -14
- package/kernel/proto/nodejs/clone/README.md +0 -16
- package/kernel/proto/nodejs/clone/index.js +0 -87
- package/kernel/proto/nodejs/clone/static/AGENTS.md +0 -27
- package/kernel/proto/nodejs/clone/static/gitignore +0 -11
- package/kernel/proto/nodejs/clone/static/pinokio.js +0 -77
- package/kernel/proto/nodejs/clone/static/reset.js +0 -8
- package/kernel/proto/nodejs/clone/static/update.js +0 -14
- package/kernel/proto/nodejs/icon.png +0 -0
- package/kernel/proto/nodejs/new/README.md +0 -15
- package/kernel/proto/nodejs/new/index.js +0 -82
- package/kernel/proto/nodejs/new/static/AGENTS.md +0 -27
- package/kernel/proto/nodejs/new/static/app/index.js +0 -10
- package/kernel/proto/nodejs/new/static/app/package.json +0 -16
- package/kernel/proto/nodejs/new/static/gitignore +0 -10
- package/kernel/proto/nodejs/new/static/pinokio.js +0 -84
- package/kernel/proto/nodejs/new/static/reset.js +0 -8
- package/kernel/proto/nodejs/new/static/update.js +0 -14
- package/kernel/proto/pinokio.js +0 -64
- package/kernel/proto/python/clone/README.md +0 -11
- package/kernel/proto/python/clone/form.png +0 -0
- package/kernel/proto/python/clone/index.js +0 -161
- package/kernel/proto/python/clone/static/AGENTS.md +0 -30
- package/kernel/proto/python/clone/static/gitignore +0 -11
- package/kernel/proto/python/clone/static/link.js +0 -10
- package/kernel/proto/python/clone/static/pinokio.js +0 -85
- package/kernel/proto/python/clone/static/reset.js +0 -8
- package/kernel/proto/python/clone/static/torch.js +0 -117
- package/kernel/proto/python/clone/static/update.js +0 -9
- package/kernel/proto/python/icon.png +0 -0
- package/kernel/proto/python/new/README.md +0 -18
- package/kernel/proto/python/new/index.js +0 -128
- package/kernel/proto/python/new/install_with_torch.js +0 -29
- package/kernel/proto/python/new/static/AGENTS.md +0 -27
- package/kernel/proto/python/new/static/app/app.py +0 -12
- package/kernel/proto/python/new/static/app/requirements.txt +0 -1
- package/kernel/proto/python/new/static/gitignore +0 -10
- package/kernel/proto/python/new/static/link.js +0 -10
- package/kernel/proto/python/new/static/pinokio.js +0 -84
- package/kernel/proto/python/new/static/reset.js +0 -8
- package/kernel/proto/python/new/static/torch.js +0 -117
- package/kernel/proto/python/new/static/update.js +0 -8
package/kernel/api/index.js
CHANGED
package/kernel/prototype.js
CHANGED
|
@@ -18,52 +18,51 @@ class Proto {
|
|
|
18
18
|
await fs.promises.mkdir(this.kernel.path("prototype"), { recursive: true }).catch((e) => { })
|
|
19
19
|
await this.kernel.exec({
|
|
20
20
|
//message: "git clone https://github.com/peanutcocktail/prototype system",
|
|
21
|
-
message: "git clone https://github.com/pinokiocomputer/prototype system",
|
|
21
|
+
//message: "git clone https://github.com/pinokiocomputer/prototype system",
|
|
22
|
+
message: "git clone https://github.com/pinokiocomputer/proto system",
|
|
22
23
|
path: this.kernel.path("prototype")
|
|
23
24
|
}, (e) => {
|
|
24
25
|
process.stdout.write(e.raw)
|
|
25
26
|
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (this.config && this.config.menu) {
|
|
33
|
-
this.config.menu.push({
|
|
34
|
-
icon: "fa-solid fa-rotate",
|
|
35
|
-
text: "Update",
|
|
36
|
-
shell: {
|
|
37
|
-
message: "git pull",
|
|
38
|
-
path: this.kernel.path("prototype/system")
|
|
39
|
-
}
|
|
27
|
+
await this.kernel.download({
|
|
28
|
+
uri: "https://raw.githubusercontent.com/pinokiocomputer/home/refs/heads/main/docs/README.md",
|
|
29
|
+
path: this.kernel.path("prototype"),
|
|
30
|
+
filename: "PINOKIO.md"
|
|
31
|
+
}, (e) => {
|
|
32
|
+
process.stdout.write(e.raw)
|
|
40
33
|
})
|
|
41
34
|
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async reset() {
|
|
38
|
+
await fs.promises.rm(this.kernel.path("prototype"), { recursive: true })
|
|
39
|
+
}
|
|
40
|
+
async create(req, ondata) {
|
|
41
|
+
console.log("proto.create", req)
|
|
42
|
+
try {
|
|
43
|
+
let projectType = req.params.projectType
|
|
44
|
+
let startType = req.params.cliType || req.params.startType
|
|
45
|
+
console.log({ projectType, startType })
|
|
42
46
|
|
|
47
|
+
let cwd = req.cwd
|
|
48
|
+
let name = req.name
|
|
49
|
+
let payload = {}
|
|
50
|
+
payload.cwd = path.resolve(cwd, name)
|
|
51
|
+
payload.input = req.params
|
|
43
52
|
|
|
53
|
+
let mod_path = this.kernel.path("prototype/system", projectType, startType)
|
|
54
|
+
let mod = await this.kernel.require(mod_path)
|
|
44
55
|
|
|
56
|
+
await mod(payload, ondata, this.kernel)
|
|
45
57
|
|
|
58
|
+
// copy readme
|
|
59
|
+
let readme_path = this.kernel.path("prototype/PINOKIO.md")
|
|
60
|
+
await fs.promises.cp(readme_path, path.resolve(cwd, name, "PINOKIO.md"))
|
|
46
61
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// let pinokiojs = path.resolve(prototype_dir, prototype_path)
|
|
52
|
-
// let config = await this.kernel.require(pinokiojs)
|
|
53
|
-
// if (config && config.run) {
|
|
54
|
-
// if (config.icon) {
|
|
55
|
-
// config.icon = "/prototype/" + proto + "/" + config.icon
|
|
56
|
-
// } else {
|
|
57
|
-
// config.icon === "/pinokio-black.png"
|
|
58
|
-
// }
|
|
59
|
-
// let c = {
|
|
60
|
-
// id: proto,
|
|
61
|
-
// ...config
|
|
62
|
-
// }
|
|
63
|
-
// this.items.push(c)
|
|
64
|
-
// this.kv[proto] = c
|
|
65
|
-
// }
|
|
66
|
-
// }
|
|
62
|
+
return { success: "/p/" + name }
|
|
63
|
+
} catch (e) {
|
|
64
|
+
console.log("ERROR", e)
|
|
65
|
+
return { error: e.stack }
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
async readme(proto) {
|
package/kernel/shell.js
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinokiod",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"download_readme": "wget -O kernel/proto/PINOKIO.md https://raw.githubusercontent.com/pinokiocomputer/home/refs/heads/main/docs/README.md",
|
|
8
|
-
"start": "
|
|
8
|
+
"start": "node script/index"
|
|
9
9
|
},
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "MIT",
|
package/server/index.js
CHANGED
|
@@ -562,9 +562,6 @@ class Server {
|
|
|
562
562
|
if (!this.kernel.proto.config) {
|
|
563
563
|
await this.kernel.proto.init()
|
|
564
564
|
}
|
|
565
|
-
// if (!this.kernel.plugin.config) {
|
|
566
|
-
// await this.kernel.plugin.init()
|
|
567
|
-
// }
|
|
568
565
|
res.render("app", result)
|
|
569
566
|
}
|
|
570
567
|
getVariationUrls(req) {
|
|
@@ -1934,7 +1931,6 @@ class Server {
|
|
|
1934
1931
|
if (config.menu[i].popout) {
|
|
1935
1932
|
config.menu[i].target = "_blank"
|
|
1936
1933
|
} else {
|
|
1937
|
-
console.log("config.menu", config.menu)
|
|
1938
1934
|
config.menu[i].target = "@" + (config.menu[i].id || config.menu[i].src)
|
|
1939
1935
|
}
|
|
1940
1936
|
|
|
@@ -2586,6 +2582,9 @@ class Server {
|
|
|
2586
2582
|
path.resolve(__dirname, "..", "kernel", "gitconfig_template"),
|
|
2587
2583
|
gitconfig
|
|
2588
2584
|
)
|
|
2585
|
+
|
|
2586
|
+
let prototype_path = path.resolve(home, "prototype")
|
|
2587
|
+
await fse.remove(prototype_path)
|
|
2589
2588
|
|
|
2590
2589
|
|
|
2591
2590
|
console.log("[TRY] Updating to the new version")
|
|
@@ -2738,9 +2737,9 @@ class Server {
|
|
|
2738
2737
|
// return
|
|
2739
2738
|
// }
|
|
2740
2739
|
|
|
2741
|
-
if (!this.kernel.proto.config) {
|
|
2742
|
-
await this.kernel.proto.init()
|
|
2743
|
-
}
|
|
2740
|
+
// if (!this.kernel.proto.config) {
|
|
2741
|
+
// await this.kernel.proto.init()
|
|
2742
|
+
// }
|
|
2744
2743
|
if (!this.kernel.plugin.config) {
|
|
2745
2744
|
await this.kernel.plugin.init()
|
|
2746
2745
|
}
|
|
@@ -22,7 +22,14 @@
|
|
|
22
22
|
padding: 0;
|
|
23
23
|
box-sizing: border-box;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
img.appicon {
|
|
26
|
+
width: 40px;
|
|
27
|
+
height: 40px;
|
|
28
|
+
margin-right: 10px;
|
|
29
|
+
padding: 5px;
|
|
30
|
+
border-radius: 20px;
|
|
31
|
+
background: white;
|
|
32
|
+
}
|
|
26
33
|
.container {
|
|
27
34
|
max-width: 800px;
|
|
28
35
|
margin: 0 auto;
|
|
@@ -42,6 +49,7 @@ h4 {
|
|
|
42
49
|
font-size: 15px;
|
|
43
50
|
letter-spacing: 0px;
|
|
44
51
|
margin-bottom: 5px;
|
|
52
|
+
margin-top: 10px;
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
h2 {
|
|
@@ -85,7 +93,7 @@ body.dark .progress-bar .step.active {
|
|
|
85
93
|
}
|
|
86
94
|
.progress-bar .step.active {
|
|
87
95
|
background: rgba(0,0,0,0.1);
|
|
88
|
-
color:
|
|
96
|
+
color: silver;
|
|
89
97
|
}
|
|
90
98
|
|
|
91
99
|
.progress-bar .step.completed {
|
|
@@ -117,11 +125,11 @@ body.dark .radio-group label {
|
|
|
117
125
|
background: rgba(0,0,0,0.3);
|
|
118
126
|
}
|
|
119
127
|
.radio-group label {
|
|
128
|
+
background: rgba(0,0,0,0.03);
|
|
120
129
|
display: flex;
|
|
121
130
|
align-items: center;
|
|
122
131
|
margin-bottom: 5px;
|
|
123
132
|
padding: 10px;
|
|
124
|
-
background: rgba(0,0,0,0.04);
|
|
125
133
|
cursor: pointer;
|
|
126
134
|
transition: all 0.3s ease;
|
|
127
135
|
}
|
|
@@ -169,7 +177,7 @@ body.dark .conditional-options {
|
|
|
169
177
|
.conditional-options {
|
|
170
178
|
margin: 20px 0;
|
|
171
179
|
padding: 1rem;
|
|
172
|
-
background: rgba(0,0,0,0.
|
|
180
|
+
background: rgba(0,0,0,0.04);
|
|
173
181
|
/*
|
|
174
182
|
border: 1px solid #000000;
|
|
175
183
|
*/
|
|
@@ -210,7 +218,7 @@ body.dark .conditional-options {
|
|
|
210
218
|
textarea, input[type="url"], input[type="text"] {
|
|
211
219
|
width: 100%;
|
|
212
220
|
padding: 10px;
|
|
213
|
-
border:
|
|
221
|
+
border: none;
|
|
214
222
|
font-family: inherit;
|
|
215
223
|
}
|
|
216
224
|
|
|
@@ -971,11 +979,11 @@ body.dark .appcanvas {
|
|
|
971
979
|
}
|
|
972
980
|
.command-fields {
|
|
973
981
|
background: rgba(0,0,0,0.04);
|
|
982
|
+
padding: 20px;
|
|
983
|
+
margin: 20px 0;
|
|
974
984
|
}
|
|
975
985
|
body.dark .command-fields {
|
|
976
|
-
padding: 20px;
|
|
977
986
|
background: rgba(0,0,0,0.3);
|
|
978
|
-
margin: 20px 0;
|
|
979
987
|
}
|
|
980
988
|
</style>
|
|
981
989
|
<link href="/app.css" rel="stylesheet"/>
|
|
@@ -1062,15 +1070,18 @@ body.dark .command-fields {
|
|
|
1062
1070
|
<div class="radio-group">
|
|
1063
1071
|
<label>
|
|
1064
1072
|
<input type="radio" name="projectType" value="nodejs">
|
|
1065
|
-
<
|
|
1073
|
+
<img class='appicon' src="/asset/prototype/system/nodejs/icon.png"/>
|
|
1074
|
+
<span>Node.js (A minimal launcher for a typical node.js project)</span>
|
|
1066
1075
|
</label>
|
|
1067
1076
|
<label>
|
|
1068
1077
|
<input type="radio" name="projectType" value="python">
|
|
1069
|
-
<
|
|
1078
|
+
<img class='appicon' src="/asset/prototype/system/python/icon.png"/>
|
|
1079
|
+
<span>Python (A minimal launcher for a typical python project)</span>
|
|
1070
1080
|
</label>
|
|
1071
1081
|
<label>
|
|
1072
1082
|
<input type="radio" name="projectType" value="empty">
|
|
1073
|
-
<
|
|
1083
|
+
<img class='appicon' src="/asset/prototype/system/empty/icon.png"/>
|
|
1084
|
+
<span>Any (A minimal launcher you can manually or use AI to customize)</span>
|
|
1074
1085
|
</label>
|
|
1075
1086
|
</div>
|
|
1076
1087
|
|
|
@@ -1133,10 +1144,12 @@ body.dark .command-fields {
|
|
|
1133
1144
|
<div class="radio-group">
|
|
1134
1145
|
<label>
|
|
1135
1146
|
<input type="radio" name="projectType" value="empty">
|
|
1147
|
+
<img class='appicon' src="/asset/prototype/system/empty/icon.png"/>
|
|
1136
1148
|
<span>Empty Project</span>
|
|
1137
1149
|
</label>
|
|
1138
1150
|
<label>
|
|
1139
1151
|
<input type="radio" name="projectType" value="cli">
|
|
1152
|
+
<img class='appicon' src="/asset/prototype/system/cli/icon.png"/>
|
|
1140
1153
|
<span>CLI App Launcher</span>
|
|
1141
1154
|
</label>
|
|
1142
1155
|
|
|
@@ -1184,6 +1197,7 @@ body.dark .command-fields {
|
|
|
1184
1197
|
|
|
1185
1198
|
<label>
|
|
1186
1199
|
<input type="radio" name="projectType" value="documentation">
|
|
1200
|
+
<img class='appicon' src="/asset/prototype/system/documentation/icon.png"/>
|
|
1187
1201
|
<span>Documentation</span>
|
|
1188
1202
|
</label>
|
|
1189
1203
|
|
|
@@ -1211,10 +1225,12 @@ body.dark .command-fields {
|
|
|
1211
1225
|
</div>
|
|
1212
1226
|
<label>
|
|
1213
1227
|
<input type="radio" name="projectType" value="nodejs">
|
|
1228
|
+
<img class='appicon' src="/asset/prototype/system/nodejs/icon.png"/>
|
|
1214
1229
|
<span>Node.js</span>
|
|
1215
1230
|
</label>
|
|
1216
1231
|
<label>
|
|
1217
1232
|
<input type="radio" name="projectType" value="python">
|
|
1233
|
+
<img class='appicon' src="/asset/prototype/system/python/icon.png"/>
|
|
1218
1234
|
<span>Python</span>
|
|
1219
1235
|
</label>
|
|
1220
1236
|
</div>
|
|
@@ -1734,7 +1750,7 @@ async function displayResults(config) {
|
|
|
1734
1750
|
}
|
|
1735
1751
|
}
|
|
1736
1752
|
socket.run({
|
|
1737
|
-
method: "kernel.
|
|
1753
|
+
method: "kernel.proto.create",
|
|
1738
1754
|
cwd: "<%-JSON.stringify(cwd).slice(1, -1)%>",
|
|
1739
1755
|
name: "<%=name%>",
|
|
1740
1756
|
params: config
|