pinokiod 1.0.49 → 1.0.51

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.
@@ -122,7 +122,8 @@ class FS {
122
122
  "pip",
123
123
  path.resolve(__dirname, "../../python/pip.py"),
124
124
  "list",
125
- [p]
125
+ [p],
126
+ ondata
126
127
  )
127
128
  const d = {}
128
129
  // symlink:
@@ -1,10 +1,10 @@
1
1
  const path = require('path')
2
- const nodecallspython = require("node-calls-python");
3
2
  class Python {
4
3
  constructor(kernel) {
5
4
  this.kernel = kernel
6
5
  }
7
- async call(modname, modpath, method, args) {
6
+ async call(modname, modpath, method, args, ondata) {
7
+ console.log("CALL", { modname, modpath, method, args })
8
8
  // if this.proc doesn't exist, create
9
9
  if (!this.proc) {
10
10
  await this.kernel.exec({
@@ -14,7 +14,9 @@ class Python {
14
14
  ],
15
15
  conda: "base"
16
16
  }, (s) => {
17
+ ondata(s)
17
18
  })
19
+ console.log("Start uvicorn", __dirname)
18
20
  await new Promise((resolve, reject) => {
19
21
  this.kernel.exec({
20
22
  message: "uvicorn --port 42001 server:app",
@@ -22,6 +24,7 @@ class Python {
22
24
  conda: "base"
23
25
  }, (s) => {
24
26
  // process.stdout.write(s)
27
+ ondata(s)
25
28
  if (/Uvicorn running on/i.test(s.cleaned)) {
26
29
  resolve()
27
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {