You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer, I want simple user experience while developing plugins. For that I need to less care about utility functions like mapConfigIfNeeded, mapOutputIfNeeded and so on.
As a proposal for solution is to incapsulate mapConfigIfNeeded function in validateConfig (which is abstraction over out old validate function from if-core). mapInputIfNeeded can be incapsulated into validate function.
Why
Context
Prerequisites/resources
SoW (scope of work)
documentation updated
test cases added
Acceptance criteria
Given (Setup): Describes the initial state of the system or the preconditions for a change.
When (Action): Describes the specific action or behavior that is being tested/changed.
Then (Assertion): Defines the expected outcome or behavior of the system after the action in the "When" step is performed.
The text was updated successfully, but these errors were encountered:
constutils=require('@grnsft/if-core/utils/validations');const{validate}=utils;// This one should be in if-core, which will make if-core more reasonableconstPluginInterface=params=>input=>{const{metadata, callback, validateInput, validateConfig, evaluateInput}=params;return{
metadata,execute: ()=>{constsafeInput=validateInput(input);constresult=callback(safeInput);returnresult;},};};constmetadata={inputs: {},outputs: {},};constcallback=inputs=>{constresult=inputs.map(input=>(input['carbon-embodied']=1));returnresult;};module.exports=PluginInterface({metadata, callback});
What
As a developer, I want simple user experience while developing plugins. For that I need to less care about utility functions like mapConfigIfNeeded, mapOutputIfNeeded and so on.
As a proposal for solution is to incapsulate mapConfigIfNeeded function in
validateConfig
(which is abstraction over out old validate function from if-core). mapInputIfNeeded can be incapsulated intovalidate
function.Why
Context
Prerequisites/resources
SoW (scope of work)
Acceptance criteria
Given (Setup): Describes the initial state of the system or the preconditions for a change.
When (Action): Describes the specific action or behavior that is being tested/changed.
Then (Assertion): Defines the expected outcome or behavior of the system after the action in the "When" step is performed.
The text was updated successfully, but these errors were encountered: