用树状图展示对象

This commit is contained in:
fofolee
2022-04-28 13:12:03 +08:00
parent 77bd51acdb
commit 715b4bc296
4 changed files with 105 additions and 33 deletions

View File

@@ -8,7 +8,6 @@ const axios = require('axios');
const http = require('http');
const url = require('url')
const kill = require('tree-kill')
const beautifyLog = require('./lib/beautifyLog')
require('ses')
window._ = require("lodash")
@@ -414,8 +413,6 @@ window.convertFilePathToUtoolsPayload = files => files.map(file => {
}
})
let parseStdout = stdout => stdout.map(x => beautifyLog(x)).join("\n")
let getSandboxFuns = () => {
var sandbox = {
fetch: fetch.bind(window),
@@ -466,7 +463,7 @@ window.runCodeInSandbox = (code, callback, addVars = {}) => {
callback(stdout, null)
},
error: (...stderr) => {
callback(null, parseStdout(stderr))
callback(null, stderr)
}
}
let sandboxWithAD = Object.assign(addVars, sandbox)