shared

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColorPalette = struct {
	// Standard colors
	Warning *color.Color
	Prompt  *color.Color
	Info    *color.Color
	Error   *color.Color

	// Specific color functions
	Welcome     func(format string, a ...interface{})
	Version     func(format string, a ...interface{}) string
	PromptStr   func(format string, a ...interface{}) string
	GrayMessage *color.Color
	ExitMessage *color.Color
}{

	Warning: color.New(color.FgYellow),
	Prompt:  color.New(color.FgBlue),
	Info:    color.New(color.FgCyan),
	Error:   color.New(color.FgRed),

	Welcome:     color.Cyan,
	Version:     color.CyanString,
	PromptStr:   color.BlueString,
	GrayMessage: color.RGB(105, 105, 105),
	ExitMessage: color.New(color.FgHiRed),
}

ColorPalette provides centralized color configuration

View Source
var EngineVersion string
View Source
var RuntimeVersion string

Functions

func XelDir

func XelDir() string

Types

type Config

type Config struct {
	DefaultTemplate     string   `json:"DefaultTemplate"`
	ModulePaths         []string `json:"ModulePaths"`
	PackageRegistryURI  string   `json:"PackageRegistryURI"`
	AllowInstallScripts bool     `json:"AllowInstallScripts"`
}

Config represents the application configuration

var XelConfig Config

XelConfig holds the application configuration

type Lockfile

type Lockfile map[string]struct {
	Algorithm string `json:"algorithm"` // Algorithm used for hashing
	Hash      string `json:"hash"`      // Hash of the file
	URL       string `json:"url"`       // URL of the file
	Version   string `json:"version"`   // Version of the package
}

type ProjectManifest

type ProjectManifest struct {
	Name        string             `json:"name"`                 // Project name
	Description string             `json:"description"`          // Project description
	Version     string             `json:"version"`              // Project version
	Xel         *string            `json:"xel,omitempty"`        // Required Xel runtime version
	Engine      *string            `json:"engine,omitempty"`     // Required VirtLang engine version
	Main        string             `json:"main"`                 // Main entry point file
	Deps        *map[string]string `json:"deps,omitempty"`       // Project dependencies
	Author      string             `json:"author"`               // Project author
	License     string             `json:"license"`              // Project license
	Tags        []string           `json:"tags,omitempty"`       // Project tags
	Deprecated  *string            `json:"deprecated,omitempty"` // Project deprecation message
}

ProjectManifest represents the metadata and configuration of a Xel project

Fields: - Name: The name of the Xel project - Description: A brief description of the project - Version: The current version of the project - Xel: Required Xel runtime version (e.g., "^0.6.0") - Engine: Required VirtLang engine version (e.g., "^2.1.0") - Main: The main entry point file (relative to project root) - Deps: Project dependencies (key-value pairs of package names and versions) - Author: The author of the project - License: The license under which the project is distributed

Example:

{
    "name": "my-project",
    "description": "A sample Xel project",
    "version": "1.0.0",
    "xel": "^0.6.0",
    "engine": "^2.1.0",
    "main": "src/main.xel",
    "deps": {
        "my-package": "^1.0.0"
    },
    "author": "John Doe",
    "license": "MIT"
}

Jump to

Keyboard shortcuts

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