mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
Don't use window.__base64. Combine deno_ns scripts. (#6858)
This commit is contained in:
parent
ca4dcb36dd
commit
218be6a269
4 changed files with 128 additions and 136 deletions
|
@ -149,7 +149,7 @@
|
|||
return parts.join("");
|
||||
}
|
||||
|
||||
window.__base64 = {
|
||||
window.__bootstrap.base64 = {
|
||||
byteLength,
|
||||
toByteArray,
|
||||
fromByteArray,
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
((window) => {
|
||||
const core = Deno.core;
|
||||
const base64 = window.__base64;
|
||||
const base64 = window.__bootstrap.base64;
|
||||
|
||||
const CONTINUE = null;
|
||||
const END_OF_STREAM = -1;
|
||||
|
|
|
@ -1,89 +1,129 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
// This module exports stable Deno APIs.
|
||||
__bootstrap.denoNs = {
|
||||
test: __bootstrap.testing.test,
|
||||
metrics: __bootstrap.metrics.metrics,
|
||||
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,
|
||||
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,
|
||||
errors: __bootstrap.errors.errors,
|
||||
customInspect: __bootstrap.console.customInspect,
|
||||
inspect: __bootstrap.console.inspect,
|
||||
env: __bootstrap.os.env,
|
||||
exit: __bootstrap.os.exit,
|
||||
execPath: __bootstrap.os.execPath,
|
||||
resources: __bootstrap.resources.resources,
|
||||
close: __bootstrap.resources.close,
|
||||
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,
|
||||
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,
|
||||
connectTls: __bootstrap.tls.connectTls,
|
||||
listenTls: __bootstrap.tls.listenTls,
|
||||
};
|
||||
|
||||
((window) => {
|
||||
window.__bootstrap.denoNs = {
|
||||
test: window.__bootstrap.testing.test,
|
||||
metrics: window.__bootstrap.metrics.metrics,
|
||||
Process: window.__bootstrap.process.Process,
|
||||
run: window.__bootstrap.process.run,
|
||||
isatty: window.__bootstrap.tty.isatty,
|
||||
writeFileSync: window.__bootstrap.writeFile.writeFileSync,
|
||||
writeFile: window.__bootstrap.writeFile.writeFile,
|
||||
writeTextFileSync: window.__bootstrap.writeFile.writeTextFileSync,
|
||||
writeTextFile: window.__bootstrap.writeFile.writeTextFile,
|
||||
readTextFile: window.__bootstrap.readFile.readTextFile,
|
||||
readTextFileSync: window.__bootstrap.readFile.readTextFileSync,
|
||||
readFile: window.__bootstrap.readFile.readFile,
|
||||
readFileSync: window.__bootstrap.readFile.readFileSync,
|
||||
watchFs: window.__bootstrap.fsEvents.watchFs,
|
||||
chmodSync: window.__bootstrap.fs.chmodSync,
|
||||
chmod: window.__bootstrap.fs.chmod,
|
||||
chown: window.__bootstrap.fs.chown,
|
||||
chownSync: window.__bootstrap.fs.chownSync,
|
||||
copyFileSync: window.__bootstrap.fs.copyFileSync,
|
||||
cwd: window.__bootstrap.fs.cwd,
|
||||
makeTempDirSync: window.__bootstrap.fs.makeTempDirSync,
|
||||
makeTempDir: window.__bootstrap.fs.makeTempDir,
|
||||
makeTempFileSync: window.__bootstrap.fs.makeTempFileSync,
|
||||
makeTempFile: window.__bootstrap.fs.makeTempFile,
|
||||
mkdirSync: window.__bootstrap.fs.mkdirSync,
|
||||
mkdir: window.__bootstrap.fs.mkdir,
|
||||
chdir: window.__bootstrap.fs.chdir,
|
||||
copyFile: window.__bootstrap.fs.copyFile,
|
||||
readDirSync: window.__bootstrap.fs.readDirSync,
|
||||
readDir: window.__bootstrap.fs.readDir,
|
||||
readLinkSync: window.__bootstrap.fs.readLinkSync,
|
||||
readLink: window.__bootstrap.fs.readLink,
|
||||
realPathSync: window.__bootstrap.fs.realPathSync,
|
||||
realPath: window.__bootstrap.fs.realPath,
|
||||
removeSync: window.__bootstrap.fs.removeSync,
|
||||
remove: window.__bootstrap.fs.remove,
|
||||
renameSync: window.__bootstrap.fs.renameSync,
|
||||
rename: window.__bootstrap.fs.rename,
|
||||
version: window.__bootstrap.version.version,
|
||||
build: window.__bootstrap.build.build,
|
||||
statSync: window.__bootstrap.fs.statSync,
|
||||
lstatSync: window.__bootstrap.fs.lstatSync,
|
||||
stat: window.__bootstrap.fs.stat,
|
||||
lstat: window.__bootstrap.fs.lstat,
|
||||
truncateSync: window.__bootstrap.fs.truncateSync,
|
||||
truncate: window.__bootstrap.fs.truncate,
|
||||
errors: window.__bootstrap.errors.errors,
|
||||
customInspect: window.__bootstrap.console.customInspect,
|
||||
inspect: window.__bootstrap.console.inspect,
|
||||
env: window.__bootstrap.os.env,
|
||||
exit: window.__bootstrap.os.exit,
|
||||
execPath: window.__bootstrap.os.execPath,
|
||||
resources: window.__bootstrap.resources.resources,
|
||||
close: window.__bootstrap.resources.close,
|
||||
Buffer: window.__bootstrap.buffer.Buffer,
|
||||
readAll: window.__bootstrap.buffer.readAll,
|
||||
readAllSync: window.__bootstrap.buffer.readAllSync,
|
||||
writeAll: window.__bootstrap.buffer.writeAll,
|
||||
writeAllSync: window.__bootstrap.buffer.writeAllSync,
|
||||
copy: window.__bootstrap.io.copy,
|
||||
iter: window.__bootstrap.io.iter,
|
||||
iterSync: window.__bootstrap.io.iterSync,
|
||||
SeekMode: window.__bootstrap.io.SeekMode,
|
||||
read: window.__bootstrap.io.read,
|
||||
readSync: window.__bootstrap.io.readSync,
|
||||
write: window.__bootstrap.io.write,
|
||||
writeSync: window.__bootstrap.io.writeSync,
|
||||
File: window.__bootstrap.files.File,
|
||||
open: window.__bootstrap.files.open,
|
||||
openSync: window.__bootstrap.files.openSync,
|
||||
create: window.__bootstrap.files.create,
|
||||
createSync: window.__bootstrap.files.createSync,
|
||||
stdin: window.__bootstrap.files.stdin,
|
||||
stdout: window.__bootstrap.files.stdout,
|
||||
stderr: window.__bootstrap.files.stderr,
|
||||
seek: window.__bootstrap.files.seek,
|
||||
seekSync: window.__bootstrap.files.seekSync,
|
||||
connect: window.__bootstrap.net.connect,
|
||||
listen: window.__bootstrap.net.listen,
|
||||
connectTls: window.__bootstrap.tls.connectTls,
|
||||
listenTls: window.__bootstrap.tls.listenTls,
|
||||
};
|
||||
})(this);
|
||||
__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,
|
||||
};
|
||||
|
|
|
@ -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);
|
Loading…
Reference in a new issue