init

package
v0.1.0-rc.44 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: BSD-3-Clause Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package projectinit owns project initialization planning, safe edits, and project-local dependency installation. callers provide artifact generation and diagnostic presentation without exposing command or publisher state.

Index

Constants

View Source
const LocalIgnoreRule = "/.tnl/local/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	NoInstall bool
	// Generate writes portable artifacts for the selected configuration. init
	// calls it after safe source edits and before wiring Python and TypeScript.
	Generate func(ctx context.Context, root, configurationPath string) error
}

type Plan

type Plan struct {
	Root                 string
	PackageManager       string
	MissingPackages      []string
	ConfigurationPath    string
	NewConfiguration     []byte
	Framework            string
	FrameworkPath        string
	NewFrameworkConfig   []byte
	ServerPath           string
	ServerSource         []byte
	ServerReplacement    []byte
	Actions              []string
	InstallBlocked       bool
	GeneratedAppService  bool
	NeedsAppRegistration bool
}

Plan records the detected project and the edits init can safely make. planning reads files but does not install dependencies or write project state.

func NewPlan

func NewPlan(ctx context.Context, cwd string, actionForFailure func(error) string) (Plan, error)

NewPlan uses actionForFailure only for recoverable detection diagnostics. the caller supplies their presentation; fatal errors retain their causes.

func (Plan) Apply

func (plan Plan) Apply(ctx context.Context, options Options) (Result, error)

type Result

type Result struct {
	Root                 string
	ConfigurationPath    string
	ConfigurationCreated bool
	InstalledPackages    []string
	UpdatedPaths         []string
	DeclarationsPath     string
	PythonPackagePath    string
	Actions              []string
	Changed              bool
}

Result contains operation facts in their existing presentation order.

Jump to

Keyboard shortcuts

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