2022-01-07 22:09:52 -05:00
|
|
|
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
2021-02-04 17:18:32 -05:00
|
|
|
"use strict";
|
2020-07-19 13:49:44 -04:00
|
|
|
|
2020-11-03 10:19:29 -05:00
|
|
|
((window) => {
|
2021-10-10 11:20:30 -04:00
|
|
|
const core = window.Deno.core;
|
2020-11-03 10:19:29 -05:00
|
|
|
const __bootstrap = window.__bootstrap;
|
2022-11-10 16:03:28 -05:00
|
|
|
|
2020-11-03 10:19:29 -05:00
|
|
|
__bootstrap.denoNs = {
|
2021-10-10 11:20:30 -04:00
|
|
|
metrics: core.metrics,
|
2020-11-03 10:19:29 -05:00
|
|
|
Process: __bootstrap.process.Process,
|
|
|
|
run: __bootstrap.process.run,
|
|
|
|
isatty: __bootstrap.tty.isatty,
|
|
|
|
writeFileSync: __bootstrap.writeFile.writeFileSync,
|
|
|
|
writeFile: __bootstrap.writeFile.writeFile,
|
|
|
|
writeTextFileSync: __bootstrap.writeFile.writeTextFileSync,
|
|
|
|
writeTextFile: __bootstrap.writeFile.writeTextFile,
|
|
|
|
readTextFile: __bootstrap.readFile.readTextFile,
|
|
|
|
readTextFileSync: __bootstrap.readFile.readTextFileSync,
|
|
|
|
readFile: __bootstrap.readFile.readFile,
|
|
|
|
readFileSync: __bootstrap.readFile.readFileSync,
|
|
|
|
watchFs: __bootstrap.fsEvents.watchFs,
|
|
|
|
chmodSync: __bootstrap.fs.chmodSync,
|
|
|
|
chmod: __bootstrap.fs.chmod,
|
|
|
|
chown: __bootstrap.fs.chown,
|
|
|
|
chownSync: __bootstrap.fs.chownSync,
|
|
|
|
copyFileSync: __bootstrap.fs.copyFileSync,
|
|
|
|
cwd: __bootstrap.fs.cwd,
|
|
|
|
makeTempDirSync: __bootstrap.fs.makeTempDirSync,
|
|
|
|
makeTempDir: __bootstrap.fs.makeTempDir,
|
|
|
|
makeTempFileSync: __bootstrap.fs.makeTempFileSync,
|
|
|
|
makeTempFile: __bootstrap.fs.makeTempFile,
|
2022-12-17 17:25:51 -05:00
|
|
|
memoryUsage: () => core.ops.op_runtime_memory_usage(),
|
2020-11-03 10:19:29 -05:00
|
|
|
mkdirSync: __bootstrap.fs.mkdirSync,
|
|
|
|
mkdir: __bootstrap.fs.mkdir,
|
|
|
|
chdir: __bootstrap.fs.chdir,
|
|
|
|
copyFile: __bootstrap.fs.copyFile,
|
|
|
|
readDirSync: __bootstrap.fs.readDirSync,
|
|
|
|
readDir: __bootstrap.fs.readDir,
|
|
|
|
readLinkSync: __bootstrap.fs.readLinkSync,
|
|
|
|
readLink: __bootstrap.fs.readLink,
|
|
|
|
realPathSync: __bootstrap.fs.realPathSync,
|
|
|
|
realPath: __bootstrap.fs.realPath,
|
|
|
|
removeSync: __bootstrap.fs.removeSync,
|
|
|
|
remove: __bootstrap.fs.remove,
|
|
|
|
renameSync: __bootstrap.fs.renameSync,
|
|
|
|
rename: __bootstrap.fs.rename,
|
|
|
|
version: __bootstrap.version.version,
|
|
|
|
build: __bootstrap.build.build,
|
|
|
|
statSync: __bootstrap.fs.statSync,
|
|
|
|
lstatSync: __bootstrap.fs.lstatSync,
|
|
|
|
stat: __bootstrap.fs.stat,
|
|
|
|
lstat: __bootstrap.fs.lstat,
|
|
|
|
truncateSync: __bootstrap.fs.truncateSync,
|
|
|
|
truncate: __bootstrap.fs.truncate,
|
2021-04-11 08:05:22 -04:00
|
|
|
ftruncateSync: __bootstrap.fs.ftruncateSync,
|
|
|
|
ftruncate: __bootstrap.fs.ftruncate,
|
2022-10-25 14:03:05 -04:00
|
|
|
futime: __bootstrap.fs.futime,
|
|
|
|
futimeSync: __bootstrap.fs.futimeSync,
|
2020-11-03 10:19:29 -05:00
|
|
|
errors: __bootstrap.errors.errors,
|
2021-06-25 03:19:18 -04:00
|
|
|
// TODO(kt3k): Remove this export at v2
|
|
|
|
// See https://github.com/denoland/deno/issues/9294
|
2020-11-03 10:19:29 -05:00
|
|
|
customInspect: __bootstrap.console.customInspect,
|
|
|
|
inspect: __bootstrap.console.inspect,
|
|
|
|
env: __bootstrap.os.env,
|
|
|
|
exit: __bootstrap.os.exit,
|
|
|
|
execPath: __bootstrap.os.execPath,
|
|
|
|
Buffer: __bootstrap.buffer.Buffer,
|
|
|
|
readAll: __bootstrap.buffer.readAll,
|
|
|
|
readAllSync: __bootstrap.buffer.readAllSync,
|
|
|
|
writeAll: __bootstrap.buffer.writeAll,
|
|
|
|
writeAllSync: __bootstrap.buffer.writeAllSync,
|
|
|
|
copy: __bootstrap.io.copy,
|
|
|
|
iter: __bootstrap.io.iter,
|
|
|
|
iterSync: __bootstrap.io.iterSync,
|
|
|
|
SeekMode: __bootstrap.io.SeekMode,
|
|
|
|
read: __bootstrap.io.read,
|
|
|
|
readSync: __bootstrap.io.readSync,
|
|
|
|
write: __bootstrap.io.write,
|
|
|
|
writeSync: __bootstrap.io.writeSync,
|
|
|
|
File: __bootstrap.files.File,
|
2022-02-15 07:59:04 -05:00
|
|
|
FsFile: __bootstrap.files.FsFile,
|
2020-11-03 10:19:29 -05:00
|
|
|
open: __bootstrap.files.open,
|
|
|
|
openSync: __bootstrap.files.openSync,
|
|
|
|
create: __bootstrap.files.create,
|
|
|
|
createSync: __bootstrap.files.createSync,
|
|
|
|
stdin: __bootstrap.files.stdin,
|
|
|
|
stdout: __bootstrap.files.stdout,
|
|
|
|
stderr: __bootstrap.files.stderr,
|
|
|
|
seek: __bootstrap.files.seek,
|
|
|
|
seekSync: __bootstrap.files.seekSync,
|
|
|
|
connect: __bootstrap.net.connect,
|
|
|
|
listen: __bootstrap.net.listen,
|
2022-10-25 11:21:14 -04:00
|
|
|
loadavg: __bootstrap.os.loadavg,
|
2020-11-03 10:19:29 -05:00
|
|
|
connectTls: __bootstrap.tls.connectTls,
|
|
|
|
listenTls: __bootstrap.tls.listenTls,
|
2021-10-29 11:13:31 -04:00
|
|
|
startTls: __bootstrap.tls.startTls,
|
2021-06-21 21:03:00 -04:00
|
|
|
shutdown: __bootstrap.net.shutdown,
|
2021-04-12 05:27:38 -04:00
|
|
|
fstatSync: __bootstrap.fs.fstatSync,
|
|
|
|
fstat: __bootstrap.fs.fstat,
|
2020-11-03 10:19:29 -05:00
|
|
|
fsyncSync: __bootstrap.fs.fsyncSync,
|
|
|
|
fsync: __bootstrap.fs.fsync,
|
|
|
|
fdatasyncSync: __bootstrap.fs.fdatasyncSync,
|
|
|
|
fdatasync: __bootstrap.fs.fdatasync,
|
2021-02-25 19:13:48 -05:00
|
|
|
symlink: __bootstrap.fs.symlink,
|
|
|
|
symlinkSync: __bootstrap.fs.symlinkSync,
|
2021-02-25 12:35:10 -05:00
|
|
|
link: __bootstrap.fs.link,
|
|
|
|
linkSync: __bootstrap.fs.linkSync,
|
2021-02-24 22:33:09 -05:00
|
|
|
permissions: __bootstrap.permissions.permissions,
|
|
|
|
Permissions: __bootstrap.permissions.Permissions,
|
|
|
|
PermissionStatus: __bootstrap.permissions.PermissionStatus,
|
2021-08-02 08:40:46 -04:00
|
|
|
serveHttp: __bootstrap.http.serveHttp,
|
2021-10-10 06:16:11 -04:00
|
|
|
resolveDns: __bootstrap.net.resolveDns,
|
2021-09-13 08:06:12 -04:00
|
|
|
upgradeWebSocket: __bootstrap.http.upgradeWebSocket,
|
2022-10-25 15:23:36 -04:00
|
|
|
utime: __bootstrap.fs.utime,
|
|
|
|
utimeSync: __bootstrap.fs.utimeSync,
|
2021-10-10 09:48:26 -04:00
|
|
|
kill: __bootstrap.process.kill,
|
2022-01-31 00:16:39 -05:00
|
|
|
addSignalListener: __bootstrap.signals.addSignalListener,
|
|
|
|
removeSignalListener: __bootstrap.signals.removeSignalListener,
|
2022-09-27 16:11:11 -04:00
|
|
|
refTimer: __bootstrap.timers.refTimer,
|
|
|
|
unrefTimer: __bootstrap.timers.unrefTimer,
|
2022-10-27 16:56:06 -04:00
|
|
|
osRelease: __bootstrap.os.osRelease,
|
2022-12-26 18:16:12 -05:00
|
|
|
osUptime: __bootstrap.os.osUptime,
|
2022-09-29 06:15:35 -04:00
|
|
|
hostname: __bootstrap.os.hostname,
|
2022-11-09 08:14:25 -05:00
|
|
|
systemMemoryInfo: __bootstrap.os.systemMemoryInfo,
|
2022-11-09 07:29:24 -05:00
|
|
|
networkInterfaces: __bootstrap.os.networkInterfaces,
|
2022-10-25 18:23:21 -04:00
|
|
|
consoleSize: __bootstrap.tty.consoleSize,
|
2022-11-09 09:46:50 -05:00
|
|
|
gid: __bootstrap.os.gid,
|
|
|
|
uid: __bootstrap.os.uid,
|
2020-11-03 10:19:29 -05:00
|
|
|
};
|
2020-07-19 13:49:44 -04:00
|
|
|
|
2020-11-03 10:19:29 -05:00
|
|
|
__bootstrap.denoNsUnstable = {
|
|
|
|
DiagnosticCategory: __bootstrap.diagnostics.DiagnosticCategory,
|
2022-10-25 16:50:55 -04:00
|
|
|
listenDatagram: __bootstrap.net.listenDatagram,
|
2020-11-03 10:19:29 -05:00
|
|
|
umask: __bootstrap.fs.umask,
|
|
|
|
HttpClient: __bootstrap.fetch.HttpClient,
|
|
|
|
createHttpClient: __bootstrap.fetch.createHttpClient,
|
2021-04-08 18:34:15 -04:00
|
|
|
http: __bootstrap.http,
|
2021-08-06 17:28:10 -04:00
|
|
|
dlopen: __bootstrap.ffi.dlopen,
|
2022-06-20 07:06:04 -04:00
|
|
|
UnsafeCallback: __bootstrap.ffi.UnsafeCallback,
|
2021-12-15 09:41:49 -05:00
|
|
|
UnsafePointer: __bootstrap.ffi.UnsafePointer,
|
|
|
|
UnsafePointerView: __bootstrap.ffi.UnsafePointerView,
|
2022-01-12 06:38:26 -05:00
|
|
|
UnsafeFnPointer: __bootstrap.ffi.UnsafeFnPointer,
|
2021-08-24 09:21:31 -04:00
|
|
|
flock: __bootstrap.fs.flock,
|
|
|
|
flockSync: __bootstrap.fs.flockSync,
|
|
|
|
funlock: __bootstrap.fs.funlock,
|
|
|
|
funlockSync: __bootstrap.fs.funlockSync,
|
2022-04-20 18:20:33 -04:00
|
|
|
Child: __bootstrap.spawn.Child,
|
2022-11-28 06:33:51 -05:00
|
|
|
ChildProcess: __bootstrap.spawn.ChildProcess,
|
2022-04-20 18:20:33 -04:00
|
|
|
spawnChild: __bootstrap.spawn.spawnChild,
|
|
|
|
spawn: __bootstrap.spawn.spawn,
|
|
|
|
spawnSync: __bootstrap.spawn.spawnSync,
|
2022-11-13 14:00:24 -05:00
|
|
|
Command: __bootstrap.spawn.Command,
|
2022-08-18 08:05:02 -04:00
|
|
|
serve: __bootstrap.flash.serve,
|
2022-08-24 08:10:57 -04:00
|
|
|
upgradeHttp: __bootstrap.http.upgradeHttp,
|
|
|
|
upgradeHttpRaw: __bootstrap.flash.upgradeHttpRaw,
|
2020-11-03 10:19:29 -05:00
|
|
|
};
|
|
|
|
})(this);
|