1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-29 16:30:56 -05:00
denoland-deno/std
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
..
archive Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
bytes Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
datetime Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
encoding change copyrights from 2019 to 2020 (#3733) 2020-01-21 10:01:55 -05:00
examples Revert "feat(flags): script arguments come after '--'" (#3681) 2020-01-15 19:21:35 -05:00
flags Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
fmt Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
fs dx: descriptive permission errors (#3808) 2020-01-27 21:13:17 -05:00
http dx: descriptive permission errors (#3808) 2020-01-27 21:13:17 -05:00
installer Revert "feat(flags): script arguments come after '--'" (#3681) 2020-01-15 19:21:35 -05:00
io fix: Deno.mkdir should conform to style guide (#3617) 2020-01-07 14:14:33 -05:00
log Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
media_types Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
mime Remove std/multipart (#3647) 2020-01-10 12:29:09 -07:00
node add some tests for isSymbol in std/node/util_test (#3788) 2020-01-25 08:25:40 -05:00
path std: Move fs/path to the top-level (#3100) 2019-10-16 14:39:33 -04:00
prettier Revert "feat(flags): script arguments come after '--'" (#3681) 2020-01-15 19:21:35 -05:00
strings fix typo 2020-01-23 10:40:26 -05:00
testing feat: Deno.args now does not include script (#3628) 2020-01-09 11:37:01 -07:00
textproto Update to TypeScript 3.7 (#3275) 2019-11-13 13:42:34 -05:00
util Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
uuid change copyrights from 2019 to 2020 (#3733) 2020-01-21 10:01:55 -05:00
ws rename dial to connect and dialTLS to connectTLS (#3710) 2020-01-18 18:35:12 +01:00
manual.md dx: descriptive permission errors (#3808) 2020-01-27 21:13:17 -05:00
README.md Run deno_std tests in github actions 2019-10-09 17:22:22 -04:00
style_guide.md Happy new year! (#3578) 2020-01-02 15:13:47 -05:00

Deno Standard Modules

These modules do not have external dependencies and they are reviewed by the Deno core team. The intention is to have a standard set of high quality code that all Deno projects can use fearlessly.

Contributions are welcome!

How to use

These modules are tagged in accordance with Deno releases. So, for example, the v0.3.0 tag is guaranteed to work with deno v0.3.0. You can link to v0.3.0 using the URL https://deno.land/std@v0.3.0/

It's strongly recommended that you link to tagged releases rather than the master branch. The project is still young and we expect disruptive renames in the future.

Documentation

Here are the dedicated documentations of modules:

Contributing

deno_std is a loose port of Go's standard library. When in doubt, simply port Go's source code, documentation, and tests. There are many times when the nature of JavaScript, TypeScript, or Deno itself justifies diverging from Go, but if possible we want to leverage the energy that went into building Go. We generally welcome direct ports of Go's code.

Please ensure the copyright headers cite the code's origin.

Follow the style guide.