enablement-build-manifest
v1.0.4
Published
This builds a dependency tree.
Readme
enablement-build-manifest
Scans a monorepo and produces a JSON manifest describing every package's version, local dependency graph, and CI/CD metadata. Supports both Azure DevOps (.cicd/) and GitHub Actions (.github/) layouts.
Usage
npx enablement-build-manifest [options]Run from the root of your monorepo. The manifest is printed to stdout and optionally saved to disk.
When using --save, existing templated package mappings and existing cicd hash/version fields in the target manifest are preserved.
Options
| Flag | Description |
|------|-------------|
| --save | Write the manifest to {configDir}/manifest.json in addition to stdout |
| --platform <github\|ado> | Override platform detection (default: auto-detected) |
| --debug | Print the number of discovered packages |
Platform Detection
The platform is auto-detected by looking for the following files:
.github/templates/templated.jsonor.github/manifest.json→github(uses.github/)- Neither found →
ado(uses.cicd/)
Pass --platform github or --platform ado to override.
Output
The manifest is a JSON object with six top-level keys:
{
"versions": { "<package-name>": "<version>", ... },
"dependencies": { "<package-name>": ["<local-dep>", ...], ... },
"dependents": { "<package-name>": ["<consumer>", ...], ... },
"pipelines": { "<template-file>": [ <stage>, ... ], ... },
"templated": { "<template-file>": { "<placeholder>": { "<package-name>": "<job-template>", ... } } },
"cicd": { "<package-name>": { "output": "...", "language": "...", "tier": "...", ... }, ... }
}versions
Maps every local package name to its current version from package.json.
dependencies / dependents
dependencies— the local packages each package directly depends on.dependents— the reverse: which local packages consume a given package.
pipelines
Populated when {configDir}/templates/templated.json exists. Each key is a pipeline template filename; the value is an ordered list of resolved stages with their associated package lists.
templated
Stores the template routing that used to live in templated.json. The first key is the output file name, the second key is the placeholder name, and the innermost map assigns each package name to the job template file or files it should use.
Example:
{
"build.yml": {
"PACKAGES": {
"enablement-build-deploy-version": "build_node_component.yml"
}
}
}cicd
CI/CD metadata for each package. Sourced from the .cicd field in package.json when present; otherwise auto-detected by inspecting the package:
| Indicator | output | language | tier |
|-----------|----------|------------|--------|
| main or module field | npm | JavaScript | component |
| bin field (CLI tool) | npm | JavaScript | tooling |
| moleculer dependency | npm | node | api |
| react dependency | npm | JavaScript | ux |
| *.csproj present | nuget | C# | api |
| pyproject.toml present | pypi | Python | api |
| Dockerfile in image/container path | docker | Dockerfile | infra |
Example
# Print manifest to stdout
npx enablement-build-manifest
# Save to .cicd/manifest.json (ADO project)
npx enablement-build-manifest --save
# Save to .github/manifest.json (GitHub project)
npx enablement-build-manifest --save --platform github
# Debug: show discovered package count
npx enablement-build-manifest --debug