@travetto/terminal 8.0.0-alpha.3 → 8.0.0-alpha.5
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/style.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/terminal",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "General terminal support",
|
|
6
6
|
"keywords": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"directory": "module/terminal"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@travetto/runtime": "^8.0.0-alpha.
|
|
28
|
+
"@travetto/runtime": "^8.0.0-alpha.5",
|
|
29
29
|
"chalk": "^5.6.2"
|
|
30
30
|
},
|
|
31
31
|
"travetto": {
|
package/src/style.ts
CHANGED
|
@@ -143,6 +143,10 @@ export class StyleUtil {
|
|
|
143
143
|
|
|
144
144
|
/** Make a URL link */
|
|
145
145
|
static link(text: string, url: string): string {
|
|
146
|
-
|
|
146
|
+
if (!process.stdout.isTTY) {
|
|
147
|
+
return text;
|
|
148
|
+
} else {
|
|
149
|
+
return `${ESC}]8;;${url}${ESC}\\${text}${ESC}]8;;${ESC}\\`;
|
|
150
|
+
}
|
|
147
151
|
}
|
|
148
152
|
}
|