@tui-sandbox/library 8.0.2 → 9.0.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/CHANGELOG.md +18 -0
- package/dist/browser/assets/{index-_30KjjEK.js → index-DroaKLT0.js} +7 -7
- package/dist/browser/index.html +1 -1
- package/dist/src/server/connection/trpc.d.ts +6 -14
- package/dist/src/server/dirtree/index.d.ts +0 -2
- package/dist/src/server/dirtree/index.js +0 -2
- package/dist/src/server/dirtree/index.test.js +13 -84
- package/dist/src/server/neovim/environment/createTempDir.test.js +3 -2
- package/dist/src/server/neovim/index.js +6 -1
- package/dist/src/server/server.d.ts +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/server/dirtree/index.test.ts +13 -84
- package/src/server/dirtree/index.ts +0 -4
- package/src/server/neovim/NeovimApplication.ts +4 -5
- package/src/server/neovim/environment/createTempDir.test.ts +3 -2
- package/src/server/neovim/index.ts +6 -1
package/dist/browser/index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<title>tui-sandbox integration tests</title>
|
|
6
|
-
<script type="module" crossorigin src="/assets/index-
|
|
6
|
+
<script type="module" crossorigin src="/assets/index-DroaKLT0.js"></script>
|
|
7
7
|
<link rel="stylesheet" crossorigin href="/assets/index-D6fBrqAi.css">
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
@@ -7,20 +7,12 @@ export declare const trpc: {
|
|
|
7
7
|
}>;
|
|
8
8
|
procedure: import("@trpc/server/unstable-core-do-not-import").ProcedureBuilder<object, object, object, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, false>;
|
|
9
9
|
middleware: <$ContextOverrides>(fn: import("@trpc/server/unstable-core-do-not-import").MiddlewareFunction<object, object, object, $ContextOverrides, unknown>) => import("@trpc/server/unstable-core-do-not-import").MiddlewareBuilder<object, object, $ContextOverrides, unknown>;
|
|
10
|
-
router: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}, TInput>;
|
|
17
|
-
<TInput extends import("@trpc/server/unstable-core-do-not-import").CreateRouterOptions>(input: TInput): import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
18
|
-
ctx: object;
|
|
19
|
-
meta: object;
|
|
20
|
-
errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
|
|
21
|
-
transformer: false;
|
|
22
|
-
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<TInput>>;
|
|
23
|
-
};
|
|
10
|
+
router: <TInput extends import("@trpc/server/unstable-core-do-not-import").CreateRouterOptions>(input: TInput) => import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
11
|
+
ctx: object;
|
|
12
|
+
meta: object;
|
|
13
|
+
errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
|
|
14
|
+
transformer: false;
|
|
15
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<TInput>>;
|
|
24
16
|
mergeRouters: typeof import("@trpc/server/unstable-core-do-not-import").mergeRouters;
|
|
25
17
|
createCallerFactory: <TRecord extends import("@trpc/server").RouterRecord>(router: Pick<import("@trpc/server/unstable-core-do-not-import").Router<{
|
|
26
18
|
ctx: object;
|
|
@@ -36,28 +36,13 @@ describe("dirtree", () => {
|
|
|
36
36
|
name: z.literal(".config/"),
|
|
37
37
|
type: z.literal("directory"),
|
|
38
38
|
contents: z.object({
|
|
39
|
-
".gitkeep": z.object({
|
|
40
|
-
name: z.literal(".gitkeep"),
|
|
41
|
-
type: z.literal("file"),
|
|
42
|
-
extension: z.literal(""),
|
|
43
|
-
stem: z.literal(".gitkeep"),
|
|
44
|
-
}),
|
|
39
|
+
".gitkeep": z.object({ name: z.literal(".gitkeep"), type: z.literal("file") }),
|
|
45
40
|
nvim: z.object({
|
|
46
41
|
name: z.literal("nvim/"),
|
|
47
42
|
type: z.literal("directory"),
|
|
48
43
|
contents: z.object({
|
|
49
|
-
"init.lua": z.object({
|
|
50
|
-
|
|
51
|
-
type: z.literal("file"),
|
|
52
|
-
extension: z.literal("lua"),
|
|
53
|
-
stem: z.literal("init."),
|
|
54
|
-
}),
|
|
55
|
-
"prepare.lua": z.object({
|
|
56
|
-
name: z.literal("prepare.lua"),
|
|
57
|
-
type: z.literal("file"),
|
|
58
|
-
extension: z.literal("lua"),
|
|
59
|
-
stem: z.literal("prepare."),
|
|
60
|
-
}),
|
|
44
|
+
"init.lua": z.object({ name: z.literal("init.lua"), type: z.literal("file") }),
|
|
45
|
+
"prepare.lua": z.object({ name: z.literal("prepare.lua"), type: z.literal("file") }),
|
|
61
46
|
}),
|
|
62
47
|
}),
|
|
63
48
|
}),
|
|
@@ -69,14 +54,10 @@ describe("dirtree", () => {
|
|
|
69
54
|
"add_command_to_count_open_buffers.lua": z.object({
|
|
70
55
|
name: z.literal("add_command_to_count_open_buffers.lua"),
|
|
71
56
|
type: z.literal("file"),
|
|
72
|
-
extension: z.literal("lua"),
|
|
73
|
-
stem: z.literal("add_command_to_count_open_buffers."),
|
|
74
57
|
}),
|
|
75
58
|
"don't_crash_when_modification_contains_unescaped_characters\\".lua": z.object({
|
|
76
59
|
name: z.literal("don't_crash_when_modification_contains_unescaped_characters\\".lua"),
|
|
77
60
|
type: z.literal("file"),
|
|
78
|
-
extension: z.literal("lua"),
|
|
79
|
-
stem: z.literal("don't_crash_when_modification_contains_unescaped_characters\\"."),
|
|
80
61
|
}),
|
|
81
62
|
}),
|
|
82
63
|
}),
|
|
@@ -84,60 +65,25 @@ describe("dirtree", () => {
|
|
|
84
65
|
name: z.literal("dir with spaces/"),
|
|
85
66
|
type: z.literal("directory"),
|
|
86
67
|
contents: z.object({
|
|
87
|
-
"file1.txt": z.object({
|
|
88
|
-
|
|
89
|
-
type: z.literal("file"),
|
|
90
|
-
extension: z.literal("txt"),
|
|
91
|
-
stem: z.literal("file1."),
|
|
92
|
-
}),
|
|
93
|
-
"file2.txt": z.object({
|
|
94
|
-
name: z.literal("file2.txt"),
|
|
95
|
-
type: z.literal("file"),
|
|
96
|
-
extension: z.literal("txt"),
|
|
97
|
-
stem: z.literal("file2."),
|
|
98
|
-
}),
|
|
68
|
+
"file1.txt": z.object({ name: z.literal("file1.txt"), type: z.literal("file") }),
|
|
69
|
+
"file2.txt": z.object({ name: z.literal("file2.txt"), type: z.literal("file") }),
|
|
99
70
|
}),
|
|
100
71
|
}),
|
|
101
|
-
"file.txt": z.object({
|
|
102
|
-
|
|
103
|
-
type: z.literal("file"),
|
|
104
|
-
extension: z.literal("txt"),
|
|
105
|
-
stem: z.literal("file."),
|
|
106
|
-
}),
|
|
107
|
-
"initial-file.txt": z.object({
|
|
108
|
-
name: z.literal("initial-file.txt"),
|
|
109
|
-
type: z.literal("file"),
|
|
110
|
-
extension: z.literal("txt"),
|
|
111
|
-
stem: z.literal("initial-file."),
|
|
112
|
-
}),
|
|
72
|
+
"file.txt": z.object({ name: z.literal("file.txt"), type: z.literal("file") }),
|
|
73
|
+
"initial-file.txt": z.object({ name: z.literal("initial-file.txt"), type: z.literal("file") }),
|
|
113
74
|
"lua-project": z.object({
|
|
114
75
|
name: z.literal("lua-project/"),
|
|
115
76
|
type: z.literal("directory"),
|
|
116
77
|
contents: z.object({
|
|
117
|
-
"config.lua": z.object({
|
|
118
|
-
|
|
119
|
-
type: z.literal("file"),
|
|
120
|
-
extension: z.literal("lua"),
|
|
121
|
-
stem: z.literal("config."),
|
|
122
|
-
}),
|
|
123
|
-
"init.lua": z.object({
|
|
124
|
-
name: z.literal("init.lua"),
|
|
125
|
-
type: z.literal("file"),
|
|
126
|
-
extension: z.literal("lua"),
|
|
127
|
-
stem: z.literal("init."),
|
|
128
|
-
}),
|
|
78
|
+
"config.lua": z.object({ name: z.literal("config.lua"), type: z.literal("file") }),
|
|
79
|
+
"init.lua": z.object({ name: z.literal("init.lua"), type: z.literal("file") }),
|
|
129
80
|
}),
|
|
130
81
|
}),
|
|
131
82
|
"other-subdirectory": z.object({
|
|
132
83
|
name: z.literal("other-subdirectory/"),
|
|
133
84
|
type: z.literal("directory"),
|
|
134
85
|
contents: z.object({
|
|
135
|
-
"other-sub-file.txt": z.object({
|
|
136
|
-
name: z.literal("other-sub-file.txt"),
|
|
137
|
-
type: z.literal("file"),
|
|
138
|
-
extension: z.literal("txt"),
|
|
139
|
-
stem: z.literal("other-sub-file."),
|
|
140
|
-
}),
|
|
86
|
+
"other-sub-file.txt": z.object({ name: z.literal("other-sub-file.txt"), type: z.literal("file") }),
|
|
141
87
|
}),
|
|
142
88
|
}),
|
|
143
89
|
routes: z.object({
|
|
@@ -148,23 +94,11 @@ describe("dirtree", () => {
|
|
|
148
94
|
name: z.literal("posts.$postId/"),
|
|
149
95
|
type: z.literal("directory"),
|
|
150
96
|
contents: z.object({
|
|
151
|
-
"adjacent-file.txt": z.object({
|
|
152
|
-
|
|
153
|
-
type: z.literal("file"),
|
|
154
|
-
extension: z.literal("txt"),
|
|
155
|
-
stem: z.literal("adjacent-file."),
|
|
156
|
-
}),
|
|
157
|
-
"route.tsx": z.object({
|
|
158
|
-
name: z.literal("route.tsx"),
|
|
159
|
-
type: z.literal("file"),
|
|
160
|
-
extension: z.literal("tsx"),
|
|
161
|
-
stem: z.literal("route."),
|
|
162
|
-
}),
|
|
97
|
+
"adjacent-file.txt": z.object({ name: z.literal("adjacent-file.txt"), type: z.literal("file") }),
|
|
98
|
+
"route.tsx": z.object({ name: z.literal("route.tsx"), type: z.literal("file") }),
|
|
163
99
|
"should-be-excluded-file.txt": z.object({
|
|
164
100
|
name: z.literal("should-be-excluded-file.txt"),
|
|
165
101
|
type: z.literal("file"),
|
|
166
|
-
extension: z.literal("txt"),
|
|
167
|
-
stem: z.literal("should-be-excluded-file."),
|
|
168
102
|
}),
|
|
169
103
|
}),
|
|
170
104
|
}),
|
|
@@ -174,12 +108,7 @@ describe("dirtree", () => {
|
|
|
174
108
|
name: z.literal("subdirectory/"),
|
|
175
109
|
type: z.literal("directory"),
|
|
176
110
|
contents: z.object({
|
|
177
|
-
"subdirectory-file.txt": z.object({
|
|
178
|
-
name: z.literal("subdirectory-file.txt"),
|
|
179
|
-
type: z.literal("file"),
|
|
180
|
-
extension: z.literal("txt"),
|
|
181
|
-
stem: z.literal("subdirectory-file."),
|
|
182
|
-
}),
|
|
111
|
+
"subdirectory-file.txt": z.object({ name: z.literal("subdirectory-file.txt"), type: z.literal("file") }),
|
|
183
112
|
}),
|
|
184
113
|
}),
|
|
185
114
|
}),
|
|
@@ -50,7 +50,7 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
|
|
|
50
50
|
var e = new Error(message);
|
|
51
51
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
52
|
});
|
|
53
|
-
import fs
|
|
53
|
+
import fs from "fs";
|
|
54
54
|
import nodePath from "path";
|
|
55
55
|
import { expect, it } from "vitest";
|
|
56
56
|
import { createTempDir } from "./createTempDir.js";
|
|
@@ -65,7 +65,8 @@ class TempDirectory {
|
|
|
65
65
|
return new TempDirectory(tmp);
|
|
66
66
|
}
|
|
67
67
|
[Symbol.dispose]() {
|
|
68
|
-
|
|
68
|
+
// eslint-disable-next-line no-empty-function
|
|
69
|
+
fs.rm(this.path, { recursive: true }, () => { });
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
it("should create a temp dir with no contents", async () => {
|
|
@@ -78,11 +78,16 @@ export async function installDependencies(testEnvironmentPath, config) {
|
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
console.log(`🚀 Running Neovim prepareFilePath ${prepareFilePath}...`);
|
|
81
|
+
let output = "";
|
|
81
82
|
app.events.on("stdout", data => {
|
|
82
|
-
|
|
83
|
+
assert(data);
|
|
84
|
+
assert(typeof data === "string");
|
|
85
|
+
output += data;
|
|
83
86
|
});
|
|
84
87
|
await app.startNextAndKillCurrent(testDirectory, { filename: "empty.txt", headlessCmd: `lua dofile("${prepareFilePath}")` }, { cols: 80, rows: 24 });
|
|
85
88
|
await app.application.untilExit();
|
|
89
|
+
console.log(`🚀 Neovim installDependencies output:`);
|
|
90
|
+
console.log(output);
|
|
86
91
|
}
|
|
87
92
|
catch (e_1) {
|
|
88
93
|
env_1.error = e_1;
|
|
@@ -103,7 +103,7 @@ export declare function createAppRouter(config: DirectoriesConfig): Promise<impo
|
|
|
103
103
|
meta: object;
|
|
104
104
|
errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
|
|
105
105
|
transformer: false;
|
|
106
|
-
}, {
|
|
106
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<{
|
|
107
107
|
start: import("@trpc/server").TRPCMutationProcedure<{
|
|
108
108
|
input: {
|
|
109
109
|
tabId: {
|
|
@@ -174,7 +174,7 @@ export declare function createAppRouter(config: DirectoriesConfig): Promise<impo
|
|
|
174
174
|
};
|
|
175
175
|
output: import("./types.js").RunExCommandOutput;
|
|
176
176
|
}>;
|
|
177
|
-
}
|
|
177
|
+
}>>;
|
|
178
178
|
}>>>;
|
|
179
179
|
export type AppRouter = Awaited<ReturnType<typeof createAppRouter>>;
|
|
180
180
|
export type RouterInput = inferRouterInputs<AppRouter>;
|