brsh 2.8.1 → 3.0.0
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/.github/workflows/release.yml +3 -1
- package/CHANGELOG.md +25 -0
- package/bin/brsh-shell.js +16 -131
- package/bin/exportFileSystem.js +4 -0
- package/bin/zsh-server.js +261 -0
- package/dist/brsh.css +1 -1
- package/dist/shell.es.js +783 -418
- package/dist/shell.es.js.map +1 -1
- package/dist/shell.min.js +30 -15
- package/dist/shell.min.js.map +1 -1
- package/dist/terminal.cjs.js +77 -100
- package/dist/terminal.cjs.js.map +1 -1
- package/dist/terminal.es.js +1382 -603
- package/dist/terminal.es.js.map +1 -1
- package/dist/terminal.min.js +77 -100
- package/dist/terminal.min.js.map +1 -1
- package/dist/wbt.es.js +266 -116
- package/dist/wbt.es.js.map +1 -1
- package/dist/wbt.min.js +7 -5
- package/dist/wbt.min.js.map +1 -1
- package/index.js +472 -0
- package/lib/Command.js +30 -0
- package/lib/InteractiveCommand.js +28 -0
- package/lib/ReplCommand.js +15 -0
- package/lib/Terminal.js +769 -510
- package/lib/TtyStream.js +181 -0
- package/lib/builtins/cat.js +2 -2
- package/lib/builtins/grep.js +2 -2
- package/lib/local/clear.js +3 -0
- package/lib/terminal/DomRenderer.js +325 -0
- package/lib/terminal/PtyBridge.js +169 -0
- package/lib/terminal/ScreenBuffer.js +594 -0
- package/lib/terminal/VtParser.js +728 -0
- package/package.json +4 -2
- package/styles/terminal.css +33 -4
- package/test/terminal.test.js +762 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brsh",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "A unix like shell written in javascript",
|
|
5
5
|
"main": "./dist/shell.min.js",
|
|
6
6
|
"module": "./dist/shell.es.js",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"build:wbt": "vite build --config vite.config.wbt.js",
|
|
36
36
|
"shell": "node bin/brsh-shell.js",
|
|
37
37
|
"demo:shell": "node bin/brsh-shell.js --demo",
|
|
38
|
+
"demo:zsh": "npm run build:terminal && node bin/zsh-server.js",
|
|
38
39
|
"pretest": "npm run build",
|
|
39
40
|
"test": "vitest run",
|
|
40
41
|
"test:watch": "vitest",
|
|
@@ -57,11 +58,12 @@
|
|
|
57
58
|
"vitest": "^4.1.5"
|
|
58
59
|
},
|
|
59
60
|
"dependencies": {
|
|
60
|
-
"ansi_up": "git+https://github.com/eliotstocker/ansi_up.git",
|
|
61
61
|
"ansi-colors": "^4.1.3",
|
|
62
62
|
"command-line-args": "^6.0.1",
|
|
63
|
+
"esbuild": "^0.28.2",
|
|
63
64
|
"esbuild-plugin-polyfill-node": "^0.3.0",
|
|
64
65
|
"string.prototype.matchall": "^4.0.12",
|
|
66
|
+
"supports-color": "^7.2.0",
|
|
65
67
|
"through2": "^4.0.2",
|
|
66
68
|
"tmp": "^0.2.5"
|
|
67
69
|
}
|
package/styles/terminal.css
CHANGED
|
@@ -22,15 +22,33 @@
|
|
|
22
22
|
line-height: 1.15em;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
.terminal__cursor.block,
|
|
25
26
|
.terminal__cursor.blink {
|
|
26
|
-
|
|
27
|
+
background-color: currentColor;
|
|
28
|
+
-webkit-text-fill-color: rgb(from currentColor calc(255 - r) calc(255 - g) calc(255 - b));
|
|
29
|
+
color: rgb(from currentColor calc(255 - r) calc(255 - g) calc(255 - b));
|
|
27
30
|
}
|
|
28
31
|
|
|
29
|
-
.terminal__cursor.
|
|
32
|
+
.terminal__cursor.blink {
|
|
33
|
+
animation: 1s blink step-end infinite;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.terminal__inverse {
|
|
30
37
|
background-color: currentColor;
|
|
38
|
+
-webkit-text-fill-color: rgb(from currentColor calc(255 - r) calc(255 - g) calc(255 - b));
|
|
31
39
|
color: rgb(from currentColor calc(255 - r) calc(255 - g) calc(255 - b));
|
|
32
40
|
}
|
|
33
41
|
|
|
42
|
+
.terminal__blink {
|
|
43
|
+
animation: 1s blink-text step-end infinite;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.terminal__link {
|
|
47
|
+
color: inherit;
|
|
48
|
+
text-decoration: underline;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
|
|
34
52
|
.terminal__line {
|
|
35
53
|
white-space: pre;
|
|
36
54
|
overflow: hidden;
|
|
@@ -45,13 +63,24 @@
|
|
|
45
63
|
}
|
|
46
64
|
|
|
47
65
|
@keyframes blink {
|
|
48
|
-
from,
|
|
66
|
+
from, 49.9% {
|
|
49
67
|
background-color: currentColor;
|
|
50
68
|
-webkit-text-fill-color: rgb(from currentColor calc(255 - r) calc(255 - g) calc(255 - b));
|
|
69
|
+
color: rgb(from currentColor calc(255 - r) calc(255 - g) calc(255 - b));
|
|
51
70
|
}
|
|
52
|
-
50
|
|
71
|
+
50%, to {
|
|
53
72
|
background-color: transparent;
|
|
54
73
|
-webkit-text-fill-color: unset;
|
|
74
|
+
color: inherit;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@keyframes blink-text {
|
|
79
|
+
from, 49.9% {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
}
|
|
82
|
+
50%, to {
|
|
83
|
+
opacity: 0;
|
|
55
84
|
}
|
|
56
85
|
}
|
|
57
86
|
|