summaryrefslogtreecommitdiff
path: root/os.ts
diff options
context:
space:
mode:
authorYingchen Xue <yingchenxue@qq.com>2018-06-05 16:10:27 +0800
committerRyan Dahl <ry@tinyclouds.org>2018-06-05 10:10:27 +0200
commit78124cd45f5b5efe1f06e82554ff09273b75b050 (patch)
tree646f8d233b5827d4b790d4f97ddce977eb1870c5 /os.ts
parent8094c7421b50d3cbbc0eace6d376d7ed31b3cfa1 (diff)
Rename sendMsg to pubInternal (#136)
Diffstat (limited to 'os.ts')
-rw-r--r--os.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/os.ts b/os.ts
index 2817a97cc..87f8061ff 100644
--- a/os.ts
+++ b/os.ts
@@ -1,12 +1,12 @@
// Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
// All rights reserved. MIT License.
import { ModuleInfo } from "./types";
-import { sendMsg } from "./dispatch";
+import { pubInternal } from "./dispatch";
import { main as pb } from "./msg.pb";
import { assert } from "./util";
export function exit(exitCode = 0): void {
- sendMsg("os", {
+ pubInternal("os", {
command: pb.Msg.Command.EXIT,
exitCode
});
@@ -16,7 +16,7 @@ export function codeFetch(
moduleSpecifier: string,
containingFile: string
): ModuleInfo {
- const res = sendMsg("os", {
+ const res = pubInternal("os", {
command: pb.Msg.Command.CODE_FETCH,
codeFetchModuleSpecifier: moduleSpecifier,
codeFetchContainingFile: containingFile
@@ -35,7 +35,7 @@ export function codeCache(
sourceCode: string,
outputCode: string
): void {
- sendMsg("os", {
+ pubInternal("os", {
command: pb.Msg.Command.CODE_CACHE,
codeCacheFilename: filename,
codeCacheSourceCode: sourceCode,
@@ -44,7 +44,7 @@ export function codeCache(
}
export function readFileSync(filename: string): Uint8Array {
- const res = sendMsg("os", {
+ const res = pubInternal("os", {
command: pb.Msg.Command.READ_FILE_SYNC,
readFileSyncFilename: filename
});
@@ -56,7 +56,7 @@ export function writeFileSync(
data: Uint8Array,
perm: number
): void {
- sendMsg("os", {
+ pubInternal("os", {
command: pb.Msg.Command.WRITE_FILE_SYNC,
writeFileSyncFilename: filename,
writeFileSyncData: data,