From a8d10b7d2de9b014f3c9d77d895acf1a92b482fa Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sat, 11 Nov 2023 10:11:07 +0000 Subject: [PATCH 1/2] Trim input --- .../CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js | 2 +- .../CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js index 381a95f..10793ff 100644 --- a/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js @@ -64,7 +64,7 @@ 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); - var variable = String(args.inputs.variable); + var variable = String(args.inputs.variable).trim(); var condition = String(args.inputs.condition); var value = String(args.inputs.value); // variable could be e.g. args.librarySettings._id or args.inputFileObj._id diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts index f82ed20..f928709 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts @@ -69,7 +69,7 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => { // eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign args.inputs = lib.loadDefaultValues(args.inputs, details); - const variable = String(args.inputs.variable); + const variable = String(args.inputs.variable).trim(); const condition = String(args.inputs.condition); const value = String(args.inputs.value); From e7c3f6c3f1fe061c1a7ba5e0833f7fba90fda5d1 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sat, 11 Nov 2023 10:19:51 +0000 Subject: [PATCH 2/2] Add more examples --- .../tools/checkFlowVariable/1.0.0/index.js | 2 +- .../tools/checkFlowVariable/1.0.0/index.ts | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js index 10793ff..717da05 100644 --- a/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js @@ -22,7 +22,7 @@ var details = function () { return ({ inputUI: { type: 'text', }, - tooltip: 'Variable to check. For example args.librarySettings._id', + tooltip: "Variable to check. For example , \n \n \\nExample\\n\n args.librarySettings._id\n \n \\nExample\\n\n args.inputFileObj._id\n\n \\nExample\\n\n args.userVariables.library.test\n\n \\nExample\\n\n args.userVariables.global.test\n ", }, { name: 'condition', diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts index f928709..41afb0e 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts @@ -25,7 +25,20 @@ const details = (): IpluginDetails => ({ inputUI: { type: 'text', }, - tooltip: 'Variable to check. For example args.librarySettings._id', + tooltip: `Variable to check. For example , + + \\nExample\\n + args.librarySettings._id + + \\nExample\\n + args.inputFileObj._id + + \\nExample\\n + args.userVariables.library.test + + \\nExample\\n + args.userVariables.global.test + `, }, { name: 'condition',