zuke.tools.nest

← Python API reference

@zuke/nest 1.0.1: @zuke/nest — typed NestJS CLI (nest) task wrappers for Zuke builds.

Symbols

#

NestBuildSettings

class
class NestBuildSettings(NestSettings)

Settings for nest build — compile a NestJS application.

  • app(value: str) -> Self

    The application/project to build (positional, optional).

  • config(path: str) -> Self

    Path to the Nest CLI configuration file (--config <p>).

  • path(path: str) -> Self

    Path to the tsconfig file (--path <p>).

  • watch() -> Self

    Rebuild on file changes (--watch).

  • webpack() -> Self

    Use the webpack builder (--webpack).

  • tsc() -> Self

    Use the tsc builder (--tsc).

  • builder(value: str) -> Self

    Builder to use, e.g. tsc/webpack/swc (--builder <v>).

  • preserve_watch_output() -> Self

    Keep prior console output between watch rebuilds (--preserveWatchOutput).

#

NestGenerateSettings

class
class NestGenerateSettings(NestSettings)

Settings for nest generate — generate code from a schematic.

  • schematic(value: str) -> Self

    The schematic to generate, e.g. module/service (positional, required).

  • name(value: str) -> Self

    The name passed to the schematic (positional, optional).

  • project(value: str) -> Self

    Target project in a monorepo (--project <v>).

  • collection(value: str) -> Self

    Schematics collection to use (--collection <v>).

  • flat() -> Self

    Generate files without a dedicated directory (--flat).

  • spec() -> Self

    Force generation of a spec file (--spec).

  • no_spec() -> Self

    Disable generation of a spec file (--no-spec).

  • skip_import() -> Self

    Skip importing the generated element into its module (--skip-import).

  • dry_run() -> Self

    Report what would be generated without writing files (--dry-run).

#

NestInfoSettings

class
class NestInfoSettings(NestSettings)

Settings for nest info — print Nest CLI and project information.

#

NestNewSettings

class
class NestNewSettings(NestSettings)

Settings for nest new — scaffold a new NestJS application.

  • name(value: str) -> Self

    The application name (positional, required).

  • directory(path: str) -> Self

    Generate into this directory (--directory <p>).

  • skip_install() -> Self

    Skip package installation (--skip-install).

  • skip_git() -> Self

    Skip git repository initialization (--skip-git).

  • strict() -> Self

    Enable TypeScript strict mode in the generated project (--strict).

  • dry_run() -> Self

    Report what would be generated without writing files (--dry-run).

  • package_manager(value: str) -> Self

    Package manager to use, e.g. npm/yarn/pnpm (--package-manager <v>).

  • language(value: str) -> Self

    Programming language, e.g. ts/js (--language <v>).

#

NestSettings

class
class NestSettings(ToolSettings)

Shared base for every nest subcommand: the binary and argv assembly.

#

NestStartSettings

class
class NestStartSettings(NestSettings)

Settings for nest start — build and run a NestJS application.

  • app(value: str) -> Self

    The application/project to start (positional, optional).

  • config(path: str) -> Self

    Path to the Nest CLI configuration file (--config <p>).

  • path(path: str) -> Self

    Path to the tsconfig file (--path <p>).

  • watch() -> Self

    Rebuild and restart on file changes (--watch).

  • debug() -> Self

    Start in debug mode (--debug).

  • preserve_watch_output() -> Self

    Keep prior console output between watch rebuilds (--preserveWatchOutput).

  • exec(value: str) -> Self

    Binary used to run the compiled output (--exec <v>).

  • builder(value: str) -> Self

    Builder to use, e.g. tsc/webpack/swc (--builder <v>).

#

NestTasks

class
class NestTasks

Typed task functions for the NestJS CLI (nest).

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

    Scaffold a new application: nest new.

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

    Generate code from a schematic: nest generate.

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

    Compile an application: nest build.

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

    Build and run an application: nest start.

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

    Print CLI and project information: nest info.