feat(runtime): Allow embedders to perform additional access checks on file open (#23208)

Embedders may have special requirements around file opening, so we add a
new `check_open` permission check that is called as part of the file
open process.
This commit is contained in:
Matt Mastracci 2024-04-19 18:12:03 -06:00 committed by GitHub
parent 365e1f48f7
commit 472a370640
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 476 additions and 121 deletions

View file

@ -112,7 +112,7 @@ impl CjsCodeAnalyzer for CliCjsCodeAnalyzer {
Some(source) => source,
None => self
.fs
.read_text_file_sync(&specifier.to_file_path().unwrap())?,
.read_text_file_sync(&specifier.to_file_path().unwrap(), None)?,
};
let analysis = self.inner_cjs_analysis(specifier, &source)?;
match analysis {