Table of Contents

Class CliBundle

Namespace
Valheim.Testing.Game
Assembly
Valheim.Testing.Game.dll

The pinned ValheimCLI plugin bundle the toolkit ships: one zip of the default plugin, its capability manifest (cli-manifest.json) and ValheimCLI's license, built once from the pinned commit and identified by its SHA-256. Valheim.Testing.GameSessions embeds it with its pin (cli-dependency.json), so a disposable client copy and valheim-test stage the same set. Extract(Stream, string, string, string, string?) unpacks it once under ValheimTesting's own folder on this machine (cli/<commit>) and reuses that copy while every file still matches the manifest, so a run needs no network and no plugins in the game.

public static class CliBundle
Inheritance
object
CliBundle

Fields

ManifestFile

The manifest's file name inside a bundle.

public const string ManifestFile = "cli-manifest.json"

Field Value

string

Properties

DataRoot

ValheimTesting's own folder on this machine (%LOCALAPPDATA%\ValheimTesting; macOS and Linux likewise).

public static string DataRoot { get; }

Property Value

string

Methods

Extract(Stream, string, string, string, string?)

The bundle in zip, which must be sha256, as a verified folder under dataRoot (default DataRoot)/cli/<commit>. An existing folder is reused only when it was extracted from this zip and every file its manifest names still has its hash; otherwise it is extracted again beside it and swapped in, one run at a time (<commit>.lock beside the folder), so concurrent runs share one copy and never replace a current one. A zip of another hash, or a manifest that does not match the files in the zip, is refused.

public static CliBundleSource Extract(Stream zip, string sha256, string commit, string origin, string? dataRoot = null)

Parameters

zip Stream
sha256 string
commit string
origin string
dataRoot string

Returns

CliBundleSource