@tui-sandbox/library 12.4.1 → 12.5.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/dist/src/client/drawTextBox.js +7 -6
- package/dist/src/client/drawTextBox.js.map +1 -1
- package/dist/src/client/drawTextBox.test.js +41 -0
- package/dist/src/client/drawTextBox.test.js.map +1 -1
- package/dist/src/client/extractTerminalContent.d.ts +2 -0
- package/dist/src/client/extractTerminalContent.js +11 -0
- package/dist/src/client/extractTerminalContent.js.map +1 -0
- package/dist/src/client/extractTerminalContent.test.d.ts +1 -0
- package/dist/src/client/extractTerminalContent.test.js +29 -0
- package/dist/src/client/extractTerminalContent.test.js.map +1 -0
- package/dist/src/client/index.d.ts +2 -0
- package/dist/src/client/index.js +2 -0
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/visualWidth.d.ts +1 -0
- package/dist/src/client/visualWidth.js +3 -0
- package/dist/src/client/visualWidth.js.map +1 -0
- package/dist/src/scripts/resolveTuiConfig.js +1 -1
- package/dist/src/scripts/resolveTuiConfig.js.map +1 -1
- package/dist/src/server/server.d.ts +0 -2
- package/dist/src/server/server.js.map +1 -1
- package/dist/src/server/updateTestdirectorySchemaFile.d.ts +0 -9
- package/dist/src/server/updateTestdirectorySchemaFile.js.map +1 -1
- package/dist/src/server/utilities/DisposableSingleApplication.test.js +2 -3
- package/dist/src/server/utilities/DisposableSingleApplication.test.js.map +1 -1
- package/dist/src/server/utilities/TerminalApplication.d.ts +0 -1
- package/dist/src/server/utilities/TerminalApplication.js +9 -12
- package/dist/src/server/utilities/TerminalApplication.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/server/cypress-support/tui-sandbox-template.ts +3 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tui-sandbox/library",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.5.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/mikavilpas/tui-sandbox"
|
|
@@ -52,7 +52,8 @@
|
|
|
52
52
|
"dree": "5.1.5",
|
|
53
53
|
"express": "5.2.1",
|
|
54
54
|
"neovim": "5.4.0",
|
|
55
|
-
"prettier": "3.8.
|
|
55
|
+
"prettier": "3.8.3",
|
|
56
|
+
"string-width": "8.2.0",
|
|
56
57
|
"tsx": "4.21.0",
|
|
57
58
|
"winston": "3.19.0",
|
|
58
59
|
"zigpty": "0.1.6",
|
|
@@ -60,15 +61,14 @@
|
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@arethetypeswrong/cli": "0.18.2",
|
|
63
|
-
"@types/command-exists": "1.2.3",
|
|
64
64
|
"@types/cors": "2.8.19",
|
|
65
65
|
"@types/express": "5.0.6",
|
|
66
66
|
"@types/node": "24.12.2",
|
|
67
|
-
"cypress": "15.
|
|
67
|
+
"cypress": "15.14.1",
|
|
68
68
|
"nodemon": "3.1.14",
|
|
69
|
-
"type-fest": "5.
|
|
70
|
-
"vite": "8.0.
|
|
71
|
-
"vitest": "4.1.
|
|
69
|
+
"type-fest": "5.6.0",
|
|
70
|
+
"vite": "8.0.10",
|
|
71
|
+
"vitest": "4.1.5"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"cypress": "^13 || ^14 || ^15",
|
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
GenericTerminalBrowserApi,
|
|
9
9
|
} from "@tui-sandbox/library/browser/neovim-client.js"
|
|
10
10
|
import type { MyNeovimConfigModification } from "@tui-sandbox/library/client"
|
|
11
|
-
import { drawTextBox } from "@tui-sandbox/library/client"
|
|
11
|
+
import { drawTextBox, extractTerminalContent } from "@tui-sandbox/library/client"
|
|
12
12
|
import type {
|
|
13
13
|
AllKeys,
|
|
14
14
|
BlockingCommandClientInput,
|
|
@@ -308,19 +308,8 @@ afterEach(function () {
|
|
|
308
308
|
/** Read the current terminal content from the xterm.js DOM. */
|
|
309
309
|
function getTerminalContent(): string | undefined {
|
|
310
310
|
const rows = Cypress.$("div.xterm-rows > div")
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
const lines: string[] = []
|
|
314
|
-
rows.each((_, row) => {
|
|
315
|
-
lines.push(Cypress.$(row).text())
|
|
316
|
-
})
|
|
317
|
-
|
|
318
|
-
// Trim trailing empty lines for readability
|
|
319
|
-
while (lines.length > 0 && lines[lines.length - 1]?.trim() === "") {
|
|
320
|
-
lines.pop()
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
return lines.length > 0 ? lines.join("\n") : undefined
|
|
311
|
+
const rowTexts = rows.toArray().map(row => Cypress.$(row).text())
|
|
312
|
+
return extractTerminalContent(rowTexts)
|
|
324
313
|
}
|
|
325
314
|
|
|
326
315
|
// On test failure in headless mode (cypress run / CI), append the terminal
|