Skip to main content

Module manager

Module manager 

Source
Expand description

The plugin manager: a static JSON registry index of plugin packages, checksum-verified downloads, side-by-side versioned installs, and dre.lock.

Index location: DRE_REGISTRY_URL, default DEFAULT_REGISTRY. It may be an https:// URL, a file:// URL or a plain path. Format: docs/registry.md.

Structs§

Artifact
Index
IndexPackage
A plugin package: one executable per platform, serving every plugin in provides.
IndexVersion
Release
One published (non-draft) release of a GitHub repository whose tag is a version.

Enums§

Synced
What sync did for one package.

Constants§

DEFAULT_REGISTRY
INDEX_SCHEMA
The index’s current schema. Schema 1 listed single plugins (kind and name); each still reads as a package of that one plugin.

Functions§

explain_undeclared
Name the package to declare for each undeclared-plugin error, from DRE’s registry, or say that the registry has no such plugin. The registry is fetched now, so a newly published package is known without a new dre. Unreachable: unchanged.
fetch
github_api
The GitHub API DRE talks to: DRE_GITHUB_API_URL (GitHub Enterprise, tests), else GitHub’s.
github_releases
repo’s releases from the GitHub API (DRE_GITHUB_API_URL, GITHUB_TOKEN), skipping drafts and tags that aren’t versions, newest first by version_order. Every page is read: a repository that also releases its plugins (duckdb-v1.0.0) can list many of those first.
install
Download, verify and install one version into <dir>/<package>/<version>/. Returns its lock entry.
install_linked
Install into dir through the shared cache: download there once, then link into dir.
platform
This machine’s platform key in the index: <os>-<arch>, e.g. macos-aarch64.
prefer_stable
The highest of items whose version matches req. When none does, a pre-release counts if its release would match, so * finds 0.0.1-alpha when a plugin has no stable release yet (semver on its own only matches a pre-release that req names explicitly).
registry_url
sync
Make every declared package available, installing what’s missing (unless install is false, in which case missing packages are errors). Honours dre.lock pins, writes new pins.
version_order
Which version is newer: semver precedence, except that numbers inside a pre-release identifier compare as numbers. Semver compares alpha-10 and alpha-9 as text, which puts 0.0.1-alpha-10 before 0.0.1-alpha-9; DRE’s own pre-releases are named 0.0.1-alpha-<n>.