Ember CLI Deploy Display Revisions
ember-cli-deploy-display-revisions is an Ember CLI Deploy plugin designed to list and display deployed revisions for Ember applications. Its current stable version is 3.0.0. This plugin integrates directly with the ember-cli-deploy ecosystem, providing a CLI command (`ember deploy:list`) to show recent deployments. It allows configuration of the number of revisions to display and expects revision data to be provided by other index plugins (e.g., fetchRevisions) in a specific JSON format, including details like `revision`, `version`, `timestamp`, `deployer`, and `active` status. The plugin is primarily a Node.js-only addon, meaning it does not participate in typical Ember application build or test processes, distinguishing it from front-end focused Ember addons. Release cadence is driven by updates to core dependencies like Node.js and ember-cli-deploy itself.
Common errors
-
Error: Node.js version X.X.X is not supported by ember-cli-deploy-display-revisions@3.0.0
cause Attempting to use the plugin with an unsupported Node.js version, especially prior to v14.fixUpdate your Node.js environment to a compatible version (14.*, 16.*, 18.*, or >= 20). -
ember deploy:list: command not found
cause `ember-cli-deploy-display-revisions` is installed, but `ember-cli-deploy` itself, or its `deploy` command, is not properly set up.fixEnsure `ember-cli-deploy` is correctly installed in your project and configured. Verify that `ember deploy --help` works, indicating the `deploy` command is available. -
The 'revisions' data does not display correctly or shows incorrect dates.
cause The `timestamp` format provided by the `fetchRevisions` plugin is not correctly parsed by Luxon after the v2.1.0 update.fixVerify that your `fetchRevisions` plugin provides timestamps in the `context.revisions` array as either milliseconds since epoch or a valid ISO 8601 string, as expected by Luxon. For example: `{ revision: 'abc', timestamp: 1438232435000 }` or `{ revision: 'abc', timestamp: '2015-07-30T10:00:00.000Z' }`.
Warnings
- breaking Version 3.0.0 introduces updated dependency requirements and significantly stricter Node.js version requirements, now demanding `14.* || 16.* || 18.* || >= 20`.
- breaking Version 2.0.0 broke compatibility for older Node.js environments, requiring Node.js 10 or higher, and also included updates to `ember-cli` dependencies.
- gotcha As a Node-only Ember CLI addon, `ember-cli-deploy-display-revisions` does not work with standard `ember build` or `ember test` commands directly within your application's test suite or build process.
- gotcha With the internal switch from Moment.js to Luxon in v2.1.0 and subsequent bug fixes in v2.1.1 and v2.1.2, users might encounter issues with timestamp parsing and display if revision data timestamps are not in the expected milliseconds-since-epoch or ISO format.
Install
-
npm install ember-cli-deploy-display-revisions -
yarn add ember-cli-deploy-display-revisions -
pnpm add ember-cli-deploy-display-revisions
Imports
- Installation
import 'ember-cli-deploy-display-revisions'; // Not a direct JS module import
ember install ember-cli-deploy-display-revisions
- Display Revisions Command
require('ember-cli-deploy-display-revisions'); // No direct programmatic API for CLI commandsember deploy:list <environment> [--amount <N>]
- Configuration
ENV['display-revisions'] = { amount: 10, revisions: function(context) { return context.revisions; } };
Quickstart
ember install ember-cli-deploy-display-revisions
# Configure in config/environment.js (example)
// ENV['display-revisions'] = {
// amount: 15, // Display up to 15 revisions
// revisions: function(context) {
// return context.revisions; // Use revisions from the deploy context
// }
// };
# To list the latest 10 deployed revisions for the 'production' environment
ember deploy:list production
# To list the latest 5 deployed revisions for the 'staging' environment
ember deploy:list --amount 5 staging