diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-10-02 21:17:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-02 21:17:39 +0100 |
commit | cac28b52621975137b86d4fd6efc32cecc10d682 (patch) | |
tree | 6338163b4be9d578dbe046a95c90cea274026b15 /cli/args/flags.rs | |
parent | bbd4ae1bc12dc6b34d4a455015096b7113a5cec5 (diff) |
feat(byonm): support `deno run npm:<package>` when package is not in package.json (#25981)
Closes https://github.com/denoland/deno/issues/25905
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 6caef29d9..a4dcb9e91 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -581,6 +581,15 @@ pub struct UnstableConfig { } #[derive(Clone, Debug, Eq, PartialEq, Default)] +pub struct InternalFlags { + /// Used when the language server is configured with an + /// explicit cache option. + pub cache_path: Option<PathBuf>, + /// Only reads to the lockfile instead of writing to it. + pub lockfile_skip_write: bool, +} + +#[derive(Clone, Debug, Eq, PartialEq, Default)] pub struct Flags { /// Vector of CLI arguments - these are user script arguments, all Deno /// specific flags are removed. @@ -591,9 +600,6 @@ pub struct Flags { pub ca_stores: Option<Vec<String>>, pub ca_data: Option<CaData>, pub cache_blocklist: Vec<String>, - /// This is not exposed as an option in the CLI, it is used internally when - /// the language server is configured with an explicit cache option. - pub cache_path: Option<PathBuf>, pub cached_only: bool, pub type_check_mode: TypeCheckMode, pub config_flag: ConfigFlag, @@ -602,6 +608,8 @@ pub struct Flags { pub enable_op_summary_metrics: bool, pub enable_testing_features: bool, pub ext: Option<String>, + /// Flags that aren't exposed in the CLI, but are used internally. + pub internal: InternalFlags, pub ignore: Vec<String>, pub import_map_path: Option<String>, pub env_file: Option<String>, |