pub async fn spawn(
uri_str: &str,
path: Option<&str>,
vcs: Option<&str>,
dist_preference: Option<&str>,
bond: bool,
sink: &dyn EventSink,
) -> Result<SpawnOutput, HyphaError>Expand description
Handle the spore spawn command - create a working copy of a spore
Spawn flow for archive sources (default):
- Download and extract archive to user directory
- If –vcs git: initialize git repo with initial commit
- Update spore.core.json: add spawn reference, clear domain
Spawn flow for git sources (–dist git):
- Clone remote repo to cache bare repo (if not exists)
- Clone from cache bare repo to user directory
- If –vcs not specified with git dist: keep .git from clone
- Update spore.core.json: add spawn reference, clear domain
Spawn a spore to a local directory — library level.