generate

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package generate ports the orchestration between the CLI and core: executeCodegen (codegen.ts) — for each `generates` entry, load schema + documents, run the plugin chain, and collect FileOutputs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx *config.Context) ([]plugin.FileOutput, error)

Execute mirrors executeCodegen: returns the list of FileOutputs (content per output filename) plus the merged schema. It does NOT write to disk (Phase 5).

func Generate

func Generate(ctx *config.Context, opts Options) ([]plugin.FileOutput, []string, error)

Generate runs the full pipeline: execute codegen, then write outputs with hash-skip / overwrite / stale-file removal / check-mode semantics, and run lifecycle hooks. It returns the written outputs and the list of stale files (check mode).

Types

type Options

type Options struct {
	SaveToFile bool
	CheckMode  bool
	Watch      bool
}

Options controls Generate's behaviour (mirrors the CLI flags folded into the config plus saveToFile).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL