diff --git a/FlowPlugins/CommunityFlowPlugins/tools/resetFlowError/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/resetFlowError/1.0.0/index.js new file mode 100644 index 0000000..fe9b528 --- /dev/null +++ b/FlowPlugins/CommunityFlowPlugins/tools/resetFlowError/1.0.0/index.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.plugin = exports.details = void 0; +/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */ +var details = function () { return ({ + name: 'Reset Flow Error', + description: "After a flow error occurs, this plugin will reset the flow\nerror so that the flow will not go to error status at the end of the flow.", + style: { + borderColor: 'red', + }, + tags: '', + isStartPlugin: false, + pType: '', + requiresVersion: '2.11.01', + sidebarPosition: -1, + icon: 'faUndo', + inputs: [], + outputs: [ + { + number: 1, + tooltip: 'Continue to next plugin', + }, + ], +}); }; +exports.details = details; +// eslint-disable-next-line @typescript-eslint/no-unused-vars +var plugin = function (args) { + var lib = require('../../../../../methods/lib')(); + // eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign + args.inputs = lib.loadDefaultValues(args.inputs, details); + // eslint-disable-next-line no-param-reassign + args.variables.flowFailed = false; + return { + outputFileObj: args.inputFileObj, + outputNumber: 1, + variables: args.variables, + }; +}; +exports.plugin = plugin; diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/resetFlowError/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/resetFlowError/1.0.0/index.ts new file mode 100644 index 0000000..a37f422 --- /dev/null +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/resetFlowError/1.0.0/index.ts @@ -0,0 +1,48 @@ +import { + IpluginDetails, + IpluginInputArgs, + IpluginOutputArgs, +} from '../../../../FlowHelpers/1.0.0/interfaces/interfaces'; + +/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */ +const details = ():IpluginDetails => ({ + name: 'Reset Flow Error', + description: `After a flow error occurs, this plugin will reset the flow +error so that the flow will not go to error status at the end of the flow.`, + style: { + borderColor: 'red', + }, + tags: '', + isStartPlugin: false, + pType: '', + requiresVersion: '2.11.01', + sidebarPosition: -1, + icon: 'faUndo', + inputs: [], + outputs: [ + { + number: 1, + tooltip: 'Continue to next plugin', + }, + ], +}); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const plugin = (args:IpluginInputArgs):IpluginOutputArgs => { + const lib = require('../../../../../methods/lib')(); + // eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign + args.inputs = lib.loadDefaultValues(args.inputs, details); + + // eslint-disable-next-line no-param-reassign + args.variables.flowFailed = false; + + return { + outputFileObj: args.inputFileObj, + outputNumber: 1, + variables: args.variables, + }; +}; +export { + details, + plugin, +};