Construct an ObsidianLauncher.
Optional
cacheDir?: stringPath to the cache directory. Defaults to "OBSIDIAN_CACHE" env var or ".obsidian-cache".
Optional
versionsUrl?: stringCustom obsidian-versions.json
url. Can be a file URL.
Optional
communityPluginsUrl?: stringCustom community-plugins.json
url. Can be a file URL.
Optional
communityThemesUrl?: stringCustom community-css-themes.json
url. Can be a file URL.
Optional
cacheDuration?: numberIf the cached version list is older than this (in ms), refetch it. Defaults to 30 minutes.
Readonly
cacheReadonly
versionsReadonly
communityReadonly
communityReadonly
cacheGet information about all available Obsidian versions.
Get information about all available community plugins.
Get information about all available community themes.
Resolves Obsidian app and installer version strings to absolute versions.
Obsidian version string or one of
minAppVersion
set in your manifest.json
Obsidian version string or one of
appVersion
appVersion
See also: Obsidian App vs Installer Versions
[appVersion, installerVersion] with any "latest" etc. resolved to specific versions.
Gets details about an Obsidian version.
Obsidian app version
Downloads the Obsidian installer for the given version and current platform. Returns the file path.
Obsidian installer version to download
Downloads the Obsidian asar for the given version. Returns the file path.
To download beta versions you'll need to have an Obsidian account with Catalyst and set the OBSIDIAN_USERNAME
and OBSIDIAN_PASSWORD
environment variables. 2FA needs to be disabled.
Obsidian version to download
Downloads chromedriver for the given Obsidian version.
wdio will download chromedriver from the Chrome for Testing API automatically (see https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints). However, Google has only put chromedriver since v115.0.5763.0 in that API, so wdio can't automatically download older versions of chromedriver for old Electron versions. Here we download chromedriver for older versions ourselves using the @electron/get package which fetches chromedriver from https://github.com/electron/electron/releases.
Obsidian installer version
Downloads a list of plugins to the cache and returns a list of DownloadedPluginEntry
with the downloaded paths.
Also adds the id
property to the plugins based on the manifest.
You can download plugins from GitHub using {repo: "org/repo"}
and community plugins using {id: 'plugin-id'}
.
Local plugins will just be passed through.
List of plugins to download.
Downloads a list of themes to the cache and returns a list of DownloadedThemeEntry
with the downloaded paths.
Also adds the name
property to the plugins based on the manifest.
You can download themes from GitHub using {repo: "org/repo"}
and community themes using {name: 'theme-name'}
.
Local themes will just be passed through.
List of themes to download
Installs plugins into an Obsidian vault
Path to the vault to install the plugins in
List plugins to install
Installs themes into an Obsidian vault
Path to the theme to install the themes in
List of themes to install
Sets up the config dir to use for the --user-data-dir
in obsidian. Returns the path to the created config dir.
Obsidian app version
Obsidian version string.
Optional
appPath?: stringPath to the asar file to install. Will download if omitted.
Optional
vault?: stringPath to the vault to open in Obsidian.
Optional
dest?: stringDestination path for the config dir. If omitted it will create a temporary directory.
Sets up a vault for Obsidian, installing plugins and themes and optionally copying the vault to a temporary directory first.
Path to the vault to open in Obsidian
Optional
copy?: booleanWhether to copy the vault to a tmpdir first. Default false
Optional
plugins?: PluginEntry[]List of plugins to install in the vault
Optional
themes?: ThemeEntry[]List of themes to install in the vault
Path to the copied vault (or just the path to the vault if copy is false)
Downloads and launches Obsidian with a sandboxed config dir and a specifc vault open. Optionally install plugins and themes first.
This is just a shortcut for calling downloadApp
, downloadInstaller
, setupVault
and setupConfDir
.
Optional
appVersion?: stringObsidian app version. Default "latest"
Optional
installerVersion?: stringObsidian installer version. Default "latest"
Optional
copy?: booleanWhether to copy the vault to a tmpdir first. Default false
Optional
vault?: stringPath to the vault to open in Obsidian
Optional
plugins?: PluginEntry[]List of plugins to install in the vault
Optional
themes?: ThemeEntry[]List of themes to install in the vault
Optional
args?: string[]CLI args to pass to Obsidian
Optional
spawnOptions?: SpawnOptionsOptions to pass to spawn
The launched child process and the created tmpdirs
Updates the info obsidian-versions.json. The obsidian-versions.json file is used in other launcher commands and in wdio-obsidian-service to get metadata about Obsidian versions in one place such as minInstallerVersion and the internal electron version.
Optional
original: ObsidianVersionInfosReturns true if the Obsidian version is already in the cache.
on of "app" or "installer"
Obsidian app/installer version
Returns true if we either have the credentials to download the version or it's already in cache. This is only relevant for Obsidian beta versions, as they require Obsidian insider credentials to download.
Obsidian app version
The
ObsidianLauncher
class.Helper class that handles downloading and installing Obsidian versions, plugins, and themes and launching Obsidian with sandboxed configuration directories.