(expression)
| 66753 | if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) { |
| 66754 | return arg; |
| 66755 | } |
| 66756 | return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`; |
| 66757 | }; |
| 66758 | var joinCommand = (file, args) => normalizeArgs(file, args).join(" "); |
| 66759 | var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" "); |
| 66760 | var SPACES_REGEXP = / +/g; |
| 66761 | var parseExpression = (expression) => { |
| 66762 | const typeOfExpression = typeof expression; |
| 66763 | if (typeOfExpression === "string") { |
| 66764 | return expression; |
| 66765 | } |
| 66766 | if (typeOfExpression === "number") { |
| 66767 | return String(expression); |
| 66768 | } |
| 66769 | if (typeOfExpression === "object" && expression !== null && !(expression instanceof import_node_child_process2.ChildProcess) && "stdout" in expression) { |
| 66770 | const typeOfStdout = typeof expression.stdout; |
| 66771 | if (typeOfStdout === "string") { |
| 66772 | return expression.stdout; |
| 66773 | } |
| 66774 | if (import_node_buffer.Buffer.isBuffer(expression.stdout)) { |
| 66775 | return expression.stdout.toString(); |
| 66776 | } |
| 66777 | throw new TypeError(`Unexpected "${typeOfStdout}" stdout in template expression`); |
no test coverage detected
searching dependent graphs…