@f5-sales-demo/pi-utils 19.51.2 → 19.51.4
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 +2 -2
- package/src/color.ts +1 -1
- package/src/env.ts +1 -1
- package/src/format.ts +1 -1
- package/src/fs-error.ts +1 -1
- package/src/i18n.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/pi-utils",
|
|
4
|
-
"version": "19.51.
|
|
4
|
+
"version": "19.51.4",
|
|
5
5
|
"description": "Shared utilities for pi packages",
|
|
6
6
|
"homepage": "https://github.com/f5-sales-demo/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/bun": "^1.3",
|
|
42
|
-
"@f5-sales-demo/pi-natives": "
|
|
42
|
+
"@f5-sales-demo/pi-natives": "19.51.4"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"bun": ">=1.3.7"
|
package/src/color.ts
CHANGED
package/src/env.ts
CHANGED
|
@@ -62,7 +62,7 @@ for (const file of [projectEnv, agentEnv, piEnv, homeEnv]) {
|
|
|
62
62
|
/**
|
|
63
63
|
* Intentional re-export of Bun.env.
|
|
64
64
|
*
|
|
65
|
-
* All users should import this env module (import { $env } from "@
|
|
65
|
+
* All users should import this env module (import { $env } from "@f5-sales-demo/pi-utils")
|
|
66
66
|
* before using environment variables. This ensures that .env files have been loaded and
|
|
67
67
|
* overrides (project, home) have been applied, so $env always reflects the correct values.
|
|
68
68
|
*/
|
package/src/format.ts
CHANGED
|
@@ -53,7 +53,7 @@ export function formatBytes(bytes: number): string {
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Truncate a string to maxLen characters, appending an ellipsis if truncated.
|
|
56
|
-
* For display-width-aware truncation (terminals), use truncateToWidth from @
|
|
56
|
+
* For display-width-aware truncation (terminals), use truncateToWidth from @f5-sales-demo/pi-tui.
|
|
57
57
|
*/
|
|
58
58
|
export function truncate(str: string, maxLen: number, ellipsis = "…"): string {
|
|
59
59
|
if (str.length <= maxLen) return str;
|
package/src/fs-error.ts
CHANGED
package/src/i18n.ts
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
LOCALE_DISPLAY_NAMES,
|
|
4
4
|
mapToSupportedLocale,
|
|
5
5
|
normalizeLocale,
|
|
6
|
-
} from "@
|
|
6
|
+
} from "@f5-sales-demo/i18n-core";
|
|
7
7
|
import { $pickenv } from "./env";
|
|
8
8
|
|
|
9
9
|
export { getLocaleDisplayName, LOCALE_DISPLAY_NAMES, mapToSupportedLocale };
|