1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-18 03:44:05 -05:00

Don't use window.__base64. Combine deno_ns scripts. (#6858)

This commit is contained in:
Ryan Dahl 2020-07-23 11:12:25 -04:00 committed by GitHub
parent ca4dcb36dd
commit 218be6a269
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 128 additions and 136 deletions

View file

@ -149,7 +149,7 @@
return parts.join(""); return parts.join("");
} }
window.__base64 = { window.__bootstrap.base64 = {
byteLength, byteLength,
toByteArray, toByteArray,
fromByteArray, fromByteArray,

View file

@ -26,7 +26,7 @@
((window) => { ((window) => {
const core = Deno.core; const core = Deno.core;
const base64 = window.__base64; const base64 = window.__bootstrap.base64;
const CONTINUE = null; const CONTINUE = null;
const END_OF_STREAM = -1; const END_OF_STREAM = -1;

View file

@ -1,89 +1,129 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// This module exports stable Deno APIs. __bootstrap.denoNs = {
test: __bootstrap.testing.test,
((window) => { metrics: __bootstrap.metrics.metrics,
window.__bootstrap.denoNs = { Process: __bootstrap.process.Process,
test: window.__bootstrap.testing.test, run: __bootstrap.process.run,
metrics: window.__bootstrap.metrics.metrics, isatty: __bootstrap.tty.isatty,
Process: window.__bootstrap.process.Process, writeFileSync: __bootstrap.writeFile.writeFileSync,
run: window.__bootstrap.process.run, writeFile: __bootstrap.writeFile.writeFile,
isatty: window.__bootstrap.tty.isatty, writeTextFileSync: __bootstrap.writeFile.writeTextFileSync,
writeFileSync: window.__bootstrap.writeFile.writeFileSync, writeTextFile: __bootstrap.writeFile.writeTextFile,
writeFile: window.__bootstrap.writeFile.writeFile, readTextFile: __bootstrap.readFile.readTextFile,
writeTextFileSync: window.__bootstrap.writeFile.writeTextFileSync, readTextFileSync: __bootstrap.readFile.readTextFileSync,
writeTextFile: window.__bootstrap.writeFile.writeTextFile, readFile: __bootstrap.readFile.readFile,
readTextFile: window.__bootstrap.readFile.readTextFile, readFileSync: __bootstrap.readFile.readFileSync,
readTextFileSync: window.__bootstrap.readFile.readTextFileSync, watchFs: __bootstrap.fsEvents.watchFs,
readFile: window.__bootstrap.readFile.readFile, chmodSync: __bootstrap.fs.chmodSync,
readFileSync: window.__bootstrap.readFile.readFileSync, chmod: __bootstrap.fs.chmod,
watchFs: window.__bootstrap.fsEvents.watchFs, chown: __bootstrap.fs.chown,
chmodSync: window.__bootstrap.fs.chmodSync, chownSync: __bootstrap.fs.chownSync,
chmod: window.__bootstrap.fs.chmod, copyFileSync: __bootstrap.fs.copyFileSync,
chown: window.__bootstrap.fs.chown, cwd: __bootstrap.fs.cwd,
chownSync: window.__bootstrap.fs.chownSync, makeTempDirSync: __bootstrap.fs.makeTempDirSync,
copyFileSync: window.__bootstrap.fs.copyFileSync, makeTempDir: __bootstrap.fs.makeTempDir,
cwd: window.__bootstrap.fs.cwd, makeTempFileSync: __bootstrap.fs.makeTempFileSync,
makeTempDirSync: window.__bootstrap.fs.makeTempDirSync, makeTempFile: __bootstrap.fs.makeTempFile,
makeTempDir: window.__bootstrap.fs.makeTempDir, mkdirSync: __bootstrap.fs.mkdirSync,
makeTempFileSync: window.__bootstrap.fs.makeTempFileSync, mkdir: __bootstrap.fs.mkdir,
makeTempFile: window.__bootstrap.fs.makeTempFile, chdir: __bootstrap.fs.chdir,
mkdirSync: window.__bootstrap.fs.mkdirSync, copyFile: __bootstrap.fs.copyFile,
mkdir: window.__bootstrap.fs.mkdir, readDirSync: __bootstrap.fs.readDirSync,
chdir: window.__bootstrap.fs.chdir, readDir: __bootstrap.fs.readDir,
copyFile: window.__bootstrap.fs.copyFile, readLinkSync: __bootstrap.fs.readLinkSync,
readDirSync: window.__bootstrap.fs.readDirSync, readLink: __bootstrap.fs.readLink,
readDir: window.__bootstrap.fs.readDir, realPathSync: __bootstrap.fs.realPathSync,
readLinkSync: window.__bootstrap.fs.readLinkSync, realPath: __bootstrap.fs.realPath,
readLink: window.__bootstrap.fs.readLink, removeSync: __bootstrap.fs.removeSync,
realPathSync: window.__bootstrap.fs.realPathSync, remove: __bootstrap.fs.remove,
realPath: window.__bootstrap.fs.realPath, renameSync: __bootstrap.fs.renameSync,
removeSync: window.__bootstrap.fs.removeSync, rename: __bootstrap.fs.rename,
remove: window.__bootstrap.fs.remove, version: __bootstrap.version.version,
renameSync: window.__bootstrap.fs.renameSync, build: __bootstrap.build.build,
rename: window.__bootstrap.fs.rename, statSync: __bootstrap.fs.statSync,
version: window.__bootstrap.version.version, lstatSync: __bootstrap.fs.lstatSync,
build: window.__bootstrap.build.build, stat: __bootstrap.fs.stat,
statSync: window.__bootstrap.fs.statSync, lstat: __bootstrap.fs.lstat,
lstatSync: window.__bootstrap.fs.lstatSync, truncateSync: __bootstrap.fs.truncateSync,
stat: window.__bootstrap.fs.stat, truncate: __bootstrap.fs.truncate,
lstat: window.__bootstrap.fs.lstat, errors: __bootstrap.errors.errors,
truncateSync: window.__bootstrap.fs.truncateSync, customInspect: __bootstrap.console.customInspect,
truncate: window.__bootstrap.fs.truncate, inspect: __bootstrap.console.inspect,
errors: window.__bootstrap.errors.errors, env: __bootstrap.os.env,
customInspect: window.__bootstrap.console.customInspect, exit: __bootstrap.os.exit,
inspect: window.__bootstrap.console.inspect, execPath: __bootstrap.os.execPath,
env: window.__bootstrap.os.env, resources: __bootstrap.resources.resources,
exit: window.__bootstrap.os.exit, close: __bootstrap.resources.close,
execPath: window.__bootstrap.os.execPath, Buffer: __bootstrap.buffer.Buffer,
resources: window.__bootstrap.resources.resources, readAll: __bootstrap.buffer.readAll,
close: window.__bootstrap.resources.close, readAllSync: __bootstrap.buffer.readAllSync,
Buffer: window.__bootstrap.buffer.Buffer, writeAll: __bootstrap.buffer.writeAll,
readAll: window.__bootstrap.buffer.readAll, writeAllSync: __bootstrap.buffer.writeAllSync,
readAllSync: window.__bootstrap.buffer.readAllSync, copy: __bootstrap.io.copy,
writeAll: window.__bootstrap.buffer.writeAll, iter: __bootstrap.io.iter,
writeAllSync: window.__bootstrap.buffer.writeAllSync, iterSync: __bootstrap.io.iterSync,
copy: window.__bootstrap.io.copy, SeekMode: __bootstrap.io.SeekMode,
iter: window.__bootstrap.io.iter, read: __bootstrap.io.read,
iterSync: window.__bootstrap.io.iterSync, readSync: __bootstrap.io.readSync,
SeekMode: window.__bootstrap.io.SeekMode, write: __bootstrap.io.write,
read: window.__bootstrap.io.read, writeSync: __bootstrap.io.writeSync,
readSync: window.__bootstrap.io.readSync, File: __bootstrap.files.File,
write: window.__bootstrap.io.write, open: __bootstrap.files.open,
writeSync: window.__bootstrap.io.writeSync, openSync: __bootstrap.files.openSync,
File: window.__bootstrap.files.File, create: __bootstrap.files.create,
open: window.__bootstrap.files.open, createSync: __bootstrap.files.createSync,
openSync: window.__bootstrap.files.openSync, stdin: __bootstrap.files.stdin,
create: window.__bootstrap.files.create, stdout: __bootstrap.files.stdout,
createSync: window.__bootstrap.files.createSync, stderr: __bootstrap.files.stderr,
stdin: window.__bootstrap.files.stdin, seek: __bootstrap.files.seek,
stdout: window.__bootstrap.files.stdout, seekSync: __bootstrap.files.seekSync,
stderr: window.__bootstrap.files.stderr, connect: __bootstrap.net.connect,
seek: window.__bootstrap.files.seek, listen: __bootstrap.net.listen,
seekSync: window.__bootstrap.files.seekSync, connectTls: __bootstrap.tls.connectTls,
connect: window.__bootstrap.net.connect, listenTls: __bootstrap.tls.listenTls,
listen: window.__bootstrap.net.listen, };
connectTls: window.__bootstrap.tls.connectTls,
listenTls: window.__bootstrap.tls.listenTls, __bootstrap.denoNsUnstable = {
signal: __bootstrap.signals.signal,
signals: __bootstrap.signals.signals,
Signal: __bootstrap.signals.Signal,
SignalStream: __bootstrap.signals.SignalStream,
transpileOnly: __bootstrap.compilerApi.transpileOnly,
compile: __bootstrap.compilerApi.compile,
bundle: __bootstrap.compilerApi.bundle,
permissions: __bootstrap.permissions.permissions,
Permissions: __bootstrap.permissions.Permissions,
PermissionStatus: __bootstrap.permissions.PermissionStatus,
openPlugin: __bootstrap.plugins.openPlugin,
kill: __bootstrap.process.kill,
setRaw: __bootstrap.tty.setRaw,
consoleSize: __bootstrap.tty.consoleSize,
DiagnosticCategory: __bootstrap.diagnostics.DiagnosticCategory,
loadavg: __bootstrap.os.loadavg,
hostname: __bootstrap.os.hostname,
osRelease: __bootstrap.os.osRelease,
applySourceMap: __bootstrap.errorStack.opApplySourceMap,
formatDiagnostics: __bootstrap.errorStack.opFormatDiagnostics,
shutdown: __bootstrap.net.shutdown,
ShutdownMode: __bootstrap.net.ShutdownMode,
listen: __bootstrap.netUnstable.listen,
connect: __bootstrap.netUnstable.connect,
listenDatagram: __bootstrap.netUnstable.listenDatagram,
startTls: __bootstrap.tls.startTls,
fstatSync: __bootstrap.fs.fstatSync,
fstat: __bootstrap.fs.fstat,
ftruncateSync: __bootstrap.fs.ftruncateSync,
ftruncate: __bootstrap.fs.ftruncate,
umask: __bootstrap.fs.umask,
link: __bootstrap.fs.link,
linkSync: __bootstrap.fs.linkSync,
utime: __bootstrap.fs.utime,
utimeSync: __bootstrap.fs.utimeSync,
symlink: __bootstrap.fs.symlink,
symlinkSync: __bootstrap.fs.symlinkSync,
fdatasyncSync: __bootstrap.fs.fdatasyncSync,
fdatasync: __bootstrap.fs.fdatasync,
fsyncSync: __bootstrap.fs.fsyncSync,
fsync: __bootstrap.fs.fsync,
}; };
})(this);

View file

@ -1,48 +0,0 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// This module exports unstable Deno APIs.
((window) => {
window.__bootstrap.denoNsUnstable = {
signal: window.__bootstrap.signals.signal,
signals: window.__bootstrap.signals.signals,
Signal: window.__bootstrap.signals.Signal,
SignalStream: window.__bootstrap.signals.SignalStream,
transpileOnly: window.__bootstrap.compilerApi.transpileOnly,
compile: window.__bootstrap.compilerApi.compile,
bundle: window.__bootstrap.compilerApi.bundle,
permissions: window.__bootstrap.permissions.permissions,
Permissions: window.__bootstrap.permissions.Permissions,
PermissionStatus: window.__bootstrap.permissions.PermissionStatus,
openPlugin: window.__bootstrap.plugins.openPlugin,
kill: window.__bootstrap.process.kill,
setRaw: window.__bootstrap.tty.setRaw,
consoleSize: window.__bootstrap.tty.consoleSize,
DiagnosticCategory: window.__bootstrap.diagnostics.DiagnosticCategory,
loadavg: window.__bootstrap.os.loadavg,
hostname: window.__bootstrap.os.hostname,
osRelease: window.__bootstrap.os.osRelease,
applySourceMap: window.__bootstrap.errorStack.opApplySourceMap,
formatDiagnostics: window.__bootstrap.errorStack.opFormatDiagnostics,
shutdown: window.__bootstrap.net.shutdown,
ShutdownMode: window.__bootstrap.net.ShutdownMode,
listen: window.__bootstrap.netUnstable.listen,
connect: window.__bootstrap.netUnstable.connect,
listenDatagram: window.__bootstrap.netUnstable.listenDatagram,
startTls: window.__bootstrap.tls.startTls,
fstatSync: window.__bootstrap.fs.fstatSync,
fstat: window.__bootstrap.fs.fstat,
ftruncateSync: window.__bootstrap.fs.ftruncateSync,
ftruncate: window.__bootstrap.fs.ftruncate,
umask: window.__bootstrap.fs.umask,
link: window.__bootstrap.fs.link,
linkSync: window.__bootstrap.fs.linkSync,
utime: window.__bootstrap.fs.utime,
utimeSync: window.__bootstrap.fs.utimeSync,
symlink: window.__bootstrap.fs.symlink,
symlinkSync: window.__bootstrap.fs.symlinkSync,
fdatasyncSync: window.__bootstrap.fs.fdatasyncSync,
fdatasync: window.__bootstrap.fs.fdatasync,
fsyncSync: window.__bootstrap.fs.fsyncSync,
fsync: window.__bootstrap.fs.fsync,
};
})(this);