-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew or additional functionalityNew or additional functionality
Description
Feature description
Add a feature to allow the app to automatically update content plugins with no user/admin input at a configurable interval.
Add extra config settings:
autoUpdate(Boolean, default:false): will enable/disable the featureupdateCron(string, default@dailyor0 0 * * *): should be in a standard CRON format, and will specify how often to run the update checksemverSpecifier(string, default:^, enum:['~', '^', '*']): will clamp which versions will be installed automatically according to the npm semver ranges:*for major/all updates,^for minor updates (i.e.1.x.x), and~for patch updates (i.e.1.0.x)
Add update check function
Function should look something like:
/**]
* @param {string|Array<string>} pluginName The name (or array of names) for the plugins to check
* @return {Object|Array<Object>} Result(s) from getPluginInfos
*/
checkForPluginUpdate (plugin_name) {
}Add CRON automated task
Set up automated update checker to run at the interval specified by updateCron, and use new checkForPluginUpdate function to check all installed plugins (with isLocalInstall: false property).
For plugins with updates found, installPlugin should be called, passing plugin name and the version to install.
Logging
checkForPluginUpdate:- Log one message at the beginning of the check:
this.log('verbose', 'UPDATE', 'checking for updates for ${pluginName}') - Log message at the end of the function to summarise:
this.log('info', 'UPDATE', 'update found for ${pluginName} (${updateVersion})')orthis.log('verbose', 'UPDATE', 'no updates found for ${pluginName}')
- Log one message at the beginning of the check:
installPlugin:- Add log at beginning of the function
this.log('debug', 'INSTALL', 'installing ${pluginName}@${version}') - Add log at end of the function
this.log('info', 'INSTALL', 'installed ${pluginName}@${version}')
- Add log at beginning of the function
Can you work on this feature?
- I can contribute
Reactions are currently unavailable
Metadata
Metadata
Labels
enhancementNew or additional functionalityNew or additional functionality