pinokiod 3.17.6 → 3.17.7
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/setup.js +15 -0
- package/package.json +1 -1
- package/server/index.js +14 -3
package/kernel/bin/setup.js
CHANGED
|
@@ -198,5 +198,20 @@ module.exports = {
|
|
|
198
198
|
"caddy"
|
|
199
199
|
]
|
|
200
200
|
}
|
|
201
|
+
},
|
|
202
|
+
git: (kernel) => {
|
|
203
|
+
let requirements = [
|
|
204
|
+
{ name: "conda", },
|
|
205
|
+
{ name: "git", },
|
|
206
|
+
]
|
|
207
|
+
return {
|
|
208
|
+
icon: "fa-solid fa-wifi",
|
|
209
|
+
title: "Git",
|
|
210
|
+
description: "Self-contained git installation",
|
|
211
|
+
requirements,
|
|
212
|
+
conda_requirements: [
|
|
213
|
+
"git",
|
|
214
|
+
]
|
|
215
|
+
}
|
|
201
216
|
}
|
|
202
217
|
}
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -334,17 +334,26 @@ class Server {
|
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
async chrome(req, res, type) {
|
|
337
|
+
|
|
338
|
+
let { requirements, install_required, requirements_pending, error } = await this.kernel.bin.check({
|
|
339
|
+
bin: this.kernel.bin.preset("dev"),
|
|
340
|
+
})
|
|
341
|
+
if (!requirements_pending && install_required) {
|
|
342
|
+
res.redirect(`/setup/dev?callback=${req.originalUrl}`)
|
|
343
|
+
return
|
|
344
|
+
}
|
|
345
|
+
|
|
337
346
|
let name = req.params.name
|
|
338
347
|
let config = await this.kernel.api.meta(name)
|
|
339
348
|
|
|
340
|
-
let
|
|
349
|
+
let err = null
|
|
341
350
|
if (config && config.version) {
|
|
342
351
|
let coerced = semver.coerce(config.version)
|
|
343
352
|
if (semver.satisfies(coerced, this.kernel.schema)) {
|
|
344
353
|
console.log("semver satisfied", config.version, this.kernel.schema)
|
|
345
354
|
} else {
|
|
346
355
|
console.log("semver NOT satisfied", config.version, this.kernel.schema)
|
|
347
|
-
|
|
356
|
+
err = `Please update to the latest Pinokio (current script version: ${config.version}, supported: ${this.kernel.schema})`
|
|
348
357
|
}
|
|
349
358
|
}
|
|
350
359
|
|
|
@@ -490,7 +499,7 @@ class Server {
|
|
|
490
499
|
plugin_menu,
|
|
491
500
|
portal: this.portal,
|
|
492
501
|
install: this.install,
|
|
493
|
-
error,
|
|
502
|
+
error: err,
|
|
494
503
|
env,
|
|
495
504
|
mode,
|
|
496
505
|
port: this.port,
|
|
@@ -2359,6 +2368,8 @@ class Server {
|
|
|
2359
2368
|
}
|
|
2360
2369
|
}
|
|
2361
2370
|
async getPlugin(name) {
|
|
2371
|
+
console.log("getPlugin", name)
|
|
2372
|
+
console.log("plugin config", this.kernel.plugin.config)
|
|
2362
2373
|
if (this.kernel.plugin.config) {
|
|
2363
2374
|
try {
|
|
2364
2375
|
let info = new Info(this.kernel)
|