1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

refactor: remove prefix from include_js_files & use extension name (#17683)

This commit is contained in:
Leo Kettmeir 2023-02-07 22:09:50 +01:00 committed by GitHub
parent b4aa153097
commit 49af1ab18d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 271 additions and 308 deletions

View file

@ -4,9 +4,9 @@ const core = globalThis.Deno.core;
const ops = core.ops; const ops = core.ops;
const internals = globalThis.__bootstrap.internals; const internals = globalThis.__bootstrap.internals;
import { setExitHandler } from "internal:runtime/js/30_os.js"; 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 { 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 primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayFrom, ArrayFrom,

View file

@ -2,5 +2,5 @@
new Event(); new Event();
^ ^
at [WILDCARD] at [WILDCARD]
at new Event (internal:ext/web/[WILDCARD]) at new Event (internal:deno_web/[WILDCARD])
at [WILDCARD] at [WILDCARD]

View file

@ -1,2 +1,2 @@
error: Uncaught (in promise) TypeError: Invalid WebAssembly content type. 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])

View file

@ -2,7 +2,7 @@ error: Uncaught (in worker "") Error
throw new Error(); throw new Error();
^ ^
at [WILDCARD]/workers/drop_handle_race.js:2:9 at [WILDCARD]/workers/drop_handle_race.js:2:9
at Object.action (internal:ext/web/02_timers.js:[WILDCARD]) at Object.action (internal:deno_web/02_timers.js:[WILDCARD])
at handleTimerMacrotask (internal:ext/web/02_timers.js:[WILDCARD]) at handleTimerMacrotask (internal:deno_web/02_timers.js:[WILDCARD])
error: Uncaught (in promise) Error: Unhandled error in child worker. error: Uncaught (in promise) Error: Unhandled error in child worker.
at Worker.#pollControl (internal:runtime/js/11_workers.js:[WILDCARD]) at Worker.#pollControl (internal:runtime/js/11_workers.js:[WILDCARD])

View file

@ -6,7 +6,7 @@ use std::rc::Rc;
use std::task::Context; use std::task::Context;
use v8::fast_api::FastFunction; 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 OpFnRef = v8::FunctionCallback;
pub type OpMiddlewareFn = dyn Fn(OpDecl) -> OpDecl; pub type OpMiddlewareFn = dyn Fn(OpDecl) -> OpDecl;
pub type OpStateFn = dyn Fn(&mut OpState) -> Result<(), Error>; pub type OpStateFn = dyn Fn(&mut OpState) -> Result<(), Error>;
@ -168,13 +168,27 @@ impl ExtensionBuilder {
self 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.js.extend(js_files);
self self
} }
pub fn esm(&mut self, js_files: Vec<SourcePair>) -> &mut Self { pub fn esm(
self.esm.extend(js_files); &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 self
} }
@ -232,17 +246,16 @@ impl ExtensionBuilder {
/// Example: /// Example:
/// ```ignore /// ```ignore
/// include_js_files!( /// include_js_files!(
/// prefix "internal:extensions/hello",
/// "01_hello.js", /// "01_hello.js",
/// "02_goodbye.js", /// "02_goodbye.js",
/// ) /// )
/// ``` /// ```
#[macro_export] #[macro_export]
macro_rules! include_js_files { macro_rules! include_js_files {
(prefix $prefix:literal, $($file:literal,)+) => { ($($file:literal,)+) => {
vec![ vec![
$(( $((
concat!($prefix, "/", $file), $file,
include_str!($file), include_str!($file),
),)+ ),)+
] ]

View file

@ -19,9 +19,8 @@ use std::io::Write;
use std::rc::Rc; use std::rc::Rc;
pub(crate) fn init_builtins() -> Extension { pub(crate) fn init_builtins() -> Extension {
Extension::builder("deno_builtins") Extension::builder("core")
.js(include_js_files!( .js(include_js_files!(
prefix "internal:core",
"00_primordials.js", "00_primordials.js",
"01_core.js", "01_core.js",
"02_error.js", "02_error.js",

View file

@ -4,13 +4,13 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 { import {
defineEventHandler, defineEventHandler,
EventTarget, EventTarget,
setTarget, setTarget,
} from "internal:ext/web/02_event.js"; } from "internal:deno_web/02_event.js";
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 primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayPrototypeIndexOf, ArrayPrototypeIndexOf,

View file

@ -112,10 +112,7 @@ pub fn init<BC: BroadcastChannel + 'static>(
) -> Extension { ) -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_webidl", "deno_web"]) .dependencies(vec!["deno_webidl", "deno_web"])
.esm(include_js_files!( .esm(include_js_files!("01_broadcast_channel.js",))
prefix "internal:ext/broadcast_channel",
"01_broadcast_channel.js",
))
.ops(vec![ .ops(vec![
op_broadcast_subscribe::decl::<BC>(), op_broadcast_subscribe::decl::<BC>(),
op_broadcast_unsubscribe::decl::<BC>(), op_broadcast_unsubscribe::decl::<BC>(),

12
ext/cache/01_cache.js vendored
View file

@ -1,7 +1,7 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
const core = globalThis.Deno.core; 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 primordials = globalThis.__bootstrap.primordials;
const { const {
Symbol, Symbol,
@ -12,11 +12,11 @@ import {
Request, Request,
RequestPrototype, RequestPrototype,
toInnerRequest, toInnerRequest,
} from "internal:ext/fetch/23_request.js"; } from "internal:deno_fetch/23_request.js";
import { toInnerResponse } from "internal:ext/fetch/23_response.js"; import { toInnerResponse } from "internal:deno_fetch/23_response.js";
import { URLPrototype } from "internal:ext/url/00_url.js"; import { URLPrototype } from "internal:deno_url/00_url.js";
import { getHeader } from "internal:ext/fetch/20_headers.js"; import { getHeader } from "internal:deno_fetch/20_headers.js";
import { readableStreamForRid } from "internal:ext/web/06_streams.js"; import { readableStreamForRid } from "internal:deno_web/06_streams.js";
class CacheStorage { class CacheStorage {
constructor() { constructor() {

5
ext/cache/lib.rs vendored
View file

@ -27,10 +27,7 @@ pub fn init<CA: Cache + 'static>(
) -> Extension { ) -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_webidl", "deno_web", "deno_url", "deno_fetch"]) .dependencies(vec!["deno_webidl", "deno_web", "deno_url", "deno_fetch"])
.esm(include_js_files!( .esm(include_js_files!("01_cache.js",))
prefix "internal:ext/cache",
"01_cache.js",
))
.ops(vec![ .ops(vec![
op_cache_storage_open::decl::<CA>(), op_cache_storage_open::decl::<CA>(),
op_cache_storage_has::decl::<CA>(), op_cache_storage_has::decl::<CA>(),

View file

@ -116,7 +116,7 @@ const {
WeakMapPrototype, WeakMapPrototype,
WeakSetPrototype, WeakSetPrototype,
} = primordials; } = primordials;
import * as colors from "internal:ext/console/01_colors.js"; import * as colors from "internal:deno_console/01_colors.js";
function isInvalidDate(x) { function isInvalidDate(x) {
return isNaN(DatePrototypeGetTime(x)); return isNaN(DatePrototypeGetTime(x));

View file

@ -3,7 +3,7 @@
/// <reference no-default-lib="true" /> /// <reference no-default-lib="true" />
/// <reference lib="esnext" /> /// <reference lib="esnext" />
declare module "internal:ext/console/02_console.js" { declare module "internal:deno_console/02_console.js" {
function createFilteredInspectProxy<TObject>(params: { function createFilteredInspectProxy<TObject>(params: {
object: TObject; object: TObject;
keys: (keyof TObject)[]; keys: (keyof TObject)[];

View file

@ -6,11 +6,7 @@ use std::path::PathBuf;
pub fn init() -> Extension { pub fn init() -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.esm(include_js_files!( .esm(include_js_files!("01_colors.js", "02_console.js",))
prefix "internal:ext/console",
"01_colors.js",
"02_console.js",
))
.build() .build()
} }

View file

@ -9,8 +9,8 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; const ops = core.ops;
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import DOMException from "internal:ext/web/01_dom_exception.js"; import DOMException from "internal:deno_web/01_dom_exception.js";
const { const {
ArrayBufferPrototype, ArrayBufferPrototype,
ArrayBufferIsView, ArrayBufferIsView,

View file

@ -5,8 +5,8 @@
/// <reference path="../webidl/internal.d.ts" /> /// <reference path="../webidl/internal.d.ts" />
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { CryptoKey } from "internal:ext/crypto/00_crypto.js"; import { CryptoKey } from "internal:deno_crypto/00_crypto.js";
const { const {
ArrayBufferIsView, ArrayBufferIsView,
ArrayBufferPrototype, ArrayBufferPrototype,

View file

@ -75,11 +75,7 @@ use crate::shared::RawKeyData;
pub fn init(maybe_seed: Option<u64>) -> Extension { pub fn init(maybe_seed: Option<u64>) -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_webidl", "deno_web"]) .dependencies(vec!["deno_webidl", "deno_web"])
.esm(include_js_files!( .esm(include_js_files!("00_crypto.js", "01_webidl.js",))
prefix "internal:ext/crypto",
"00_crypto.js",
"01_webidl.js",
))
.ops(vec![ .ops(vec![
op_crypto_get_random_values::decl(), op_crypto_get_random_values::decl(),
op_crypto_generate_key::decl(), op_crypto_generate_key::decl(),

View file

@ -9,7 +9,7 @@
/// <reference path="./lib.deno_fetch.d.ts" /> /// <reference path="./lib.deno_fetch.d.ts" />
/// <reference lib="esnext" /> /// <reference lib="esnext" />
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { import {
byteLowerCase, byteLowerCase,
collectHttpQuotedString, collectHttpQuotedString,
@ -18,7 +18,7 @@ import {
HTTP_TAB_OR_SPACE_SUFFIX_RE, HTTP_TAB_OR_SPACE_SUFFIX_RE,
HTTP_TOKEN_CODE_POINT_RE, HTTP_TOKEN_CODE_POINT_RE,
httpTrim, httpTrim,
} from "internal:ext/web/00_infra.js"; } from "internal:deno_web/00_infra.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayIsArray, ArrayIsArray,

View file

@ -10,13 +10,13 @@
/// <reference lib="esnext" /> /// <reference lib="esnext" />
const core = globalThis.Deno.core; 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 { import {
Blob, Blob,
BlobPrototype, BlobPrototype,
File, File,
FilePrototype, FilePrototype,
} from "internal:ext/web/09_file.js"; } from "internal:deno_web/09_file.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayPrototypePush, ArrayPrototypePush,

View file

@ -12,19 +12,19 @@
/// <reference lib="esnext" /> /// <reference lib="esnext" />
const core = globalThis.Deno.core; 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 { import {
parseUrlEncoded, parseUrlEncoded,
URLSearchParamsPrototype, URLSearchParamsPrototype,
} from "internal:ext/url/00_url.js"; } from "internal:deno_url/00_url.js";
import { import {
formDataFromEntries, formDataFromEntries,
FormDataPrototype, FormDataPrototype,
formDataToBlob, formDataToBlob,
parseFormData, parseFormData,
} from "internal:ext/fetch/21_formdata.js"; } from "internal:deno_fetch/21_formdata.js";
import * as mimesniff from "internal:ext/web/01_mimesniff.js"; import * as mimesniff from "internal:deno_web/01_mimesniff.js";
import { BlobPrototype } from "internal:ext/web/09_file.js"; import { BlobPrototype } from "internal:deno_web/09_file.js";
import { import {
createProxy, createProxy,
errorReadableStream, errorReadableStream,
@ -34,7 +34,7 @@ import {
readableStreamDisturb, readableStreamDisturb,
ReadableStreamPrototype, ReadableStreamPrototype,
readableStreamThrowIfErrored, readableStreamThrowIfErrored,
} from "internal:ext/web/06_streams.js"; } from "internal:deno_web/06_streams.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayBufferPrototype, ArrayBufferPrototype,

View file

@ -9,30 +9,30 @@
/// <reference path="./lib.deno_fetch.d.ts" /> /// <reference path="./lib.deno_fetch.d.ts" />
/// <reference lib="esnext" /> /// <reference lib="esnext" />
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js"; import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
import { import {
byteUpperCase, byteUpperCase,
HTTP_TOKEN_CODE_POINT_RE, HTTP_TOKEN_CODE_POINT_RE,
} from "internal:ext/web/00_infra.js"; } from "internal:deno_web/00_infra.js";
import { URL } from "internal:ext/url/00_url.js"; import { URL } from "internal:deno_url/00_url.js";
import { import {
extractBody, extractBody,
InnerBody, InnerBody,
mixinBody, mixinBody,
} from "internal:ext/fetch/22_body.js"; } from "internal:deno_fetch/22_body.js";
import { getLocationHref } from "internal:ext/web/12_location.js"; import { getLocationHref } from "internal:deno_web/12_location.js";
import { extractMimeType } from "internal:ext/web/01_mimesniff.js"; import { extractMimeType } from "internal:deno_web/01_mimesniff.js";
import { blobFromObjectUrl } from "internal:ext/web/09_file.js"; import { blobFromObjectUrl } from "internal:deno_web/09_file.js";
import { import {
fillHeaders, fillHeaders,
getDecodeSplitHeader, getDecodeSplitHeader,
guardFromHeaders, guardFromHeaders,
headerListFromHeaders, headerListFromHeaders,
headersFromHeaderList, headersFromHeaderList,
} from "internal:ext/fetch/20_headers.js"; } from "internal:deno_fetch/20_headers.js";
import { HttpClientPrototype } from "internal:ext/fetch/22_http_client.js"; import { HttpClientPrototype } from "internal:deno_fetch/22_http_client.js";
import * as abortSignal from "internal:ext/web/03_abort_signal.js"; import * as abortSignal from "internal:deno_web/03_abort_signal.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayPrototypeMap, ArrayPrototypeMap,

View file

@ -11,25 +11,25 @@
/// <reference lib="esnext" /> /// <reference lib="esnext" />
const core = globalThis.Deno.core; 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 { createFilteredInspectProxy } from "internal:ext/console/02_console.js"; import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
import { import {
byteLowerCase, byteLowerCase,
HTTP_TAB_OR_SPACE, HTTP_TAB_OR_SPACE,
regexMatcher, regexMatcher,
serializeJSValueToJSONString, serializeJSValueToJSONString,
} from "internal:ext/web/00_infra.js"; } from "internal:deno_web/00_infra.js";
import { extractBody, mixinBody } from "internal:ext/fetch/22_body.js"; import { extractBody, mixinBody } from "internal:deno_fetch/22_body.js";
import { getLocationHref } from "internal:ext/web/12_location.js"; import { getLocationHref } from "internal:deno_web/12_location.js";
import { extractMimeType } from "internal:ext/web/01_mimesniff.js"; import { extractMimeType } from "internal:deno_web/01_mimesniff.js";
import { URL } from "internal:ext/url/00_url.js"; import { URL } from "internal:deno_url/00_url.js";
import { import {
fillHeaders, fillHeaders,
getDecodeSplitHeader, getDecodeSplitHeader,
guardFromHeaders, guardFromHeaders,
headerListFromHeaders, headerListFromHeaders,
headersFromHeaderList, headersFromHeaderList,
} from "internal:ext/fetch/20_headers.js"; } from "internal:deno_fetch/20_headers.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayPrototypeMap, ArrayPrototypeMap,

View file

@ -12,19 +12,19 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 { byteLowerCase } from "internal:ext/web/00_infra.js"; import { byteLowerCase } from "internal:deno_web/00_infra.js";
import { BlobPrototype } from "internal:ext/web/09_file.js"; import { BlobPrototype } from "internal:deno_web/09_file.js";
import { import {
errorReadableStream, errorReadableStream,
readableStreamForRid, readableStreamForRid,
ReadableStreamPrototype, ReadableStreamPrototype,
} from "internal:ext/web/06_streams.js"; } from "internal:deno_web/06_streams.js";
import { extractBody, InnerBody } from "internal:ext/fetch/22_body.js"; import { extractBody, InnerBody } from "internal:deno_fetch/22_body.js";
import { import {
processUrlList, processUrlList,
toInnerRequest, toInnerRequest,
} from "internal:ext/fetch/23_request.js"; } from "internal:deno_fetch/23_request.js";
import { import {
abortedNetworkError, abortedNetworkError,
fromInnerResponse, fromInnerResponse,
@ -32,8 +32,8 @@ import {
nullBodyStatus, nullBodyStatus,
redirectStatus, redirectStatus,
toInnerResponse, toInnerResponse,
} from "internal:ext/fetch/23_response.js"; } from "internal:deno_fetch/23_response.js";
import * as abortSignal from "internal:ext/web/03_abort_signal.js"; import * as abortSignal from "internal:deno_web/03_abort_signal.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayPrototypePush, ArrayPrototypePush,

View file

@ -9,7 +9,7 @@ declare var domIterable: {
DomIterableMixin(base: any, dataSymbol: symbol): any; DomIterableMixin(base: any, dataSymbol: symbol): any;
}; };
declare module "internal:ext/fetch/20_headers.js" { declare module "internal:deno_fetch/20_headers.js" {
class Headers { class Headers {
} }
type HeaderList = [string, string][]; type HeaderList = [string, string][];
@ -33,7 +33,7 @@ declare module "internal:ext/fetch/20_headers.js" {
): "immutable" | "request" | "request-no-cors" | "response" | "none"; ): "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; type FormData = typeof FormData;
function formDataToBlob( function formDataToBlob(
formData: FormData, formData: FormData,
@ -45,7 +45,7 @@ declare module "internal:ext/fetch/21_formdata.js" {
function formDataFromEntries(entries: FormDataEntry[]): FormData; function formDataFromEntries(entries: FormDataEntry[]): FormData;
} }
declare module "internal:ext/fetch/22_body.js" { declare module "internal:deno_fetch/22_body.js" {
function mixinBody( function mixinBody(
prototype: any, prototype: any,
bodySymbol: symbol, 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 toInnerRequest(request: Request): InnerRequest;
function fromInnerRequest( function fromInnerRequest(
inner: InnerRequest, inner: InnerRequest,

View file

@ -98,7 +98,6 @@ where
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_webidl", "deno_web", "deno_url", "deno_console"]) .dependencies(vec!["deno_webidl", "deno_web", "deno_url", "deno_console"])
.esm(include_js_files!( .esm(include_js_files!(
prefix "internal:ext/fetch",
"20_headers.js", "20_headers.js",
"21_formdata.js", "21_formdata.js",
"22_body.js", "22_body.js",

View file

@ -84,10 +84,7 @@ pub(crate) struct FfiState {
pub fn init<P: FfiPermissions + 'static>(unstable: bool) -> Extension { pub fn init<P: FfiPermissions + 'static>(unstable: bool) -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.esm(include_js_files!( .esm(include_js_files!("00_ffi.js",))
prefix "internal:ext/ffi",
"00_ffi.js",
))
.ops(vec![ .ops(vec![
op_ffi_load::decl::<P>(), op_ffi_load::decl::<P>(),
op_ffi_get_static::decl(), op_ffi_get_static::decl(),

View file

@ -2,18 +2,18 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; const ops = core.ops;
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
import { BlobPrototype } from "internal:ext/web/09_file.js"; import { BlobPrototype } from "internal:deno_web/09_file.js";
import { TcpConn } from "internal:ext/net/01_net.js"; import { TcpConn } from "internal:deno_net/01_net.js";
import { toInnerResponse } from "internal:ext/fetch/23_response.js"; import { toInnerResponse } from "internal:deno_fetch/23_response.js";
import { _flash, fromFlashRequest } from "internal:ext/fetch/23_request.js"; import { _flash, fromFlashRequest } from "internal:deno_fetch/23_request.js";
import { Event } from "internal:ext/web/02_event.js"; import { Event } from "internal:deno_web/02_event.js";
import { import {
_state, _state,
getReadableStreamResourceBacking, getReadableStreamResourceBacking,
ReadableStream, ReadableStream,
readableStreamClose, readableStreamClose,
ReadableStreamPrototype, ReadableStreamPrototype,
} from "internal:ext/web/06_streams.js"; } from "internal:deno_web/06_streams.js";
import { import {
_eventLoop, _eventLoop,
_idleTimeoutDuration, _idleTimeoutDuration,
@ -23,8 +23,8 @@ import {
_rid, _rid,
_serverHandleIdleTimeout, _serverHandleIdleTimeout,
WebSocket, WebSocket,
} from "internal:ext/websocket/01_websocket.js"; } from "internal:deno_websocket/01_websocket.js";
import { _ws } from "internal:ext/http/01_http.js"; import { _ws } from "internal:deno_http/01_http.js";
const { const {
ObjectPrototypeIsPrototypeOf, ObjectPrototypeIsPrototypeOf,
PromisePrototype, PromisePrototype,

View file

@ -1514,10 +1514,7 @@ pub fn init<P: FlashPermissions + 'static>(unstable: bool) -> Extension {
"deno_websocket", "deno_websocket",
"deno_http", "deno_http",
]) ])
.esm(deno_core::include_js_files!( .esm(deno_core::include_js_files!("01_http.js",))
prefix "internal:ext/flash",
"01_http.js",
))
.ops(vec![ .ops(vec![
op_flash_serve::decl::<P>(), op_flash_serve::decl::<P>(),
op_node_unstable_flash_serve::decl::<P>(), op_node_unstable_flash_serve::decl::<P>(),

View file

@ -2,22 +2,22 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { BadResourcePrototype, InterruptedPrototype, ops } = core; const { BadResourcePrototype, InterruptedPrototype, ops } = core;
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { InnerBody } from "internal:ext/fetch/22_body.js"; import { InnerBody } from "internal:deno_fetch/22_body.js";
import { Event, setEventTargetData } from "internal:ext/web/02_event.js"; import { Event, setEventTargetData } from "internal:deno_web/02_event.js";
import { BlobPrototype } from "internal:ext/web/09_file.js"; import { BlobPrototype } from "internal:deno_web/09_file.js";
import { import {
fromInnerResponse, fromInnerResponse,
newInnerResponse, newInnerResponse,
ResponsePrototype, ResponsePrototype,
toInnerResponse, toInnerResponse,
} from "internal:ext/fetch/23_response.js"; } from "internal:deno_fetch/23_response.js";
import { import {
_flash, _flash,
fromInnerRequest, fromInnerRequest,
newInnerRequest, newInnerRequest,
} from "internal:ext/fetch/23_request.js"; } from "internal:deno_fetch/23_request.js";
import * as abortSignal from "internal:ext/web/03_abort_signal.js"; import * as abortSignal from "internal:deno_web/03_abort_signal.js";
import { import {
_eventLoop, _eventLoop,
_idleTimeoutDuration, _idleTimeoutDuration,
@ -28,16 +28,16 @@ import {
_server, _server,
_serverHandleIdleTimeout, _serverHandleIdleTimeout,
WebSocket, WebSocket,
} from "internal:ext/websocket/01_websocket.js"; } from "internal:deno_websocket/01_websocket.js";
import { TcpConn, UnixConn } from "internal:ext/net/01_net.js"; import { TcpConn, UnixConn } from "internal:deno_net/01_net.js";
import { TlsConn } from "internal:ext/net/02_tls.js"; import { TlsConn } from "internal:deno_net/02_tls.js";
import { import {
Deferred, Deferred,
getReadableStreamResourceBacking, getReadableStreamResourceBacking,
readableStreamClose, readableStreamClose,
readableStreamForRid, readableStreamForRid,
ReadableStreamPrototype, ReadableStreamPrototype,
} from "internal:ext/web/06_streams.js"; } from "internal:deno_web/06_streams.js";
const { const {
ArrayPrototypeIncludes, ArrayPrototypeIncludes,
ArrayPrototypePush, ArrayPrototypePush,

View file

@ -80,10 +80,7 @@ mod reader_stream;
pub fn init() -> Extension { pub fn init() -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_web", "deno_net", "deno_fetch", "deno_websocket"]) .dependencies(vec!["deno_web", "deno_net", "deno_fetch", "deno_websocket"])
.esm(include_js_files!( .esm(include_js_files!("01_http.js",))
prefix "internal:ext/http",
"01_http.js",
))
.ops(vec![ .ops(vec![
op_http_accept::decl(), op_http_accept::decl(),
op_http_write_headers::decl(), op_http_write_headers::decl(),

View file

@ -7,7 +7,7 @@ import {
readableStreamForRidUnrefableRef, readableStreamForRidUnrefableRef,
readableStreamForRidUnrefableUnref, readableStreamForRidUnrefableUnref,
writableStreamForRid, writableStreamForRid,
} from "internal:ext/web/06_streams.js"; } from "internal:deno_web/06_streams.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
Error, Error,

View file

@ -2,7 +2,7 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 primordials = globalThis.__bootstrap.primordials;
const { TypeError } = primordials; const { TypeError } = primordials;

View file

@ -86,11 +86,7 @@ pub fn init<P: NetPermissions + 'static>(
ops.extend(ops_tls::init::<P>()); ops.extend(ops_tls::init::<P>());
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_web"]) .dependencies(vec!["deno_web"])
.esm(include_js_files!( .esm(include_js_files!("01_net.js", "02_tls.js",))
prefix "internal:ext/net",
"01_net.js",
"02_tls.js",
))
.ops(ops) .ops(ops)
.state(move |state| { .state(move |state| {
state.put(DefaultTlsOptions { state.put(DefaultTlsOptions {

View file

@ -85,11 +85,7 @@ pub fn init<P: NodePermissions + 'static>(
maybe_npm_resolver: Option<Rc<dyn RequireNpmResolver>>, maybe_npm_resolver: Option<Rc<dyn RequireNpmResolver>>,
) -> Extension { ) -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.esm(include_js_files!( .esm(include_js_files!("01_node.js", "02_require.js",))
prefix "internal:ext/node",
"01_node.js",
"02_require.js",
))
.ops(vec![ .ops(vec![
op_require_init_paths::decl(), op_require_init_paths::decl(),
op_require_node_module_paths::decl::<P>(), op_require_node_module_paths::decl::<P>(),

View file

@ -7,7 +7,7 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayIsArray, ArrayIsArray,

View file

@ -9,7 +9,7 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayPrototypeMap, ArrayPrototypeMap,

View file

@ -14,7 +14,7 @@ fn setup() -> Vec<Extension> {
Extension::builder("bench_setup") Extension::builder("bench_setup")
.esm(vec![( .esm(vec![(
"internal:setup", "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; globalThis.URL = URL;
"#, "#,
)]) )])

View file

@ -3,12 +3,12 @@
/// <reference no-default-lib="true" /> /// <reference no-default-lib="true" />
/// <reference lib="esnext" /> /// <reference lib="esnext" />
declare module "internal:ext/url/00_url.js" { declare module "internal:deno_url/00_url.js" {
const URL: typeof URL; const URL: typeof URL;
const URLSearchParams: typeof URLSearchParams; const URLSearchParams: typeof URLSearchParams;
function parseUrlEncoded(bytes: Uint8Array): [string, string][]; 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; const URLPattern: typeof URLPattern;
} }

View file

@ -20,11 +20,7 @@ use crate::urlpattern::op_urlpattern_process_match_input;
pub fn init() -> Extension { pub fn init() -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_webidl"]) .dependencies(vec!["deno_webidl"])
.esm(include_js_files!( .esm(include_js_files!("00_url.js", "01_urlpattern.js",))
prefix "internal:ext/url",
"00_url.js",
"01_urlpattern.js",
))
.ops(vec![ .ops(vec![
op_url_reparse::decl(), op_url_reparse::decl(),
op_url_parse::decl(), op_url_parse::decl(),

View file

@ -20,8 +20,8 @@ const {
Symbol, Symbol,
SymbolFor, SymbolFor,
} = primordials; } = primordials;
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js"; import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
const _name = Symbol("name"); const _name = Symbol("name");
const _message = Symbol("message"); const _message = Symbol("message");

View file

@ -26,7 +26,7 @@ import {
HTTP_WHITESPACE, HTTP_WHITESPACE,
HTTP_WHITESPACE_PREFIX_RE, HTTP_WHITESPACE_PREFIX_RE,
HTTP_WHITESPACE_SUFFIX_RE, HTTP_WHITESPACE_SUFFIX_RE,
} from "internal:ext/web/00_infra.js"; } from "internal:deno_web/00_infra.js";
/** /**
* @typedef MimeType * @typedef MimeType

View file

@ -7,9 +7,9 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 DOMException from "internal:ext/web/01_dom_exception.js"; import DOMException from "internal:deno_web/01_dom_exception.js";
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js"; import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayPrototypeFilter, ArrayPrototypeFilter,

View file

@ -7,7 +7,7 @@
/// <reference path="../web/lib.deno_web.d.ts" /> /// <reference path="../web/lib.deno_web.d.ts" />
const core = globalThis.Deno.core; 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 primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayBuffer, ArrayBuffer,

View file

@ -22,9 +22,9 @@ const {
TypeError, TypeError,
indirectEval, indirectEval,
} = primordials; } = primordials;
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { reportException } from "internal:ext/web/02_event.js"; import { reportException } from "internal:deno_web/02_event.js";
import { assert } from "internal:ext/web/00_infra.js"; import { assert } from "internal:deno_web/00_infra.js";
const hrU8 = new Uint8Array(8); const hrU8 = new Uint8Array(8);
const hr = new Uint32Array(hrU8.buffer); const hr = new Uint32Array(hrU8.buffer);

View file

@ -3,14 +3,14 @@
// @ts-check // @ts-check
/// <reference path="../../core/internal.d.ts" /> /// <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 { import {
defineEventHandler, defineEventHandler,
Event, Event,
EventTarget, EventTarget,
listenerCount, listenerCount,
setIsTrusted, setIsTrusted,
} from "internal:ext/web/02_event.js"; } from "internal:deno_web/02_event.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
SafeArrayIterator, SafeArrayIterator,
@ -25,7 +25,7 @@ import {
refTimer, refTimer,
setTimeout, setTimeout,
unrefTimer, unrefTimer,
} from "internal:ext/web/02_timers.js"; } from "internal:deno_web/02_timers.js";
const add = Symbol("[[add]]"); const add = Symbol("[[add]]");
const signalAbort = Symbol("[[signalAbort]]"); const signalAbort = Symbol("[[signalAbort]]");

View file

@ -3,7 +3,7 @@
// @ts-check // @ts-check
/// <reference path="../../core/internal.d.ts" /> /// <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 primordials = globalThis.__bootstrap.primordials;
const { const {
Symbol, Symbol,

View file

@ -8,8 +8,8 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 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 primordials = globalThis.__bootstrap.primordials;
const { const {
ObjectPrototypeIsPrototypeOf, ObjectPrototypeIsPrototypeOf,

View file

@ -8,14 +8,14 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 { import {
AbortSignalPrototype, AbortSignalPrototype,
add, add,
newSignal, newSignal,
remove, remove,
signalAbort, signalAbort,
} from "internal:ext/web/03_abort_signal.js"; } from "internal:deno_web/03_abort_signal.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayBuffer, ArrayBuffer,
@ -68,8 +68,8 @@ const {
WeakMapPrototypeHas, WeakMapPrototypeHas,
WeakMapPrototypeSet, WeakMapPrototypeSet,
} = primordials; } = primordials;
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js"; import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
import { assert, AssertionError } from "internal:ext/web/00_infra.js"; import { assert, AssertionError } from "internal:deno_web/00_infra.js";
/** @template T */ /** @template T */
class Deferred { class Deferred {

View file

@ -11,7 +11,7 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 primordials = globalThis.__bootstrap.primordials;
const { const {
PromiseReject, PromiseReject,

View file

@ -12,7 +12,7 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayBufferPrototype, ArrayBufferPrototype,
@ -38,7 +38,7 @@ const {
TypeError, TypeError,
Uint8Array, Uint8Array,
} = primordials; } = 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 // TODO(lucacasonato): this needs to not be hardcoded and instead depend on
// host os. // host os.

View file

@ -12,13 +12,13 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 primordials = globalThis.__bootstrap.primordials;
import { forgivingBase64Encode } from "internal:ext/web/00_infra.js"; import { forgivingBase64Encode } from "internal:deno_web/00_infra.js";
import { EventTarget, ProgressEvent } from "internal:ext/web/02_event.js"; import { EventTarget, ProgressEvent } from "internal:deno_web/02_event.js";
import { decode, TextDecoder } from "internal:ext/web/08_text_encoding.js"; import { decode, TextDecoder } from "internal:deno_web/08_text_encoding.js";
import { parseMimeType } from "internal:ext/web/01_mimesniff.js"; import { parseMimeType } from "internal:deno_web/01_mimesniff.js";
import DOMException from "internal:ext/web/01_dom_exception.js"; import DOMException from "internal:deno_web/01_dom_exception.js";
const { const {
ArrayPrototypePush, ArrayPrototypePush,
ArrayPrototypeReduce, ArrayPrototypeReduce,

View file

@ -13,9 +13,9 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 { getParts } from "internal:ext/web/09_file.js"; import { getParts } from "internal:deno_web/09_file.js";
import { URL } from "internal:ext/url/00_url.js"; import { URL } from "internal:deno_url/00_url.js";
/** /**
* @param {Blob} blob * @param {Blob} blob

View file

@ -2,8 +2,8 @@
/// <reference path="../../core/internal.d.ts" /> /// <reference path="../../core/internal.d.ts" />
import { URL } from "internal:ext/url/00_url.js"; import { URL } from "internal:deno_url/00_url.js";
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 primordials = globalThis.__bootstrap.primordials;
const { const {
Error, Error,

View file

@ -8,14 +8,14 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const { InterruptedPrototype, ops } = 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 { import {
defineEventHandler, defineEventHandler,
EventTarget, EventTarget,
MessageEvent, MessageEvent,
setEventTargetData, setEventTargetData,
} from "internal:ext/web/02_event.js"; } from "internal:deno_web/02_event.js";
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 primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayBufferPrototype, ArrayBufferPrototype,

View file

@ -7,8 +7,8 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 { TransformStream } from "internal:ext/web/06_streams.js"; import { TransformStream } from "internal:deno_web/06_streams.js";
webidl.converters.CompressionFormat = webidl.createEnumConverter( webidl.converters.CompressionFormat = webidl.createEnumConverter(
"CompressionFormat", "CompressionFormat",

View file

@ -14,12 +14,12 @@ const {
SymbolFor, SymbolFor,
TypeError, TypeError,
} = primordials; } = primordials;
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { structuredClone } from "internal:ext/web/02_structured_clone.js"; import { structuredClone } from "internal:deno_web/02_structured_clone.js";
import { createFilteredInspectProxy } from "internal:ext/console/02_console.js"; import { createFilteredInspectProxy } from "internal:deno_console/02_console.js";
import { EventTarget } from "internal:ext/web/02_event.js"; import { EventTarget } from "internal:deno_web/02_event.js";
import { opNow } from "internal:ext/web/02_timers.js"; import { opNow } from "internal:deno_web/02_timers.js";
import DOMException from "internal:ext/web/01_dom_exception.js"; import DOMException from "internal:deno_web/01_dom_exception.js";
const illegalConstructorKey = Symbol("illegalConstructorKey"); const illegalConstructorKey = Symbol("illegalConstructorKey");
const customInspect = SymbolFor("Deno.customInspect"); const customInspect = SymbolFor("Deno.customInspect");

View file

@ -32,7 +32,7 @@ fn setup() -> Vec<Extension> {
.esm(vec![( .esm(vec![(
"internal:setup", "internal:setup",
r#" 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.TextDecoder = TextDecoder;
globalThis.hello12k = Deno.core.encode("hello world\n".repeat(1e3)); globalThis.hello12k = Deno.core.encode("hello world\n".repeat(1e3));
"#, "#,

View file

@ -30,7 +30,7 @@ fn setup() -> Vec<Extension> {
Extension::builder("bench_setup") Extension::builder("bench_setup")
.esm(vec![ .esm(vec![
("internal:setup", r#" ("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; globalThis.setTimeout = setTimeout;
Deno.core.setMacrotaskCallback(handleTimerMacrotask); Deno.core.setMacrotaskCallback(handleTimerMacrotask);
"#), "#),

18
ext/web/internal.d.ts vendored
View file

@ -3,7 +3,7 @@
/// <reference no-default-lib="true" /> /// <reference no-default-lib="true" />
/// <reference lib="esnext" /> /// <reference lib="esnext" />
declare module "internal:ext/web/00_infra.js" { declare module "internal:deno_web/00_infra.js" {
function collectSequenceOfCodepoints( function collectSequenceOfCodepoints(
input: string, input: string,
position: number, position: number,
@ -44,11 +44,11 @@ declare module "internal:ext/web/00_infra.js" {
function serializeJSValueToJSONString(value: unknown): string; 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; export = DOMException;
} }
declare module "internal:ext/web/01_mimesniff.js" { declare module "internal:deno_web/01_mimesniff.js" {
interface MimeType { interface MimeType {
type: string; type: string;
subtype: string; subtype: string;
@ -62,7 +62,7 @@ declare module "internal:ext/web/01_mimesniff.js" {
): MimeType | null; ): MimeType | null;
} }
declare module "internal:ext/web/02_event.js" { declare module "internal:deno_web/02_event.js" {
const EventTarget: typeof EventTarget; const EventTarget: typeof EventTarget;
const Event: typeof event; const Event: typeof event;
const ErrorEvent: typeof ErrorEvent; const ErrorEvent: typeof ErrorEvent;
@ -74,29 +74,29 @@ declare module "internal:ext/web/02_event.js" {
const reportError: typeof reportError; const reportError: typeof reportError;
} }
declare module "internal:ext/web/12_location.js" { declare module "internal:deno_web/12_location.js" {
function getLocationHref(): string | undefined; 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 atob(data: string): string;
function btoa(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 blobFromObjectUrl(url: string): Blob | null;
function getParts(blob: Blob): string[]; function getParts(blob: Blob): string[];
const Blob: typeof Blob; const Blob: typeof Blob;
const File: typeof File; const File: typeof File;
} }
declare module "internal:ext/web/06_streams.js" { declare module "internal:deno_web/06_streams.js" {
const ReadableStream: typeof ReadableStream; const ReadableStream: typeof ReadableStream;
function isReadableStreamDisturbed(stream: ReadableStream): boolean; function isReadableStreamDisturbed(stream: ReadableStream): boolean;
function createProxy<T>(stream: ReadableStream<T>): ReadableStream<T>; 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 = { type Transferable = {
kind: "messagePort"; kind: "messagePort";
data: number; data: number;

View file

@ -65,7 +65,6 @@ pub fn init<P: TimersPermission + 'static>(
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_webidl", "deno_console", "deno_url"]) .dependencies(vec!["deno_webidl", "deno_console", "deno_url"])
.esm(include_js_files!( .esm(include_js_files!(
prefix "internal:ext/web",
"00_infra.js", "00_infra.js",
"01_dom_exception.js", "01_dom_exception.js",
"01_mimesniff.js", "01_mimesniff.js",

View file

@ -9,9 +9,9 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; const ops = core.ops;
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { EventTarget } from "internal:ext/web/02_event.js"; import { EventTarget } from "internal:deno_web/02_event.js";
import DOMException from "internal:ext/web/01_dom_exception.js"; import DOMException from "internal:deno_web/01_dom_exception.js";
const { const {
ArrayBuffer, ArrayBuffer,
ArrayBufferIsView, ArrayBufferIsView,

View file

@ -3,7 +3,7 @@
// @ts-check // @ts-check
/// <reference path="../web/internal.d.ts" /> /// <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 { import {
GPU, GPU,
GPUAdapter, GPUAdapter,
@ -35,7 +35,7 @@ import {
GPUTextureUsage, GPUTextureUsage,
GPUTextureView, GPUTextureView,
GPUValidationError, GPUValidationError,
} from "internal:ext/webgpu/01_webgpu.js"; } from "internal:deno_webgpu/01_webgpu.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { SymbolIterator, TypeError } = primordials; const { SymbolIterator, TypeError } = primordials;

View file

@ -8,14 +8,14 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 primordials = globalThis.__bootstrap.primordials;
const { Symbol } = primordials; const { Symbol } = primordials;
import { import {
_device, _device,
assertDevice, assertDevice,
createGPUTexture, createGPUTexture,
} from "internal:ext/webgpu/01_webgpu.js"; } from "internal:deno_webgpu/01_webgpu.js";
const _surfaceRid = Symbol("[[surfaceRid]]"); const _surfaceRid = Symbol("[[surfaceRid]]");
const _configuration = Symbol("[[configuration]]"); const _configuration = Symbol("[[configuration]]");

View file

@ -6,8 +6,8 @@
/// <reference path="../web/lib.deno_web.d.ts" /> /// <reference path="../web/lib.deno_web.d.ts" />
/// <reference path="./lib.deno_webgpu.d.ts" /> /// <reference path="./lib.deno_webgpu.d.ts" />
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { GPUTextureUsage } from "internal:ext/webgpu/01_webgpu.js"; import { GPUTextureUsage } from "internal:deno_webgpu/01_webgpu.js";
// ENUM: GPUCanvasAlphaMode // ENUM: GPUCanvasAlphaMode
webidl.converters["GPUCanvasAlphaMode"] = webidl.createEnumConverter( webidl.converters["GPUCanvasAlphaMode"] = webidl.createEnumConverter(

View file

@ -119,11 +119,7 @@ impl Resource for WebGpuQuerySet {
pub fn init(unstable: bool) -> Extension { pub fn init(unstable: bool) -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_webidl", "deno_web"]) .dependencies(vec!["deno_webidl", "deno_web"])
.esm(include_js_files!( .esm(include_js_files!("01_webgpu.js", "02_idl_types.js",))
prefix "internal:ext/webgpu",
"01_webgpu.js",
"02_idl_types.js",
))
.ops(declare_webgpu_ops()) .ops(declare_webgpu_ops())
.state(move |state| { .state(move |state| {
// TODO: check & possibly streamline this // TODO: check & possibly streamline this

View file

@ -16,7 +16,6 @@ pub fn init_surface(unstable: bool) -> Extension {
Extension::builder("deno_webgpu_surface") Extension::builder("deno_webgpu_surface")
.dependencies(vec!["deno_webidl", "deno_web", "deno_webgpu"]) .dependencies(vec!["deno_webidl", "deno_web", "deno_webgpu"])
.esm(include_js_files!( .esm(include_js_files!(
prefix "internal:ext/webgpu",
"03_surface.js", "03_surface.js",
"04_surface_idl_types.js", "04_surface_idl_types.js",
)) ))

View file

@ -5,7 +5,7 @@
import { import {
converters, converters,
createDictionaryConverter, createDictionaryConverter,
} from "internal:ext/webidl/00_webidl.js"; } from "internal:deno_webidl/00_webidl.js";
const TextDecodeOptions = createDictionaryConverter( const TextDecodeOptions = createDictionaryConverter(
"TextDecodeOptions", "TextDecodeOptions",

View file

@ -4,7 +4,7 @@
/// <reference no-default-lib="true" /> /// <reference no-default-lib="true" />
/// <reference lib="esnext" /> /// <reference lib="esnext" />
declare module "internal:ext/webidl/00_webidl.js" { declare module "internal:deno_webidl/00_webidl.js" {
interface ConverterOpts { interface ConverterOpts {
/** /**
* The prefix for error messages created by this converter. * The prefix for error messages created by this converter.

View file

@ -6,9 +6,6 @@ use deno_core::Extension;
/// Load and execute the javascript code. /// Load and execute the javascript code.
pub fn init() -> Extension { pub fn init() -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.esm(include_js_files!( .esm(include_js_files!("00_webidl.js",))
prefix "internal:ext/webidl",
"00_webidl.js",
))
.build() .build()
} }

View file

@ -4,10 +4,10 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; const ops = core.ops;
import { URL } from "internal:ext/url/00_url.js"; import { URL } from "internal:deno_url/00_url.js";
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { HTTP_TOKEN_CODE_POINT_RE } from "internal:ext/web/00_infra.js"; import { HTTP_TOKEN_CODE_POINT_RE } from "internal:deno_web/00_infra.js";
import DOMException from "internal:ext/web/01_dom_exception.js"; import DOMException from "internal:deno_web/01_dom_exception.js";
import { import {
_skipInternalInit, _skipInternalInit,
CloseEvent, CloseEvent,
@ -16,8 +16,8 @@ import {
Event, Event,
EventTarget, EventTarget,
MessageEvent, MessageEvent,
} from "internal:ext/web/02_event.js"; } from "internal:deno_web/02_event.js";
import { Blob, BlobPrototype } from "internal:ext/web/09_file.js"; import { Blob, BlobPrototype } from "internal:deno_web/09_file.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayBufferPrototype, ArrayBufferPrototype,

View file

@ -4,15 +4,15 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 { Deferred, writableStreamClose } from "internal:ext/web/06_streams.js"; import { Deferred, writableStreamClose } from "internal:deno_web/06_streams.js";
import DOMException from "internal:ext/web/01_dom_exception.js"; import DOMException from "internal:deno_web/01_dom_exception.js";
import { add, remove } from "internal:ext/web/03_abort_signal.js"; import { add, remove } from "internal:deno_web/03_abort_signal.js";
import { import {
fillHeaders, fillHeaders,
headerListFromHeaders, headerListFromHeaders,
headersFromHeaderList, headersFromHeaderList,
} from "internal:ext/fetch/20_headers.js"; } from "internal:deno_fetch/20_headers.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayPrototypeJoin, ArrayPrototypeJoin,

View file

@ -505,7 +505,6 @@ pub fn init<P: WebSocketPermissions + 'static>(
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_url", "deno_webidl"]) .dependencies(vec!["deno_url", "deno_webidl"])
.esm(include_js_files!( .esm(include_js_files!(
prefix "internal:ext/websocket",
"01_websocket.js", "01_websocket.js",
"02_websocketstream.js", "02_websocketstream.js",
)) ))

View file

@ -4,7 +4,7 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 primordials = globalThis.__bootstrap.primordials;
const { const {
SafeArrayIterator, SafeArrayIterator,

View file

@ -24,10 +24,7 @@ const MAX_STORAGE_BYTES: u32 = 10 * 1024 * 1024;
pub fn init(origin_storage_dir: Option<PathBuf>) -> Extension { pub fn init(origin_storage_dir: Option<PathBuf>) -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")) Extension::builder(env!("CARGO_PKG_NAME"))
.dependencies(vec!["deno_webidl"]) .dependencies(vec!["deno_webidl"])
.esm(include_js_files!( .esm(include_js_files!("01_webstorage.js",))
prefix "internal:ext/webstorage",
"01_webstorage.js",
))
.ops(vec![ .ops(vec![
op_webstorage_length::decl(), op_webstorage_length::decl(),
op_webstorage_key::decl(), op_webstorage_key::decl(),

View file

@ -11,7 +11,7 @@ const {
TypeError, TypeError,
} = primordials; } = primordials;
import { build } from "internal:runtime/js/01_build.js"; 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 logDebug = false;
let logSource = "JS"; let logSource = "JS";

View file

@ -2,7 +2,7 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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"; import { pathFromURL } from "internal:runtime/js/06_util.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {

View file

@ -11,9 +11,9 @@ const {
SymbolIterator, SymbolIterator,
SymbolToStringTag, SymbolToStringTag,
} = primordials; } = primordials;
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import { URL } from "internal:ext/url/00_url.js"; import { URL } from "internal:deno_url/00_url.js";
import { getLocationHref } from "internal:ext/web/12_location.js"; import { getLocationHref } from "internal:deno_web/12_location.js";
import { serializePermissions } from "internal:runtime/js/10_permissions.js"; import { serializePermissions } from "internal:runtime/js/10_permissions.js";
import { log } from "internal:runtime/js/06_util.js"; import { log } from "internal:runtime/js/06_util.js";
import { import {
@ -21,12 +21,12 @@ import {
ErrorEvent, ErrorEvent,
EventTarget, EventTarget,
MessageEvent, MessageEvent,
} from "internal:ext/web/02_event.js"; } from "internal:deno_web/02_event.js";
import { import {
deserializeJsMessageData, deserializeJsMessageData,
MessagePortPrototype, MessagePortPrototype,
serializeJsMessageData, serializeJsMessageData,
} from "internal:ext/web/13_message_port.js"; } from "internal:deno_web/13_message_port.js";
function createWorker( function createWorker(
specifier, specifier,

View file

@ -4,7 +4,7 @@
// Copyright 2009 The Go Authors. All rights reserved. BSD license. // Copyright 2009 The Go Authors. All rights reserved. BSD license.
// https://github.com/golang/go/blob/master/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 primordials = globalThis.__bootstrap.primordials;
const { const {
TypedArrayPrototypeSubarray, TypedArrayPrototypeSubarray,

View file

@ -2,7 +2,7 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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 primordials = globalThis.__bootstrap.primordials;
const { const {
Error, Error,

View file

@ -13,7 +13,7 @@ import { pathFromURL } from "internal:runtime/js/06_util.js";
import { import {
readableStreamForRid, readableStreamForRid,
writableStreamForRid, writableStreamForRid,
} from "internal:ext/web/06_streams.js"; } from "internal:deno_web/06_streams.js";
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayPrototypeFilter, ArrayPrototypeFilter,

View file

@ -1,7 +1,7 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; 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) { function serveHttp(conn) {
const rid = ops.op_http_start(conn.rid); const rid = ops.op_http_start(conn.rid);

View file

@ -5,7 +5,7 @@ const ops = core.ops;
import { FsFile } from "internal:runtime/js/40_files.js"; import { FsFile } from "internal:runtime/js/40_files.js";
import { readAll } from "internal:runtime/js/12_io.js"; import { readAll } from "internal:runtime/js/12_io.js";
import { pathFromURL } from "internal:runtime/js/06_util.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 primordials = globalThis.__bootstrap.primordials;
const { const {
ArrayPrototypeMap, ArrayPrototypeMap,

View file

@ -3,7 +3,7 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; const ops = core.ops;
import { pathFromURL } from "internal:runtime/js/06_util.js"; 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) { function readFileSync(path) {
return ops.op_readfile_sync(pathFromURL(path)); return ops.op_readfile_sync(pathFromURL(path));

View file

@ -4,7 +4,7 @@ const core = globalThis.Deno.core;
const ops = core.ops; const ops = core.ops;
const primordials = globalThis.__bootstrap.primordials; const primordials = globalThis.__bootstrap.primordials;
import { pathFromURL } from "internal:runtime/js/06_util.js"; 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 { const {
ArrayPrototypeMap, ArrayPrototypeMap,
ObjectEntries, ObjectEntries,
@ -23,7 +23,7 @@ import {
readableStreamForRidUnrefableUnref, readableStreamForRidUnrefableUnref,
ReadableStreamPrototype, ReadableStreamPrototype,
writableStreamForRid, writableStreamForRid,
} from "internal:ext/web/06_streams.js"; } from "internal:deno_web/06_streams.js";
const illegalConstructorKey = Symbol("illegalConstructorKey"); const illegalConstructorKey = Symbol("illegalConstructorKey");

View file

@ -2,10 +2,10 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; const ops = core.ops;
const primordials = globalThis.__bootstrap.primordials; 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 { pathFromURL } from "internal:runtime/js/06_util.js";
import { open } from "internal:runtime/js/40_files.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; const { ObjectPrototypeIsPrototypeOf } = primordials;
function writeFileSync( function writeFileSync(

View file

@ -2,14 +2,14 @@
const core = globalThis.Deno.core; const core = globalThis.Deno.core;
const ops = core.ops; const ops = core.ops;
import * as timers from "internal:ext/web/02_timers.js"; import * as timers from "internal:deno_web/02_timers.js";
import * as httpClient from "internal:ext/fetch/22_http_client.js"; import * as httpClient from "internal:deno_fetch/22_http_client.js";
import * as console from "internal:ext/console/02_console.js"; import * as console from "internal:deno_console/02_console.js";
import * as ffi from "internal:ext/ffi/00_ffi.js"; import * as ffi from "internal:deno_ffi/00_ffi.js";
import * as net from "internal:ext/net/01_net.js"; import * as net from "internal:deno_net/01_net.js";
import * as tls from "internal:ext/net/02_tls.js"; import * as tls from "internal:deno_net/02_tls.js";
import * as http from "internal:ext/http/01_http.js"; import * as http from "internal:deno_http/01_http.js";
import * as flash from "internal:ext/flash/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 build from "internal:runtime/js/01_build.js";
import * as errors from "internal:runtime/js/01_errors.js"; import * as errors from "internal:runtime/js/01_errors.js";
import * as version from "internal:runtime/js/01_version.js"; import * as version from "internal:runtime/js/01_version.js";

View file

@ -8,37 +8,37 @@ const {
} = primordials; } = primordials;
import * as util from "internal:runtime/js/06_util.js"; import * as util from "internal:runtime/js/06_util.js";
import * as location from "internal:ext/web/12_location.js"; import * as location from "internal:deno_web/12_location.js";
import * as event from "internal:ext/web/02_event.js"; import * as event from "internal:deno_web/02_event.js";
import * as timers from "internal:ext/web/02_timers.js"; import * as timers from "internal:deno_web/02_timers.js";
import * as base64 from "internal:ext/web/05_base64.js"; import * as base64 from "internal:deno_web/05_base64.js";
import * as encoding from "internal:ext/web/08_text_encoding.js"; import * as encoding from "internal:deno_web/08_text_encoding.js";
import * as console from "internal:ext/console/02_console.js"; import * as console from "internal:deno_console/02_console.js";
import * as caches from "internal:ext/cache/01_cache.js"; import * as caches from "internal:deno_cache/01_cache.js";
import * as compression from "internal:ext/web/14_compression.js"; import * as compression from "internal:deno_web/14_compression.js";
import * as worker from "internal:runtime/js/11_workers.js"; import * as worker from "internal:runtime/js/11_workers.js";
import * as performance from "internal:ext/web/15_performance.js"; import * as performance from "internal:deno_web/15_performance.js";
import * as crypto from "internal:ext/crypto/00_crypto.js"; import * as crypto from "internal:deno_crypto/00_crypto.js";
import * as url from "internal:ext/url/00_url.js"; import * as url from "internal:deno_url/00_url.js";
import * as urlPattern from "internal:ext/url/01_urlpattern.js"; import * as urlPattern from "internal:deno_url/01_urlpattern.js";
import * as headers from "internal:ext/fetch/20_headers.js"; import * as headers from "internal:deno_fetch/20_headers.js";
import * as streams from "internal:ext/web/06_streams.js"; import * as streams from "internal:deno_web/06_streams.js";
import * as fileReader from "internal:ext/web/10_filereader.js"; import * as fileReader from "internal:deno_web/10_filereader.js";
import * as webgpu from "internal:ext/webgpu/01_webgpu.js"; import * as webgpu from "internal:deno_webgpu/01_webgpu.js";
import * as webSocket from "internal:ext/websocket/01_websocket.js"; import * as webSocket from "internal:deno_websocket/01_websocket.js";
import * as webSocketStream from "internal:ext/websocket/02_websocketstream.js"; import * as webSocketStream from "internal:deno_websocket/02_websocketstream.js";
import * as broadcastChannel from "internal:ext/broadcast_channel/01_broadcast_channel.js"; import * as broadcastChannel from "internal:deno_broadcast_channel/01_broadcast_channel.js";
import * as file from "internal:ext/web/09_file.js"; import * as file from "internal:deno_web/09_file.js";
import * as formData from "internal:ext/fetch/21_formdata.js"; import * as formData from "internal:deno_fetch/21_formdata.js";
import * as request from "internal:ext/fetch/23_request.js"; import * as request from "internal:deno_fetch/23_request.js";
import * as response from "internal:ext/fetch/23_response.js"; import * as response from "internal:deno_fetch/23_response.js";
import * as fetch from "internal:ext/fetch/26_fetch.js"; import * as fetch from "internal:deno_fetch/26_fetch.js";
import * as messagePort from "internal:ext/web/13_message_port.js"; import * as messagePort from "internal:deno_web/13_message_port.js";
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import DOMException from "internal:ext/web/01_dom_exception.js"; import DOMException from "internal:deno_web/01_dom_exception.js";
import * as abortSignal from "internal:ext/web/03_abort_signal.js"; import * as abortSignal from "internal:deno_web/03_abort_signal.js";
import * as globalInterfaces from "internal:ext/web/04_global_interfaces.js"; import * as globalInterfaces from "internal:deno_web/04_global_interfaces.js";
import * as webStorage from "internal:ext/webstorage/01_webstorage.js"; import * as webStorage from "internal:deno_webstorage/01_webstorage.js";
import * as prompt from "internal:runtime/js/41_prompt.js"; import * as prompt from "internal:runtime/js/41_prompt.js";
// https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope // https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope

View file

@ -40,28 +40,28 @@ const {
WeakMapPrototypeSet, WeakMapPrototypeSet,
} = primordials; } = primordials;
import * as util from "internal:runtime/js/06_util.js"; import * as util from "internal:runtime/js/06_util.js";
import * as event from "internal:ext/web/02_event.js"; import * as event from "internal:deno_web/02_event.js";
import * as location from "internal:ext/web/12_location.js"; import * as location from "internal:deno_web/12_location.js";
import * as build from "internal:runtime/js/01_build.js"; import * as build from "internal:runtime/js/01_build.js";
import * as version from "internal:runtime/js/01_version.js"; import * as version from "internal:runtime/js/01_version.js";
import * as os from "internal:runtime/js/30_os.js"; import * as os from "internal:runtime/js/30_os.js";
import * as timers from "internal:ext/web/02_timers.js"; import * as timers from "internal:deno_web/02_timers.js";
import * as colors from "internal:ext/console/01_colors.js"; import * as colors from "internal:deno_console/01_colors.js";
import * as net from "internal:ext/net/01_net.js"; import * as net from "internal:deno_net/01_net.js";
import { import {
inspectArgs, inspectArgs,
quoteString, quoteString,
wrapConsole, wrapConsole,
} from "internal:ext/console/02_console.js"; } from "internal:deno_console/02_console.js";
import * as performance from "internal:ext/web/15_performance.js"; import * as performance from "internal:deno_web/15_performance.js";
import * as url from "internal:ext/url/00_url.js"; import * as url from "internal:deno_url/00_url.js";
import * as fetch from "internal:ext/fetch/26_fetch.js"; import * as fetch from "internal:deno_fetch/26_fetch.js";
import * as messagePort from "internal:ext/web/13_message_port.js"; import * as messagePort from "internal:deno_web/13_message_port.js";
import { denoNs, denoNsUnstable } from "internal:runtime/js/90_deno_ns.js"; import { denoNs, denoNsUnstable } from "internal:runtime/js/90_deno_ns.js";
import { errors } from "internal:runtime/js/01_errors.js"; import { errors } from "internal:runtime/js/01_errors.js";
import * as webidl from "internal:ext/webidl/00_webidl.js"; import * as webidl from "internal:deno_webidl/00_webidl.js";
import DOMException from "internal:ext/web/01_dom_exception.js"; import DOMException from "internal:deno_web/01_dom_exception.js";
import * as flash from "internal:ext/flash/01_http.js"; import * as flash from "internal:deno_flash/01_http.js";
import * as spawn from "internal:runtime/js/40_spawn.js"; import * as spawn from "internal:runtime/js/40_spawn.js";
import { import {
mainRuntimeGlobalProperties, mainRuntimeGlobalProperties,

View file

@ -87,7 +87,7 @@ async function patchSrcLib() {
(data) => (data) =>
data.replace( data.replace(
`prefix "internal:deno_webgpu",`, `prefix "internal:deno_webgpu",`,
`prefix "internal:ext/webgpu",`, `prefix "internal:deno_webgpu",`,
), ),
); );
} }
@ -98,7 +98,7 @@ async function patchSurface() {
(data) => (data) =>
data.replace( data.replace(
`prefix "internal:deno_webgpu",`, `prefix "internal:deno_webgpu",`,
`prefix "internal:ext/webgpu",`, `prefix "internal:deno_webgpu",`,
), ),
); );
} }