pinokiod 2.1.16 → 2.1.18

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.
@@ -112,6 +112,7 @@ class Bin {
112
112
  merge_env(existing, merge) {
113
113
  // merge 'merge' into 'existing'
114
114
  for(let key in merge) {
115
+ // Array => like PATH
115
116
  if (Array.isArray(merge[key])) {
116
117
  if (typeof existing[key] === 'undefined') {
117
118
  existing[key] = merge[key]
@@ -134,10 +135,17 @@ class Bin {
134
135
 
135
136
  // 1. get the module envs
136
137
  let envs = this.mods.map((mod) => {
137
- if (mod.mod.env) {
138
- return mod.mod.env(this.kernel)
139
- } else {
138
+ if (mod.name === "vs") {
139
+ // don't include vs now
140
+ // instead, include it after conda activation, since this should be top priority and even higher priority than conda activated environment variables
141
+ this.vs_env = mod.mod.env(this.kernel)
140
142
  return null
143
+ } else {
144
+ if (mod.mod.env) {
145
+ return mod.mod.env(this.kernel)
146
+ } else {
147
+ return null
148
+ }
141
149
  }
142
150
  }).filter(x => x)
143
151
 
package/kernel/shell.js CHANGED
@@ -511,6 +511,7 @@ class Shell {
511
511
 
512
512
 
513
513
  // 2. conda_activation
514
+
514
515
  let conda_activation = []
515
516
  if (conda_path) {
516
517
  let env_path = path.resolve(params.path, conda_path)
@@ -570,6 +571,14 @@ class Shell {
570
571
  conda_activation = []
571
572
  }
572
573
 
574
+ // Visual Studio Build Tools (Exception)
575
+ const vs_env = this.kernel.bin.vs_env
576
+ console.log({ vs_env })
577
+ if (vs_env) {
578
+ const vs = `conda env config vars set ${vs_env}:%PATH%`
579
+ console.log({ vs })
580
+ conda_activation.push(vs)
581
+ }
573
582
 
574
583
 
575
584
  // Update env setting
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "2.1.16",
3
+ "version": "2.1.18",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -39,6 +39,15 @@ body.frozen {
39
39
  flex-direction: column;
40
40
  height: 100%;
41
41
  }
42
+ .terminal-container {
43
+ flex-grow: none !important;
44
+ }
45
+ .xterm {
46
+ height: 100%;
47
+ }
48
+ .containers .terminal-container {
49
+ height: auto !important;
50
+ }
42
51
  #table > table {
43
52
  border-left: 2px solid black;
44
53
  padding-left: 5px;
@@ -229,6 +238,7 @@ document.addEventListener("DOMContentLoaded", async () => {
229
238
  await this.socket.close()
230
239
  // document.querySelector(".terminal-container").classList.add("hidden")
231
240
  let query = Object.fromEntries(new URLSearchParams(location.search))
241
+ document.querySelector(".containers").classList.add("running")
232
242
 
233
243
 
234
244
  this.socket.run({
@@ -806,7 +816,7 @@ const reloadMemory = async () => {
806
816
  </div>
807
817
  </div>
808
818
  <% } else { %>
809
- <div class='containers'>
819
+ <div class='containers running'>
810
820
  <main>
811
821
  <!--
812
822
  <pre id='response'></pre>