mirror of
https://github.com/denoland/deno.git
synced 2025-09-29 05:34:49 +00:00
refactor: remove dispatch_json.js from cli/rt and cli/tsc (#7521)
Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync
This commit is contained in:
parent
104aebdfb5
commit
6c4da0e429
31 changed files with 177 additions and 373 deletions
|
@ -1,23 +1,23 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
((window) => {
|
||||
const core = window.Deno.core;
|
||||
const { File } = window.__bootstrap.files;
|
||||
const { close } = window.__bootstrap.resources;
|
||||
const { readAll } = window.__bootstrap.buffer;
|
||||
const { sendSync, sendAsync } = window.__bootstrap.dispatchJson;
|
||||
const { assert, pathFromURL } = window.__bootstrap.util;
|
||||
|
||||
function opKill(pid, signo) {
|
||||
sendSync("op_kill", { pid, signo });
|
||||
core.jsonOpSync("op_kill", { pid, signo });
|
||||
}
|
||||
|
||||
function opRunStatus(rid) {
|
||||
return sendAsync("op_run_status", { rid });
|
||||
return core.jsonOpAsync("op_run_status", { rid });
|
||||
}
|
||||
|
||||
function opRun(request) {
|
||||
assert(request.cmd.length > 0);
|
||||
return sendSync("op_run", request);
|
||||
return core.jsonOpSync("op_run", request);
|
||||
}
|
||||
|
||||
async function runStatus(rid) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue