Module e_installer

Module e_installer 

Source

Functions§

check_npm_and_install
check_pnpm_and_install
Check for a pnpm workspace and, if found, run pnpm install.
Returns the full path to the pnpm executable.
ensure_admin_privileges
Check if the program is running as an administrator. Returns an error if the program is not running with administrative privileges.
ensure_choco
Ensure choco (Chocolatey) is on PATH.
If missing, prompts the user to install Chocolatey manually.
Returns the full path to the choco executable.
ensure_cross_env
Ensure cross-env is on PATH.
If it’s missing, prompts the user and installs it globally via npm install -g cross-env.
Returns the full path to the cross-env executable.
ensure_dx
Ensure the dx CLI (the Dioxus helper) is on PATH. If missing, prompts the user to install the Dioxus CLI via cargo install dioxus-cli. Returns the full path to the dx executable.
ensure_github_gh
Ensure the GitHub CLI (gh) is on PATH.
If missing, installs it using Chocolatey on Windows.
Returns the full path to the gh executable.
ensure_leptos
Ensure the cargo-leptos CLI is on PATH.
If missing, prompts the user to install it via cargo install cargo-leptos.
Returns the full path to the cargo-leptos executable.
ensure_napi_cli
Ensure the napi CLI is on PATH (provided by @napi-rs/cli).
If missing, prompts the user and installs it globally via npm install -g @napi-rs/cli.
Returns the full path to the napi executable.
ensure_node
Ensure node is on PATH.
If missing, attempts to install Node.js using nvm (automated for Windows, manual prompt otherwise).
Returns the full path to the node executable.
ensure_npm
Ensure npm is on PATH.
Ensures Node.js is installed first.
Returns the full path to the npm executable, or an error.
ensure_perl
ensure_pnpm
Ensure pnpm is on PATH.
Ensures Node.js is installed first.
If it’s missing, will use npm (via ensure_npm) to install pnpm globally.
Returns the full path to the pnpm executable.
ensure_rust_script
Ensure rust-script is on PATH.
Returns the full path to the rust-script executable, or an error.
ensure_trunk
Ensure trunk is on PATH.
Returns the full path to the trunk executable, or an error.
is_admin