Skip to content

Commit ed6e06b

Browse files
gtsiolisjeanp413
authored andcommitted
Update prebuild and incremental prebuild emojis
1 parent 7349d1c commit ed6e06b

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

components/dashboard/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
"react-popper": "^2.3.0",
3030
"react-portal": "^4.2.2",
3131
"react-router-dom": "^5.2.0",
32-
"xterm": "^4.11.0",
33-
"xterm-addon-fit": "^0.5.0"
32+
"xterm": "^5.1.0",
33+
"xterm-addon-fit": "^0.7.0",
34+
"xterm-addon-canvas" : "^0.3.0"
3435
},
3536
"devDependencies": {
3637
"@craco/craco": "^6.1.2",

components/dashboard/src/components/WorkspaceLogs.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import EventEmitter from "events";
88
import { useContext, useEffect, useRef } from "react";
99
import { Terminal, ITerminalOptions, ITheme } from "xterm";
1010
import { FitAddon } from "xterm-addon-fit";
11+
import { CanvasAddon } from "xterm-addon-canvas";
1112
import "xterm/css/xterm.css";
1213
import { ThemeContext } from "../theme-context";
1314

@@ -30,6 +31,7 @@ export default function WorkspaceLogs(props: WorkspaceLogsProps) {
3031
const xTermParentRef = useRef<HTMLDivElement>(null);
3132
const terminalRef = useRef<Terminal>();
3233
const fitAddon = new FitAddon();
34+
const canvasAddon = new CanvasAddon();
3335
const { isDark } = useContext(ThemeContext);
3436

3537
useEffect(() => {
@@ -46,6 +48,7 @@ export default function WorkspaceLogs(props: WorkspaceLogsProps) {
4648
const terminal = new Terminal(options);
4749
terminalRef.current = terminal;
4850
terminal.loadAddon(fitAddon);
51+
terminal.loadAddon(canvasAddon);
4952
terminal.open(xTermParentRef.current);
5053
props.logsEmitter.on("logs", (logs) => {
5154
if (terminal && logs) {
@@ -82,7 +85,7 @@ export default function WorkspaceLogs(props: WorkspaceLogsProps) {
8285
if (!terminalRef.current) {
8386
return;
8487
}
85-
terminalRef.current.setOption("theme", isDark ? darkTheme : lightTheme);
88+
terminalRef.current.options.theme = isDark ? darkTheme : lightTheme;
8689
}, [terminalRef.current, isDark]);
8790

8891
return (

components/supervisor/pkg/supervisor/tasks.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ func (tm *tasksManager) watch(task *task, term *terminal.Term) {
498498
duration := ""
499499
if elapsed >= 1*time.Minute {
500500
elapsedInMinutes := strconv.Itoa(int(math.Round(elapsed.Minutes())))
501-
duration = "⏱ Well done on saving " + elapsedInMinutes + " minute"
501+
duration = "⏱ Well done on saving " + elapsedInMinutes + " minute"
502502
if elapsedInMinutes != "1" {
503503
duration += "s"
504504
}
@@ -526,7 +526,7 @@ func importParentLogAndGetDuration(fn string, out io.Writer) time.Duration {
526526
}
527527
defer file.Close()
528528

529-
defer out.Write([]byte("♻️ Re-running task as an incremental workspace prebuild\r\n\r\n"))
529+
defer out.Write([]byte("📦 Re-running task for incremental prebuild\r\n\r\n"))
530530

531531
scanner := bufio.NewScanner(file)
532532
for scanner.Scan() {
@@ -539,7 +539,7 @@ func importParentLogAndGetDuration(fn string, out io.Writer) time.Duration {
539539
if !scanner.Scan() {
540540
return 0
541541
}
542-
reg, err := regexp.Compile(`⏱ Well done on saving (\d+) minute`)
542+
reg, err := regexp.Compile(`⏱ Well done on saving (\d+) minute`)
543543
if err != nil {
544544
return 0
545545
}

yarn.lock

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19086,15 +19086,20 @@ xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1:
1908619086
resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz"
1908719087
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
1908819088

19089-
xterm-addon-fit@^0.5.0:
19090-
version "0.5.0"
19091-
resolved "https://registry.npmjs.org/xterm-addon-fit/-/xterm-addon-fit-0.5.0.tgz"
19092-
integrity sha512-DsS9fqhXHacEmsPxBJZvfj2la30Iz9xk+UKjhQgnYNkrUIN5CYLbw7WEfz117c7+S86S/tpHPfvNxJsF5/G8wQ==
19089+
xterm-addon-canvas@^0.3.0:
19090+
version "0.3.0"
19091+
resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.3.0.tgz#8cfb5a13297f4a31a12870c1119af2c139392b50"
19092+
integrity sha512-2deF4ev6T+NjgSM56H+jcAWz4k5viEoaBtuDEyfo5Qdh1r7HOvNzLC45HSeegdH38qmEcL9XIt0KXyOINpSFRA==
1909319093

19094-
xterm@^4.11.0:
19095-
version "4.14.1"
19096-
resolved "https://registry.npmjs.org/xterm/-/xterm-4.14.1.tgz"
19097-
integrity sha512-jgzNg5BuGPwq5/M4dGnmbghZvHx2jaj+9crSEt15bV34Za49VziBmCu7zIy88zUKKiGTxeo7aVzirFSJArIMFw==
19094+
xterm-addon-fit@^0.7.0:
19095+
version "0.7.0"
19096+
resolved "https://registry.yarnpkg.com/xterm-addon-fit/-/xterm-addon-fit-0.7.0.tgz#b8ade6d96e63b47443862088f6670b49fb752c6a"
19097+
integrity sha512-tQgHGoHqRTgeROPnvmtEJywLKoC/V9eNs4bLLz7iyJr1aW/QFzRwfd3MGiJ6odJd9xEfxcW36/xRU47JkD5NKQ==
19098+
19099+
xterm@^5.1.0:
19100+
version "5.1.0"
19101+
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.1.0.tgz#3e160d60e6801c864b55adf19171c49d2ff2b4fc"
19102+
integrity sha512-LovENH4WDzpwynj+OTkLyZgJPeDom9Gra4DMlGAgz6pZhIDCQ+YuO7yfwanY+gVbn/mmZIStNOnVRU/ikQuAEQ==
1909819103

1909919104
y18n@^3.2.1:
1910019105
version "3.2.2"

0 commit comments

Comments
 (0)