adobe / adobe/aio-cli-plugin-app-templates

Template Registry approval is bypassed by aio templates install/aio app init and pulls latest npm version

Open
#79 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6
Forks
7
Avg merge
20h 43m
Merged PRs (30d)
2

Description

### Summary
`aio templates install `and `aio app init `install the version from npm’s latest dist-tag, not the version approved in the Template Registry.
The Template Registry’s latestVersion is only used for display in `aio templates discover,` not for actual installs.
This creates a mismatch where users may see one version (approved) but install a newer, unapproved version.
As a result, publishing to npm effectively bypasses the registry approval gate.

### Expected Behavior
aio templates install and aio app init should install the version specified by the Template Registry’s latestVersion (i.e., the approved version).
The Template Registry should act as the source of truth and release gate for template availability.
All CLI flows (discover, install, app init) should consistently use the registry-approved version.

#### Possible fix

when the install spec has no explicit version ([src/commands/templates/install.js](https://github.com/adobe/aio-cli-plugin-app-templates/blob/main/src/commands/templates/install.js#L33) → [src/lib/npm-helper.js:102](https://github.com/adobe/aio-cli-plugin-app-templates/blob/main/src/lib/npm-helper.js#L102)), look up the template's latestVersion from the Template Registry (already used by discover.js via [getTemplates()](https://github.com/adobe/aio-cli-plugin-app-templates/blob/main/src/commands/templates/discover.js#L123 ) in [template-registry-helper.js](https://github.com/adobe/aio-cli-plugin-app-templates/blob/main/src/lib/template-registry-helper.js#L23)) and pass the version-pinned spec to `npm install`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.