Composer.Step.Meta (composer v0.2.0)

Copy Markdown View Source

A step's declared metadata, returned by its __composer_step__/0.

id is the step's path under its cookbook's steps/ directory ("ash/postgres"), and ref the full reference ("composer_lab:ash/postgres").

Summary

Functions

Formats a requires entry for display.

What a hex: reference to package does, for display.

The metadata shown for a step (by mix composer.step.show and the language server's hover), as {label, text} rows. Empty values are left out.

Returns the metadata as plain data with string keys, for the manifest and --json output. requires tuples become maps.

Types

t()

@type t() :: %Composer.Step.Meta{
  action: atom() | nil,
  author: String.t() | nil,
  capability: [atom()],
  conflicts: [atom()],
  cookbook: String.t(),
  frameworks: [atom()],
  homepage: String.t() | nil,
  id: String.t(),
  license: String.t() | nil,
  module: module(),
  phase: atom() | nil,
  provides: [atom()],
  ref: String.t(),
  requires: [Composer.Facets.requirement()],
  stability: atom() | nil,
  summary: String.t() | nil,
  tags: [String.t()]
}

Functions

format_requirement(ref)

@spec format_requirement(Composer.Facets.requirement()) :: String.t()

Formats a requires entry for display.

hex_note(package)

@spec hex_note(String.t()) :: String.t()

What a hex: reference to package does, for display.

rows(meta)

@spec rows(t()) :: [{String.t(), String.t()}]

The metadata shown for a step (by mix composer.step.show and the language server's hover), as {label, text} rows. Empty values are left out.

to_data(meta)

@spec to_data(t()) :: map()

Returns the metadata as plain data with string keys, for the manifest and --json output. requires tuples become maps.