mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 16:19:12 -05:00
refactor: remove prefix from include_js_files & use extension name (#17683)
This commit is contained in:
parent
b4aa153097
commit
49af1ab18d
88 changed files with 271 additions and 308 deletions
|
@ -4,9 +4,9 @@ const core = globalThis.Deno.core;
|
|||
const ops = core.ops;
|
||||
const internals = globalThis.__bootstrap.internals;
|
||||
import { setExitHandler } from "internal:runtime/js/30_os.js";
|
||||
import { Console } from "internal:ext/console/02_console.js";
|
||||
import { Console } from "internal:deno_console/02_console.js";
|
||||
import { serializePermissions } from "internal:runtime/js/10_permissions.js";
|
||||
import { assert } from "internal:ext/web/00_infra.js";
|
||||
import { assert } from "internal:deno_web/00_infra.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayFrom,
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
new Event();
|
||||
^
|
||||
at [WILDCARD]
|
||||
at new Event (internal:ext/web/[WILDCARD])
|
||||
at new Event (internal:deno_web/[WILDCARD])
|
||||
at [WILDCARD]
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
error: Uncaught (in promise) TypeError: Invalid WebAssembly content type.
|
||||
at handleWasmStreaming (internal:ext/fetch/26_fetch.js:[WILDCARD])
|
||||
at handleWasmStreaming (internal:deno_fetch/26_fetch.js:[WILDCARD])
|
||||
|
|
|
@ -2,7 +2,7 @@ error: Uncaught (in worker "") Error
|
|||
throw new Error();
|
||||
^
|
||||
at [WILDCARD]/workers/drop_handle_race.js:2:9
|
||||
at Object.action (internal:ext/web/02_timers.js:[WILDCARD])
|
||||
at handleTimerMacrotask (internal:ext/web/02_timers.js:[WILDCARD])
|
||||
at Object.action (internal:deno_web/02_timers.js:[WILDCARD])
|
||||
at handleTimerMacrotask (internal:deno_web/02_timers.js:[WILDCARD])
|
||||
error: Uncaught (in promise) Error: Unhandled error in child worker.
|
||||
at Worker.#pollControl (internal:runtime/js/11_workers.js:[WILDCARD])
|
||||
|
|
|
@ -6,7 +6,7 @@ use std::rc::Rc;
|
|||
use std::task::Context;
|
||||
use v8::fast_api::FastFunction;
|
||||
|
||||
pub type SourcePair = (&'static str, &'static str);
|
||||
pub type SourcePair = (String, &'static str);
|
||||
pub type OpFnRef = v8::FunctionCallback;
|
||||
pub type OpMiddlewareFn = dyn Fn(OpDecl) -> OpDecl;
|
||||
pub type OpStateFn = dyn Fn(&mut OpState) -> Result<(), Error>;
|
||||
|
@ -168,13 +168,27 @@ impl ExtensionBuilder {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn js(&mut self, js_files: Vec<SourcePair>) -> &mut Self {
|
||||
pub fn js(
|
||||
&mut self,
|
||||
js_files: Vec<(&'static str, &'static str)>,
|
||||
) -> &mut Self {
|
||||
let js_files = js_files.into_iter().map(|source_pair| {
|
||||
let name = format!("internal:{}/{}", self.name, source_pair.0);
|
||||
(name, source_pair.1)
|
||||
});
|
||||
self.js.extend(js_files);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn esm(&mut self, js_files: Vec<SourcePair>) -> &mut Self {
|
||||
self.esm.extend(js_files);
|
||||
pub fn esm(
|
||||
&mut self,
|
||||
esm_files: Vec<(&'static str, &'static str)>,
|
||||
) -> &mut Self {
|
||||
let esm_files = esm_files.into_iter().map(|source_pair| {
|
||||
let name = format!("internal:{}/{}", self.name, source_pair.0);
|
||||
(name, source_pair.1)
|
||||
});
|
||||
self.esm.extend(esm_files);
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -232,17 +246,16 @@ impl ExtensionBuilder {
|
|||
/// Example:
|
||||
/// ```ignore
|
||||
/// include_js_files!(
|
||||
/// prefix "internal:extensions/hello",
|
||||
/// "01_hello.js",
|
||||
/// "02_goodbye.js",
|
||||
/// )
|
||||
/// ```
|
||||
#[macro_export]
|
||||
macro_rules! include_js_files {
|
||||
(prefix $prefix:literal, $($file:literal,)+) => {
|
||||
($($file:literal,)+) => {
|
||||
vec![
|
||||
$((
|
||||
concat!($prefix, "/", $file),
|
||||
$file,
|
||||
include_str!($file),
|
||||
),)+
|
||||
]
|
||||
|
|
|
@ -19,9 +19,8 @@ use std::io::Write;
|
|||
use std::rc::Rc;
|
||||
|
||||
pub(crate) fn init_builtins() -> Extension {
|
||||
Extension::builder("deno_builtins")
|
||||
Extension::builder("core")
|
||||
.js(include_js_files!(
|
||||
prefix "internal:core",
|
||||
"00_primordials.js",
|
||||
"01_core.js",
|
||||
"02_error.js",
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import {
|
||||
defineEventHandler,
|
||||
EventTarget,
|
||||
setTarget,
|
||||
} from "internal:ext/web/02_event.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
} from "internal:deno_web/02_event.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayPrototypeIndexOf,
|
||||
|
|
|
@ -112,10 +112,7 @@ pub fn init<BC: BroadcastChannel + 'static>(
|
|||
) -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_webidl", "deno_web"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/broadcast_channel",
|
||||
"01_broadcast_channel.js",
|
||||
))
|
||||
.esm(include_js_files!("01_broadcast_channel.js",))
|
||||
.ops(vec![
|
||||
op_broadcast_subscribe::decl::<BC>(),
|
||||
op_broadcast_unsubscribe::decl::<BC>(),
|
||||
|
|
12
ext/cache/01_cache.js
vendored
12
ext/cache/01_cache.js
vendored
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
const core = globalThis.Deno.core;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
Symbol,
|
||||
|
@ -12,11 +12,11 @@ import {
|
|||
Request,
|
||||
RequestPrototype,
|
||||
toInnerRequest,
|
||||
} from "internal:ext/fetch/23_request.js";
|
||||
import { toInnerResponse } from "internal:ext/fetch/23_response.js";
|
||||
import { URLPrototype } from "internal:ext/url/00_url.js";
|
||||
import { getHeader } from "internal:ext/fetch/20_headers.js";
|
||||
import { readableStreamForRid } from "internal:ext/web/06_streams.js";
|
||||
} from "internal:deno_fetch/23_request.js";
|
||||
import { toInnerResponse } from "internal:deno_fetch/23_response.js";
|
||||
import { URLPrototype } from "internal:deno_url/00_url.js";
|
||||
import { getHeader } from "internal:deno_fetch/20_headers.js";
|
||||
import { readableStreamForRid } from "internal:deno_web/06_streams.js";
|
||||
|
||||
class CacheStorage {
|
||||
constructor() {
|
||||
|
|
5
ext/cache/lib.rs
vendored
5
ext/cache/lib.rs
vendored
|
@ -27,10 +27,7 @@ pub fn init<CA: Cache + 'static>(
|
|||
) -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_webidl", "deno_web", "deno_url", "deno_fetch"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/cache",
|
||||
"01_cache.js",
|
||||
))
|
||||
.esm(include_js_files!("01_cache.js",))
|
||||
.ops(vec![
|
||||
op_cache_storage_open::decl::<CA>(),
|
||||
op_cache_storage_has::decl::<CA>(),
|
||||
|
|
|
@ -116,7 +116,7 @@ const {
|
|||
WeakMapPrototype,
|
||||
WeakSetPrototype,
|
||||
} = primordials;
|
||||
import * as colors from "internal:ext/console/01_colors.js";
|
||||
import * as colors from "internal:deno_console/01_colors.js";
|
||||
|
||||
function isInvalidDate(x) {
|
||||
return isNaN(DatePrototypeGetTime(x));
|
||||
|
|
2
ext/console/internal.d.ts
vendored
2
ext/console/internal.d.ts
vendored
|
@ -3,7 +3,7 @@
|
|||
/// <reference no-default-lib="true" />
|
||||
/// <reference lib="esnext" />
|
||||
|
||||
declare module "internal:ext/console/02_console.js" {
|
||||
declare module "internal:deno_console/02_console.js" {
|
||||
function createFilteredInspectProxy<TObject>(params: {
|
||||
object: TObject;
|
||||
keys: (keyof TObject)[];
|
||||
|
|
|
@ -6,11 +6,7 @@ use std::path::PathBuf;
|
|||
|
||||
pub fn init() -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/console",
|
||||
"01_colors.js",
|
||||
"02_console.js",
|
||||
))
|
||||
.esm(include_js_files!("01_colors.js", "02_console.js",))
|
||||
.build()
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
const {
|
||||
ArrayBufferPrototype,
|
||||
ArrayBufferIsView,
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
/// <reference path="../webidl/internal.d.ts" />
|
||||
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { CryptoKey } from "internal:ext/crypto/00_crypto.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { CryptoKey } from "internal:deno_crypto/00_crypto.js";
|
||||
const {
|
||||
ArrayBufferIsView,
|
||||
ArrayBufferPrototype,
|
||||
|
|
|
@ -75,11 +75,7 @@ use crate::shared::RawKeyData;
|
|||
pub fn init(maybe_seed: Option<u64>) -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_webidl", "deno_web"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/crypto",
|
||||
"00_crypto.js",
|
||||
"01_webidl.js",
|
||||
))
|
||||
.esm(include_js_files!("00_crypto.js", "01_webidl.js",))
|
||||
.ops(vec![
|
||||
op_crypto_get_random_values::decl(),
|
||||
op_crypto_generate_key::decl(),
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
/// <reference path="./lib.deno_fetch.d.ts" />
|
||||
/// <reference lib="esnext" />
|
||||
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import {
|
||||
byteLowerCase,
|
||||
collectHttpQuotedString,
|
||||
|
@ -18,7 +18,7 @@ import {
|
|||
HTTP_TAB_OR_SPACE_SUFFIX_RE,
|
||||
HTTP_TOKEN_CODE_POINT_RE,
|
||||
httpTrim,
|
||||
} from "internal:ext/web/00_infra.js";
|
||||
} from "internal:deno_web/00_infra.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayIsArray,
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
/// <reference lib="esnext" />
|
||||
|
||||
const core = globalThis.Deno.core;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import {
|
||||
Blob,
|
||||
BlobPrototype,
|
||||
File,
|
||||
FilePrototype,
|
||||
} from "internal:ext/web/09_file.js";
|
||||
} from "internal:deno_web/09_file.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayPrototypePush,
|
||||
|
|
|
@ -12,19 +12,19 @@
|
|||
/// <reference lib="esnext" />
|
||||
|
||||
const core = globalThis.Deno.core;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import {
|
||||
parseUrlEncoded,
|
||||
URLSearchParamsPrototype,
|
||||
} from "internal:ext/url/00_url.js";
|
||||
} from "internal:deno_url/00_url.js";
|
||||
import {
|
||||
formDataFromEntries,
|
||||
FormDataPrototype,
|
||||
formDataToBlob,
|
||||
parseFormData,
|
||||
} from "internal:ext/fetch/21_formdata.js";
|
||||
import * as mimesniff from "internal:ext/web/01_mimesniff.js";
|
||||
import { BlobPrototype } from "internal:ext/web/09_file.js";
|
||||
} from "internal:deno_fetch/21_formdata.js";
|
||||
import * as mimesniff from "internal:deno_web/01_mimesniff.js";
|
||||
import { BlobPrototype } from "internal:deno_web/09_file.js";
|
||||
import {
|
||||
createProxy,
|
||||
errorReadableStream,
|
||||
|
@ -34,7 +34,7 @@ import {
|
|||
readableStreamDisturb,
|
||||
ReadableStreamPrototype,
|
||||
readableStreamThrowIfErrored,
|
||||
} from "internal:ext/web/06_streams.js";
|
||||
} from "internal:deno_web/06_streams.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayBufferPrototype,
|
||||
|
|
|
@ -9,30 +9,30 @@
|
|||
/// <reference path="./lib.deno_fetch.d.ts" />
|
||||
/// <reference lib="esnext" />
|
||||
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
|
||||
import {
|
||||
byteUpperCase,
|
||||
HTTP_TOKEN_CODE_POINT_RE,
|
||||
} from "internal:ext/web/00_infra.js";
|
||||
import { URL } from "internal:ext/url/00_url.js";
|
||||
} from "internal:deno_web/00_infra.js";
|
||||
import { URL } from "internal:deno_url/00_url.js";
|
||||
import {
|
||||
extractBody,
|
||||
InnerBody,
|
||||
mixinBody,
|
||||
} from "internal:ext/fetch/22_body.js";
|
||||
import { getLocationHref } from "internal:ext/web/12_location.js";
|
||||
import { extractMimeType } from "internal:ext/web/01_mimesniff.js";
|
||||
import { blobFromObjectUrl } from "internal:ext/web/09_file.js";
|
||||
} from "internal:deno_fetch/22_body.js";
|
||||
import { getLocationHref } from "internal:deno_web/12_location.js";
|
||||
import { extractMimeType } from "internal:deno_web/01_mimesniff.js";
|
||||
import { blobFromObjectUrl } from "internal:deno_web/09_file.js";
|
||||
import {
|
||||
fillHeaders,
|
||||
getDecodeSplitHeader,
|
||||
guardFromHeaders,
|
||||
headerListFromHeaders,
|
||||
headersFromHeaderList,
|
||||
} from "internal:ext/fetch/20_headers.js";
|
||||
import { HttpClientPrototype } from "internal:ext/fetch/22_http_client.js";
|
||||
import * as abortSignal from "internal:ext/web/03_abort_signal.js";
|
||||
} from "internal:deno_fetch/20_headers.js";
|
||||
import { HttpClientPrototype } from "internal:deno_fetch/22_http_client.js";
|
||||
import * as abortSignal from "internal:deno_web/03_abort_signal.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayPrototypeMap,
|
||||
|
|
|
@ -11,25 +11,25 @@
|
|||
/// <reference lib="esnext" />
|
||||
|
||||
const core = globalThis.Deno.core;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
|
||||
import {
|
||||
byteLowerCase,
|
||||
HTTP_TAB_OR_SPACE,
|
||||
regexMatcher,
|
||||
serializeJSValueToJSONString,
|
||||
} from "internal:ext/web/00_infra.js";
|
||||
import { extractBody, mixinBody } from "internal:ext/fetch/22_body.js";
|
||||
import { getLocationHref } from "internal:ext/web/12_location.js";
|
||||
import { extractMimeType } from "internal:ext/web/01_mimesniff.js";
|
||||
import { URL } from "internal:ext/url/00_url.js";
|
||||
} from "internal:deno_web/00_infra.js";
|
||||
import { extractBody, mixinBody } from "internal:deno_fetch/22_body.js";
|
||||
import { getLocationHref } from "internal:deno_web/12_location.js";
|
||||
import { extractMimeType } from "internal:deno_web/01_mimesniff.js";
|
||||
import { URL } from "internal:deno_url/00_url.js";
|
||||
import {
|
||||
fillHeaders,
|
||||
getDecodeSplitHeader,
|
||||
guardFromHeaders,
|
||||
headerListFromHeaders,
|
||||
headersFromHeaderList,
|
||||
} from "internal:ext/fetch/20_headers.js";
|
||||
} from "internal:deno_fetch/20_headers.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayPrototypeMap,
|
||||
|
|
|
@ -12,19 +12,19 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { byteLowerCase } from "internal:ext/web/00_infra.js";
|
||||
import { BlobPrototype } from "internal:ext/web/09_file.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { byteLowerCase } from "internal:deno_web/00_infra.js";
|
||||
import { BlobPrototype } from "internal:deno_web/09_file.js";
|
||||
import {
|
||||
errorReadableStream,
|
||||
readableStreamForRid,
|
||||
ReadableStreamPrototype,
|
||||
} from "internal:ext/web/06_streams.js";
|
||||
import { extractBody, InnerBody } from "internal:ext/fetch/22_body.js";
|
||||
} from "internal:deno_web/06_streams.js";
|
||||
import { extractBody, InnerBody } from "internal:deno_fetch/22_body.js";
|
||||
import {
|
||||
processUrlList,
|
||||
toInnerRequest,
|
||||
} from "internal:ext/fetch/23_request.js";
|
||||
} from "internal:deno_fetch/23_request.js";
|
||||
import {
|
||||
abortedNetworkError,
|
||||
fromInnerResponse,
|
||||
|
@ -32,8 +32,8 @@ import {
|
|||
nullBodyStatus,
|
||||
redirectStatus,
|
||||
toInnerResponse,
|
||||
} from "internal:ext/fetch/23_response.js";
|
||||
import * as abortSignal from "internal:ext/web/03_abort_signal.js";
|
||||
} from "internal:deno_fetch/23_response.js";
|
||||
import * as abortSignal from "internal:deno_web/03_abort_signal.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayPrototypePush,
|
||||
|
|
8
ext/fetch/internal.d.ts
vendored
8
ext/fetch/internal.d.ts
vendored
|
@ -9,7 +9,7 @@ declare var domIterable: {
|
|||
DomIterableMixin(base: any, dataSymbol: symbol): any;
|
||||
};
|
||||
|
||||
declare module "internal:ext/fetch/20_headers.js" {
|
||||
declare module "internal:deno_fetch/20_headers.js" {
|
||||
class Headers {
|
||||
}
|
||||
type HeaderList = [string, string][];
|
||||
|
@ -33,7 +33,7 @@ declare module "internal:ext/fetch/20_headers.js" {
|
|||
): "immutable" | "request" | "request-no-cors" | "response" | "none";
|
||||
}
|
||||
|
||||
declare module "internal:ext/fetch/21_formdata.js" {
|
||||
declare module "internal:deno_fetch/21_formdata.js" {
|
||||
type FormData = typeof FormData;
|
||||
function formDataToBlob(
|
||||
formData: FormData,
|
||||
|
@ -45,7 +45,7 @@ declare module "internal:ext/fetch/21_formdata.js" {
|
|||
function formDataFromEntries(entries: FormDataEntry[]): FormData;
|
||||
}
|
||||
|
||||
declare module "internal:ext/fetch/22_body.js" {
|
||||
declare module "internal:deno_fetch/22_body.js" {
|
||||
function mixinBody(
|
||||
prototype: any,
|
||||
bodySymbol: symbol,
|
||||
|
@ -66,7 +66,7 @@ declare module "internal:ext/fetch/22_body.js" {
|
|||
};
|
||||
}
|
||||
|
||||
declare module "internal:ext/fetch/26_fetch.js" {
|
||||
declare module "internal:deno_fetch/26_fetch.js" {
|
||||
function toInnerRequest(request: Request): InnerRequest;
|
||||
function fromInnerRequest(
|
||||
inner: InnerRequest,
|
||||
|
|
|
@ -98,7 +98,6 @@ where
|
|||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_webidl", "deno_web", "deno_url", "deno_console"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/fetch",
|
||||
"20_headers.js",
|
||||
"21_formdata.js",
|
||||
"22_body.js",
|
||||
|
|
|
@ -84,10 +84,7 @@ pub(crate) struct FfiState {
|
|||
|
||||
pub fn init<P: FfiPermissions + 'static>(unstable: bool) -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/ffi",
|
||||
"00_ffi.js",
|
||||
))
|
||||
.esm(include_js_files!("00_ffi.js",))
|
||||
.ops(vec![
|
||||
op_ffi_load::decl::<P>(),
|
||||
op_ffi_get_static::decl(),
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
import { BlobPrototype } from "internal:ext/web/09_file.js";
|
||||
import { TcpConn } from "internal:ext/net/01_net.js";
|
||||
import { toInnerResponse } from "internal:ext/fetch/23_response.js";
|
||||
import { _flash, fromFlashRequest } from "internal:ext/fetch/23_request.js";
|
||||
import { Event } from "internal:ext/web/02_event.js";
|
||||
import { BlobPrototype } from "internal:deno_web/09_file.js";
|
||||
import { TcpConn } from "internal:deno_net/01_net.js";
|
||||
import { toInnerResponse } from "internal:deno_fetch/23_response.js";
|
||||
import { _flash, fromFlashRequest } from "internal:deno_fetch/23_request.js";
|
||||
import { Event } from "internal:deno_web/02_event.js";
|
||||
import {
|
||||
_state,
|
||||
getReadableStreamResourceBacking,
|
||||
ReadableStream,
|
||||
readableStreamClose,
|
||||
ReadableStreamPrototype,
|
||||
} from "internal:ext/web/06_streams.js";
|
||||
} from "internal:deno_web/06_streams.js";
|
||||
import {
|
||||
_eventLoop,
|
||||
_idleTimeoutDuration,
|
||||
|
@ -23,8 +23,8 @@ import {
|
|||
_rid,
|
||||
_serverHandleIdleTimeout,
|
||||
WebSocket,
|
||||
} from "internal:ext/websocket/01_websocket.js";
|
||||
import { _ws } from "internal:ext/http/01_http.js";
|
||||
} from "internal:deno_websocket/01_websocket.js";
|
||||
import { _ws } from "internal:deno_http/01_http.js";
|
||||
const {
|
||||
ObjectPrototypeIsPrototypeOf,
|
||||
PromisePrototype,
|
||||
|
|
|
@ -1514,10 +1514,7 @@ pub fn init<P: FlashPermissions + 'static>(unstable: bool) -> Extension {
|
|||
"deno_websocket",
|
||||
"deno_http",
|
||||
])
|
||||
.esm(deno_core::include_js_files!(
|
||||
prefix "internal:ext/flash",
|
||||
"01_http.js",
|
||||
))
|
||||
.esm(deno_core::include_js_files!("01_http.js",))
|
||||
.ops(vec![
|
||||
op_flash_serve::decl::<P>(),
|
||||
op_node_unstable_flash_serve::decl::<P>(),
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
const core = globalThis.Deno.core;
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const { BadResourcePrototype, InterruptedPrototype, ops } = core;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { InnerBody } from "internal:ext/fetch/22_body.js";
|
||||
import { Event, setEventTargetData } from "internal:ext/web/02_event.js";
|
||||
import { BlobPrototype } from "internal:ext/web/09_file.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { InnerBody } from "internal:deno_fetch/22_body.js";
|
||||
import { Event, setEventTargetData } from "internal:deno_web/02_event.js";
|
||||
import { BlobPrototype } from "internal:deno_web/09_file.js";
|
||||
import {
|
||||
fromInnerResponse,
|
||||
newInnerResponse,
|
||||
ResponsePrototype,
|
||||
toInnerResponse,
|
||||
} from "internal:ext/fetch/23_response.js";
|
||||
} from "internal:deno_fetch/23_response.js";
|
||||
import {
|
||||
_flash,
|
||||
fromInnerRequest,
|
||||
newInnerRequest,
|
||||
} from "internal:ext/fetch/23_request.js";
|
||||
import * as abortSignal from "internal:ext/web/03_abort_signal.js";
|
||||
} from "internal:deno_fetch/23_request.js";
|
||||
import * as abortSignal from "internal:deno_web/03_abort_signal.js";
|
||||
import {
|
||||
_eventLoop,
|
||||
_idleTimeoutDuration,
|
||||
|
@ -28,16 +28,16 @@ import {
|
|||
_server,
|
||||
_serverHandleIdleTimeout,
|
||||
WebSocket,
|
||||
} from "internal:ext/websocket/01_websocket.js";
|
||||
import { TcpConn, UnixConn } from "internal:ext/net/01_net.js";
|
||||
import { TlsConn } from "internal:ext/net/02_tls.js";
|
||||
} from "internal:deno_websocket/01_websocket.js";
|
||||
import { TcpConn, UnixConn } from "internal:deno_net/01_net.js";
|
||||
import { TlsConn } from "internal:deno_net/02_tls.js";
|
||||
import {
|
||||
Deferred,
|
||||
getReadableStreamResourceBacking,
|
||||
readableStreamClose,
|
||||
readableStreamForRid,
|
||||
ReadableStreamPrototype,
|
||||
} from "internal:ext/web/06_streams.js";
|
||||
} from "internal:deno_web/06_streams.js";
|
||||
const {
|
||||
ArrayPrototypeIncludes,
|
||||
ArrayPrototypePush,
|
||||
|
|
|
@ -80,10 +80,7 @@ mod reader_stream;
|
|||
pub fn init() -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_web", "deno_net", "deno_fetch", "deno_websocket"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/http",
|
||||
"01_http.js",
|
||||
))
|
||||
.esm(include_js_files!("01_http.js",))
|
||||
.ops(vec![
|
||||
op_http_accept::decl(),
|
||||
op_http_write_headers::decl(),
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
readableStreamForRidUnrefableRef,
|
||||
readableStreamForRidUnrefableUnref,
|
||||
writableStreamForRid,
|
||||
} from "internal:ext/web/06_streams.js";
|
||||
} from "internal:deno_web/06_streams.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
Error,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import { Conn, Listener } from "internal:ext/net/01_net.js";
|
||||
import { Conn, Listener } from "internal:deno_net/01_net.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const { TypeError } = primordials;
|
||||
|
||||
|
|
|
@ -86,11 +86,7 @@ pub fn init<P: NetPermissions + 'static>(
|
|||
ops.extend(ops_tls::init::<P>());
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_web"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/net",
|
||||
"01_net.js",
|
||||
"02_tls.js",
|
||||
))
|
||||
.esm(include_js_files!("01_net.js", "02_tls.js",))
|
||||
.ops(ops)
|
||||
.state(move |state| {
|
||||
state.put(DefaultTlsOptions {
|
||||
|
|
|
@ -85,11 +85,7 @@ pub fn init<P: NodePermissions + 'static>(
|
|||
maybe_npm_resolver: Option<Rc<dyn RequireNpmResolver>>,
|
||||
) -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/node",
|
||||
"01_node.js",
|
||||
"02_require.js",
|
||||
))
|
||||
.esm(include_js_files!("01_node.js", "02_require.js",))
|
||||
.ops(vec![
|
||||
op_require_init_paths::decl(),
|
||||
op_require_node_module_paths::decl::<P>(),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayIsArray,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayPrototypeMap,
|
||||
|
|
|
@ -14,7 +14,7 @@ fn setup() -> Vec<Extension> {
|
|||
Extension::builder("bench_setup")
|
||||
.esm(vec![(
|
||||
"internal:setup",
|
||||
r#"import { URL } from "internal:ext/url/00_url.js";
|
||||
r#"import { URL } from "internal:deno_url/00_url.js";
|
||||
globalThis.URL = URL;
|
||||
"#,
|
||||
)])
|
||||
|
|
4
ext/url/internal.d.ts
vendored
4
ext/url/internal.d.ts
vendored
|
@ -3,12 +3,12 @@
|
|||
/// <reference no-default-lib="true" />
|
||||
/// <reference lib="esnext" />
|
||||
|
||||
declare module "internal:ext/url/00_url.js" {
|
||||
declare module "internal:deno_url/00_url.js" {
|
||||
const URL: typeof URL;
|
||||
const URLSearchParams: typeof URLSearchParams;
|
||||
function parseUrlEncoded(bytes: Uint8Array): [string, string][];
|
||||
}
|
||||
|
||||
declare module "internal:ext/url/01_urlpattern.js" {
|
||||
declare module "internal:deno_url/01_urlpattern.js" {
|
||||
const URLPattern: typeof URLPattern;
|
||||
}
|
||||
|
|
|
@ -20,11 +20,7 @@ use crate::urlpattern::op_urlpattern_process_match_input;
|
|||
pub fn init() -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_webidl"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/url",
|
||||
"00_url.js",
|
||||
"01_urlpattern.js",
|
||||
))
|
||||
.esm(include_js_files!("00_url.js", "01_urlpattern.js",))
|
||||
.ops(vec![
|
||||
op_url_reparse::decl(),
|
||||
op_url_parse::decl(),
|
||||
|
|
|
@ -20,8 +20,8 @@ const {
|
|||
Symbol,
|
||||
SymbolFor,
|
||||
} = primordials;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
|
||||
|
||||
const _name = Symbol("name");
|
||||
const _message = Symbol("message");
|
||||
|
|
|
@ -26,7 +26,7 @@ import {
|
|||
HTTP_WHITESPACE,
|
||||
HTTP_WHITESPACE_PREFIX_RE,
|
||||
HTTP_WHITESPACE_SUFFIX_RE,
|
||||
} from "internal:ext/web/00_infra.js";
|
||||
} from "internal:deno_web/00_infra.js";
|
||||
|
||||
/**
|
||||
* @typedef MimeType
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayPrototypeFilter,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/// <reference path="../web/lib.deno_web.d.ts" />
|
||||
|
||||
const core = globalThis.Deno.core;
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayBuffer,
|
||||
|
|
|
@ -22,9 +22,9 @@ const {
|
|||
TypeError,
|
||||
indirectEval,
|
||||
} = primordials;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { reportException } from "internal:ext/web/02_event.js";
|
||||
import { assert } from "internal:ext/web/00_infra.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { reportException } from "internal:deno_web/02_event.js";
|
||||
import { assert } from "internal:deno_web/00_infra.js";
|
||||
|
||||
const hrU8 = new Uint8Array(8);
|
||||
const hr = new Uint32Array(hrU8.buffer);
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
// @ts-check
|
||||
/// <reference path="../../core/internal.d.ts" />
|
||||
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import {
|
||||
defineEventHandler,
|
||||
Event,
|
||||
EventTarget,
|
||||
listenerCount,
|
||||
setIsTrusted,
|
||||
} from "internal:ext/web/02_event.js";
|
||||
} from "internal:deno_web/02_event.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
SafeArrayIterator,
|
||||
|
@ -25,7 +25,7 @@ import {
|
|||
refTimer,
|
||||
setTimeout,
|
||||
unrefTimer,
|
||||
} from "internal:ext/web/02_timers.js";
|
||||
} from "internal:deno_web/02_timers.js";
|
||||
|
||||
const add = Symbol("[[add]]");
|
||||
const signalAbort = Symbol("[[signalAbort]]");
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// @ts-check
|
||||
/// <reference path="../../core/internal.d.ts" />
|
||||
|
||||
import { EventTarget } from "internal:ext/web/02_event.js";
|
||||
import { EventTarget } from "internal:deno_web/02_event.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
Symbol,
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ObjectPrototypeIsPrototypeOf,
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import {
|
||||
AbortSignalPrototype,
|
||||
add,
|
||||
newSignal,
|
||||
remove,
|
||||
signalAbort,
|
||||
} from "internal:ext/web/03_abort_signal.js";
|
||||
} from "internal:deno_web/03_abort_signal.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayBuffer,
|
||||
|
@ -68,8 +68,8 @@ const {
|
|||
WeakMapPrototypeHas,
|
||||
WeakMapPrototypeSet,
|
||||
} = primordials;
|
||||
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js";
|
||||
import { assert, AssertionError } from "internal:ext/web/00_infra.js";
|
||||
import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
|
||||
import { assert, AssertionError } from "internal:deno_web/00_infra.js";
|
||||
|
||||
/** @template T */
|
||||
class Deferred {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
PromiseReject,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayBufferPrototype,
|
||||
|
@ -38,7 +38,7 @@ const {
|
|||
TypeError,
|
||||
Uint8Array,
|
||||
} = primordials;
|
||||
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js";
|
||||
import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
|
||||
|
||||
// TODO(lucacasonato): this needs to not be hardcoded and instead depend on
|
||||
// host os.
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
import { forgivingBase64Encode } from "internal:ext/web/00_infra.js";
|
||||
import { EventTarget, ProgressEvent } from "internal:ext/web/02_event.js";
|
||||
import { decode, TextDecoder } from "internal:ext/web/08_text_encoding.js";
|
||||
import { parseMimeType } from "internal:ext/web/01_mimesniff.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import { forgivingBase64Encode } from "internal:deno_web/00_infra.js";
|
||||
import { EventTarget, ProgressEvent } from "internal:deno_web/02_event.js";
|
||||
import { decode, TextDecoder } from "internal:deno_web/08_text_encoding.js";
|
||||
import { parseMimeType } from "internal:deno_web/01_mimesniff.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
const {
|
||||
ArrayPrototypePush,
|
||||
ArrayPrototypeReduce,
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { getParts } from "internal:ext/web/09_file.js";
|
||||
import { URL } from "internal:ext/url/00_url.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { getParts } from "internal:deno_web/09_file.js";
|
||||
import { URL } from "internal:deno_url/00_url.js";
|
||||
|
||||
/**
|
||||
* @param {Blob} blob
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
/// <reference path="../../core/internal.d.ts" />
|
||||
|
||||
import { URL } from "internal:ext/url/00_url.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import { URL } from "internal:deno_url/00_url.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
Error,
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const { InterruptedPrototype, ops } = core;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import {
|
||||
defineEventHandler,
|
||||
EventTarget,
|
||||
MessageEvent,
|
||||
setEventTargetData,
|
||||
} from "internal:ext/web/02_event.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
} from "internal:deno_web/02_event.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayBufferPrototype,
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { TransformStream } from "internal:ext/web/06_streams.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { TransformStream } from "internal:deno_web/06_streams.js";
|
||||
|
||||
webidl.converters.CompressionFormat = webidl.createEnumConverter(
|
||||
"CompressionFormat",
|
||||
|
|
|
@ -14,12 +14,12 @@ const {
|
|||
SymbolFor,
|
||||
TypeError,
|
||||
} = primordials;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { structuredClone } from "internal:ext/web/02_structured_clone.js";
|
||||
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js";
|
||||
import { EventTarget } from "internal:ext/web/02_event.js";
|
||||
import { opNow } from "internal:ext/web/02_timers.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { structuredClone } from "internal:deno_web/02_structured_clone.js";
|
||||
import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
|
||||
import { EventTarget } from "internal:deno_web/02_event.js";
|
||||
import { opNow } from "internal:deno_web/02_timers.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
|
||||
const illegalConstructorKey = Symbol("illegalConstructorKey");
|
||||
const customInspect = SymbolFor("Deno.customInspect");
|
||||
|
|
|
@ -32,7 +32,7 @@ fn setup() -> Vec<Extension> {
|
|||
.esm(vec![(
|
||||
"internal:setup",
|
||||
r#"
|
||||
import { TextDecoder } from "internal:ext/web/08_text_encoding.js";
|
||||
import { TextDecoder } from "internal:deno_web/08_text_encoding.js";
|
||||
globalThis.TextDecoder = TextDecoder;
|
||||
globalThis.hello12k = Deno.core.encode("hello world\n".repeat(1e3));
|
||||
"#,
|
||||
|
|
|
@ -30,7 +30,7 @@ fn setup() -> Vec<Extension> {
|
|||
Extension::builder("bench_setup")
|
||||
.esm(vec![
|
||||
("internal:setup", r#"
|
||||
import { setTimeout, handleTimerMacrotask } from "internal:ext/web/02_timers.js";
|
||||
import { setTimeout, handleTimerMacrotask } from "internal:deno_web/02_timers.js";
|
||||
globalThis.setTimeout = setTimeout;
|
||||
Deno.core.setMacrotaskCallback(handleTimerMacrotask);
|
||||
"#),
|
||||
|
|
18
ext/web/internal.d.ts
vendored
18
ext/web/internal.d.ts
vendored
|
@ -3,7 +3,7 @@
|
|||
/// <reference no-default-lib="true" />
|
||||
/// <reference lib="esnext" />
|
||||
|
||||
declare module "internal:ext/web/00_infra.js" {
|
||||
declare module "internal:deno_web/00_infra.js" {
|
||||
function collectSequenceOfCodepoints(
|
||||
input: string,
|
||||
position: number,
|
||||
|
@ -44,11 +44,11 @@ declare module "internal:ext/web/00_infra.js" {
|
|||
function serializeJSValueToJSONString(value: unknown): string;
|
||||
}
|
||||
|
||||
declare module "internal:ext/web/01_dom_exception.js" {
|
||||
declare module "internal:deno_web/01_dom_exception.js" {
|
||||
export = DOMException;
|
||||
}
|
||||
|
||||
declare module "internal:ext/web/01_mimesniff.js" {
|
||||
declare module "internal:deno_web/01_mimesniff.js" {
|
||||
interface MimeType {
|
||||
type: string;
|
||||
subtype: string;
|
||||
|
@ -62,7 +62,7 @@ declare module "internal:ext/web/01_mimesniff.js" {
|
|||
): MimeType | null;
|
||||
}
|
||||
|
||||
declare module "internal:ext/web/02_event.js" {
|
||||
declare module "internal:deno_web/02_event.js" {
|
||||
const EventTarget: typeof EventTarget;
|
||||
const Event: typeof event;
|
||||
const ErrorEvent: typeof ErrorEvent;
|
||||
|
@ -74,29 +74,29 @@ declare module "internal:ext/web/02_event.js" {
|
|||
const reportError: typeof reportError;
|
||||
}
|
||||
|
||||
declare module "internal:ext/web/12_location.js" {
|
||||
declare module "internal:deno_web/12_location.js" {
|
||||
function getLocationHref(): string | undefined;
|
||||
}
|
||||
|
||||
declare module "internal:ext/web/05_base64.js" {
|
||||
declare module "internal:deno_web/05_base64.js" {
|
||||
function atob(data: string): string;
|
||||
function btoa(data: string): string;
|
||||
}
|
||||
|
||||
declare module "internal:ext/web/09_file.js" {
|
||||
declare module "internal:deno_web/09_file.js" {
|
||||
function blobFromObjectUrl(url: string): Blob | null;
|
||||
function getParts(blob: Blob): string[];
|
||||
const Blob: typeof Blob;
|
||||
const File: typeof File;
|
||||
}
|
||||
|
||||
declare module "internal:ext/web/06_streams.js" {
|
||||
declare module "internal:deno_web/06_streams.js" {
|
||||
const ReadableStream: typeof ReadableStream;
|
||||
function isReadableStreamDisturbed(stream: ReadableStream): boolean;
|
||||
function createProxy<T>(stream: ReadableStream<T>): ReadableStream<T>;
|
||||
}
|
||||
|
||||
declare module "internal:ext/web/13_message_port.js" {
|
||||
declare module "internal:deno_web/13_message_port.js" {
|
||||
type Transferable = {
|
||||
kind: "messagePort";
|
||||
data: number;
|
||||
|
|
|
@ -65,7 +65,6 @@ pub fn init<P: TimersPermission + 'static>(
|
|||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_webidl", "deno_console", "deno_url"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/web",
|
||||
"00_infra.js",
|
||||
"01_dom_exception.js",
|
||||
"01_mimesniff.js",
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { EventTarget } from "internal:ext/web/02_event.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { EventTarget } from "internal:deno_web/02_event.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
const {
|
||||
ArrayBuffer,
|
||||
ArrayBufferIsView,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// @ts-check
|
||||
/// <reference path="../web/internal.d.ts" />
|
||||
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import {
|
||||
GPU,
|
||||
GPUAdapter,
|
||||
|
@ -35,7 +35,7 @@ import {
|
|||
GPUTextureUsage,
|
||||
GPUTextureView,
|
||||
GPUValidationError,
|
||||
} from "internal:ext/webgpu/01_webgpu.js";
|
||||
} from "internal:deno_webgpu/01_webgpu.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const { SymbolIterator, TypeError } = primordials;
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const { Symbol } = primordials;
|
||||
import {
|
||||
_device,
|
||||
assertDevice,
|
||||
createGPUTexture,
|
||||
} from "internal:ext/webgpu/01_webgpu.js";
|
||||
} from "internal:deno_webgpu/01_webgpu.js";
|
||||
|
||||
const _surfaceRid = Symbol("[[surfaceRid]]");
|
||||
const _configuration = Symbol("[[configuration]]");
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
/// <reference path="../web/lib.deno_web.d.ts" />
|
||||
/// <reference path="./lib.deno_webgpu.d.ts" />
|
||||
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { GPUTextureUsage } from "internal:ext/webgpu/01_webgpu.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { GPUTextureUsage } from "internal:deno_webgpu/01_webgpu.js";
|
||||
|
||||
// ENUM: GPUCanvasAlphaMode
|
||||
webidl.converters["GPUCanvasAlphaMode"] = webidl.createEnumConverter(
|
||||
|
|
|
@ -119,11 +119,7 @@ impl Resource for WebGpuQuerySet {
|
|||
pub fn init(unstable: bool) -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_webidl", "deno_web"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/webgpu",
|
||||
"01_webgpu.js",
|
||||
"02_idl_types.js",
|
||||
))
|
||||
.esm(include_js_files!("01_webgpu.js", "02_idl_types.js",))
|
||||
.ops(declare_webgpu_ops())
|
||||
.state(move |state| {
|
||||
// TODO: check & possibly streamline this
|
||||
|
|
|
@ -16,7 +16,6 @@ pub fn init_surface(unstable: bool) -> Extension {
|
|||
Extension::builder("deno_webgpu_surface")
|
||||
.dependencies(vec!["deno_webidl", "deno_web", "deno_webgpu"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/webgpu",
|
||||
"03_surface.js",
|
||||
"04_surface_idl_types.js",
|
||||
))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
import {
|
||||
converters,
|
||||
createDictionaryConverter,
|
||||
} from "internal:ext/webidl/00_webidl.js";
|
||||
} from "internal:deno_webidl/00_webidl.js";
|
||||
|
||||
const TextDecodeOptions = createDictionaryConverter(
|
||||
"TextDecodeOptions",
|
||||
|
|
2
ext/webidl/internal.d.ts
vendored
2
ext/webidl/internal.d.ts
vendored
|
@ -4,7 +4,7 @@
|
|||
/// <reference no-default-lib="true" />
|
||||
/// <reference lib="esnext" />
|
||||
|
||||
declare module "internal:ext/webidl/00_webidl.js" {
|
||||
declare module "internal:deno_webidl/00_webidl.js" {
|
||||
interface ConverterOpts {
|
||||
/**
|
||||
* The prefix for error messages created by this converter.
|
||||
|
|
|
@ -6,9 +6,6 @@ use deno_core::Extension;
|
|||
/// Load and execute the javascript code.
|
||||
pub fn init() -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/webidl",
|
||||
"00_webidl.js",
|
||||
))
|
||||
.esm(include_js_files!("00_webidl.js",))
|
||||
.build()
|
||||
}
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import { URL } from "internal:ext/url/00_url.js";
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { HTTP_TOKEN_CODE_POINT_RE } from "internal:ext/web/00_infra.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import { URL } from "internal:deno_url/00_url.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { HTTP_TOKEN_CODE_POINT_RE } from "internal:deno_web/00_infra.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
import {
|
||||
_skipInternalInit,
|
||||
CloseEvent,
|
||||
|
@ -16,8 +16,8 @@ import {
|
|||
Event,
|
||||
EventTarget,
|
||||
MessageEvent,
|
||||
} from "internal:ext/web/02_event.js";
|
||||
import { Blob, BlobPrototype } from "internal:ext/web/09_file.js";
|
||||
} from "internal:deno_web/02_event.js";
|
||||
import { Blob, BlobPrototype } from "internal:deno_web/09_file.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayBufferPrototype,
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { Deferred, writableStreamClose } from "internal:ext/web/06_streams.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import { add, remove } from "internal:ext/web/03_abort_signal.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { Deferred, writableStreamClose } from "internal:deno_web/06_streams.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
import { add, remove } from "internal:deno_web/03_abort_signal.js";
|
||||
import {
|
||||
fillHeaders,
|
||||
headerListFromHeaders,
|
||||
headersFromHeaderList,
|
||||
} from "internal:ext/fetch/20_headers.js";
|
||||
} from "internal:deno_fetch/20_headers.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayPrototypeJoin,
|
||||
|
|
|
@ -505,7 +505,6 @@ pub fn init<P: WebSocketPermissions + 'static>(
|
|||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_url", "deno_webidl"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/websocket",
|
||||
"01_websocket.js",
|
||||
"02_websocketstream.js",
|
||||
))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
SafeArrayIterator,
|
||||
|
|
|
@ -24,10 +24,7 @@ const MAX_STORAGE_BYTES: u32 = 10 * 1024 * 1024;
|
|||
pub fn init(origin_storage_dir: Option<PathBuf>) -> Extension {
|
||||
Extension::builder(env!("CARGO_PKG_NAME"))
|
||||
.dependencies(vec!["deno_webidl"])
|
||||
.esm(include_js_files!(
|
||||
prefix "internal:ext/webstorage",
|
||||
"01_webstorage.js",
|
||||
))
|
||||
.esm(include_js_files!("01_webstorage.js",))
|
||||
.ops(vec![
|
||||
op_webstorage_length::decl(),
|
||||
op_webstorage_key::decl(),
|
||||
|
|
|
@ -11,7 +11,7 @@ const {
|
|||
TypeError,
|
||||
} = primordials;
|
||||
import { build } from "internal:runtime/js/01_build.js";
|
||||
import { URLPrototype } from "internal:ext/url/00_url.js";
|
||||
import { URLPrototype } from "internal:deno_url/00_url.js";
|
||||
let logDebug = false;
|
||||
let logSource = "JS";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import { Event, EventTarget } from "internal:ext/web/02_event.js";
|
||||
import { Event, EventTarget } from "internal:deno_web/02_event.js";
|
||||
import { pathFromURL } from "internal:runtime/js/06_util.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
|
|
|
@ -11,9 +11,9 @@ const {
|
|||
SymbolIterator,
|
||||
SymbolToStringTag,
|
||||
} = primordials;
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import { URL } from "internal:ext/url/00_url.js";
|
||||
import { getLocationHref } from "internal:ext/web/12_location.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import { URL } from "internal:deno_url/00_url.js";
|
||||
import { getLocationHref } from "internal:deno_web/12_location.js";
|
||||
import { serializePermissions } from "internal:runtime/js/10_permissions.js";
|
||||
import { log } from "internal:runtime/js/06_util.js";
|
||||
import {
|
||||
|
@ -21,12 +21,12 @@ import {
|
|||
ErrorEvent,
|
||||
EventTarget,
|
||||
MessageEvent,
|
||||
} from "internal:ext/web/02_event.js";
|
||||
} from "internal:deno_web/02_event.js";
|
||||
import {
|
||||
deserializeJsMessageData,
|
||||
MessagePortPrototype,
|
||||
serializeJsMessageData,
|
||||
} from "internal:ext/web/13_message_port.js";
|
||||
} from "internal:deno_web/13_message_port.js";
|
||||
|
||||
function createWorker(
|
||||
specifier,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// Copyright 2009 The Go Authors. All rights reserved. BSD license.
|
||||
// https://github.com/golang/go/blob/master/LICENSE
|
||||
|
||||
import { assert } from "internal:ext/web/00_infra.js";
|
||||
import { assert } from "internal:deno_web/00_infra.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
TypedArrayPrototypeSubarray,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import { Event, EventTarget } from "internal:ext/web/02_event.js";
|
||||
import { Event, EventTarget } from "internal:deno_web/02_event.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
Error,
|
||||
|
|
|
@ -13,7 +13,7 @@ import { pathFromURL } from "internal:runtime/js/06_util.js";
|
|||
import {
|
||||
readableStreamForRid,
|
||||
writableStreamForRid,
|
||||
} from "internal:ext/web/06_streams.js";
|
||||
} from "internal:deno_web/06_streams.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayPrototypeFilter,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import { HttpConn } from "internal:ext/http/01_http.js";
|
||||
import { HttpConn } from "internal:deno_http/01_http.js";
|
||||
|
||||
function serveHttp(conn) {
|
||||
const rid = ops.op_http_start(conn.rid);
|
||||
|
|
|
@ -5,7 +5,7 @@ const ops = core.ops;
|
|||
import { FsFile } from "internal:runtime/js/40_files.js";
|
||||
import { readAll } from "internal:runtime/js/12_io.js";
|
||||
import { pathFromURL } from "internal:runtime/js/06_util.js";
|
||||
import { assert } from "internal:ext/web/00_infra.js";
|
||||
import { assert } from "internal:deno_web/00_infra.js";
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
const {
|
||||
ArrayPrototypeMap,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import { pathFromURL } from "internal:runtime/js/06_util.js";
|
||||
import * as abortSignal from "internal:ext/web/03_abort_signal.js";
|
||||
import * as abortSignal from "internal:deno_web/03_abort_signal.js";
|
||||
|
||||
function readFileSync(path) {
|
||||
return ops.op_readfile_sync(pathFromURL(path));
|
||||
|
|
|
@ -4,7 +4,7 @@ const core = globalThis.Deno.core;
|
|||
const ops = core.ops;
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
import { pathFromURL } from "internal:runtime/js/06_util.js";
|
||||
import { add, remove } from "internal:ext/web/03_abort_signal.js";
|
||||
import { add, remove } from "internal:deno_web/03_abort_signal.js";
|
||||
const {
|
||||
ArrayPrototypeMap,
|
||||
ObjectEntries,
|
||||
|
@ -23,7 +23,7 @@ import {
|
|||
readableStreamForRidUnrefableUnref,
|
||||
ReadableStreamPrototype,
|
||||
writableStreamForRid,
|
||||
} from "internal:ext/web/06_streams.js";
|
||||
} from "internal:deno_web/06_streams.js";
|
||||
|
||||
const illegalConstructorKey = Symbol("illegalConstructorKey");
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
const primordials = globalThis.__bootstrap.primordials;
|
||||
import * as abortSignal from "internal:ext/web/03_abort_signal.js";
|
||||
import * as abortSignal from "internal:deno_web/03_abort_signal.js";
|
||||
import { pathFromURL } from "internal:runtime/js/06_util.js";
|
||||
import { open } from "internal:runtime/js/40_files.js";
|
||||
import { ReadableStreamPrototype } from "internal:ext/web/06_streams.js";
|
||||
import { ReadableStreamPrototype } from "internal:deno_web/06_streams.js";
|
||||
const { ObjectPrototypeIsPrototypeOf } = primordials;
|
||||
|
||||
function writeFileSync(
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
const core = globalThis.Deno.core;
|
||||
const ops = core.ops;
|
||||
import * as timers from "internal:ext/web/02_timers.js";
|
||||
import * as httpClient from "internal:ext/fetch/22_http_client.js";
|
||||
import * as console from "internal:ext/console/02_console.js";
|
||||
import * as ffi from "internal:ext/ffi/00_ffi.js";
|
||||
import * as net from "internal:ext/net/01_net.js";
|
||||
import * as tls from "internal:ext/net/02_tls.js";
|
||||
import * as http from "internal:ext/http/01_http.js";
|
||||
import * as flash from "internal:ext/flash/01_http.js";
|
||||
import * as timers from "internal:deno_web/02_timers.js";
|
||||
import * as httpClient from "internal:deno_fetch/22_http_client.js";
|
||||
import * as console from "internal:deno_console/02_console.js";
|
||||
import * as ffi from "internal:deno_ffi/00_ffi.js";
|
||||
import * as net from "internal:deno_net/01_net.js";
|
||||
import * as tls from "internal:deno_net/02_tls.js";
|
||||
import * as http from "internal:deno_http/01_http.js";
|
||||
import * as flash from "internal:deno_flash/01_http.js";
|
||||
import * as build from "internal:runtime/js/01_build.js";
|
||||
import * as errors from "internal:runtime/js/01_errors.js";
|
||||
import * as version from "internal:runtime/js/01_version.js";
|
||||
|
|
|
@ -8,37 +8,37 @@ const {
|
|||
} = primordials;
|
||||
|
||||
import * as util from "internal:runtime/js/06_util.js";
|
||||
import * as location from "internal:ext/web/12_location.js";
|
||||
import * as event from "internal:ext/web/02_event.js";
|
||||
import * as timers from "internal:ext/web/02_timers.js";
|
||||
import * as base64 from "internal:ext/web/05_base64.js";
|
||||
import * as encoding from "internal:ext/web/08_text_encoding.js";
|
||||
import * as console from "internal:ext/console/02_console.js";
|
||||
import * as caches from "internal:ext/cache/01_cache.js";
|
||||
import * as compression from "internal:ext/web/14_compression.js";
|
||||
import * as location from "internal:deno_web/12_location.js";
|
||||
import * as event from "internal:deno_web/02_event.js";
|
||||
import * as timers from "internal:deno_web/02_timers.js";
|
||||
import * as base64 from "internal:deno_web/05_base64.js";
|
||||
import * as encoding from "internal:deno_web/08_text_encoding.js";
|
||||
import * as console from "internal:deno_console/02_console.js";
|
||||
import * as caches from "internal:deno_cache/01_cache.js";
|
||||
import * as compression from "internal:deno_web/14_compression.js";
|
||||
import * as worker from "internal:runtime/js/11_workers.js";
|
||||
import * as performance from "internal:ext/web/15_performance.js";
|
||||
import * as crypto from "internal:ext/crypto/00_crypto.js";
|
||||
import * as url from "internal:ext/url/00_url.js";
|
||||
import * as urlPattern from "internal:ext/url/01_urlpattern.js";
|
||||
import * as headers from "internal:ext/fetch/20_headers.js";
|
||||
import * as streams from "internal:ext/web/06_streams.js";
|
||||
import * as fileReader from "internal:ext/web/10_filereader.js";
|
||||
import * as webgpu from "internal:ext/webgpu/01_webgpu.js";
|
||||
import * as webSocket from "internal:ext/websocket/01_websocket.js";
|
||||
import * as webSocketStream from "internal:ext/websocket/02_websocketstream.js";
|
||||
import * as broadcastChannel from "internal:ext/broadcast_channel/01_broadcast_channel.js";
|
||||
import * as file from "internal:ext/web/09_file.js";
|
||||
import * as formData from "internal:ext/fetch/21_formdata.js";
|
||||
import * as request from "internal:ext/fetch/23_request.js";
|
||||
import * as response from "internal:ext/fetch/23_response.js";
|
||||
import * as fetch from "internal:ext/fetch/26_fetch.js";
|
||||
import * as messagePort from "internal:ext/web/13_message_port.js";
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import * as abortSignal from "internal:ext/web/03_abort_signal.js";
|
||||
import * as globalInterfaces from "internal:ext/web/04_global_interfaces.js";
|
||||
import * as webStorage from "internal:ext/webstorage/01_webstorage.js";
|
||||
import * as performance from "internal:deno_web/15_performance.js";
|
||||
import * as crypto from "internal:deno_crypto/00_crypto.js";
|
||||
import * as url from "internal:deno_url/00_url.js";
|
||||
import * as urlPattern from "internal:deno_url/01_urlpattern.js";
|
||||
import * as headers from "internal:deno_fetch/20_headers.js";
|
||||
import * as streams from "internal:deno_web/06_streams.js";
|
||||
import * as fileReader from "internal:deno_web/10_filereader.js";
|
||||
import * as webgpu from "internal:deno_webgpu/01_webgpu.js";
|
||||
import * as webSocket from "internal:deno_websocket/01_websocket.js";
|
||||
import * as webSocketStream from "internal:deno_websocket/02_websocketstream.js";
|
||||
import * as broadcastChannel from "internal:deno_broadcast_channel/01_broadcast_channel.js";
|
||||
import * as file from "internal:deno_web/09_file.js";
|
||||
import * as formData from "internal:deno_fetch/21_formdata.js";
|
||||
import * as request from "internal:deno_fetch/23_request.js";
|
||||
import * as response from "internal:deno_fetch/23_response.js";
|
||||
import * as fetch from "internal:deno_fetch/26_fetch.js";
|
||||
import * as messagePort from "internal:deno_web/13_message_port.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
import * as abortSignal from "internal:deno_web/03_abort_signal.js";
|
||||
import * as globalInterfaces from "internal:deno_web/04_global_interfaces.js";
|
||||
import * as webStorage from "internal:deno_webstorage/01_webstorage.js";
|
||||
import * as prompt from "internal:runtime/js/41_prompt.js";
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope
|
||||
|
|
|
@ -40,28 +40,28 @@ const {
|
|||
WeakMapPrototypeSet,
|
||||
} = primordials;
|
||||
import * as util from "internal:runtime/js/06_util.js";
|
||||
import * as event from "internal:ext/web/02_event.js";
|
||||
import * as location from "internal:ext/web/12_location.js";
|
||||
import * as event from "internal:deno_web/02_event.js";
|
||||
import * as location from "internal:deno_web/12_location.js";
|
||||
import * as build from "internal:runtime/js/01_build.js";
|
||||
import * as version from "internal:runtime/js/01_version.js";
|
||||
import * as os from "internal:runtime/js/30_os.js";
|
||||
import * as timers from "internal:ext/web/02_timers.js";
|
||||
import * as colors from "internal:ext/console/01_colors.js";
|
||||
import * as net from "internal:ext/net/01_net.js";
|
||||
import * as timers from "internal:deno_web/02_timers.js";
|
||||
import * as colors from "internal:deno_console/01_colors.js";
|
||||
import * as net from "internal:deno_net/01_net.js";
|
||||
import {
|
||||
inspectArgs,
|
||||
quoteString,
|
||||
wrapConsole,
|
||||
} from "internal:ext/console/02_console.js";
|
||||
import * as performance from "internal:ext/web/15_performance.js";
|
||||
import * as url from "internal:ext/url/00_url.js";
|
||||
import * as fetch from "internal:ext/fetch/26_fetch.js";
|
||||
import * as messagePort from "internal:ext/web/13_message_port.js";
|
||||
} from "internal:deno_console/02_console.js";
|
||||
import * as performance from "internal:deno_web/15_performance.js";
|
||||
import * as url from "internal:deno_url/00_url.js";
|
||||
import * as fetch from "internal:deno_fetch/26_fetch.js";
|
||||
import * as messagePort from "internal:deno_web/13_message_port.js";
|
||||
import { denoNs, denoNsUnstable } from "internal:runtime/js/90_deno_ns.js";
|
||||
import { errors } from "internal:runtime/js/01_errors.js";
|
||||
import * as webidl from "internal:ext/webidl/00_webidl.js";
|
||||
import DOMException from "internal:ext/web/01_dom_exception.js";
|
||||
import * as flash from "internal:ext/flash/01_http.js";
|
||||
import * as webidl from "internal:deno_webidl/00_webidl.js";
|
||||
import DOMException from "internal:deno_web/01_dom_exception.js";
|
||||
import * as flash from "internal:deno_flash/01_http.js";
|
||||
import * as spawn from "internal:runtime/js/40_spawn.js";
|
||||
import {
|
||||
mainRuntimeGlobalProperties,
|
||||
|
|
|
@ -87,7 +87,7 @@ async function patchSrcLib() {
|
|||
(data) =>
|
||||
data.replace(
|
||||
`prefix "internal:deno_webgpu",`,
|
||||
`prefix "internal:ext/webgpu",`,
|
||||
`prefix "internal:deno_webgpu",`,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ async function patchSurface() {
|
|||
(data) =>
|
||||
data.replace(
|
||||
`prefix "internal:deno_webgpu",`,
|
||||
`prefix "internal:ext/webgpu",`,
|
||||
`prefix "internal:deno_webgpu",`,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue