@tui-sandbox/library 10.0.0 → 10.1.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/CHANGELOG.md +7 -0
- package/dist/browser/assets/{index-Dm7lp9YI.js → index-BmeFKAKi.js} +6 -6
- package/dist/browser/index.html +1 -1
- package/dist/src/browser/neovim-client.js +2 -1
- package/dist/src/browser/neovim-client.js.map +1 -1
- package/dist/src/client/neovim-terminal-client.js +3 -3
- package/dist/src/client/neovim-terminal-client.js.map +1 -1
- package/dist/src/client/terminal-terminal-client.js +2 -2
- package/dist/src/client/terminal-terminal-client.js.map +1 -1
- package/dist/src/server/cypress-support/contents.js +10 -0
- package/dist/src/server/cypress-support/contents.js.map +1 -1
- package/dist/src/server/server.d.ts +8 -0
- package/dist/src/server/server.js +3 -0
- package/dist/src/server/server.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/browser/neovim-client.ts +3 -1
- package/src/client/neovim-terminal-client.ts +3 -3
- package/src/client/terminal-terminal-client.ts +2 -2
- package/src/server/cypress-support/contents.ts +10 -0
- package/src/server/server.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tui-sandbox/library",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@catppuccin/palette": "1.7.1",
|
|
11
|
-
"@trpc/client": "11.0.
|
|
12
|
-
"@trpc/server": "11.0.
|
|
11
|
+
"@trpc/client": "11.0.1",
|
|
12
|
+
"@trpc/server": "11.0.1",
|
|
13
13
|
"@xterm/addon-attach": "0.11.0",
|
|
14
14
|
"@xterm/addon-fit": "0.10.0",
|
|
15
15
|
"@xterm/xterm": "5.5.0",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"node-pty": "1.0.0",
|
|
23
23
|
"prettier": "3.5.3",
|
|
24
24
|
"tsx": "4.19.3",
|
|
25
|
-
"type-fest": "4.
|
|
25
|
+
"type-fest": "4.38.0",
|
|
26
26
|
"winston": "3.17.0",
|
|
27
27
|
"zod": "3.24.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@runtyping/zod": "
|
|
30
|
+
"@runtyping/zod": "3.0.0",
|
|
31
31
|
"@types/command-exists": "1.2.3",
|
|
32
32
|
"@types/cors": "2.8.17",
|
|
33
|
-
"@types/express": "5.0.
|
|
34
|
-
"@types/node": "22.13.
|
|
33
|
+
"@types/express": "5.0.1",
|
|
34
|
+
"@types/node": "22.13.14",
|
|
35
35
|
"nodemon": "3.1.9",
|
|
36
|
-
"vite": "6.2.
|
|
37
|
-
"vitest": "3.0.
|
|
36
|
+
"vite": "6.2.3",
|
|
37
|
+
"vitest": "3.0.9"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"cypress": "^13 || ^14",
|
|
@@ -75,10 +75,12 @@ window.startTerminalApplication = async function (
|
|
|
75
75
|
): Promise<GenericTerminalBrowserApi> {
|
|
76
76
|
const terminal = terminalClient.get()
|
|
77
77
|
const testDirectory = await terminal.startTerminalApplication(args)
|
|
78
|
-
|
|
78
|
+
|
|
79
|
+
const terminalBrowserApi: GenericTerminalBrowserApi = {
|
|
79
80
|
dir: testDirectory,
|
|
80
81
|
runBlockingShellCommand(input) {
|
|
81
82
|
return terminal.runBlockingShellCommand(input)
|
|
82
83
|
},
|
|
83
84
|
}
|
|
85
|
+
return terminalBrowserApi
|
|
84
86
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createTRPCClient, httpBatchLink,
|
|
1
|
+
import { createTRPCClient, httpBatchLink, httpSubscriptionLink, splitLink } from "@trpc/client"
|
|
2
2
|
import type { Terminal } from "@xterm/xterm"
|
|
3
3
|
import "@xterm/xterm/css/xterm.css"
|
|
4
4
|
import type { BlockingCommandClientInput } from "../server/blockingCommandInputSchema.js"
|
|
@@ -26,7 +26,7 @@ export class NeovimTerminalClient {
|
|
|
26
26
|
links: [
|
|
27
27
|
splitLink({
|
|
28
28
|
condition: operation => operation.type === "subscription",
|
|
29
|
-
true:
|
|
29
|
+
true: httpSubscriptionLink({
|
|
30
30
|
url: "/trpc",
|
|
31
31
|
}),
|
|
32
32
|
false: httpBatchLink({
|
|
@@ -56,7 +56,7 @@ export class NeovimTerminalClient {
|
|
|
56
56
|
// time to complete
|
|
57
57
|
this.ready = new Promise<void>(resolve => {
|
|
58
58
|
console.log("Subscribing to stdout")
|
|
59
|
-
trpc.neovim.
|
|
59
|
+
trpc.neovim.initializeStdout.subscribe(
|
|
60
60
|
{ client: tabId },
|
|
61
61
|
{
|
|
62
62
|
onStarted() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createTRPCClient, httpBatchLink,
|
|
1
|
+
import { createTRPCClient, httpBatchLink, httpSubscriptionLink, splitLink } from "@trpc/client"
|
|
2
2
|
import type { Terminal } from "@xterm/xterm"
|
|
3
3
|
import "@xterm/xterm/css/xterm.css"
|
|
4
4
|
import type { BlockingCommandClientInput } from "../server/blockingCommandInputSchema.js"
|
|
@@ -21,7 +21,7 @@ export class TerminalTerminalClient {
|
|
|
21
21
|
links: [
|
|
22
22
|
splitLink({
|
|
23
23
|
condition: operation => operation.type === "subscription",
|
|
24
|
-
true:
|
|
24
|
+
true: httpSubscriptionLink({
|
|
25
25
|
url: "/trpc",
|
|
26
26
|
}),
|
|
27
27
|
false: httpBatchLink({
|
|
@@ -125,6 +125,12 @@ Cypress.Commands.add("startNeovim", (startArguments?: MyStartNeovimServerArgumen
|
|
|
125
125
|
})
|
|
126
126
|
})
|
|
127
127
|
|
|
128
|
+
Cypress.Commands.add("nvim_isRunning", () => {
|
|
129
|
+
return cy.window().then(async _ => {
|
|
130
|
+
return !!testNeovim
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
|
|
128
134
|
Cypress.Commands.add("startTerminalApplication", (args: StartTerminalGenericArguments) => {
|
|
129
135
|
cy.window().then(async win => {
|
|
130
136
|
const terminal: GenericTerminalBrowserApi = await win.startTerminalApplication(args)
|
|
@@ -189,6 +195,10 @@ declare global {
|
|
|
189
195
|
*/
|
|
190
196
|
nvim_runExCommand(input: ExCommandClientInput): Chainable<RunExCommandOutput>
|
|
191
197
|
|
|
198
|
+
/** Returns true if neovim is running. Useful to conditionally run
|
|
199
|
+
* afterEach actions based on whether it's running. */
|
|
200
|
+
nvim_isRunning(): Chainable<boolean>
|
|
201
|
+
|
|
192
202
|
terminal_runBlockingShellCommand(input: MyBlockingCommandClientInput): Chainable<BlockingShellCommandOutput>
|
|
193
203
|
}
|
|
194
204
|
}
|
package/src/server/server.ts
CHANGED
|
@@ -103,6 +103,10 @@ export async function createAppRouter(config: DirectoriesConfig) {
|
|
|
103
103
|
onStdout: trpc.procedure.input(z.object({ client: tabIdSchema })).subscription(options => {
|
|
104
104
|
return neovim.initializeStdout(options.input, options.signal, config.testEnvironmentPath)
|
|
105
105
|
}),
|
|
106
|
+
|
|
107
|
+
initializeStdout: trpc.procedure.input(z.object({ client: tabIdSchema })).subscription(options => {
|
|
108
|
+
return neovim.initializeStdout(options.input, options.signal, config.testEnvironmentPath)
|
|
109
|
+
}),
|
|
106
110
|
sendStdin: trpc.procedure.input(z.object({ tabId: tabIdSchema, data: z.string() })).mutation(options => {
|
|
107
111
|
return neovim.sendStdin(options.input)
|
|
108
112
|
}),
|