@tui-sandbox/library 11.7.0 → 11.7.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 +7 -0
- package/dist/src/scripts/commands/commandTuiStart.js +13 -8
- package/dist/src/scripts/commands/commandTuiStart.js.map +1 -1
- package/dist/src/scripts/tui.js +4 -3
- package/dist/src/scripts/tui.js.map +1 -1
- package/dist/src/server/updateTestdirectorySchemaFile.js +1 -1
- package/dist/src/server/updateTestdirectorySchemaFile.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/scripts/commands/commandTuiStart.ts +14 -8
- package/src/scripts/tui.ts +5 -4
- package/src/server/updateTestdirectorySchemaFile.ts +1 -1
package/package.json
CHANGED
|
@@ -6,25 +6,31 @@ import { updateTestdirectorySchemaFile } from "../../server/updateTestdirectoryS
|
|
|
6
6
|
import { cwd } from "../tui.js"
|
|
7
7
|
|
|
8
8
|
export async function commandTuiStart(config: TestServerConfig): Promise<void> {
|
|
9
|
+
await Promise.allSettled([updateSchemaFile(config), createSupportFile()])
|
|
10
|
+
|
|
9
11
|
try {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
supportFileName: "tui-sandbox.ts",
|
|
13
|
-
})
|
|
12
|
+
console.log(`🚀 Starting test server in ${cwd} - this should be the root of your integration-tests directory 🤞🏻`)
|
|
13
|
+
await startTestServer(config)
|
|
14
14
|
} catch (e) {
|
|
15
|
-
console.error("Failed to
|
|
15
|
+
console.error("Failed to startTestServer", e)
|
|
16
16
|
}
|
|
17
|
+
}
|
|
17
18
|
|
|
19
|
+
async function updateSchemaFile(config: TestServerConfig): Promise<void> {
|
|
18
20
|
try {
|
|
19
21
|
await updateTestdirectorySchemaFile(config.directories)
|
|
20
22
|
} catch (e) {
|
|
21
23
|
console.error("Failed to updateTestdirectorySchemaFile", e)
|
|
22
24
|
}
|
|
25
|
+
}
|
|
23
26
|
|
|
27
|
+
async function createSupportFile(): Promise<void> {
|
|
24
28
|
try {
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
await createCypressSupportFile({
|
|
30
|
+
cypressSupportDirectoryPath: path.join(cwd, "cypress", "support"),
|
|
31
|
+
supportFileName: "tui-sandbox.ts",
|
|
32
|
+
})
|
|
27
33
|
} catch (e) {
|
|
28
|
-
console.error("Failed to
|
|
34
|
+
console.error("Failed to createCypressSupportFile", e)
|
|
29
35
|
}
|
|
30
36
|
}
|
package/src/scripts/tui.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert"
|
|
2
|
+
import type { TestServerConfig } from "../server/updateTestdirectorySchemaFile.js"
|
|
2
3
|
import type { TestResultExitCode } from "./commands/commandRun.js"
|
|
3
4
|
import { commandRun } from "./commands/commandRun.js"
|
|
4
5
|
import { commandTuiNeovimExec } from "./commands/commandTuiNeovimExec.js"
|
|
@@ -31,20 +32,20 @@ if (configResult.error) {
|
|
|
31
32
|
|
|
32
33
|
// the arguments passed to this script start at index 2
|
|
33
34
|
const args = process.argv.slice(2)
|
|
34
|
-
|
|
35
|
+
const config: TestServerConfig = configResult.result
|
|
35
36
|
const command = await parseArguments(args)
|
|
36
37
|
|
|
37
38
|
switch (command?.action) {
|
|
38
39
|
case "neovim prepare": {
|
|
39
|
-
await commandTuiNeovimPrepare(
|
|
40
|
+
await commandTuiNeovimPrepare(config)
|
|
40
41
|
break
|
|
41
42
|
}
|
|
42
43
|
case "neovim exec": {
|
|
43
|
-
await commandTuiNeovimExec(command,
|
|
44
|
+
await commandTuiNeovimExec(command, config)
|
|
44
45
|
break
|
|
45
46
|
}
|
|
46
47
|
case "start": {
|
|
47
|
-
await commandTuiStart(
|
|
48
|
+
await commandTuiStart(config)
|
|
48
49
|
break
|
|
49
50
|
}
|
|
50
51
|
case "run": {
|
|
@@ -3,7 +3,7 @@ import { debuglog } from "util"
|
|
|
3
3
|
import * as z from "zod"
|
|
4
4
|
import { buildTestDirectorySchema } from "./dirtree/index.js"
|
|
5
5
|
|
|
6
|
-
const log = debuglog(
|
|
6
|
+
const log = debuglog(`tui-sandbox.${updateTestdirectorySchemaFile.name}`)
|
|
7
7
|
|
|
8
8
|
export type DirectoriesConfig = TestServerConfig["directories"]
|
|
9
9
|
|