mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 12:58:54 -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("");
|
return parts.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
window.__base64 = {
|
window.__bootstrap.base64 = {
|
||||||
byteLength,
|
byteLength,
|
||||||
toByteArray,
|
toByteArray,
|
||||||
fromByteArray,
|
fromByteArray,
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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,
|
||||||
|
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) => {
|
__bootstrap.denoNsUnstable = {
|
||||||
window.__bootstrap.denoNs = {
|
signal: __bootstrap.signals.signal,
|
||||||
test: window.__bootstrap.testing.test,
|
signals: __bootstrap.signals.signals,
|
||||||
metrics: window.__bootstrap.metrics.metrics,
|
Signal: __bootstrap.signals.Signal,
|
||||||
Process: window.__bootstrap.process.Process,
|
SignalStream: __bootstrap.signals.SignalStream,
|
||||||
run: window.__bootstrap.process.run,
|
transpileOnly: __bootstrap.compilerApi.transpileOnly,
|
||||||
isatty: window.__bootstrap.tty.isatty,
|
compile: __bootstrap.compilerApi.compile,
|
||||||
writeFileSync: window.__bootstrap.writeFile.writeFileSync,
|
bundle: __bootstrap.compilerApi.bundle,
|
||||||
writeFile: window.__bootstrap.writeFile.writeFile,
|
permissions: __bootstrap.permissions.permissions,
|
||||||
writeTextFileSync: window.__bootstrap.writeFile.writeTextFileSync,
|
Permissions: __bootstrap.permissions.Permissions,
|
||||||
writeTextFile: window.__bootstrap.writeFile.writeTextFile,
|
PermissionStatus: __bootstrap.permissions.PermissionStatus,
|
||||||
readTextFile: window.__bootstrap.readFile.readTextFile,
|
openPlugin: __bootstrap.plugins.openPlugin,
|
||||||
readTextFileSync: window.__bootstrap.readFile.readTextFileSync,
|
kill: __bootstrap.process.kill,
|
||||||
readFile: window.__bootstrap.readFile.readFile,
|
setRaw: __bootstrap.tty.setRaw,
|
||||||
readFileSync: window.__bootstrap.readFile.readFileSync,
|
consoleSize: __bootstrap.tty.consoleSize,
|
||||||
watchFs: window.__bootstrap.fsEvents.watchFs,
|
DiagnosticCategory: __bootstrap.diagnostics.DiagnosticCategory,
|
||||||
chmodSync: window.__bootstrap.fs.chmodSync,
|
loadavg: __bootstrap.os.loadavg,
|
||||||
chmod: window.__bootstrap.fs.chmod,
|
hostname: __bootstrap.os.hostname,
|
||||||
chown: window.__bootstrap.fs.chown,
|
osRelease: __bootstrap.os.osRelease,
|
||||||
chownSync: window.__bootstrap.fs.chownSync,
|
applySourceMap: __bootstrap.errorStack.opApplySourceMap,
|
||||||
copyFileSync: window.__bootstrap.fs.copyFileSync,
|
formatDiagnostics: __bootstrap.errorStack.opFormatDiagnostics,
|
||||||
cwd: window.__bootstrap.fs.cwd,
|
shutdown: __bootstrap.net.shutdown,
|
||||||
makeTempDirSync: window.__bootstrap.fs.makeTempDirSync,
|
ShutdownMode: __bootstrap.net.ShutdownMode,
|
||||||
makeTempDir: window.__bootstrap.fs.makeTempDir,
|
listen: __bootstrap.netUnstable.listen,
|
||||||
makeTempFileSync: window.__bootstrap.fs.makeTempFileSync,
|
connect: __bootstrap.netUnstable.connect,
|
||||||
makeTempFile: window.__bootstrap.fs.makeTempFile,
|
listenDatagram: __bootstrap.netUnstable.listenDatagram,
|
||||||
mkdirSync: window.__bootstrap.fs.mkdirSync,
|
startTls: __bootstrap.tls.startTls,
|
||||||
mkdir: window.__bootstrap.fs.mkdir,
|
fstatSync: __bootstrap.fs.fstatSync,
|
||||||
chdir: window.__bootstrap.fs.chdir,
|
fstat: __bootstrap.fs.fstat,
|
||||||
copyFile: window.__bootstrap.fs.copyFile,
|
ftruncateSync: __bootstrap.fs.ftruncateSync,
|
||||||
readDirSync: window.__bootstrap.fs.readDirSync,
|
ftruncate: __bootstrap.fs.ftruncate,
|
||||||
readDir: window.__bootstrap.fs.readDir,
|
umask: __bootstrap.fs.umask,
|
||||||
readLinkSync: window.__bootstrap.fs.readLinkSync,
|
link: __bootstrap.fs.link,
|
||||||
readLink: window.__bootstrap.fs.readLink,
|
linkSync: __bootstrap.fs.linkSync,
|
||||||
realPathSync: window.__bootstrap.fs.realPathSync,
|
utime: __bootstrap.fs.utime,
|
||||||
realPath: window.__bootstrap.fs.realPath,
|
utimeSync: __bootstrap.fs.utimeSync,
|
||||||
removeSync: window.__bootstrap.fs.removeSync,
|
symlink: __bootstrap.fs.symlink,
|
||||||
remove: window.__bootstrap.fs.remove,
|
symlinkSync: __bootstrap.fs.symlinkSync,
|
||||||
renameSync: window.__bootstrap.fs.renameSync,
|
fdatasyncSync: __bootstrap.fs.fdatasyncSync,
|
||||||
rename: window.__bootstrap.fs.rename,
|
fdatasync: __bootstrap.fs.fdatasync,
|
||||||
version: window.__bootstrap.version.version,
|
fsyncSync: __bootstrap.fs.fsyncSync,
|
||||||
build: window.__bootstrap.build.build,
|
fsync: __bootstrap.fs.fsync,
|
||||||
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);
|
|
||||||
|
|
|
@ -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