The fifth lifecycle event to trigger overall and the third to trigger inside the main Mosaic process.
It is called every time any source emits new pages and should return a boolean to indicate if other sources that share the same source namespace should re-run afterUpdate
.
The shouldUpdateNamespaceSources
lifecycle event is called with:
- updatedSourceFilesystem - Immutable filesystem for the source that changed i.e, not the source filesystem
- helpers - an object with useful methods
- options - the options specified for the plugin in the mosaic config file
The helpers provided with this lifecycle event are listed in the table below.
Property | Description |
---|---|
serialiser | A matching Serialiser for serialising/deserialising pages when reading/writing to the filesystem |
config | An immutable object for reading data from other lifecycle phases of all plugins for this source in the child process for this plugin. Shared only with this source. |
globalFilesystem | Immutable union filesystem instance with all source's pages (and symlinks applied) |
pageExtensions | A collection of pageExtensions the source is using |
ignorePages | A collection of page globs that are to be ignored for this source |
namespace | The namespace of the source running the plugin |