@blogic-cz/agent-tools 0.8.0 → 0.8.1
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
|
@@ -121,11 +121,11 @@ function parseMemoryToMi(memory: string): number {
|
|
|
121
121
|
case "ti":
|
|
122
122
|
return Math.round(value * 1024 * 1024);
|
|
123
123
|
case "k":
|
|
124
|
-
return Math.round(value
|
|
124
|
+
return Math.round((value * 1000) / (1024 * 1024));
|
|
125
125
|
case "m":
|
|
126
|
-
return Math.round(value
|
|
126
|
+
return Math.round((value * 1_000_000) / (1024 * 1024));
|
|
127
127
|
case "g":
|
|
128
|
-
return Math.round(value / 1024);
|
|
128
|
+
return Math.round((value * 1_000_000_000) / (1024 * 1024));
|
|
129
129
|
default:
|
|
130
130
|
return Math.round(value);
|
|
131
131
|
}
|
|
@@ -478,9 +478,8 @@ export function transformGenericKubectl(
|
|
|
478
478
|
if (parsed && typeof parsed === "object") {
|
|
479
479
|
return parsed as Record<string, unknown>;
|
|
480
480
|
}
|
|
481
|
-
} catch
|
|
482
|
-
|
|
483
|
-
void ignored;
|
|
481
|
+
} catch {
|
|
482
|
+
// not JSON — fall through to table/text detection
|
|
484
483
|
}
|
|
485
484
|
}
|
|
486
485
|
|