Registry / devops / enablement-build-template-generate

enablement-build-template-generate

JSON →
library1.0.20jsnpmunverified

Generates pipeline YAML files for monorepos by expanding a job template per package and stitching into a document template. v1.0.20 stable release. Designed for Azure DevOps and GitHub Actions. Reads either manifest.json (preferred) or templated.json (legacy). Supports multiple templates per package, platform auto-detection, and fallback template lookup. Differentiator: specialized for Microsoft enablement build ecosystem.

npm install enablement-build-template-generate
INSTALL
IMPORT
SIG · ENABLEMENT-BUILD-T
E
enablement-build-template-generate
devopsjavascriptv1.0.20
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI execution
npx enablement-build-template-generate@latest [flags]
npm install -g enablement-build-template-generate && generate-templates
No global install needed; use npx to get latest.
Programmatic API
import { generate } from 'enablement-build-template-generate';
const generate = require('enablement-build-template-generate');
Package is primarily CLI; programmatic API not documented but works as named export.
TypeScript types
import type { GenerateOptions } from 'enablement-build-template-generate';
import { GenerateOptions } from 'enablement-build-template-generate';
Types are exported as interfaces; use 'import type' to avoid bundling.

Runs the CLI with Azure DevOps platform, skips specified packages, and enables debug output.

npx enablement-build-template-generate --platform ado --exclude skip-pkg1,skip-pkg2 --debug
Debug
Known issues
breakingTemplate placeholders changed from {{variable}} to {variable} in v1.0.0.
fix
Update all templates to use single curly braces: {PACKAGES} instead of {{PACKAGES}}.
affects: <1.0.0
breakingLegacy templated.json format deprecated in v1.0.0. manifest.json is now required.
fix
Migrate to manifest.json format using enablement-build-manifest.
affects: >=1.0.0
breakingPlatform auto-detection now checks .cicd/ or .github/ directories. Previously only .cicd/.
fix
Ensure pipeline config files are in the correct directory for your platform.
affects: >=1.0.0
gotchaTemplate lookup falls back to other platform's templates directory. This may include unintended files.
fix
Explicitly set --platform if you have templates in both .cicd/ and .github/.
affects: >=1.0.0
gotchaPackage metadata for manifest.json is read from manifest.cicd[packageName]. If missing, placeholders will be empty.
fix
Verify that manifest.cicd contains entries for all packages listed in templated section.
affects: >=1.0.0
deprecatedtemplated.json format is considered legacy and may be removed in a future major version.
fix
Switch to manifest.json format.
affects: >=1.0.0
breakingOutput file is written one level above template directory. Previously it was written to the same directory.
fix
Adjust any scripts that expect output in templates/ folder.
affects: <1.0.0
Errors
Common errors & fixes
Error: No manifest.json or templated.json found in .cicd/ or .github/
Missing or misnamed config file in the expected directory.
fix
Create either .cicd/manifest.json or .cicd/templates/templated.json (or .github/ equivalents).
Error: Package 'my-pkg' has no template mapping in manifest.json
Package listed in manifest.cicd but not in templated section.
fix
Add an entry for 'my-pkg' in the templated object of manifest.json, or remove it from manifest.cicd.
Error: Template file 'build_node_component.yml' not found in any templates directory
Referenced template file does not exist in .cicd/templates/ or .github/templates/.
fix
Place the template file in the correct templates directory (platform-dependent) or update the template name in manifest.json.
Error: Package folder 'packages/my-pkg' does not contain a manifest file (package.json, version.json, or pyproject.toml)
Legacy templated.json mode; package folder lacks required manifest.
fix
Add a package.json or pyproject.toml to the package folder, or switch to manifest.json mode.
Warning: Package 'my-pkg' in manifest.cicd lacks 'folderName' property; using package name as fallback
Incomplete metadata in manifest.cicd.
fix
Ensure each manifest.cicd entry has a 'folderName' field pointing to the package directory.
Upgrade
Version history
1.0.20latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources