releam/package_config

Types

pub type Overrides {
  Overrides(auto_push: Result(Bool, snag.Snag))
}

Constructors

  • Overrides(auto_push: Result(Bool, snag.Snag))
pub type PackageConfig {
  PackageConfig(
    version: SemVer,
    repository: Result(Repository, Nil),
    auto_push: Bool,
  )
}

Constructors

  • PackageConfig(
      version: SemVer,
      repository: Result(Repository, Nil),
      auto_push: Bool,
    )
pub type Repository {
  Repository(host: RepositoryHost, org: String, name: String)
}

Constructors

  • Repository(host: RepositoryHost, org: String, name: String)
pub type RepositoryHost {
  Github
  NotImplemented(String)
}

Constructors

  • Github
  • NotImplemented(String)

Functions

pub fn parse(
  raw_config: String,
  overrides: Overrides,
) -> PackageConfig

Parses the content of a gleam.toml to return a PackageConfig

pub fn replace_version(
  raw_config: String,
  new_version: SemVer,
) -> String

Replace the package version in a gleam.toml content

Search Document