pinokiod 3.0.37 → 3.0.39

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.
@@ -556,6 +556,7 @@ class Api {
556
556
  // get fully resolved env
557
557
  let env = await Environment.get2(request.path, this.kernel)
558
558
  // set template
559
+ console.log("step env", env)
559
560
  this.kernel.template.update({ envs: env, env })
560
561
 
561
562
  // render until `{{ }}` pattern does not exist
@@ -122,7 +122,7 @@ create_default_packages:
122
122
  //"conda install conda=24.5.0",
123
123
  "conda clean -y --index-cache",
124
124
  "conda update -y --all",
125
- "conda install -y conda=24.9.0",
125
+ // "conda install -y conda=24.9.0",
126
126
 
127
127
 
128
128
  // handling the conda-libmamba-solver bug here: https://github.com/conda/conda-libmamba-solver/issues/283
@@ -6,7 +6,7 @@ class Node {
6
6
  async install(req, ondata) {
7
7
  await this.kernel.bin.exec({
8
8
  //message: "conda install -y nodejs=22.12.0 -c conda-forge"
9
- message: "conda install -y nodejs -c conda-forge"
9
+ message: "conda install -y nodejs=20.17.0 -c conda-forge"
10
10
  }, ondata)
11
11
  }
12
12
  async installed() {
@@ -380,7 +380,8 @@ const get2 = async (filepath, kernel) => {
380
380
  let api_path = Util.api_path(filepath, kernel)
381
381
  let default_env = await get(kernel.homedir)
382
382
  let api_env = await get(api_path)
383
- let current_env = Object.assign({}, process.env, default_env, api_env)
383
+ let process_env = kernel.envs || process.env
384
+ let current_env = Object.assign({}, process_env, default_env, api_env)
384
385
  return current_env
385
386
  }
386
387
 
package/kernel/index.js CHANGED
@@ -341,7 +341,6 @@ class Kernel {
341
341
  await this.api.init()
342
342
 
343
343
  //await this.shell.init()
344
- this.shell.init()
345
344
 
346
345
  if (this.homedir) {
347
346
  this.sys = new Sysinfo()
@@ -360,17 +359,33 @@ class Kernel {
360
359
  system,
361
360
  platform: this.platform,
362
361
  arch: this.arch,
363
- env: this.envs,
364
- envs: this.envs,
362
+ // env: this.envs,
363
+ // envs: this.envs,
365
364
  proxy: (port) => {
366
365
  return this.api.get_proxy_url("/proxy", port)
367
366
  },
368
367
  ...info
369
368
  })
369
+ console.time("update_sysinfo")
370
370
  await this.update_sysinfo()
371
+ console.timeEnd("update_sysinfo")
371
372
  }
372
373
 
373
374
 
375
+ console.time("shell.init")
376
+ this.shell.init().then(() => {
377
+ console.timeEnd("shell.init")
378
+ console.log("this.envs", this.envs)
379
+ console.log("this.template.keys before", this.template.keys)
380
+ console.log("this.template.vals before", this.template.vals)
381
+ this.template.update({
382
+ env: this.envs,
383
+ envs: this.envs
384
+ })
385
+ console.log("this.template.keys after", this.template.keys)
386
+ console.log("this.template.vals after", this.template.vals)
387
+ })
388
+
374
389
  let pwpath
375
390
  if (this.platform === "win32") {
376
391
  pwpath = this.bin.path("miniconda/node_modules/playwright")
@@ -404,6 +419,7 @@ class Kernel {
404
419
  try {
405
420
  await this.sys.refresh()
406
421
  let info = this.sys.info
422
+ console.log("template.update", info)
407
423
  this.template.update(info)
408
424
  this.sysinfo = info
409
425
  this.gpu = info.gpu
@@ -1,4 +1,5 @@
1
1
  const path = require('path')
2
+ const fetch = require('cross-fetch')
2
3
  class Python {
3
4
  constructor(kernel) {
4
5
  this.kernel = kernel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.0.37",
3
+ "version": "3.0.39",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {