pinokiod 3.2.181 → 3.2.184
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/bin/conda.js +16 -5
- package/package.json +1 -1
- package/server/index.js +3 -0
- package/server/views/pre.ejs +19 -5
package/kernel/bin/conda.js
CHANGED
|
@@ -68,8 +68,8 @@ class Conda {
|
|
|
68
68
|
create_default_packages:
|
|
69
69
|
- python=3.10`)
|
|
70
70
|
// }
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
let pinned_exists = await this.kernel.exists("bin/miniconda/conda-meta")
|
|
72
|
+
if (pinned_exists) {
|
|
73
73
|
await fs.promises.writeFile(this.kernel.path('bin/miniconda/conda-meta/pinned'), `conda=24.11.3`)
|
|
74
74
|
// await fs.promises.writeFile(this.kernel.path('bin/miniconda/conda-meta/pinned'), `conda=24.9.0`)
|
|
75
75
|
// await fs.promises.writeFile(this.kernel.path('bin/miniconda/conda-meta/pinned'), `conda=24.11.2
|
|
@@ -77,7 +77,7 @@ create_default_packages:
|
|
|
77
77
|
// await fs.promises.writeFile(this.kernel.path('bin/miniconda/conda-meta/pinned'), `conda=24.7.1
|
|
78
78
|
//conda-libmamba-solver=24.7.0`)
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
}
|
|
81
81
|
}
|
|
82
82
|
// async init() {
|
|
83
83
|
// let exists = await this.kernel.bin.exists("miniconda/condarc")
|
|
@@ -197,7 +197,7 @@ create_default_packages:
|
|
|
197
197
|
|
|
198
198
|
// set pinned
|
|
199
199
|
let pinned_exists = await this.kernel.exists("bin/miniconda/conda-meta")
|
|
200
|
-
|
|
200
|
+
if (pinned_exists) {
|
|
201
201
|
//await fs.promises.writeFile(this.kernel.path('bin/miniconda/conda-meta/pinned'), `conda=24.11.1`)
|
|
202
202
|
await fs.promises.writeFile(this.kernel.path('bin/miniconda/conda-meta/pinned'), `conda=24.11.3`)
|
|
203
203
|
// await fs.promises.writeFile(this.kernel.path('bin/miniconda/conda-meta/pinned'), `conda=24.9.0`)
|
|
@@ -205,7 +205,7 @@ create_default_packages:
|
|
|
205
205
|
//conda-libmamba-solver=24.11.1`)
|
|
206
206
|
// await fs.promises.writeFile(this.kernel.path('bin/miniconda/conda-meta/pinned'), `conda=24.7.1
|
|
207
207
|
//conda-libmamba-solver=24.7.0`)
|
|
208
|
-
|
|
208
|
+
}
|
|
209
209
|
//// await this.activate()
|
|
210
210
|
// await fs.promises.writeFile(this.kernel.bin.path('miniconda/condarc'), `channels:
|
|
211
211
|
// - conda-forge
|
|
@@ -298,6 +298,17 @@ create_default_packages:
|
|
|
298
298
|
this.kernel.bin.path("miniconda", "python.exe"),
|
|
299
299
|
this.kernel.bin.path("miniconda", "python3.exe"),
|
|
300
300
|
)
|
|
301
|
+
|
|
302
|
+
// give full permission
|
|
303
|
+
console.log("Give full permission")
|
|
304
|
+
await this.kernel.bin.exec({
|
|
305
|
+
sudo: true,
|
|
306
|
+
message: `icacls ${install_path} /grant Users:(OI)(CI)F /T`
|
|
307
|
+
}, (stream) => {
|
|
308
|
+
ondata(stream)
|
|
309
|
+
})
|
|
310
|
+
console.log("Give full permission done")
|
|
311
|
+
|
|
301
312
|
}
|
|
302
313
|
ondata({ raw: `Install finished\r\n` })
|
|
303
314
|
await this.kernel.bin.rm(installer, ondata)
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -2621,6 +2621,9 @@ class Server {
|
|
|
2621
2621
|
if (item.icon) {
|
|
2622
2622
|
item.icon = `/api/${req.params.name}/${item.icon}?raw=true`
|
|
2623
2623
|
}
|
|
2624
|
+
if (!item.href.startsWith("http")) {
|
|
2625
|
+
item.href = path.resolve(this.kernel.homedir, "api", req.params.name, item.href)
|
|
2626
|
+
}
|
|
2624
2627
|
})
|
|
2625
2628
|
let env = await Environment.get2(p2, this.kernel)
|
|
2626
2629
|
res.render("pre", {
|
package/server/views/pre.ejs
CHANGED
|
@@ -58,10 +58,6 @@ h1 {
|
|
|
58
58
|
.item .title {
|
|
59
59
|
font-weight: bold;
|
|
60
60
|
}
|
|
61
|
-
.item .btn {
|
|
62
|
-
width: 50px;
|
|
63
|
-
text-align: center;
|
|
64
|
-
}
|
|
65
61
|
.item img {
|
|
66
62
|
width: 100px;
|
|
67
63
|
}
|
|
@@ -97,6 +93,17 @@ footer a.btn {
|
|
|
97
93
|
box-sizing: border-box;
|
|
98
94
|
width: 100%;
|
|
99
95
|
}
|
|
96
|
+
.item .btn i {
|
|
97
|
+
margin-right: 5px;
|
|
98
|
+
}
|
|
99
|
+
.item .btn {
|
|
100
|
+
margin-top: 10px;
|
|
101
|
+
text-align: center;
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
padding: 10px 20px;
|
|
105
|
+
display: inline-block;
|
|
106
|
+
}
|
|
100
107
|
</style>
|
|
101
108
|
</head>
|
|
102
109
|
<body class='columns <%=theme%>'>
|
|
@@ -118,8 +125,15 @@ footer a.btn {
|
|
|
118
125
|
<div class='col'>
|
|
119
126
|
<div class='title'><%=item.title%></div>
|
|
120
127
|
<div class='description'><%=item.description%></div>
|
|
128
|
+
<% if (item.href.startsWith("http")) { %>
|
|
129
|
+
<a target="_blank" features="browser" href='<%=item.href%>' class='btn'><i class="fa-solid fa-square-arrow-up-right"></i> Get</a>
|
|
130
|
+
<% } else { %>
|
|
131
|
+
<button class='btn' data-filepath="<%=item.href%>"><i class="fa-solid fa-square-arrow-up-right"></i> Get</button>
|
|
132
|
+
<% } %>
|
|
121
133
|
</div>
|
|
134
|
+
<!--
|
|
122
135
|
<a target="_blank" features="browser" href='<%=item.href%>' class='btn'>Get</a>
|
|
136
|
+
-->
|
|
123
137
|
</div>
|
|
124
138
|
<% } else if (item.env) { %>
|
|
125
139
|
<!--
|
|
@@ -136,7 +150,7 @@ footer a.btn {
|
|
|
136
150
|
<% }) %>
|
|
137
151
|
</div>
|
|
138
152
|
<footer>
|
|
139
|
-
<a class='btn' href="/env/api/<%=name%>?init=true">
|
|
153
|
+
<a class='btn' href="/env/api/<%=name%>?init=true">Next</a>
|
|
140
154
|
</footer>
|
|
141
155
|
</main>
|
|
142
156
|
</body>
|