mirror of
https://github.com/denoland/deno.git
synced 2025-08-31 15:57:53 +00:00
refactor: use primordials in runtime/, part2 (#11248)
This commit is contained in:
parent
ffa75be480
commit
5addba2abc
16 changed files with 257 additions and 164 deletions
|
@ -6,6 +6,13 @@
|
|||
const { File } = window.__bootstrap.files;
|
||||
const { readAll } = window.__bootstrap.io;
|
||||
const { assert, pathFromURL } = window.__bootstrap.util;
|
||||
const {
|
||||
ArrayPrototypeMap,
|
||||
TypeError,
|
||||
isNaN,
|
||||
ObjectEntries,
|
||||
String,
|
||||
} = window.__bootstrap.primordials;
|
||||
|
||||
function opKill(pid, signo) {
|
||||
core.opSync("op_kill", { pid, signo });
|
||||
|
@ -102,9 +109,9 @@
|
|||
cmd[0] = pathFromURL(cmd[0]);
|
||||
}
|
||||
const res = opRun({
|
||||
cmd: cmd.map(String),
|
||||
cmd: ArrayPrototypeMap(cmd, String),
|
||||
cwd,
|
||||
env: Object.entries(env),
|
||||
env: ObjectEntries(env),
|
||||
stdin: isRid(stdin) ? "" : stdin,
|
||||
stdout: isRid(stdout) ? "" : stdout,
|
||||
stderr: isRid(stderr) ? "" : stderr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue