mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
feat: support import attributes (#20342)
This commit is contained in:
parent
01a761f1d4
commit
3fc19dab47
61 changed files with 434 additions and 225 deletions
|
@ -15,6 +15,7 @@ use super::path_to_regex::Token;
|
|||
use crate::args::CacheSetting;
|
||||
use crate::cache::GlobalHttpCache;
|
||||
use crate::cache::HttpCache;
|
||||
use crate::file_fetcher::FetchOptions;
|
||||
use crate::file_fetcher::FileFetcher;
|
||||
use crate::http_util::HttpClient;
|
||||
|
||||
|
@ -509,11 +510,12 @@ impl ModuleRegistry {
|
|||
) -> Result<Vec<RegistryConfiguration>, AnyError> {
|
||||
let fetch_result = self
|
||||
.file_fetcher
|
||||
.fetch_with_accept(
|
||||
.fetch_with_options(FetchOptions {
|
||||
specifier,
|
||||
PermissionsContainer::allow_all(),
|
||||
Some("application/vnd.deno.reg.v2+json, application/vnd.deno.reg.v1+json;q=0.9, application/json;q=0.8"),
|
||||
)
|
||||
permissions: PermissionsContainer::allow_all(),
|
||||
maybe_accept: Some("application/vnd.deno.reg.v2+json, application/vnd.deno.reg.v1+json;q=0.9, application/json;q=0.8"),
|
||||
maybe_cache_setting: None,
|
||||
})
|
||||
.await;
|
||||
// if there is an error fetching, we will cache an empty file, so that
|
||||
// subsequent requests they are just an empty doc which will error without
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue