From 7ca49e5e48b0ad34d6812a61c510d9b86a8e3197 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sun, 2 Mar 2025 17:38:22 +0000 Subject: [PATCH 1/4] fix: outputFileBecomesWorkingFile logic when doesCommandCreateOutputFile set false --- .../CommunityFlowPlugins/tools/runCli/1.0.0/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/runCli/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/runCli/1.0.0/index.ts index cd2e051..7f5ceb6 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/tools/runCli/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/runCli/1.0.0/index.ts @@ -196,9 +196,13 @@ const plugin = async (args: IpluginInputArgs): Promise => { const customCliPath = String(args.inputs.customCliPath); let cliPath = ''; - const { - outputFileBecomesWorkingFile, - } = args.inputs; + const { doesCommandCreateOutputFile } = args.inputs; + let { outputFileBecomesWorkingFile } = args.inputs; + + if (!doesCommandCreateOutputFile) { + outputFileBecomesWorkingFile = false; + } + let userOutputFilePath = String(args.inputs.userOutputFilePath); let cliArguments = String(args.inputs.cliArguments); From 1bab9ad71521dc2df98d0f5271b05e8c48b103c7 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sun, 2 Mar 2025 17:40:16 +0000 Subject: [PATCH 2/4] Apply auto-build changes --- .../CommunityFlowPlugins/tools/runCli/1.0.0/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FlowPlugins/CommunityFlowPlugins/tools/runCli/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/runCli/1.0.0/index.js index fbb5a5b..9eaa666 100644 --- a/FlowPlugins/CommunityFlowPlugins/tools/runCli/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/tools/runCli/1.0.0/index.js @@ -209,7 +209,7 @@ var details = function () { return ({ exports.details = details; // eslint-disable-next-line @typescript-eslint/no-unused-vars var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function () { - var lib, userCli, useCustomCliPath, customCliPath, cliPath, outputFileBecomesWorkingFile, userOutputFilePath, cliArguments, cacheDir, fileName, cliArgs, availableCli, msg, cli, res, msg; + var lib, userCli, useCustomCliPath, customCliPath, cliPath, doesCommandCreateOutputFile, outputFileBecomesWorkingFile, userOutputFilePath, cliArguments, cacheDir, fileName, cliArgs, availableCli, msg, cli, res, msg; return __generator(this, function (_a) { switch (_a.label) { case 0: @@ -220,7 +220,11 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function useCustomCliPath = args.inputs.useCustomCliPath; customCliPath = String(args.inputs.customCliPath); cliPath = ''; + doesCommandCreateOutputFile = args.inputs.doesCommandCreateOutputFile; outputFileBecomesWorkingFile = args.inputs.outputFileBecomesWorkingFile; + if (!doesCommandCreateOutputFile) { + outputFileBecomesWorkingFile = false; + } userOutputFilePath = String(args.inputs.userOutputFilePath); cliArguments = String(args.inputs.cliArguments); // eslint-disable-next-line no-template-curly-in-string From b8e96720d17d2b4c1369bd79aa9bd5f6d54c11ef Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sun, 2 Mar 2025 17:50:04 +0000 Subject: [PATCH 3/4] feat: use onSelect handler instead --- .../tools/runCli/1.0.0/index.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/runCli/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/runCli/1.0.0/index.ts index 7f5ceb6..e8ae61a 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/tools/runCli/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/runCli/1.0.0/index.ts @@ -91,6 +91,11 @@ const details = (): IpluginDetails => ({ defaultValue: 'true', inputUI: { type: 'switch', + onSelect: { + false: { + outputFileBecomesWorkingFile: 'false', + }, + }, }, tooltip: 'Toggle this on if the command creates an output file.', @@ -196,12 +201,9 @@ const plugin = async (args: IpluginInputArgs): Promise => { const customCliPath = String(args.inputs.customCliPath); let cliPath = ''; - const { doesCommandCreateOutputFile } = args.inputs; - let { outputFileBecomesWorkingFile } = args.inputs; - - if (!doesCommandCreateOutputFile) { - outputFileBecomesWorkingFile = false; - } + const { + outputFileBecomesWorkingFile, + } = args.inputs; let userOutputFilePath = String(args.inputs.userOutputFilePath); let cliArguments = String(args.inputs.cliArguments); From c271c6bcd01cb568fb6dfd87e7d6decb8e41360a Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sun, 2 Mar 2025 17:51:42 +0000 Subject: [PATCH 4/4] Apply auto-build changes --- .../CommunityFlowPlugins/tools/runCli/1.0.0/index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/tools/runCli/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/runCli/1.0.0/index.js index 9eaa666..d0b4156 100644 --- a/FlowPlugins/CommunityFlowPlugins/tools/runCli/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/tools/runCli/1.0.0/index.js @@ -133,6 +133,11 @@ var details = function () { return ({ defaultValue: 'true', inputUI: { type: 'switch', + onSelect: { + false: { + outputFileBecomesWorkingFile: 'false', + }, + }, }, tooltip: 'Toggle this on if the command creates an output file.', }, @@ -209,7 +214,7 @@ var details = function () { return ({ exports.details = details; // eslint-disable-next-line @typescript-eslint/no-unused-vars var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function () { - var lib, userCli, useCustomCliPath, customCliPath, cliPath, doesCommandCreateOutputFile, outputFileBecomesWorkingFile, userOutputFilePath, cliArguments, cacheDir, fileName, cliArgs, availableCli, msg, cli, res, msg; + var lib, userCli, useCustomCliPath, customCliPath, cliPath, outputFileBecomesWorkingFile, userOutputFilePath, cliArguments, cacheDir, fileName, cliArgs, availableCli, msg, cli, res, msg; return __generator(this, function (_a) { switch (_a.label) { case 0: @@ -220,11 +225,7 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function useCustomCliPath = args.inputs.useCustomCliPath; customCliPath = String(args.inputs.customCliPath); cliPath = ''; - doesCommandCreateOutputFile = args.inputs.doesCommandCreateOutputFile; outputFileBecomesWorkingFile = args.inputs.outputFileBecomesWorkingFile; - if (!doesCommandCreateOutputFile) { - outputFileBecomesWorkingFile = false; - } userOutputFilePath = String(args.inputs.userOutputFilePath); cliArguments = String(args.inputs.cliArguments); // eslint-disable-next-line no-template-curly-in-string