deno/cli/tools
Andreu Botella 69ec45eac7
refactor(cli): Integrate standalone mode cert handling into Flags (#17419)
The way the standalone mode handles the `--cert` flag is different to
all other modes. This is because `--cert` takes a path to the
certificate file, which is directly added to the root cert store; except
for compile mode, where its byte contents are stored in the standalone
metadata, and they are added to the root cert store after the
`ProcState` is created.

This change instead changes `Flags::ca_file` (an `Option<String>`) into
`Flags::ca_data`, which can represent a `String` file path or a
`Vec<u8>` with the certificate contents. That way, standalone mode can
create a `ProcState` whose root cert store alreay contains the
certificate.

This change also adds a tests for certificates in standalone mode, since
there weren't any before.

This refactor will help with implementing web workers in standalone mode
in the future.
2023-01-18 01:18:24 +01:00
..
coverage chore: use rustfmt imports_granularity option (#17421) 2023-01-14 23:18:58 -05:00
init chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
repl fix(repl): improve validator to mark more code as incomplete (#17443) 2023-01-16 09:45:06 -05:00
vendor refactor(cli/tools): reduce cloning (#17309) 2023-01-13 22:39:19 +01:00
bench.rs refactor(cli): fewer clones (#17450) 2023-01-16 15:27:41 -05:00
bundle.rs refactor(cli/tools): reduce cloning (#17309) 2023-01-13 22:39:19 +01:00
check.rs refactor(cli,core,ext,rt): remove some unnecessary clone or malloc (#17274) 2023-01-05 14:29:50 -05:00
doc.rs refactor: create enum for --builtin doc flag (#17423) 2023-01-14 12:39:56 -05:00
fmt.rs fix(cli/fmt): show filepath for InvalidData error (#17361) 2023-01-16 00:30:52 +00:00
info.rs chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
installer.rs refactor(cli): Integrate standalone mode cert handling into Flags (#17419) 2023-01-18 01:18:24 +01:00
lint.rs refactor(cli/tools): reduce cloning (#17309) 2023-01-13 22:39:19 +01:00
mod.rs chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
run.rs refactor(cli/tools): reduce cloning (#17309) 2023-01-13 22:39:19 +01:00
standalone.rs refactor(cli): Integrate standalone mode cert handling into Flags (#17419) 2023-01-18 01:18:24 +01:00
task.rs chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
test.rs refactor(cli): fewer clones (#17450) 2023-01-16 15:27:41 -05:00
upgrade.rs refactor(cli/tools): reduce cloning (#17309) 2023-01-13 22:39:19 +01:00