2019-01-01 19:58:40 -05:00
|
|
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
2018-10-20 03:25:29 +08:00
|
|
|
|
2018-07-06 11:20:35 -04:00
|
|
|
// Public deno module.
|
2019-09-02 17:07:11 -04:00
|
|
|
export { env, exit, isTTY, execPath, homeDir } from "./os.ts";
|
|
|
|
export { chdir, cwd } from "./dir.ts";
|
2018-12-13 16:20:37 -05:00
|
|
|
export {
|
|
|
|
File,
|
|
|
|
open,
|
2019-03-28 04:29:36 +01:00
|
|
|
openSync,
|
2018-12-13 16:20:37 -05:00
|
|
|
stdin,
|
|
|
|
stdout,
|
|
|
|
stderr,
|
|
|
|
read,
|
2019-03-28 04:29:36 +01:00
|
|
|
readSync,
|
2018-12-13 16:20:37 -05:00
|
|
|
write,
|
2019-03-28 04:29:36 +01:00
|
|
|
writeSync,
|
2019-02-18 15:26:41 -08:00
|
|
|
seek,
|
2019-03-28 04:29:36 +01:00
|
|
|
seekSync,
|
2018-12-13 16:20:37 -05:00
|
|
|
close,
|
|
|
|
OpenMode
|
2019-09-02 17:07:11 -04:00
|
|
|
} from "./files.ts";
|
2018-10-06 17:29:59 +02:00
|
|
|
export {
|
2019-07-06 23:16:03 +09:00
|
|
|
EOF,
|
2018-10-08 09:19:18 +02:00
|
|
|
copy,
|
2018-10-31 15:29:13 +01:00
|
|
|
toAsyncIterator,
|
2019-02-18 15:26:41 -08:00
|
|
|
SeekMode,
|
2018-10-08 09:19:18 +02:00
|
|
|
Reader,
|
2019-03-28 04:29:36 +01:00
|
|
|
SyncReader,
|
2018-10-08 09:19:18 +02:00
|
|
|
Writer,
|
2019-03-28 04:29:36 +01:00
|
|
|
SyncWriter,
|
2018-10-08 09:19:18 +02:00
|
|
|
Closer,
|
|
|
|
Seeker,
|
2019-03-28 04:29:36 +01:00
|
|
|
SyncSeeker,
|
2018-10-26 12:14:06 -04:00
|
|
|
ReadCloser,
|
2018-10-08 09:19:18 +02:00
|
|
|
WriteCloser,
|
|
|
|
ReadSeeker,
|
|
|
|
WriteSeeker,
|
|
|
|
ReadWriteCloser,
|
|
|
|
ReadWriteSeeker
|
2019-09-02 17:07:11 -04:00
|
|
|
} from "./io.ts";
|
|
|
|
export {
|
|
|
|
Buffer,
|
|
|
|
readAll,
|
|
|
|
readAllSync,
|
|
|
|
writeAll,
|
|
|
|
writeAllSync
|
|
|
|
} from "./buffer.ts";
|
|
|
|
export { mkdirSync, mkdir } from "./mkdir.ts";
|
2019-02-14 00:50:15 +11:00
|
|
|
export {
|
|
|
|
makeTempDirSync,
|
|
|
|
makeTempDir,
|
|
|
|
MakeTempDirOptions
|
2019-09-02 17:07:11 -04:00
|
|
|
} from "./make_temp_dir.ts";
|
|
|
|
export { chmodSync, chmod } from "./chmod.ts";
|
|
|
|
export { chownSync, chown } from "./chown.ts";
|
|
|
|
export { utimeSync, utime } from "./utime.ts";
|
|
|
|
export { removeSync, remove, RemoveOption } from "./remove.ts";
|
|
|
|
export { renameSync, rename } from "./rename.ts";
|
|
|
|
export { readFileSync, readFile } from "./read_file.ts";
|
|
|
|
export { readDirSync, readDir } from "./read_dir.ts";
|
|
|
|
export { copyFileSync, copyFile } from "./copy_file.ts";
|
|
|
|
export { readlinkSync, readlink } from "./read_link.ts";
|
|
|
|
export { statSync, lstatSync, stat, lstat } from "./stat.ts";
|
|
|
|
export { linkSync, link } from "./link.ts";
|
|
|
|
export { symlinkSync, symlink } from "./symlink.ts";
|
|
|
|
export { writeFileSync, writeFile, WriteFileOptions } from "./write_file.ts";
|
|
|
|
export { applySourceMap } from "./error_stack.ts";
|
|
|
|
export { ErrorKind, DenoError } from "./errors.ts";
|
2019-03-04 17:04:19 +01:00
|
|
|
export {
|
|
|
|
permissions,
|
|
|
|
revokePermission,
|
|
|
|
Permission,
|
|
|
|
Permissions
|
2019-09-02 17:07:11 -04:00
|
|
|
} from "./permissions.ts";
|
|
|
|
export { truncateSync, truncate } from "./truncate.ts";
|
|
|
|
export { FileInfo } from "./file_info.ts";
|
|
|
|
export { connect, dial, listen, Listener, Conn } from "./net.ts";
|
2019-09-23 14:40:38 -04:00
|
|
|
export { dialTLS } from "./tls.ts";
|
2019-09-02 17:07:11 -04:00
|
|
|
export { metrics, Metrics } from "./metrics.ts";
|
|
|
|
export { resources } from "./resources.ts";
|
2019-04-21 18:26:56 -07:00
|
|
|
export {
|
|
|
|
kill,
|
|
|
|
run,
|
|
|
|
RunOptions,
|
|
|
|
Process,
|
|
|
|
ProcessStatus,
|
|
|
|
Signal
|
2019-09-02 17:07:11 -04:00
|
|
|
} from "./process.ts";
|
|
|
|
export { inspect, customInspect } from "./console.ts";
|
2019-09-10 12:39:42 +09:00
|
|
|
export { build, OperatingSystem, Arch } from "./build.ts";
|
2019-09-02 17:07:11 -04:00
|
|
|
export { version } from "./version.ts";
|
2018-09-22 20:47:44 +08:00
|
|
|
export const args: string[] = [];
|
2018-10-06 00:13:22 +10:00
|
|
|
|
2019-03-26 23:22:07 +11:00
|
|
|
// These are internal Deno APIs. We are marking them as internal so they do not
|
|
|
|
// appear in the runtime type library.
|
|
|
|
/** @internal */
|
2019-09-02 17:07:11 -04:00
|
|
|
export { core } from "./core.ts";
|
2019-03-26 23:22:07 +11:00
|
|
|
|
2019-07-29 19:11:08 +10:00
|
|
|
/** @internal */
|
2019-09-02 17:07:11 -04:00
|
|
|
export { setPrepareStackTrace } from "./error_stack.ts";
|
2019-07-29 19:11:08 +10:00
|
|
|
|
2018-12-23 11:44:08 -05:00
|
|
|
// TODO Don't expose Console nor stringifyArgs.
|
2019-02-14 00:50:15 +11:00
|
|
|
/** @internal */
|
2019-09-02 17:07:11 -04:00
|
|
|
export { Console, stringifyArgs } from "./console.ts";
|
2018-12-23 11:44:08 -05:00
|
|
|
// TODO Don't expose DomIterableMixin.
|
2019-02-14 00:50:15 +11:00
|
|
|
/** @internal */
|
2019-09-02 17:07:11 -04:00
|
|
|
export { DomIterableMixin } from "./mixins/dom_iterable.ts";
|
|
|
|
|
|
|
|
/** The current process id of the runtime. */
|
|
|
|
export let pid: number;
|
|
|
|
|
|
|
|
/** Reflects the NO_COLOR environment variable: https://no-color.org/ */
|
|
|
|
export let noColor: boolean;
|
|
|
|
|
|
|
|
// TODO(ry) This should not be exposed to Deno.
|
|
|
|
export function _setGlobals(pid_: number, noColor_: boolean): void {
|
|
|
|
pid = pid_;
|
|
|
|
noColor = noColor_;
|
|
|
|
}
|