summaryrefslogtreecommitdiff
path: root/cli/ops.rs
AgeCommit message (Collapse)Author
2019-08-14split up ops.rs (#2753)Bartek Iwańczuk
Note cli/dispatch_minimal.rs ops are not yet included in cli/ops. This is part of work towards #2730
2019-08-13Dynamic import should respect permissions (#2764)Ryan Dahl
2019-08-13Fix permission requirements for Deno.rename() and Deno.link() (#2737)Nayeem Rahman
2019-08-08Resolve worker specifiers relative to main module of host. (#2751)andy finch
2019-08-07Add op_id throughout op API (#2734)Ryan Dahl
Removes the magic number hack to switch between flatbuffers and the minimal dispatcher. Adds machinery to pass the op_id through the shared_queue.
2019-08-06Make Deno.execPath a function (#2743)Kevin (Kun) "Kassimo" Qian
And throws without allow-env
2019-08-06Implement Blob url support for worker (#2729)Kevin (Kun) "Kassimo" Qian
2019-08-06Enforce permissions on kill(), homeDir() and execPath (#2723)Nayeem Rahman
2019-08-05Provide option to delete Deno namespace in worker (#2717)Kevin (Kun) "Kassimo" Qian
2019-08-03Enforce env permission on homeDir() and execPath (#2714)Kevin (Kun) "Kassimo" Qian
2019-07-31Use system rustfmt instead of fixed binary (#2701)Ryan Dahl
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-29Remap stack traces of unthrown errors. (#2693)Kitson Kelly
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-08cli: refactor deno_dir to use Url instead of StringBartek Iwańczuk
2019-07-08core: clearly define when module lookup is path-based vs URL-basedBert Belder
The rules are now as follows: * In `import` statements, as mandated by the WHATWG specification, the import specifier is always treated as a URL. If it is a relative URL, it must start with either / or ./ or ../ * A script name passed to deno as a command line argument may be either an absolute URL or a local path. - If the name starts with a valid URI scheme followed by a colon, e.g. 'http:', 'https:', 'file:', 'foo+bar:', it always interpreted as a URL (even if Deno doesn't support the indicated protocol). - Otherwise, the script name is interpreted as a local path. The local path may be relative, and operating system semantics determine how it is resolved. Prefixing a relative path with ./ is not required.
2019-06-30fix: normalize Deno.execPath (#2598)Bartek Iwańczuk
2019-06-26fix: run blocking function on a different task (#2570)Jimmy Cao
This avoids freezing the current task if the fn blocks indefinitely
2019-06-25Add homeDir to Deno namespace (#2578)Evgeniy Karagodin
2019-06-24refactor: use Path/PathBuf in deno dir (#2559)Bartek Iwańczuk
2019-06-22feat: log permission access (#2518)Bartek Iwańczuk
Replaces -D/--log-debug flag with --log-level=debug --log-level=info displays permission access
2019-06-21feat: redirect process stdio to file (#2554)Bartek Iwańczuk
2019-06-19Combine CLI Errors (#2487)Kitson Kelly
2019-06-18fix: use Loader::resolve in op_fetch_module_meta_data (#2519)Bartek Iwańczuk
2019-06-17refactor dispatch take 2 (#2533)andy finch
2019-06-14Revert "Refactor dispatch handling (#2452)"Ryan Dahl
Due to performance regression: https://github.com/denoland/deno/commit/dc60fe9f300043f191286ef804a365e16e455f87#commitcomment-33943711 This reverts commit dc60fe9f300043f191286ef804a365e16e455f87.
2019-06-13Refactor dispatch handling (#2452)andy finch
Promise id is now created in core and passed back to JS.
2019-06-12Move ModuleSpecifier to //core (#2509)Bartek Iwańczuk
2019-06-12Refactor module resolving (#2493)Bartek Iwańczuk
Adds ModuleSpecifier, which wraps a URL. This is now passed around instead of specifier and resolver strings.
2019-06-11Add --seed for setting RNG seed (#2483)Matt Harrison
2019-06-09feat: Import maps (#2360)Bartek Iwańczuk
2019-06-08Remove tokio_util::block_on dep in compile_async and other cleanupgurv-s
2019-06-08make op_create_worker async internallygurv-s
2019-06-05RecursiveLoad shouldn't own the Isolate (#2453)Ryan Dahl
This patch makes it so that RecursiveLoad doesn't own the Isolate, so Worker::execute_mod_async does not consume itself. Previously Worker implemented Loader, but now ThreadSafeState does. This is necessary preparation work for dynamic import (#1789) and import maps (#1921)
2019-05-29TS compiler refactorRyan Dahl
* Compiler no longer has its own Tokio runtime. Compiler handles one message and then exits. * Uses the simpler ts.CompilerHost interface instead of ts.LanguageServiceHost. * avoids recompiling the same module by introducing a hacky but simple `hashset<string>` that stores the module names that have been already compiled. * Removes the CompilerConfig op. * Removes a lot of the mocking stuff in compiler.ts like `this._ts`. It is not useful as we don't even have tests. * Turns off checkJs because it causes fmt_test to die with OOM.
2019-05-29Correct tokio_util::block_on() and op_fetch_module_meta_dataRyan Dahl
op_fetch_module_meta_data is an op that is used by the TypeScript compiler. TypeScript requires this op to be sync. However the implementation of the op does things on the event loop (like fetching HTTP resources). In certain situations this can lead to deadlocks. The runtime's thread pool can be filled with ops waiting on the result of op_fetch_module_meta_data. The runtime has a maximum number of threads it can use (the number of logical CPUs on the system). This patch changes tokio_util::block_on to launch a new Tokio runtime for evaluating the future, thus bipassing the max-thread problem. This is only an issue in op_fetch_module_meta_data. Other synchronous ops are truly synchornous, not interacting with the event loop. TODO comments are added to direct future development.
2019-05-23re-fix permissions for dial and listen (#2400)Bartek Iwańczuk
Closes #2397
2019-05-23Rename --allow-high-precision to --allow-hrtime (#2398)Ryan Dahl
2019-05-22Revert "Fix permissions for dial and listen (#2373)"Bert Belder
This reverts commit 7219787894f13b1920b3b6b49203cdcb8f672c00.
2019-05-17Fix permissions for dial and listen (#2373)Bartek Iwańczuk
2019-05-17Add crypto.getRandomValues() (#2327)chiefbiiko
2019-05-15Remove FileInfo.pathRyan Dahl
2019-05-11Add progress bar (#2309)Ryan Dahl
2019-05-09core: Privatize ModuleNameMap SymbolicModule deno_buf (#2324)Bartek Iwańczuk
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-07Add Deno.chown (#2292)Yingbo (Max) Wang
2019-05-03feat(cli cmd): deno xeval (#2260)Kevin (Kun) "Kassimo" Qian
2019-05-03add --no-fetch CLI flag to prevent remote downloads (#2213)Bartek Iwańczuk