summaryrefslogtreecommitdiff
path: root/cli/deno_dir.rs
AgeCommit message (Collapse)Author
2020-02-19refactor: rewrite HTTP cache for file fetcher (#4030)Bartek Iwańczuk
2020-01-02Happy new year! (#3578)Ry Dahl
2019-07-31refactor: cleanup compiler pipeline (#2686)Bartek Iwańczuk
* remove fetch_source_file_and_maybe_compile_async and replace it with State.fetch_compiled_module * remove SourceFile.js_source() * introduce CompiledModule which is basically the same as deno::SourceInfo and represents arbitrary file that has been compiled to JS module * introduce //cli/compilers module containing all compilers * introduce JsCompiler which is a no-op compiler - output is the same as input, no compilation takes place - it is used for MediaType::JavaScript and MediaType::Unknown * introduce JsonCompiler that wraps JSON in default export * support JS-to-JS compilation using checkJs
2019-07-31factor out FileFetcher to separate module (#2683)Bartek Iwańczuk
* merge SourceFileFetcher trait and FileFetcher struct * move logic related to source file fetching to //cli/file_fetcher.rs * use Result when creating new ThreadSafeState
2019-07-22save headers for all intermediate redirects (#2677)Bartek Iwańczuk
2019-07-20removed unnecessary implementation from SourceFileFetcher (#2670)andy finch
2019-07-18Remove hacky normalize_path (#2660)Ryan Dahl
2019-07-17Refactor DenoDir (#2636)Bartek Iwańczuk
* rename `ModuleMetaData` to `SourceFile` and remove TS specific functionality * add `TsCompiler` struct encapsulating processing of TypeScript files * move `SourceMapGetter` trait implementation to `//cli/compiler.rs` * add low-level `DiskCache` API for general purpose caches and use it in `DenoDir` and `TsCompiler` for filesystem access * don't use hash-like filenames for compiled modules, instead use metadata file for storing compilation hash * add `SourceFileCache` for in-process caching of loaded files for fast subsequent access * define `SourceFileFetcher` trait encapsulating loading of local and remote files and implement it for `DenoDir` * define `use_cache` and `no_fetch` flags on `DenoDir` instead of using in fetch methods
2019-07-11Refactor error to use dynamic dispatch and traitsBert Belder
This is in preperation for dynamic import (#1789), which is more easily implemented when errors are dynamic.
2019-07-08core: replace ModuleSpecifier::to_url() by as_url()Bert Belder
2019-07-08cli: refactor deno_dir to use Url instead of StringBartek Iwańczuk
2019-06-25Port code from Cargo and use for progressRyan Dahl
A lot of its functionality is unused still, but the goal it to slowly migrate logging functionality to it. There is also a useful progress bar which can be ported over later - it depends on this module. https://github.com/rust-lang/cargo/blob/4c1fa54d10f58d69ac9ff55be68e1b1c25ecb816/src/cargo/util/progress.rs
2019-06-24refactor: use Path/PathBuf in deno dir (#2559)Bartek Iwańczuk
2019-06-24fix: prevent multiple downloads of modules (#2477)Bartek Iwańczuk
2019-06-19Combine CLI Errors (#2487)Kitson Kelly
2019-05-11Add progress bar (#2309)Ryan Dahl
2019-05-09fix: support relative path for whitelisting (#2317)Kevin (Kun) "Kassimo" Qian
Using `std::fs::canonicalize` to expand path to full existing path, such that later attempt to loop-pop and compare path segment would work.
2019-05-08First pass at permissions whitelist (#2129)andy finch
2019-05-03feat: support .mjs extension resolution (#2283)Kevin (Kun) "Kassimo" Qian
Removed `extmap` and added .mjs entry in `map_file_extension`. The assert in the compiler does not need to be updated, since it is resolving from the compiled cache instead of elsewhere (notice the .map is asserted next to it)
2019-05-03add --no-fetch CLI flag to prevent remote downloads (#2213)Bartek Iwańczuk
2019-04-29Add support for custom tsconfig.json (#2089)Kitson Kelly
Use `--config`
2019-04-17Fix clippy warningsBert Belder
2019-04-13fix absolute path resolution from remote (#2109)Yoshiya Hinosawa
2019-04-09Silence clippy warnings and format source codeBert Belder
2019-04-01Follow redirect location as new referrers for nested module imports (#2031)Kevin (Kun) "Kassimo" Qian
Fixes #1742 Fixes #2021
2019-03-28Merge the --recompile and --reload flags (#2003)Ryan Dahl
2019-03-28Clippy fixes (#2009)Bert Belder
2019-03-20Fix clippy errors and upgrade Rust to 1.33.0 in CI (#1945)Ryan Dahl
2019-03-20Add more async module loading function (#1974)Ryan Dahl
* get_source_code_async * fetch_module_meta_data_async * fetch_module_meta_data_and_maybe_compile_async
2019-03-19Add fetch_remote_source_async (#1972)Ryan Dahl
2019-03-19Move fetch_remote_source, fetch_local_sourceRyan Dahl
They do not depend on DenoDir, so should not be methods of it.
2019-03-19Rename //src/ to //cli/ (#1962)Ryan Dahl
To better distinguish the deno_core crate from the executable deno, which will now be called "the cli" internally.