lazy-js-utils
Advanced tools
Comparing version
@@ -51,3 +51,3 @@ import { I as IShellMessage, P as PkgTool, N as NodeWorkerPayload } from '../types-a148dfb7.js'; | ||
args?: string[]; | ||
stdio?: StdioOptions; | ||
stdio?: StdioOptions | undefined; | ||
errorExit?: boolean; | ||
@@ -54,0 +54,0 @@ isLog?: boolean; |
@@ -56,5 +56,5 @@ "use strict"; | ||
// src/node/jsShell.ts | ||
function jsShell(commander, options = "inherit") { | ||
function jsShell(commander, options) { | ||
let args = []; | ||
let stdio = "inherit"; | ||
let stdio; | ||
let errorExit = true; | ||
@@ -66,5 +66,5 @@ let isLog = false; | ||
stdio = options; | ||
} else { | ||
} else if (options) { | ||
args = options.args ?? []; | ||
stdio = options.stdio ?? "inherit"; | ||
stdio = options.stdio; | ||
errorExit = options.errorExit ?? true; | ||
@@ -81,3 +81,3 @@ isLog = options.isLog ?? false; | ||
encoding: "utf8", | ||
stdio: stdio === "inherit" ? "inherit" : ["inherit", "pipe", "inherit"], | ||
stdio, | ||
cwd, | ||
@@ -84,0 +84,0 @@ ..._options |
@@ -43,5 +43,5 @@ "use strict"; | ||
var import_node_process2 = __toESM(require("process")); | ||
function jsShell(commander, options = "inherit") { | ||
function jsShell(commander, options) { | ||
let args = []; | ||
let stdio = "inherit"; | ||
let stdio; | ||
let errorExit = true; | ||
@@ -53,5 +53,5 @@ let isLog = false; | ||
stdio = options; | ||
} else { | ||
} else if (options) { | ||
args = options.args ?? []; | ||
stdio = options.stdio ?? "inherit"; | ||
stdio = options.stdio; | ||
errorExit = options.errorExit ?? true; | ||
@@ -68,3 +68,3 @@ isLog = options.isLog ?? false; | ||
encoding: "utf8", | ||
stdio: stdio === "inherit" ? "inherit" : ["inherit", "pipe", "inherit"], | ||
stdio, | ||
cwd, | ||
@@ -71,0 +71,0 @@ ..._options |
{ | ||
"name": "lazy-js-utils", | ||
"version": "0.1.22", | ||
"version": "0.1.23", | ||
"description": "A collection of lazy-loaded JavaScript utilities for efficient development", | ||
@@ -51,3 +51,3 @@ "author": "Simon He", | ||
"spark-md5": "^3.0.2", | ||
"lazy-js-utils": "^0.1.22" | ||
"lazy-js-utils": "^0.1.23" | ||
}, | ||
@@ -54,0 +54,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
474567
-0.11%Updated