Dagger.Artifacts (dagger v1.0.0-beta.15)

Copy Markdown View Source

An immutable selection of workspace artifacts. Listed types, dimensions, and keys use OR; chained filters use AND. Empty alternatives and unknown names match nothing. Filters never change addresses or dimension identifiers.

Summary

Functions

Convert the selection to Changesets. Fail if any artifact is not a Changeset. Does not apply command filters.

Convert the selection to Checks. Fail if any artifact is not a Check. Does not apply command filters or run the checks.

Convert the selection to expertise without running the functions. Fail if any artifact is not a source of expertise.

Convert the selection to Generators without running them. Fail if any artifact is not a Generator.

Convert the selection to Services. Fail if any artifact is not a Service. Does not apply command filters or start the services.

List dimensions on the selected schema paths, including empty collections. Does not read runtime values.

List collection items represented in this selection for the given dimension. Preserve parent keys and remove duplicate item addresses. Does not evaluate item values.

List keys represented in this selection for the given dimension, sorted with no duplicates.

List dimension identifiers represented in this selection, sorted with no duplicates.

Keep artifacts with any listed key in this dimension.

Keep artifacts selected through any listed dimension.

Keep artifacts with any listed directive. Does not filter by type or workspace settings.

Keep artifacts whose immediate parent has any listed directive. Artifacts without a parent do not match.

Keep artifacts whose immediate parent has any listed object type. Artifacts without a typed parent do not match.

Match one complete, ordered field sequence exactly.

Keep paths that match a glob pattern. A literal path matches exactly. Both module-qualified and entrypoint paths match.

Keep artifacts of any listed concrete GraphQL type.

Apply a DAG address as one filter: the chain of path, type, and dimension-key filters it encodes.

A unique identifier for this Artifacts.

Enumerate complete artifacts without evaluating their values.

List the modules represented in this selection without evaluating artifact values.

Require exactly one artifact; fail if there are zero or multiple matches. Several matches are listed, one address per line.

List selected schema paths, including empty collections. Does not read runtime values. Applies type keys and collection presence; collection key values require items.

List concrete type definitions represented in this selection, sorted by name with no duplicates.

The DAG address that selects this whole selection: filterUri(uri) selects the same set.

Evaluate the selection in parallel, retaining each result and error.

Combine two selections, keeping each workspace address once. Different addresses remain distinct even if they return the same object.

Remove artifacts selected by a DAG address.

Types

t()

@type t() :: %Dagger.Artifacts{client: term(), query_builder: term()}

Functions

as_changesets(artifacts)

@spec as_changesets(t()) :: {:ok, [Dagger.Changeset.t()]} | {:error, term()}

Convert the selection to Changesets. Fail if any artifact is not a Changeset. Does not apply command filters.

as_checks(artifacts)

@spec as_checks(t()) :: {:ok, [Dagger.Check.t()]} | {:error, term()}

Convert the selection to Checks. Fail if any artifact is not a Check. Does not apply command filters or run the checks.

as_expertise(artifacts)

@spec as_expertise(t()) :: {:ok, [Dagger.Expertise.t()]} | {:error, term()}

Convert the selection to expertise without running the functions. Fail if any artifact is not a source of expertise.

as_generators(artifacts)

@spec as_generators(t()) :: {:ok, [Dagger.Generator.t()]} | {:error, term()}

Convert the selection to Generators without running them. Fail if any artifact is not a Generator.

as_services(artifacts)

@spec as_services(t()) :: {:ok, [Dagger.Service.t()]} | {:error, term()}

Convert the selection to Services. Fail if any artifact is not a Service. Does not apply command filters or start the services.

dimension_definitions(artifacts)

@spec dimension_definitions(t()) ::
  {:ok, [Dagger.ArtifactDimension.t()]} | {:error, term()}

List dimensions on the selected schema paths, including empty collections. Does not read runtime values.

dimension_items(artifacts, dimension)

@spec dimension_items(t(), String.t()) ::
  {:ok, [Dagger.Artifact.t()]} | {:error, term()}

List collection items represented in this selection for the given dimension. Preserve parent keys and remove duplicate item addresses. Does not evaluate item values.

dimension_keys(artifacts, dimension)

@spec dimension_keys(t(), String.t()) :: {:ok, [String.t()]} | {:error, term()}

List keys represented in this selection for the given dimension, sorted with no duplicates.

dimensions(artifacts)

@spec dimensions(t()) :: {:ok, [String.t()]} | {:error, term()}

List dimension identifiers represented in this selection, sorted with no duplicates.

filter_dimension_keys(artifacts, dimension, keys)

@spec filter_dimension_keys(t(), String.t(), [String.t()]) :: t()

Keep artifacts with any listed key in this dimension.

filter_dimensions(artifacts, dimensions)

@spec filter_dimensions(t(), [String.t()]) :: t()

Keep artifacts selected through any listed dimension.

filter_directives(artifacts, directives, optional_args \\ [])

@spec filter_directives(t(), [String.t()], [{:exclude, boolean() | nil}]) :: t()

Keep artifacts with any listed directive. Does not filter by type or workspace settings.

filter_parent_directives(artifacts, directives, optional_args \\ [])

@spec filter_parent_directives(t(), [String.t()], [{:exclude, boolean() | nil}]) ::
  t()

Keep artifacts whose immediate parent has any listed directive. Artifacts without a parent do not match.

filter_parent_types(artifacts, types, optional_args \\ [])

@spec filter_parent_types(t(), [String.t()], [{:exclude, boolean() | nil}]) :: t()

Keep artifacts whose immediate parent has any listed object type. Artifacts without a typed parent do not match.

filter_path(artifacts, path)

@spec filter_path(t(), [String.t()]) :: t()

Match one complete, ordered field sequence exactly.

filter_path_pattern(artifacts, pattern)

@spec filter_path_pattern(t(), String.t()) :: t()

Keep paths that match a glob pattern. A literal path matches exactly. Both module-qualified and entrypoint paths match.

filter_types(artifacts, types, optional_args \\ [])

@spec filter_types(t(), [String.t()], [{:exclude, boolean() | nil}]) :: t()

Keep artifacts of any listed concrete GraphQL type.

filter_uri(artifacts, uri)

@spec filter_uri(t(), String.t()) :: t()

Apply a DAG address as one filter: the chain of path, type, and dimension-key filters it encodes.

The scheme is optional. The path may be a pattern; an empty path selects all artifacts.

id(artifacts)

@spec id(t()) :: {:ok, String.t()} | {:error, term()}

A unique identifier for this Artifacts.

items(artifacts)

@spec items(t()) :: {:ok, [Dagger.Artifact.t()]} | {:error, term()}

Enumerate complete artifacts without evaluating their values.

modules(artifacts)

@spec modules(t()) :: {:ok, [Dagger.Module.t()]} | {:error, term()}

List the modules represented in this selection without evaluating artifact values.

one(artifacts)

@spec one(t()) :: Dagger.Artifact.t()

Require exactly one artifact; fail if there are zero or multiple matches. Several matches are listed, one address per line.

path_definitions(artifacts, optional_args \\ [])

@spec path_definitions(t(),
  absolute: boolean() | nil,
  type_assertion: boolean() | nil,
  dimension: String.t() | nil
) :: {:ok, [Dagger.ArtifactPath.t()]} | {:error, term()}

List selected schema paths, including empty collections. Does not read runtime values. Applies type keys and collection presence; collection key values require items.

types(artifacts)

@spec types(t()) :: {:ok, [Dagger.TypeDef.t()]} | {:error, term()}

List concrete type definitions represented in this selection, sorted by name with no duplicates.

uri(artifacts)

@spec uri(t()) :: {:ok, String.t()} | {:error, term()}

The DAG address that selects this whole selection: filterUri(uri) selects the same set.

values(artifacts, optional_args \\ [])

@spec values(t(), fail_fast: boolean() | nil, arguments: Dagger.JSON.t() | nil) ::
  {:ok, [Dagger.ArtifactResult.t()]} | {:error, term()}

Evaluate the selection in parallel, retaining each result and error.

with_artifacts(artifacts_, artifacts)

@spec with_artifacts(t(), t()) :: t()

Combine two selections, keeping each workspace address once. Different addresses remain distinct even if they return the same object.

without_uri(artifacts, uri)

@spec without_uri(t(), String.t()) :: t()

Remove artifacts selected by a DAG address.