pinokiod 8.0.101 → 8.0.102
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/hf/index.js +4 -4
- package/package.json +1 -1
package/kernel/api/hf/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const unparse = require('yargs-unparser-custom-flag');
|
|
1
2
|
const Shell = require('../shell')
|
|
2
3
|
const Util = require('../../util')
|
|
3
4
|
const HtmlModal = require('../htmlmodal')
|
|
@@ -328,12 +329,11 @@ class HF {
|
|
|
328
329
|
let params = Object.assign({}, req.params)
|
|
329
330
|
delete params.env
|
|
330
331
|
delete params.path
|
|
331
|
-
|
|
332
|
-
params._ = ["hf", "download", ...positional]
|
|
332
|
+
let chunks = unparse(params)
|
|
333
333
|
let message = [
|
|
334
|
-
|
|
335
|
-
kernel.platform === "win32" ? "dir" : "ls"
|
|
334
|
+
`hf download ${chunks.join(" ")}` + (kernel.platform === "win32" ? " && dir" : " ; ls")
|
|
336
335
|
]
|
|
336
|
+
console.log({ message, before: req.params.message })
|
|
337
337
|
req.params.message = message
|
|
338
338
|
let res = await shell.run(req, ondata, kernel)
|
|
339
339
|
return res
|