As of today, Plugins defines custom implementations to be run before or after each item/procedure resolution.
This gives Murray developers a great control over how they implement each plugin, but lacks of control for Murray users when they want to use plugin details with some kind of context over current element being processed.
Lets take the Shell plugin used in an "after item replacement" phase.
it's easy to add a command like echo Hello after each replacement, but what if a user wants to echo current Item destination path or something similar?
Murray Plugins should inject in provided context some special variable like _inputPath or _outputPath with current input properties, so that the plugin section of a BoneItem can contain something like echo {{_inputPath}}, with complete control over shell commands configurations.
custom names should all start with a _, so that it's harder to collide with provided context
in any case a custom name should overwrite a previously existing property inside provided context
context override should shared between every plugin (future-proof), maybe in the Plugin base-class.
List of possible values:
_name: name of current item / procedure being processed
_sourcePath: complete path of source template
_destinationPath: complete path of destination template
As of today, Plugins defines custom implementations to be run before or after each item/procedure resolution.
This gives Murray developers a great control over how they implement each plugin, but lacks of control for Murray users when they want to use plugin details with some kind of context over current element being processed.
Lets take the Shell plugin used in an "after item replacement" phase. it's easy to add a command like
echo Hello
after each replacement, but what if a user wants to echo current Item destination path or something similar?Murray Plugins should inject in provided context some special variable like
_inputPath
or_outputPath
with current input properties, so that the plugin section of a BoneItem can contain something likeecho {{_inputPath}}
, with complete control over shell commands configurations._
, so that it's harder to collide with provided contextPlugin
base-class.List of possible values:
_name
: name of current item / procedure being processed_sourcePath
: complete path of source template_destinationPath
: complete path of destination template