@effected/cli-kit 0.0.0-stage → 0.26.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/Cancelled.js +43 -0
- package/CliAudience.js +177 -0
- package/CliColor.js +59 -0
- package/CliEnv.js +101 -0
- package/CliExit.js +64 -0
- package/CliFailure.js +287 -0
- package/CliFormat.js +124 -0
- package/CliInteractive.js +94 -0
- package/CliLinks.js +153 -0
- package/CliLog.js +367 -0
- package/CliLogger.js +91 -0
- package/CliMessage.js +79 -0
- package/CliPrompt.js +110 -0
- package/CliRuntime.js +254 -0
- package/CliTest.js +206 -0
- package/CliTheme.js +142 -0
- package/ConfigIssueRenderer.js +63 -0
- package/Doc.js +548 -0
- package/Fmt.js +335 -0
- package/GithubAnnotation.js +39 -0
- package/Glyphs.js +82 -0
- package/LICENSE +21 -0
- package/NotInteractive.js +41 -0
- package/README.md +215 -2
- package/Render.js +280 -0
- package/SchemaIssueRenderer.js +47 -0
- package/Status.js +165 -0
- package/TestTerminal.js +101 -0
- package/Token.js +68 -0
- package/index.d.ts +3951 -0
- package/index.js +27 -0
- package/internal/ExitRequested.js +21 -0
- package/internal/HelpRouting.js +35 -0
- package/internal/ansi.js +229 -0
- package/internal/autoFormat.js +33 -0
- package/internal/canPrompt.js +14 -0
- package/internal/counts.js +83 -0
- package/internal/diagnostics.js +31 -0
- package/internal/displayPath.js +46 -0
- package/internal/displayWidth.js +42 -0
- package/internal/failureTarget.js +195 -0
- package/internal/fallbackAnswer.js +17 -0
- package/internal/fileSink.js +61 -0
- package/internal/format.js +175 -0
- package/internal/inspect.js +40 -0
- package/internal/isExitCode.js +11 -0
- package/internal/layout.js +249 -0
- package/internal/linkScheme.js +29 -0
- package/internal/linkTarget.js +49 -0
- package/internal/logSafety.js +45 -0
- package/internal/renderAnsi.js +51 -0
- package/internal/renderDoc.js +322 -0
- package/internal/renderGithubLog.js +59 -0
- package/internal/renderMarkdown.js +367 -0
- package/internal/renderPlain.js +49 -0
- package/internal/scanAudience.js +105 -0
- package/internal/splitFrame.js +55 -0
- package/internal/terminalCapabilities.js +23 -0
- package/internal/wizardGate.js +17 -0
- package/package.json +90 -5
- package/testing.d.ts +246 -0
- package/testing.js +4 -0
- package/tsdoc-metadata.json +11 -0
- package/ui/CliUi.js +507 -0
- package/ui/CliUiDetached.js +36 -0
- package/ui/CliUiLive.js +436 -0
- package/ui/CliUiRouteStream.js +72 -0
- package/ui/Confirm.js +244 -0
- package/ui/DocView.js +76 -0
- package/ui/KeyHelp.js +61 -0
- package/ui/KeyTable.js +198 -0
- package/ui/MultiSelect.js +259 -0
- package/ui/Select.js +229 -0
- package/ui/Tabs.js +201 -0
- package/ui/TextInput.js +289 -0
- package/ui/Toggle.js +31 -0
- package/ui/UiKey.js +48 -0
- package/ui/UiProvider.js +62 -0
- package/ui/UiStreams.js +17 -0
- package/ui/UiTheme.js +147 -0
- package/ui/Viewport.js +203 -0
- package/ui/internal/ErrorBoundary.js +29 -0
- package/ui/internal/Holder.js +73 -0
- package/ui/internal/ScreenContext.js +51 -0
- package/ui/internal/UiProviders.js +38 -0
- package/ui/internal/ink.js +121 -0
- package/ui/internal/inkChalk.js +47 -0
- package/ui/internal/inkConsole.js +150 -0
- package/ui/internal/lazyView.js +73 -0
- package/ui/internal/lineRouter.js +70 -0
- package/ui/internal/lineText.js +18 -0
- package/ui/internal/mountPermit.js +15 -0
- package/ui/internal/processStreams.js +18 -0
- package/ui/internal/renderOptions.js +12 -0
- package/ui/testing/CliUiTest.js +792 -0
- package/ui/testing/fakeStreams.js +104 -0
- package/ui/testing/terminalModel.js +67 -0
- package/ui-testing-serializer.d.ts +12 -0
- package/ui-testing-serializer.js +32 -0
- package/ui-testing.d.ts +558 -0
- package/ui-testing.js +3 -0
- package/ui.d.ts +1990 -0
- package/ui.js +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,91 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@effected/cli-kit",
|
|
3
|
+
"version": "0.26.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "The presentation boundary of an effect/cli program: audience-aware output, a document IR and renderers, editor links, failure reports and logging, plus opt-in Ink screens, widgets and a live view",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"effect",
|
|
8
|
+
"cli",
|
|
9
|
+
"logger",
|
|
10
|
+
"terminal",
|
|
11
|
+
"ink",
|
|
12
|
+
"tui"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/spencerbeggs/effected/tree/main/packages/cli-kit#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/spencerbeggs/effected/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/spencerbeggs/effected.git",
|
|
21
|
+
"directory": "packages/cli-kit"
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"author": {
|
|
25
|
+
"name": "C. Spencer Beggs",
|
|
26
|
+
"email": "spencer@beggs.codes",
|
|
27
|
+
"url": "https://spencerbeg.gs"
|
|
28
|
+
},
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"type": "module",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./index.d.ts",
|
|
34
|
+
"import": "./index.js",
|
|
35
|
+
"default": "./index.js"
|
|
36
|
+
},
|
|
37
|
+
"./testing": {
|
|
38
|
+
"types": "./testing.d.ts",
|
|
39
|
+
"import": "./testing.js",
|
|
40
|
+
"default": "./testing.js"
|
|
41
|
+
},
|
|
42
|
+
"./ui": {
|
|
43
|
+
"types": "./ui.d.ts",
|
|
44
|
+
"import": "./ui.js",
|
|
45
|
+
"default": "./ui.js"
|
|
46
|
+
},
|
|
47
|
+
"./ui/testing": {
|
|
48
|
+
"types": "./ui-testing.d.ts",
|
|
49
|
+
"import": "./ui-testing.js",
|
|
50
|
+
"default": "./ui-testing.js"
|
|
51
|
+
},
|
|
52
|
+
"./ui/testing/serializer": {
|
|
53
|
+
"types": "./ui-testing-serializer.d.ts",
|
|
54
|
+
"import": "./ui-testing-serializer.js",
|
|
55
|
+
"default": "./ui-testing-serializer.js"
|
|
56
|
+
},
|
|
57
|
+
"./package.json": "./package.json"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@effected/commands": "^0.20.0",
|
|
61
|
+
"@effected/github-commands": "^0.9.0",
|
|
62
|
+
"@effected/kit": "^0.12.0"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"@effected/config-file": "^0.24.0",
|
|
66
|
+
"@effected/env": "^0.10.0",
|
|
67
|
+
"@effected/glob": "^0.18.0",
|
|
68
|
+
"@effected/walker": "^0.25.0",
|
|
69
|
+
"@types/react": "^19.3.0",
|
|
70
|
+
"effect": "~4.1.0",
|
|
71
|
+
"ink": "^8.0.0",
|
|
72
|
+
"react": "^19.3.0"
|
|
73
|
+
},
|
|
74
|
+
"peerDependenciesMeta": {
|
|
75
|
+
"@effected/config-file": {
|
|
76
|
+
"optional": true
|
|
77
|
+
},
|
|
78
|
+
"@types/react": {
|
|
79
|
+
"optional": true
|
|
80
|
+
},
|
|
81
|
+
"ink": {
|
|
82
|
+
"optional": true
|
|
83
|
+
},
|
|
84
|
+
"react": {
|
|
85
|
+
"optional": true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": ">=24.11.0"
|
|
90
|
+
}
|
|
91
|
+
}
|
package/testing.d.ts
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { Duration, Effect, FileSystem, Layer, Path, PlatformError, Scope, Stream, Terminal } from "effect";
|
|
2
|
+
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
3
|
+
/**
|
|
4
|
+
* A hermetic temp directory minted by {@link CliTest.sandbox}, removed when its
|
|
5
|
+
* scope closes.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
interface Sandbox {
|
|
10
|
+
/** The temp directory itself; the default working directory of {@link CliTest.run}. */
|
|
11
|
+
readonly root: string;
|
|
12
|
+
/** The fresh `HOME` inside `root`; the XDG base directories live under it. */
|
|
13
|
+
readonly home: string;
|
|
14
|
+
/**
|
|
15
|
+
* The complete child environment: `HOME`, the four `XDG_*_HOME` variables,
|
|
16
|
+
* the injected `PATH` and `NO_COLOR=1`. Nothing is inherited from the host.
|
|
17
|
+
*/
|
|
18
|
+
readonly env: Readonly<Record<string, string>>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* How {@link CliTest.run} spawns a bin.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
interface RunOptions {
|
|
26
|
+
/** The sandbox whose environment and root the child runs in. */
|
|
27
|
+
readonly sandbox: Sandbox;
|
|
28
|
+
/** The node binary — pass `process.execPath` from the test file, never a PATH lookup. */
|
|
29
|
+
readonly execPath: string;
|
|
30
|
+
/** The child's working directory. Defaults to the sandbox `root`. */
|
|
31
|
+
readonly cwd?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Extra environment variables, merged over the sandbox environment — the
|
|
34
|
+
* way to override `PATH` for one run.
|
|
35
|
+
*/
|
|
36
|
+
readonly env?: Readonly<Record<string, string>> | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Text written to the child's stdin, which is then closed. Omitted or `""`,
|
|
39
|
+
* the child gets an already-ended empty input, never an open pipe.
|
|
40
|
+
*/
|
|
41
|
+
readonly stdin?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* How long a child has to exit after `SIGTERM` (or the signal `kill` sends), when its scope closes or
|
|
44
|
+
* {@link SpawnedBin.kill} is called, before it is sent `SIGKILL`; `2 seconds` by default. A finite duration: a
|
|
45
|
+
* child that ignores the signal would otherwise keep the scope from closing forever, and leave the process behind.
|
|
46
|
+
*/
|
|
47
|
+
readonly forceKillAfter?: Duration.Input | undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* What a spawned bin did, as data: a non-zero exit is a result, not a failure.
|
|
51
|
+
*
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
interface RunResult {
|
|
55
|
+
/** The child's exit code, or `null` when a signal ended it. */
|
|
56
|
+
readonly exitCode: number | null;
|
|
57
|
+
/** The signal that ended the child, or `null` when it exited with a code. */
|
|
58
|
+
readonly signal: ChildProcess.Signal | null;
|
|
59
|
+
/** Everything the child wrote to stdout, decoded as UTF-8. */
|
|
60
|
+
readonly stdout: string;
|
|
61
|
+
/** Everything the child wrote to stderr, decoded as UTF-8. */
|
|
62
|
+
readonly stderr: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A bin {@link CliTest.spawn} started and has not waited for: its output as it arrives, a way to signal it, and its
|
|
66
|
+
* exit.
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
interface SpawnedBin {
|
|
71
|
+
/**
|
|
72
|
+
* The child's stdout as lines, each without its line break (`\r\n` included), from the first byte it wrote,
|
|
73
|
+
* ending when the child closes stdout; a last line with no line break comes when it does. Every subscription replays
|
|
74
|
+
* from the start, so a test may read it more than once, and output a test never reads is still drained, so the
|
|
75
|
+
* child never blocks on a full pipe.
|
|
76
|
+
*/
|
|
77
|
+
readonly stdout: Stream.Stream<string>;
|
|
78
|
+
/** The child's stderr as lines, as `stdout` gives stdout. */
|
|
79
|
+
readonly stderr: Stream.Stream<string>;
|
|
80
|
+
/**
|
|
81
|
+
* Send `signal` (`SIGTERM` by default) and wait for the child to exit. A child still running after
|
|
82
|
+
* {@link RunOptions.forceKillAfter} is sent `SIGKILL`, so this always ends. A child that has already exited, on its
|
|
83
|
+
* own or at the same moment, is not an error: this returns normally, and `exitCode` and `result` keep reporting how
|
|
84
|
+
* it ended. A kill that fails on a child still running fails with that `PlatformError`.
|
|
85
|
+
*/
|
|
86
|
+
readonly kill: (signal?: ChildProcess.Signal) => Effect.Effect<void, PlatformError.PlatformError>;
|
|
87
|
+
/**
|
|
88
|
+
* The child's exit code once it exits, or `null` when a signal ended it (the default `kill` included): `result`
|
|
89
|
+
* names the signal. Re-reading it after the exit answers at once.
|
|
90
|
+
*/
|
|
91
|
+
readonly exitCode: Effect.Effect<number | null, PlatformError.PlatformError>;
|
|
92
|
+
/** Wait for the exit and the end of both streams, and read everything, as {@link CliTest.run} returns it. */
|
|
93
|
+
readonly result: Effect.Effect<RunResult, PlatformError.PlatformError>;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Spawn a built CLI bin hermetically and read its exit code and streams as data.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* import * as NodeServices from "@effect/platform-node/NodeServices"
|
|
101
|
+
* import { assert, it } from "@effect/vitest"
|
|
102
|
+
* import { CliTest } from "@effected/cli-kit/testing"
|
|
103
|
+
* import { Effect } from "effect"
|
|
104
|
+
*
|
|
105
|
+
* it.effect("prints its version", () =>
|
|
106
|
+
* Effect.gen(function* () {
|
|
107
|
+
* const sandbox = yield* CliTest.sandbox({ path: process.env.PATH ?? "" })
|
|
108
|
+
* const result = yield* CliTest.run("dist/bin.js", ["--version"], { sandbox, execPath: process.execPath })
|
|
109
|
+
* assert.strictEqual(result.exitCode, 0)
|
|
110
|
+
* }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
|
|
111
|
+
* )
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @public
|
|
115
|
+
*/
|
|
116
|
+
export declare class CliTest {
|
|
117
|
+
private constructor();
|
|
118
|
+
/**
|
|
119
|
+
* A scoped temp directory with a fresh `HOME` and XDG tree, `NO_COLOR=1`,
|
|
120
|
+
* and the `PATH` you pass — the host environment is never inherited.
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
* Each call mints a fresh temp directory; bind the result to a `const`
|
|
124
|
+
* within one test rather than calling this more than once per assertion.
|
|
125
|
+
*/
|
|
126
|
+
static readonly sandbox: (options: {
|
|
127
|
+
/**
|
|
128
|
+
* The `PATH` the child sees, passed explicitly because nothing else is
|
|
129
|
+
* inherited — `process.env.PATH` when the bin shells out to host tools,
|
|
130
|
+
* a narrower list to prove it does not.
|
|
131
|
+
*/
|
|
132
|
+
readonly path: string;
|
|
133
|
+
}) => Effect.Effect<Sandbox, PlatformError.PlatformError, FileSystem.FileSystem | Path.Path | Scope.Scope>;
|
|
134
|
+
/**
|
|
135
|
+
* Run `execPath bin ...args`; a non-zero exit is returned, never failed.
|
|
136
|
+
*
|
|
137
|
+
* @remarks
|
|
138
|
+
* `stdin` is never left as an inherited open pipe: when omitted or `""`
|
|
139
|
+
* the child gets an already-ended empty input (`Stream.empty`), so a
|
|
140
|
+
* stdin-reading bin exits instead of hanging on `effect/process`'s
|
|
141
|
+
* default `"pipe"` stdio, which stays open until something writes to and
|
|
142
|
+
* ends it.
|
|
143
|
+
*/
|
|
144
|
+
static readonly run: (bin: string, args: ReadonlyArray<string>, options: RunOptions) => Effect.Effect<RunResult, PlatformError.PlatformError, ChildProcessSpawner.ChildProcessSpawner>;
|
|
145
|
+
/**
|
|
146
|
+
* Start `execPath bin ...args` and return at once with a handle on it: its output as lines while it runs, a signal,
|
|
147
|
+
* and its exit, for a long-running command (a `--follow`, a watch mode, a server) that {@link CliTest.run} would wait
|
|
148
|
+
* on forever.
|
|
149
|
+
*
|
|
150
|
+
* @remarks
|
|
151
|
+
* The child lives in the caller's scope: when the scope closes first, the child is sent `SIGTERM`, then `SIGKILL`
|
|
152
|
+
* after `forceKillAfter` (`2 seconds` by default), so a test that ends early leaves nothing running and never waits
|
|
153
|
+
* on a child that ignores the signal. A child a signal ended reports `exitCode: null` and the signal in `result`. Both streams are drained from the start whether or not the test reads them, so a
|
|
154
|
+
* chatty child never blocks on a full pipe, and each stream replays from its first line to every reader. The
|
|
155
|
+
* options are {@link CliTest.run}'s, `stdin` included: the child gets that text, then an ended input.
|
|
156
|
+
*
|
|
157
|
+
* ```ts
|
|
158
|
+
* const child = yield* CliTest.spawn("dist/bin.js", ["logs", "--follow"], { sandbox, execPath: process.execPath })
|
|
159
|
+
* yield* Stream.runHead(child.stdout) // the first line: it is following
|
|
160
|
+
* yield* child.kill("SIGINT")
|
|
161
|
+
* assert.strictEqual(yield* child.exitCode, 0)
|
|
162
|
+
* ```
|
|
163
|
+
*
|
|
164
|
+
* @param bin - the built bin to run
|
|
165
|
+
* @param args - its arguments
|
|
166
|
+
* @param options - the sandbox, the node binary, and the working directory, environment and stdin
|
|
167
|
+
*/
|
|
168
|
+
static readonly spawn: (bin: string, args: ReadonlyArray<string>, options: RunOptions) => Effect.Effect<SpawnedBin, PlatformError.PlatformError, ChildProcessSpawner.ChildProcessSpawner | Scope.Scope>;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* One key press for {@link TestTerminal}.
|
|
172
|
+
*
|
|
173
|
+
* @public
|
|
174
|
+
*/
|
|
175
|
+
interface KeyInput {
|
|
176
|
+
/** The key name the prompts switch on: `down`, `up`, `enter`, `space`, `escape`, or a character. */
|
|
177
|
+
readonly name: string;
|
|
178
|
+
/** Whether Ctrl is held. */
|
|
179
|
+
readonly ctrl?: boolean | undefined;
|
|
180
|
+
/** Whether Meta is held. */
|
|
181
|
+
readonly meta?: boolean | undefined;
|
|
182
|
+
/** Whether Shift is held. */
|
|
183
|
+
readonly shift?: boolean | undefined;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* What {@link TestTerminal.make} builds: the `Terminal` layer and the means to drive and inspect it.
|
|
187
|
+
*
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
190
|
+
interface TestTerminalHandle {
|
|
191
|
+
/** Provides `Terminal` backed by this double. */
|
|
192
|
+
readonly layer: Layer.Layer<Terminal.Terminal>;
|
|
193
|
+
/** Queue key presses, as if the user had typed them. */
|
|
194
|
+
readonly input: (keys: ReadonlyArray<KeyInput>) => Effect.Effect<void>;
|
|
195
|
+
/** Queue `text` one character at a time. */
|
|
196
|
+
readonly type: (text: string) => Effect.Effect<void>;
|
|
197
|
+
/** End the input, as Ctrl-C or end-of-file does: a prompt waiting for a key is quit. */
|
|
198
|
+
readonly end: Effect.Effect<void>;
|
|
199
|
+
/** Everything written to the terminal so far, prompt frames and escape codes included. */
|
|
200
|
+
readonly output: Effect.Effect<string>;
|
|
201
|
+
/**
|
|
202
|
+
* Resize the terminal: `columns` and `rows` report the new size from now on, and every open `size`
|
|
203
|
+
* subscription receives it.
|
|
204
|
+
*/
|
|
205
|
+
readonly resize: (size: Terminal.Size) => Effect.Effect<void>;
|
|
206
|
+
/** How many queued key presses nobody has taken yet. */
|
|
207
|
+
readonly pending: Effect.Effect<number>;
|
|
208
|
+
/**
|
|
209
|
+
* What the program did with the input: `keys` taken from it, `lines` read with `readLine`, and
|
|
210
|
+
* `subscriptions` to `readInput`. All `0` proves a code path never touched the terminal's input. Counting the
|
|
211
|
+
* subscription matters: on a real terminal merely subscribing attaches a reader to stdin, even when no key is
|
|
212
|
+
* ever taken.
|
|
213
|
+
*/
|
|
214
|
+
readonly reads: Effect.Effect<{
|
|
215
|
+
readonly keys: number;
|
|
216
|
+
readonly lines: number;
|
|
217
|
+
readonly subscriptions: number;
|
|
218
|
+
}>;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* A scripted `Terminal` for testing prompts and anything that reads the terminal.
|
|
222
|
+
*
|
|
223
|
+
* @remarks
|
|
224
|
+
* Queue keys with `input` or `type`, run the program under `layer`, then read `output`. `size` behaves as a real
|
|
225
|
+
* terminal's does: each subscription starts with the current size, receives every `resize`, keeps only the latest,
|
|
226
|
+
* and ends when its scope closes. To assert that a code path
|
|
227
|
+
* did NOT touch the terminal, queue some keys first and check `reads` is all zero (no subscription, no key, no
|
|
228
|
+
* line) and `pending` is unchanged afterwards. Only
|
|
229
|
+
* available from `@effected/cli-kit/testing`.
|
|
230
|
+
*
|
|
231
|
+
* @public
|
|
232
|
+
*/
|
|
233
|
+
export declare class TestTerminal {
|
|
234
|
+
private constructor();
|
|
235
|
+
/**
|
|
236
|
+
* Build a test terminal.
|
|
237
|
+
*
|
|
238
|
+
* @param options - the reported size; 80 by 24 by default
|
|
239
|
+
*/
|
|
240
|
+
static readonly make: (options?: {
|
|
241
|
+
readonly columns?: number | undefined;
|
|
242
|
+
readonly rows?: number | undefined;
|
|
243
|
+
}) => Effect.Effect<TestTerminalHandle>;
|
|
244
|
+
}
|
|
245
|
+
export type { KeyInput, RunOptions, RunResult, Sandbox, SpawnedBin, TestTerminalHandle };
|
|
246
|
+
//# sourceMappingURL=testing.d.ts.map
|
package/testing.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.60.1"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|