pinokiod 3.2.118 → 3.2.119

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.
@@ -131,6 +131,13 @@ conda-libmamba-solver=24.11.1`)
131
131
  // - defaults
132
132
  //create_default_packages:
133
133
  // - python=3.10`)
134
+
135
+
136
+ // 1. right after installing conda==24.11.1, run conda update --all
137
+ // 2. The pinned file says conda-libmamba-solver=24.11.1
138
+ // 3. so after conda update --all, it should be conda-libmamba-solver=24.11.1
139
+
140
+
134
141
  let cmds = [
135
142
  //"conda clean -y --index-cache",
136
143
  "conda clean -y --all",
@@ -22,6 +22,7 @@ const Torch = require("./torch")
22
22
  const { glob } = require('glob')
23
23
  const fakeUa = require('fake-useragent');
24
24
  const fse = require('fs-extra')
25
+ const semver = require('semver')
25
26
 
26
27
 
27
28
  //const Puppet = require("./puppeteer")
@@ -284,6 +285,17 @@ class Bin {
284
285
  conda_check.mamba = true
285
286
  }
286
287
  }
288
+ if (name === "sqlite") {
289
+ let coerced = semver.coerce(version)
290
+ let sqlite_requirement = ">=3.47.2"
291
+ console.log({ coerced, version, sqlite_requirement })
292
+ if (semver.satisfies(coerced, sqlite_requirement)) {
293
+ console.log("semver satisfied")
294
+ conda_check.sqlite = true
295
+ } else {
296
+ console.log("semver NOT satisfied")
297
+ }
298
+ }
287
299
  }
288
300
  } else {
289
301
  if (/name.*version.*build.*channel/i.test(line)) {
@@ -294,7 +306,7 @@ class Bin {
294
306
  }
295
307
 
296
308
  console.log({ conda_check })
297
- if (conda_check.conda && conda_check.mamba) {
309
+ if (conda_check.conda && conda_check.mamba && conda_check.sqlite) {
298
310
  //if (conda_check.conda) {
299
311
  this.correct_conda = true
300
312
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.118",
3
+ "version": "3.2.119",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -2124,23 +2124,34 @@ class Server {
2124
2124
  } else {
2125
2125
  // update the py module if it's already installed
2126
2126
  console.log("not up to date")
2127
- let installed = await this.kernel.bin.mod.py.installed()
2128
- console.log("py installed", installed)
2129
- if (installed) {
2130
- // update
2131
- console.log("update py")
2132
- await this.kernel.exec({
2133
- message: "git pull",
2134
- path: this.kernel.path("bin/py")
2135
- }, (e) => {
2136
- console.log(e)
2137
- })
2138
-
2139
- }
2140
- // after updating, set the version
2141
- console.log("set the version", this.version.pinokiod)
2142
- this.kernel.store.set("version", this.version.pinokiod)
2143
- console.log("RESTART")
2127
+ await new Promise((resolve, reject) => {
2128
+ let interval = setInterval(async () => {
2129
+ console.log("checking mod.py")
2130
+ if (this.kernel.bin.mod && this.kernel.bin.mod.py) {
2131
+ console.log("mod.py initialized!")
2132
+ let installed = await this.kernel.bin.mod.py.installed()
2133
+ console.log("py installed", installed)
2134
+ if (installed) {
2135
+ // update
2136
+ console.log("update py")
2137
+ await this.kernel.exec({
2138
+ message: "git pull",
2139
+ path: this.kernel.path("bin/py")
2140
+ }, (e) => {
2141
+ console.log(e)
2142
+ })
2143
+ }
2144
+ // after updating, set the version
2145
+ console.log("set the version", this.version.pinokiod)
2146
+ this.kernel.store.set("version", this.version.pinokiod)
2147
+ console.log("RESTART")
2148
+ clearInterval(interval)
2149
+ resolve()
2150
+ } else {
2151
+ console.log("mod.py not initialized yet")
2152
+ }
2153
+ }, 1000)
2154
+ })
2144
2155
  this.listening = true // set this.listening = true so all http connections get reset when restarting
2145
2156
  await this.start(options)
2146
2157
  console.log("RESTARTED")