npm

package
v0.59.13 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NpmRegistryURL is the base URL for the npm registry
	NpmRegistryURL = "https://registry.npmjs.org"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NpmPackageInfo

type NpmPackageInfo struct {
	Name     string            `json:"name"`
	DistTags map[string]string `json:"dist-tags"`
	Time     map[string]string `json:"time"` // Maps version -> publish timestamp (RFC3339)
	Versions map[string]struct {
		Version string `json:"version"`
	} `json:"versions"`
}

NpmPackageInfo represents information about an npm package

type NpmTool

type NpmTool struct {
	// contains filtered or unexported fields
}

NpmTool handles npm package version checking

func NewNpmTool

func NewNpmTool(client packageversions.HTTPClient) *NpmTool

NewNpmTool creates a new npm tool with the given HTTP client

func (*NpmTool) Definition

func (t *NpmTool) Definition() mcp.Tool

Definition returns the tool's definition for MCP registration

func (*NpmTool) Execute

func (t *NpmTool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, args map[string]any) (*mcp.CallToolResult, error)

Execute executes the tool's logic

Jump to

Keyboard shortcuts

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