pinokiod 3.2.232 → 3.2.234
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/api/fs/index.js +19 -0
- package/package.json +1 -1
package/kernel/api/fs/index.js
CHANGED
|
@@ -94,6 +94,7 @@ class FS {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
async share(req, ondata, kernel) {
|
|
97
|
+
|
|
97
98
|
/////////////////////////////////////////////////////////////////////////////
|
|
98
99
|
//
|
|
99
100
|
// 1. peer to peer shared drive
|
|
@@ -159,6 +160,10 @@ class FS {
|
|
|
159
160
|
//
|
|
160
161
|
/////////////////////////////////////////////////////////////////////////////
|
|
161
162
|
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
162
167
|
ondata({ raw: "\r\ncreating a shared drive:\r\n" + JSON.stringify(req.params, null, 2).replace(/\n/g, "\r\n") })
|
|
163
168
|
|
|
164
169
|
|
|
@@ -177,6 +182,20 @@ class FS {
|
|
|
177
182
|
}
|
|
178
183
|
|
|
179
184
|
if (req.params.venv) {
|
|
185
|
+
// check if the python version is 3.10.16
|
|
186
|
+
// only if 3.10.16, allow fs.link for now
|
|
187
|
+
|
|
188
|
+
let pyvenv_config_path = path.resolve(req.cwd, req.params.venv, "pyvenv.cfg")
|
|
189
|
+
let pyvenv_str = await fs.promises.readFile(pyvenv_config_path, "utf-8")
|
|
190
|
+
console.log({ pyvenv_str })
|
|
191
|
+
if (/version.*=[ ]*3\.10\..+/gi.test(pyvenv_str)) {
|
|
192
|
+
ondata({ raw: "\r\npython verrsion 3.10.x. Proceed with fs.link.\r\n" })
|
|
193
|
+
} else {
|
|
194
|
+
ondata({ raw: "\r\npython verrsion is NOT 3.10.x. Not implemented yet. Pass.\r\n" })
|
|
195
|
+
return
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
180
199
|
// pip sharing
|
|
181
200
|
// 1. get all pip items
|
|
182
201
|
let p
|