1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-29 16:30:56 -05:00
denoland-deno/cli
Bartek Iwańczuk f32c31a0eb dx: descriptive permission errors (#3808)
Before:
```
▶ target/debug/deno https://deno.land/std/examples/echo_server.ts
error: Uncaught PermissionDenied: run again with the --allow-net flag
► $deno$/dispatch_json.ts:40:11
    at DenoError ($deno$/errors.ts:20:5)
    at unwrapResponse ($deno$/dispatch_json.ts:40:11)
    at sendSync ($deno$/dispatch_json.ts:67:10)
    at listen ($deno$/net.ts:170:15)
    at https://deno.land/std/examples/echo_server.ts:4:23
```

```
▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd
error: Uncaught PermissionDenied: run again with the --allow-read flag
► $deno$/dispatch_json.ts:40:11
    at DenoError ($deno$/errors.ts:20:5)
    at unwrapResponse ($deno$/dispatch_json.ts:40:11)
    at sendAsync ($deno$/dispatch_json.ts:91:10)
```

After:
```
▶ target/debug/deno https://deno.land/std/examples/echo_server.ts
error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag
► $deno$/dispatch_json.ts:40:11
    at DenoError ($deno$/errors.ts:20:5)
    at unwrapResponse ($deno$/dispatch_json.ts:40:11)
    at sendSync ($deno$/dispatch_json.ts:67:10)
    at listen ($deno$/net.ts:170:15)
    at https://deno.land/std/examples/echo_server.ts:4:23
```

```
▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd
error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with the --allow-read flag
► $deno$/dispatch_json.ts:40:11
    at DenoError ($deno$/errors.ts:20:5)
    at unwrapResponse ($deno$/dispatch_json.ts:40:11)
    at sendAsync ($deno$/dispatch_json.ts:91:10)
```
2020-01-27 21:13:17 -05:00
..
compilers refactor: isomorphic snapshot for CLI (#3728) 2020-01-27 21:12:25 -05:00
js refactor: isomorphic snapshot for CLI (#3728) 2020-01-27 21:12:25 -05:00
ops refactor: isomorphic snapshot for CLI (#3728) 2020-01-27 21:12:25 -05:00
tests dx: descriptive permission errors (#3808) 2020-01-27 21:13:17 -05:00
build.rs s/PinnedBuf/ZeroCopyBuf (#3782) 2020-01-24 15:10:49 -05:00
Cargo.toml v0.31.0 2020-01-24 11:07:53 -05:00
checksum.rs feat: lockfiles (#3231) 2019-11-03 10:39:27 -05:00
colors.rs Remove dead code in cli/shell.rs (#3792) 2020-01-26 11:40:28 -05:00
deno_dir.rs Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
deno_error.rs refactor: reduce number of ErrorKind variants (#3662) 2020-01-20 10:50:16 -05:00
diagnostics.rs Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
disk_cache.rs Do not panic and improve error message on cache failure (#3784) 2020-01-24 17:16:31 -05:00
file_fetcher.rs Improve support of type definitions (#3755) 2020-01-26 13:59:41 -05:00
flags.rs feat: make eval support --v8-flags=... (#3797) 2020-01-26 09:49:34 -05:00
fmt_errors.rs workers: minimal error handling and async module loading (#3665) 2020-01-17 18:43:53 -05:00
fs.rs refactor: reduce number of ErrorKind variants (#3662) 2020-01-20 10:50:16 -05:00
global_state.rs refactor: Improve path handling in permission checks (#3714) 2020-01-20 09:45:44 -05:00
global_timer.rs Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
http_util.rs Improve support of type definitions (#3755) 2020-01-26 13:59:41 -05:00
import_map.rs Rename crates: 'deno' to 'deno_core' and 'deno_cli' to 'deno' (#3600) 2020-01-05 11:56:18 -05:00
js.rs refactor: isomorphic snapshot for CLI (#3728) 2020-01-27 21:12:25 -05:00
lib.rs lock: support lock-write for fetch command (#3787) 2020-01-26 13:43:59 -05:00
lockfile.rs feat: lockfiles (#3231) 2019-11-03 10:39:27 -05:00
main.rs Rename crates: 'deno' to 'deno_core' and 'deno_cli' to 'deno' (#3600) 2020-01-05 11:56:18 -05:00
metrics.rs Refactor Worker and ThreadSafeState (#3242) 2019-11-04 10:38:52 -05:00
msg.rs refactor: reduce number of ErrorKind variants (#3662) 2020-01-20 10:50:16 -05:00
permissions.rs dx: descriptive permission errors (#3808) 2020-01-27 21:13:17 -05:00
progress.rs Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
README.md update readmes (#3765) 2020-01-23 22:32:52 +01:00
repl.rs Rename crates: 'deno' to 'deno_core' and 'deno_cli' to 'deno' (#3600) 2020-01-05 11:56:18 -05:00
resolve_addr.rs Rename crates: 'deno' to 'deno_core' and 'deno_cli' to 'deno' (#3600) 2020-01-05 11:56:18 -05:00
shell.rs Remove dead code in cli/shell.rs (#3792) 2020-01-26 11:40:28 -05:00
signal.rs Add signal handlers (#3757) 2020-01-24 08:15:31 -05:00
source_maps.rs Use globalThis to reference global scope (#3719) 2020-01-20 09:30:30 -05:00
startup_data.rs Rename crates: 'deno' to 'deno_core' and 'deno_cli' to 'deno' (#3600) 2020-01-05 11:56:18 -05:00
state.rs refactor: Modules and Loader trait (#3791) 2020-01-25 18:53:16 +01:00
test_util.rs Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
tokio_util.rs Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
version.rs Rename crates: 'deno' to 'deno_core' and 'deno_cli' to 'deno' (#3600) 2020-01-05 11:56:18 -05:00
web_worker.rs refactor: isomorphic snapshot for CLI (#3728) 2020-01-27 21:12:25 -05:00
worker.rs refactor: isomorphic snapshot for CLI (#3728) 2020-01-27 21:12:25 -05:00

Deno CLI Crate

crates docs

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core and deno_typescript to provide the executable.