manifests

package
v0.37.13 Latest Latest
Warning

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

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

Documentation

Overview

Package manifests is the dependency-manifest ingestion adapter: it parses `go.mod` and `package.json` files at the repo root plus one nested level (e.g. frontend/, backend/, landings*/) into `derived` facts.

Feature: cli/studio/index (REQ: adapter-manifests)

Emitted predicates:

  • publishes — the module/package identity a manifest declares (go.mod `module` directive; package.json `name` + `version`)
  • consumes — one fact per direct dependency with its version specifier (go.mod non-indirect `require` lines; package.json `dependencies` and `devDependencies`)

Subjects are emitted repo-relative (`#<manifest-path>`, e.g. `#go.mod`, `#frontend/package.json`); the pipeline prefixes them with the workspace-scoped repo slug. Objects are package IDs (`module@version`, version omitted when the manifest declares none). Dot-directories and node_modules are never scanned.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct{}

Adapter is the dependency-manifest ingestion adapter. The zero value is ready to use.

func New

func New() Adapter

New returns the adapter.

func (Adapter) ID

func (Adapter) ID() string

ID returns the stable adapter id stamped into every emitted fact.

func (Adapter) Ingest

func (Adapter) Ingest(repoPath string) ([]fact.Fact, []fact.Warning)

Ingest parses the manifests of the repo at repoPath: go.mod and package.json at the repo root and in each immediate subdirectory. A missing manifest is not an error; an unreadable or malformed one becomes a warning and skips only that file (REQ: partial-tolerance).

func (Adapter) Version

func (Adapter) Version() string

Version returns the adapter version stamped into every emitted fact.

Jump to

Keyboard shortcuts

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