Liking cljdoc? Tell your friends :D

wagoe.scaffolder.cli

CLI commands for module scaffolding.

This is the SHELL layer in Functional Core / Imperative Shell architecture. Responsibilities:

  • Parse command-line arguments using tools.cli
  • Orchestrate scaffolder service calls
  • Format output (list files, success/error messages)
  • Handle errors and exit codes
CLI commands for module scaffolding.

This is the SHELL layer in Functional Core / Imperative Shell architecture.
Responsibilities:
- Parse command-line arguments using tools.cli
- Orchestrate scaffolder service calls
- Format output (list files, success/error messages)
- Handle errors and exit codes
raw docstring

adapter-helpclj

source

adapter-optionsclj

source

dispatch-commandclj

(dispatch-command verb opts service)

Dispatch command to appropriate executor.

Args: verb: :generate, :field, :endpoint, :adapter, :help opts: Parsed command options service: Scaffolder service instance

Returns: Map with :status, :result, or :errors

Dispatch command to appropriate executor.

Args:
  verb: :generate, :field, :endpoint, :adapter, :help
  opts: Parsed command options
  service: Scaffolder service instance

Returns:
  Map with :status, :result, or :errors
sourceraw docstring

endpoint-helpclj

source

endpoint-optionsclj

source

execute-adapterclj

(execute-adapter service opts)

Execute adapter command - generate a new adapter implementation.

Execute adapter command - generate a new adapter implementation.
sourceraw docstring

execute-endpointclj

(execute-endpoint service opts)

Execute endpoint command - add an endpoint to an existing module.

Execute endpoint command - add an endpoint to an existing module.
sourceraw docstring

execute-fieldclj

(execute-field service opts)

Execute field command - add a field to an existing entity.

Execute field command - add a field to an existing entity.
sourceraw docstring

execute-generateclj

(execute-generate service opts)

Execute generate command.

Execute generate command.
sourceraw docstring

field-helpclj

source

field-optionsclj

source

format-dry-run-textclj

(format-dry-run-text result)

Format dry-run result as text.

Format dry-run result as text.
sourceraw docstring

format-errorclj

(format-error format-type errors)

Format error message based on output format.

Format error message based on output format.
sourceraw docstring

format-error-textclj

(format-error-text result)

Format error result as text.

Format error result as text.
sourceraw docstring

format-file-listclj

(format-file-list files)

Format the touched files as a text list.

:note is printed where present. A bare skip: …/schema.clj says something did not happen without saying what to do instead, which is barely better than the false update: it replaced.

Format the touched files as a text list.

`:note` is printed where present. A bare `skip: …/schema.clj` says something
did not happen without saying what to do instead, which is barely better
than the false `update:` it replaced.
sourceraw docstring

format-successclj

(format-success format-type result)

Format successful result based on output format.

Format successful result based on output format.
sourceraw docstring

format-success-textclj

(format-success-text result)

Format a successful result as text.

The heading and the next steps come from the result, not from a constant. Every command shared one block of module-generation wording, so bb scaffold field announced "Successfully generated module" and then told the user to register a module in Integrant — advice for a different command, printed after adding a column (BOU-275).

Format a successful result as text.

The heading and the next steps come from the result, not from a constant.
Every command shared one block of module-generation wording, so `bb scaffold
field` announced "Successfully generated module" and then told the user to
register a module in Integrant — advice for a different command, printed
after adding a column (BOU-275).
sourceraw docstring

generate-helpclj

source

generate-optionsclj

source

global-optionsclj

source

new-removed-helpclj

source

parse-all-fieldsclj

(parse-all-fields field-specs)

Parse all field specifications.

Returns: [success? fields-or-errors]

Parse all field specifications.

Returns:
  [success? fields-or-errors]
sourceraw docstring

parse-field-specclj

(parse-field-spec field-spec)

Parse a field specification string into a field map.

Format: name:type[:required][:unique]

Examples: email:email:required:unique name:string:required age:integer status:enum

Returns: Map with keys: :name, :type, :required, :unique, or error map

Parse a field specification string into a field map.

Format: name:type[:required][:unique]

Examples:
  email:email:required:unique
  name:string:required
  age:integer
  status:enum
  
Returns:
  Map with keys: :name, :type, :required, :unique, or error map
sourceraw docstring

parse-method-specclj

(parse-method-spec method-spec)

Parse a method specification string into a method map. Format: name:arg1,arg2,... Returns: {:name "name" :args ["arg1" "arg2"]}

Parse a method specification string into a method map.
Format: name:arg1,arg2,...
Returns: {:name "name" :args ["arg1" "arg2"]}
sourceraw docstring

root-helpclj

source

run-cli!clj

(run-cli! service args)

Main CLI entry point for scaffolder module.

Args: service: Scaffolder service instance args: Command-line arguments vector

Returns: Exit status: 0 for success, 1 for error

Side effects: Prints to stdout/stderr based on command and format

Main CLI entry point for scaffolder module.

Args:
  service: Scaffolder service instance
  args: Command-line arguments vector
  
Returns:
  Exit status: 0 for success, 1 for error
  
Side effects:
  Prints to stdout/stderr based on command and format
sourceraw docstring

validate-adapter-optionsclj

(validate-adapter-options opts)

Validate required options for adapter command.

Validate required options for adapter command.
sourceraw docstring

validate-endpoint-optionsclj

(validate-endpoint-options opts)

Validate required options for endpoint command.

Validate required options for endpoint command.
sourceraw docstring

validate-field-optionsclj

(validate-field-options opts)

Validate required options for field command.

Validate required options for field command.
sourceraw docstring

validate-generate-optionsclj

(validate-generate-options opts)

Validate required options for generate command.

Returns: [valid? error-messages]

Validate required options for generate command.

Returns:
  [valid? error-messages]
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close