pinokiod 3.17.5 → 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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.17.5",
3
+ "version": "3.17.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
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 error = null
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
- error = `Please update to the latest Pinokio (current script version: ${config.version}, supported: ${this.kernel.schema})`
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,
@@ -1556,6 +1565,7 @@ class Server {
1556
1565
  if (!config) {
1557
1566
  return { menu: [] }
1558
1567
  }
1568
+ console.log("renderMenu2 Before", JSON.stringify(config, null, 2))
1559
1569
 
1560
1570
  if (config.menu) {
1561
1571
  for(let i=0; i<config.menu.length; i++) {
@@ -1594,6 +1604,7 @@ class Server {
1594
1604
  //config.script_id = this.kernel.path(keypath) + "?cwd=" + base.cwd
1595
1605
  config.script_id = path.resolve(base.path, config.href) + "?cwd=" + base.cwd
1596
1606
  }
1607
+ console.log("renderMenu2 After", JSON.stringify(config, null, 2))
1597
1608
  return config
1598
1609
  }
1599
1610
 
@@ -2357,6 +2368,8 @@ class Server {
2357
2368
  }
2358
2369
  }
2359
2370
  async getPlugin(name) {
2371
+ console.log("getPlugin", name)
2372
+ console.log("plugin config", this.kernel.plugin.config)
2360
2373
  if (this.kernel.plugin.config) {
2361
2374
  try {
2362
2375
  let info = new Info(this.kernel)
@@ -2369,6 +2382,7 @@ class Server {
2369
2382
  await this.renderMenu(uri, name, plugin, [])
2370
2383
  return plugin
2371
2384
  } catch (e) {
2385
+ console.log("getPlugin ERROR", e)
2372
2386
  return {
2373
2387
  menu: []
2374
2388
  }