1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use super::bin_config::BinEntry;
use schematic::Config;
use version_spec::UnresolvedVersionSpec;
use warpgate_api::PluginLocator;

/// Configures and enables the Deno platform.
/// Docs: https://moonrepo.dev/docs/config/toolchain#deno
#[derive(Clone, Config, Debug)]
pub struct DenoConfig {
    /// List of binaries to install into the environment using `deno install`.
    #[setting(nested)]
    pub bins: Vec<BinEntry>,

    /// Relative path to a dependency management file. Used for content hashing.
    #[setting(default = "deps.ts")]
    pub deps_file: String,

    /// Requires and forces the use of `deno.lock` files.
    pub lockfile: bool,

    /// Location of the WASM plugin to use for Deno support.
    pub plugin: Option<PluginLocator>,

    /// The version of Deno to download, install, and run `deno` tasks with.
    #[setting(env = "MOON_DENO_VERSION")]
    pub version: Option<UnresolvedVersionSpec>,
}