pinokiod 3.2.208 → 3.2.209

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.
@@ -110,7 +110,7 @@ report_errors: false`)
110
110
  for(let line of lines) {
111
111
  if (start) {
112
112
  let chunks = line.split(/\s+/).filter(x => x)
113
- if (chunks.length > 1) {
113
+ if (chunks.length > 2) {
114
114
  let name = chunks[0]
115
115
  let version = chunks[1]
116
116
  conda.add(name)
@@ -272,7 +272,7 @@ class Bin {
272
272
  for(let line of lines) {
273
273
  if (start) {
274
274
  let chunks = line.split(/\s+/).filter(x => x)
275
- if (chunks.length > 1) {
275
+ if (chunks.length > 2) {
276
276
  let name = chunks[0]
277
277
  let version = chunks[1]
278
278
  conda.add(name)
package/kernel/index.js CHANGED
@@ -236,6 +236,8 @@ class Kernel {
236
236
  return { cols, rows, id, group, path, index, cmd, done }
237
237
  }),
238
238
  proxies: [],
239
+ api: [],
240
+ bin: {},
239
241
  vars: this.vars,
240
242
  memory: this.memory,
241
243
  procs: this.procs,
@@ -288,8 +290,32 @@ class Kernel {
288
290
  })
289
291
  }
290
292
  }
291
- this.api.proxies,
292
293
 
294
+ let files = await fs.promises.readdir(this.api.userdir, { withFileTypes: true })
295
+ let folders = files.filter((f) => { return f.isDirectory() }).map((x) => { return x.name })
296
+ let meta = {}
297
+ for(let folder of folders) {
298
+ let p = path.resolve(this.api.userdir, folder, "pinokio.js")
299
+ let pinokio = (await this.loader.load(p)).resolved
300
+ if (pinokio) {
301
+ i.api.push({
302
+ path: folder,
303
+ title: pinokio.title,
304
+ description: pinokio.description,
305
+ icon: pinokio.icon ? `/api/${folder}/${pinokio.icon}?raw=true` : null
306
+ })
307
+ } else {
308
+ i.api.push({
309
+ path: folder,
310
+ })
311
+ }
312
+ }
313
+ for(let key in this.bin.installed) {
314
+ let s = this.bin.installed[key]
315
+ i.bin[key] = {
316
+ installed: Array.from(s)
317
+ }
318
+ }
293
319
  this.i = i
294
320
  }
295
321
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.208",
3
+ "version": "3.2.209",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -35,6 +35,7 @@
35
35
  "http-proxy": "^1.18.1",
36
36
  "http-proxy-middleware": "^3.0.0",
37
37
  "http-terminator": "^3.2.0",
38
+ "https": "^1.0.0",
38
39
  "isomorphic-git": "^1.23.0",
39
40
  "jimini": "^0.0.7",
40
41
  "jsdom": "^24.0.0",