@outfitter/testing 0.2.2 → 0.2.4
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/cli-harness.d.ts +1 -1
- package/dist/cli-helpers.d.ts +1 -1
- package/dist/fixtures.d.ts +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/mcp-harness.d.ts +1 -1
- package/dist/mock-factories.d.ts +1 -1
- package/package.json +5 -4
- package/dist/shared/@outfitter/{testing-6e1425qr.d.ts → testing-5gdrv3f5.d.ts} +6 -6
- package/dist/shared/@outfitter/{testing-ark2sn92.d.ts → testing-fyjbwn80.d.ts} +4 -4
- package/dist/shared/@outfitter/{testing-qnrap0h2.d.ts → testing-jdfrrv33.d.ts} +3 -3
- package/dist/shared/@outfitter/{testing-wes8smnv.d.ts → testing-xaxkt6c9.d.ts} +4 -4
package/dist/cli-harness.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CliHarness, CliResult, createCliHarness } from "./shared/@outfitter/testing-
|
|
1
|
+
import { CliHarness, CliResult, createCliHarness } from "./shared/@outfitter/testing-xaxkt6c9.js";
|
|
2
2
|
export { createCliHarness, CliResult, CliHarness };
|
package/dist/cli-helpers.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CliTestResult, captureCLI, mockStdin } from "./shared/@outfitter/testing-
|
|
1
|
+
import { CliTestResult, captureCLI, mockStdin } from "./shared/@outfitter/testing-fyjbwn80.js";
|
|
2
2
|
export { mockStdin, captureCLI, CliTestResult };
|
package/dist/fixtures.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { createFixture, loadFixture, withEnv, withTempDir } from "./shared/@outfitter/testing-98fsks4n";
|
|
1
|
+
import { createFixture, loadFixture, withEnv, withTempDir } from "./shared/@outfitter/testing-98fsks4n.js";
|
|
2
2
|
export { withTempDir, withEnv, loadFixture, createFixture };
|
package/dist/index.d.ts
CHANGED
|
@@ -109,12 +109,12 @@ declare function loadFixture2<T = string>(name: string, options?: LoadFixtureOpt
|
|
|
109
109
|
* Contains the captured output streams and exit code from the command.
|
|
110
110
|
*/
|
|
111
111
|
interface CliResult {
|
|
112
|
-
/** Standard output from the command */
|
|
113
|
-
stdout: string;
|
|
114
|
-
/** Standard error output from the command */
|
|
115
|
-
stderr: string;
|
|
116
112
|
/** Exit code from the command (0 typically indicates success) */
|
|
117
113
|
exitCode: number;
|
|
114
|
+
/** Standard error output from the command */
|
|
115
|
+
stderr: string;
|
|
116
|
+
/** Standard output from the command */
|
|
117
|
+
stdout: string;
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
120
|
* Harness for executing CLI commands in tests.
|
|
@@ -165,12 +165,12 @@ declare function createCliHarness(command: string): CliHarness;
|
|
|
165
165
|
* @packageDocumentation
|
|
166
166
|
*/
|
|
167
167
|
interface CliTestResult {
|
|
168
|
-
/** Captured stdout */
|
|
169
|
-
stdout: string;
|
|
170
|
-
/** Captured stderr */
|
|
171
|
-
stderr: string;
|
|
172
168
|
/** Process exit code */
|
|
173
169
|
exitCode: number;
|
|
170
|
+
/** Captured stderr */
|
|
171
|
+
stderr: string;
|
|
172
|
+
/** Captured stdout */
|
|
173
|
+
stdout: string;
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
* Capture stdout/stderr and exit code from an async CLI function.
|
|
@@ -212,10 +212,6 @@ interface McpHarness {
|
|
|
212
212
|
*/
|
|
213
213
|
listTools(): SerializedTool[];
|
|
214
214
|
/**
|
|
215
|
-
* Search tools by name or description (case-insensitive).
|
|
216
|
-
*/
|
|
217
|
-
searchTools(query: string): SerializedTool[];
|
|
218
|
-
/**
|
|
219
215
|
* Load fixture data by name (relative to __fixtures__).
|
|
220
216
|
*/
|
|
221
217
|
loadFixture<T = string>(name: string): T;
|
|
@@ -223,18 +219,22 @@ interface McpHarness {
|
|
|
223
219
|
* Reset harness state between tests.
|
|
224
220
|
*/
|
|
225
221
|
reset(): void;
|
|
222
|
+
/**
|
|
223
|
+
* Search tools by name or description (case-insensitive).
|
|
224
|
+
*/
|
|
225
|
+
searchTools(query: string): SerializedTool[];
|
|
226
226
|
}
|
|
227
227
|
interface McpHarnessOptions {
|
|
228
228
|
/** Base fixtures directory (defaults to `${process.cwd()}/__fixtures__`). */
|
|
229
229
|
readonly fixturesDir?: string;
|
|
230
230
|
}
|
|
231
231
|
interface McpTestHarnessOptions {
|
|
232
|
-
/** Tools to register on the test MCP server. */
|
|
233
|
-
readonly tools: ToolDefinition<unknown, unknown, OutfitterError>[];
|
|
234
232
|
/** Base fixtures directory (defaults to `${process.cwd()}/__fixtures__`). */
|
|
235
233
|
readonly fixturesDir?: string;
|
|
236
234
|
/** Optional server name for diagnostics. */
|
|
237
235
|
readonly name?: string;
|
|
236
|
+
/** Tools to register on the test MCP server. */
|
|
237
|
+
readonly tools: ToolDefinition<unknown, unknown, OutfitterError>[];
|
|
238
238
|
/** Optional server version for diagnostics. */
|
|
239
239
|
readonly version?: string;
|
|
240
240
|
}
|
|
@@ -252,15 +252,15 @@ declare function createMCPTestHarness(options: McpTestHarnessOptions): McpHarnes
|
|
|
252
252
|
import { HandlerContext, Logger, ResolvedConfig } from "@outfitter/contracts";
|
|
253
253
|
import { z } from "zod";
|
|
254
254
|
interface LogEntry {
|
|
255
|
+
data?: Record<string, unknown>;
|
|
255
256
|
level: "trace" | "debug" | "info" | "warn" | "error" | "fatal";
|
|
256
257
|
message: string;
|
|
257
|
-
data?: Record<string, unknown>;
|
|
258
258
|
}
|
|
259
259
|
interface TestLogger extends Logger {
|
|
260
|
-
/** Captured log entries for assertions */
|
|
261
|
-
logs: LogEntry[];
|
|
262
260
|
/** Clear captured logs */
|
|
263
261
|
clear(): void;
|
|
262
|
+
/** Captured log entries for assertions */
|
|
263
|
+
logs: LogEntry[];
|
|
264
264
|
}
|
|
265
265
|
declare function createTestLogger(context?: Record<string, unknown>): TestLogger;
|
|
266
266
|
declare function createTestConfig<T>(schema: z.ZodType<T>, values: Partial<T>): ResolvedConfig;
|
package/dist/mcp-harness.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { McpHarness, McpHarnessOptions, McpTestHarnessOptions, McpToolResponse, createMCPTestHarness, createMcpHarness } from "./shared/@outfitter/testing-
|
|
1
|
+
import { McpHarness, McpHarnessOptions, McpTestHarnessOptions, McpToolResponse, createMCPTestHarness, createMcpHarness } from "./shared/@outfitter/testing-5gdrv3f5.js";
|
|
2
2
|
export { createMCPTestHarness as createMcpTestHarness, createMcpHarness, createMCPTestHarness, McpToolResponse, McpTestHarnessOptions, McpHarnessOptions, McpHarness };
|
package/dist/mock-factories.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LogEntry, TestLogger, createTestConfig, createTestContext, createTestLogger } from "./shared/@outfitter/testing-
|
|
1
|
+
import { LogEntry, TestLogger, createTestConfig, createTestContext, createTestLogger } from "./shared/@outfitter/testing-jdfrrv33.js";
|
|
2
2
|
export { createTestLogger, createTestContext, createTestConfig, TestLogger, LogEntry };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outfitter/testing",
|
|
3
3
|
"description": "Test harnesses, fixtures, and utilities for Outfitter packages",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -54,11 +54,12 @@
|
|
|
54
54
|
"lint:fix": "biome lint --write ./src",
|
|
55
55
|
"test": "bun test",
|
|
56
56
|
"typecheck": "tsc --noEmit",
|
|
57
|
-
"clean": "rm -rf dist"
|
|
57
|
+
"clean": "rm -rf dist",
|
|
58
|
+
"prepublishOnly": "bun ../../scripts/check-publish-manifest.ts"
|
|
58
59
|
},
|
|
59
60
|
"dependencies": {
|
|
60
|
-
"@outfitter/contracts": "0.
|
|
61
|
-
"@outfitter/mcp": "0.4.
|
|
61
|
+
"@outfitter/contracts": "0.4.1",
|
|
62
|
+
"@outfitter/mcp": "0.4.2",
|
|
62
63
|
"zod": "^4.3.5"
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
@@ -26,10 +26,6 @@ interface McpHarness {
|
|
|
26
26
|
*/
|
|
27
27
|
listTools(): SerializedTool[];
|
|
28
28
|
/**
|
|
29
|
-
* Search tools by name or description (case-insensitive).
|
|
30
|
-
*/
|
|
31
|
-
searchTools(query: string): SerializedTool[];
|
|
32
|
-
/**
|
|
33
29
|
* Load fixture data by name (relative to __fixtures__).
|
|
34
30
|
*/
|
|
35
31
|
loadFixture<T = string>(name: string): T;
|
|
@@ -37,18 +33,22 @@ interface McpHarness {
|
|
|
37
33
|
* Reset harness state between tests.
|
|
38
34
|
*/
|
|
39
35
|
reset(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Search tools by name or description (case-insensitive).
|
|
38
|
+
*/
|
|
39
|
+
searchTools(query: string): SerializedTool[];
|
|
40
40
|
}
|
|
41
41
|
interface McpHarnessOptions {
|
|
42
42
|
/** Base fixtures directory (defaults to `${process.cwd()}/__fixtures__`). */
|
|
43
43
|
readonly fixturesDir?: string;
|
|
44
44
|
}
|
|
45
45
|
interface McpTestHarnessOptions {
|
|
46
|
-
/** Tools to register on the test MCP server. */
|
|
47
|
-
readonly tools: ToolDefinition<unknown, unknown, OutfitterError>[];
|
|
48
46
|
/** Base fixtures directory (defaults to `${process.cwd()}/__fixtures__`). */
|
|
49
47
|
readonly fixturesDir?: string;
|
|
50
48
|
/** Optional server name for diagnostics. */
|
|
51
49
|
readonly name?: string;
|
|
50
|
+
/** Tools to register on the test MCP server. */
|
|
51
|
+
readonly tools: ToolDefinition<unknown, unknown, OutfitterError>[];
|
|
52
52
|
/** Optional server version for diagnostics. */
|
|
53
53
|
readonly version?: string;
|
|
54
54
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
8
|
interface CliTestResult {
|
|
9
|
-
/** Captured stdout */
|
|
10
|
-
stdout: string;
|
|
11
|
-
/** Captured stderr */
|
|
12
|
-
stderr: string;
|
|
13
9
|
/** Process exit code */
|
|
14
10
|
exitCode: number;
|
|
11
|
+
/** Captured stderr */
|
|
12
|
+
stderr: string;
|
|
13
|
+
/** Captured stdout */
|
|
14
|
+
stdout: string;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Capture stdout/stderr and exit code from an async CLI function.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { HandlerContext, Logger, ResolvedConfig } from "@outfitter/contracts";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
interface LogEntry {
|
|
4
|
+
data?: Record<string, unknown>;
|
|
4
5
|
level: "trace" | "debug" | "info" | "warn" | "error" | "fatal";
|
|
5
6
|
message: string;
|
|
6
|
-
data?: Record<string, unknown>;
|
|
7
7
|
}
|
|
8
8
|
interface TestLogger extends Logger {
|
|
9
|
-
/** Captured log entries for assertions */
|
|
10
|
-
logs: LogEntry[];
|
|
11
9
|
/** Clear captured logs */
|
|
12
10
|
clear(): void;
|
|
11
|
+
/** Captured log entries for assertions */
|
|
12
|
+
logs: LogEntry[];
|
|
13
13
|
}
|
|
14
14
|
declare function createTestLogger(context?: Record<string, unknown>): TestLogger;
|
|
15
15
|
declare function createTestConfig<T>(schema: z.ZodType<T>, values: Partial<T>): ResolvedConfig;
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
* Contains the captured output streams and exit code from the command.
|
|
14
14
|
*/
|
|
15
15
|
interface CliResult {
|
|
16
|
-
/** Standard output from the command */
|
|
17
|
-
stdout: string;
|
|
18
|
-
/** Standard error output from the command */
|
|
19
|
-
stderr: string;
|
|
20
16
|
/** Exit code from the command (0 typically indicates success) */
|
|
21
17
|
exitCode: number;
|
|
18
|
+
/** Standard error output from the command */
|
|
19
|
+
stderr: string;
|
|
20
|
+
/** Standard output from the command */
|
|
21
|
+
stdout: string;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Harness for executing CLI commands in tests.
|