pinokiod 3.2.153 → 3.2.155
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/conda.js +42 -31
- package/kernel/bin/index.js +7 -6
- package/kernel/util.js +1 -0
- package/package.json +1 -1
package/kernel/bin/conda.js
CHANGED
|
@@ -99,45 +99,56 @@ create_default_packages:
|
|
|
99
99
|
console.log("CONDA", res.response)
|
|
100
100
|
let lines = res.response.split(/[\r\n]+/)
|
|
101
101
|
let conda_check = {}
|
|
102
|
+
let conda = new Set()
|
|
103
|
+
let start = false
|
|
102
104
|
for(let line of lines) {
|
|
103
|
-
|
|
104
|
-
if (
|
|
105
|
-
let
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
console.log({ line, start })
|
|
106
|
+
if (start) {
|
|
107
|
+
let chunks = line.split(/\s+/).filter(x => x)
|
|
108
|
+
if (chunks.length > 1) {
|
|
109
|
+
let name = chunks[0]
|
|
110
|
+
let version = chunks[1]
|
|
111
|
+
conda.add(name)
|
|
112
|
+
if (name === "conda") {
|
|
113
|
+
if (String(version) === "24.11.1") {
|
|
114
|
+
conda_check.conda = true
|
|
115
|
+
}
|
|
110
116
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
// check conda-libmamba-solver is up to date
|
|
118
|
+
// sometimes it just fails silently so need to check
|
|
119
|
+
if (name === "conda-libmamba-solver") {
|
|
120
|
+
//if (String(version) === "24.7.0") {
|
|
121
|
+
let channel = chunks[3]
|
|
122
|
+
let coerced = semver.coerce(version)
|
|
123
|
+
let mamba_requirement = ">=24.11.1"
|
|
124
|
+
console.log({ name, channel, version })
|
|
125
|
+
if (semver.satisfies(coerced, mamba_requirement) && channel === "conda-forge") {
|
|
126
|
+
conda_check.mamba = true
|
|
127
|
+
}
|
|
122
128
|
}
|
|
123
|
-
}
|
|
124
129
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
// Use sqlite to check if `conda update -y --all` went through successfully
|
|
131
|
+
// sometimes it just fails silently so need to check
|
|
132
|
+
if (name === "sqlite") {
|
|
133
|
+
let coerced = semver.coerce(version)
|
|
134
|
+
let sqlite_requirement = ">=3.47.2"
|
|
135
|
+
console.log({ coerced, version, sqlite_requirement })
|
|
136
|
+
if (semver.satisfies(coerced, sqlite_requirement)) {
|
|
137
|
+
console.log("semver satisfied")
|
|
138
|
+
conda_check.sqlite = true
|
|
139
|
+
} else {
|
|
140
|
+
console.log("semver NOT satisfied")
|
|
141
|
+
}
|
|
136
142
|
}
|
|
137
143
|
}
|
|
144
|
+
} else {
|
|
145
|
+
if (/.*name.*version.*build.*channel/i.test(line)) {
|
|
146
|
+
start = true
|
|
147
|
+
}
|
|
138
148
|
}
|
|
139
149
|
}
|
|
140
|
-
console.log("> Check", { conda_check })
|
|
150
|
+
console.log("> Check", { conda_check, conda })
|
|
151
|
+
this.kernel.bin.installed.conda = conda
|
|
141
152
|
return conda_check.conda && conda_check.mamba && conda_check.sqlite
|
|
142
153
|
}
|
|
143
154
|
async install(req, ondata) {
|
package/kernel/bin/index.js
CHANGED
|
@@ -244,6 +244,7 @@ class Bin {
|
|
|
244
244
|
console.log("CONDA", res.response)
|
|
245
245
|
let lines = res.response.split(/[\r\n]+/)
|
|
246
246
|
for(let line of lines) {
|
|
247
|
+
console.log({ line, start })
|
|
247
248
|
if (start) {
|
|
248
249
|
let chunks = line.split(/\s+/).filter(x => x)
|
|
249
250
|
if (chunks.length > 1) {
|
|
@@ -280,7 +281,7 @@ class Bin {
|
|
|
280
281
|
}
|
|
281
282
|
}
|
|
282
283
|
} else {
|
|
283
|
-
if (
|
|
284
|
+
if (/.*name.*version.*build.*channel/i.test(line)) {
|
|
284
285
|
start = true
|
|
285
286
|
}
|
|
286
287
|
}
|
|
@@ -486,10 +487,10 @@ class Bin {
|
|
|
486
487
|
|
|
487
488
|
let install = requirement.install // custom install command
|
|
488
489
|
let args = requirement.args || ""
|
|
489
|
-
if (requirement.installed) {
|
|
490
|
-
console.log("Already installed", requirement)
|
|
491
|
-
} else {
|
|
492
|
-
console.log("Not yet installed", requirement)
|
|
490
|
+
// if (requirement.installed) {
|
|
491
|
+
// console.log("Already installed", requirement)
|
|
492
|
+
// } else {
|
|
493
|
+
// console.log("Not yet installed", requirement)
|
|
493
494
|
/*
|
|
494
495
|
{
|
|
495
496
|
platform: win32|darwin|linux|<none>,
|
|
@@ -542,7 +543,7 @@ class Bin {
|
|
|
542
543
|
}
|
|
543
544
|
|
|
544
545
|
}
|
|
545
|
-
}
|
|
546
|
+
// }
|
|
546
547
|
}
|
|
547
548
|
async install(req, ondata) {
|
|
548
549
|
/*
|
package/kernel/util.js
CHANGED
|
@@ -25,6 +25,7 @@ if( __dirname.includes(".asar") ) {
|
|
|
25
25
|
}
|
|
26
26
|
const { getFolderSize, getFolderSizeBin, getFolderSizeWasm, } = g
|
|
27
27
|
const du = async (folderpath) => {
|
|
28
|
+
return 0;
|
|
28
29
|
console.time("disk size calc")
|
|
29
30
|
let totalSize = await getFolderSizeBin(folderpath)
|
|
30
31
|
console.timeEnd("disk size calc")
|