重构代码结构、数据传递方式,方便数据存取

This commit is contained in:
fofolee
2025-01-05 00:22:53 +08:00
parent dcaa00823b
commit 827c702e50
42 changed files with 2713 additions and 2143 deletions

View File

@@ -6,6 +6,7 @@ export function generateCode(commandFlow) {
const indent = hasAsyncFunction ? " " : "";
commandFlow.forEach((cmd) => {
if (!cmd.code) return;
let line = indent;
if (cmd.outputVariable) {
@@ -13,8 +14,7 @@ export function generateCode(commandFlow) {
}
let awaitCmd = cmd.isAsync ? "await " : "";
line += `${awaitCmd} ${cmd.argv}`;
line += `${awaitCmd} ${cmd.code}`;
code.push(line);
});