app

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// Path is the absolute path to the application root
	Path string

	// Env contains environment variables that may influence detection
	Env map[string]string
}

Context provides information about the application being analyzed

func NewContext

func NewContext(path string) *Context

NewContext creates a new Context for the given path

func (*Context) HasFile

func (ctx *Context) HasFile(name string) bool

HasFile checks if a file exists in the application path

func (*Context) ListFiles

func (ctx *Context) ListFiles(pattern string) ([]string, error)

ListFiles lists files matching a pattern in the application path

func (*Context) ReadFile

func (ctx *Context) ReadFile(name string) ([]byte, error)

ReadFile reads a file from the application path

type Plan

type Plan struct {
	// Provider is the name of the provider that detected this application (e.g., "node")
	Provider string `json:"provider"`

	// Language is the detected programming language (e.g., "nodejs", "python")
	Language string `json:"language"`

	// LanguageVersion is the detected or default version of the language runtime
	LanguageVersion string `json:"language_version,omitempty"`

	// Framework is the detected framework (e.g., "nextjs", "remix", "express")
	Framework string `json:"framework,omitempty"`

	// FrameworkVersion is the version of the detected framework
	FrameworkVersion string `json:"framework_version,omitempty"`

	// PackageManager is the detected package manager (e.g., "npm", "yarn", "pnpm", "bun")
	PackageManager string `json:"package_manager,omitempty"`

	// PackageManagerVersion is the version of the package manager
	PackageManagerVersion string `json:"package_manager_version,omitempty"`

	// InstallCommand is the command to install dependencies
	InstallCommand string `json:"install_command,omitempty"`

	// BuildCommand is the command to build the application
	BuildCommand string `json:"build_command,omitempty"`

	// StartCommand is the command to start the application
	StartCommand string `json:"start_command,omitempty"`

	// DetectedFiles lists the files that were used for detection
	DetectedFiles []string `json:"detected_files,omitempty"`

	// Metadata contains additional provider-specific information
	Metadata map[string]interface{} `json:"metadata,omitempty"`

	// BuildEnv contains environment variables available during build (ARG in Dockerfile)
	BuildEnv map[string]string `json:"build_env,omitempty"`

	// Env contains environment variables available at runtime (ENV in Dockerfile)
	Env map[string]string `json:"env,omitempty"`
}

Plan represents the detected build plan for an application

Jump to

Keyboard shortcuts

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