@catladder/cli 0.0.0-fix-handle-missing-cloud-sql-proxy-command-error-and-show-nice-17045900 → 0.0.0-fix-handle-missing-cloud-sql-proxy-command-error-and-show-nice-c702221a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  }
54
54
  ],
55
55
  "license": "MIT",
56
- "version": "0.0.0-fix-handle-missing-cloud-sql-proxy-command-error-and-show-nice-17045900",
56
+ "version": "0.0.0-fix-handle-missing-cloud-sql-proxy-command-error-and-show-nice-c702221a",
57
57
  "scripts": {
58
58
  "lint": "eslint \"src/**/*.ts\"",
59
59
  "lint:fix": "eslint \"src/**/*.ts\" --fix",
package/src/utils/log.ts CHANGED
@@ -48,13 +48,8 @@ export function logLines(
48
48
  cmd: LoggerCmdInstance = console,
49
49
  ...lines: LinesArg[]
50
50
  ) {
51
- const logger = cmd ?? console;
52
- for (const line of lines.flat()) {
53
- if (line === null || line === undefined) {
54
- logger.log("");
55
- } else {
56
- logger.log(line);
57
- }
51
+ for (const line of lines.flat().map((line) => line || "")) {
52
+ (cmd ?? console).log(line);
58
53
  }
59
54
  }
60
55
 
@@ -102,7 +97,7 @@ export const logWarning = (
102
97
  message: string,
103
98
  ...additionalMessages: LinesArg[]
104
99
  ) => {
105
- logLines(cmd, `[WARNING] ⚠️: ${message}`);
100
+ logLines(cmd, `[WARNING] ⚠️ : ${message}`);
106
101
  if (additionalMessages?.length) {
107
102
  logLines(cmd, ...additionalMessages.flat(), null);
108
103
  }