zuke.tools.nx

← Python API reference

@zuke/nx 1.0.1: @zuke/nx — typed NxTasks wrappers for the [Nx](https://nx.dev) CLI, for use in Zuke builds.

Symbols

#

NxAffectedSettings

class
class NxAffectedSettings(NxSettings)

Settings for nx affected.

  • target(name: str) -> Self

    The target to run on affected projects (required).

  • base(ref: str) -> Self

    The base ref to diff against (--base).

  • head(ref: str) -> Self

    The head ref to diff against (--head).

  • configuration(name: str) -> Self

    Use a named configuration (--configuration).

  • parallel(count: float) -> Self

    Maximum number of tasks to run in parallel (--parallel).

#

NxRunManySettings

class
class NxRunManySettings(NxSettings)

Settings for nx run-many.

  • target(name: str) -> Self

    The target to run across projects (required).

  • projects(*names: str) -> Self

    Limit to specific projects (--projects); repeatable.

  • configuration(name: str) -> Self

    Use a named configuration (--configuration).

  • parallel(count: float) -> Self

    Maximum number of tasks to run in parallel (--parallel).

  • all() -> Self

    Run for every project (--all).

#

NxRunSettings

class
class NxRunSettings(NxSettings)

Settings for nx run (a single project:target).

  • target(spec: str) -> Self

    The project:target to run, e.g. web:build (required).

  • configuration(name: str) -> Self

    Use a named configuration (--configuration).

#

NxSettings

class
class NxSettings(ToolSettings)

Base for all nx subcommand settings: the binary is nx.

#

NxTasks

class
class NxTasks

Typed task functions for the nx CLI.

  • static async run(ctx: ServiceContext, configure: Callable[[NxRunSettings], NxRunSettings] | None=None) -> ExecResult

    Run a single project:target: nx run.

  • static async run_many(ctx: ServiceContext, configure: Callable[[NxRunManySettings], NxRunManySettings] | None=None) -> ExecResult

    Run a target across many projects: nx run-many.

  • static async affected(ctx: ServiceContext, configure: Callable[[NxAffectedSettings], NxAffectedSettings] | None=None) -> ExecResult

    Run a target on affected projects: nx affected.