mock-mcp 0.3.0 โ 0.5.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/README.md +217 -128
- package/dist/adapter/index.cjs +712 -0
- package/dist/adapter/index.d.cts +55 -0
- package/dist/adapter/index.d.ts +55 -0
- package/dist/adapter/index.js +672 -0
- package/dist/client/connect.cjs +913 -0
- package/dist/client/connect.d.cts +211 -0
- package/dist/client/connect.d.ts +209 -6
- package/dist/client/connect.js +867 -10
- package/dist/client/index.cjs +914 -0
- package/dist/client/index.d.cts +4 -0
- package/dist/client/index.d.ts +4 -2
- package/dist/client/index.js +873 -2
- package/dist/daemon/index.cjs +667 -0
- package/dist/daemon/index.d.cts +62 -0
- package/dist/daemon/index.d.ts +62 -0
- package/dist/daemon/index.js +628 -0
- package/dist/discovery-Dc2LdF8q.d.cts +105 -0
- package/dist/discovery-Dc2LdF8q.d.ts +105 -0
- package/dist/index.cjs +2238 -0
- package/dist/index.d.cts +472 -0
- package/dist/index.d.ts +472 -10
- package/dist/index.js +2185 -53
- package/dist/protocol-CiwaQFOt.d.ts +239 -0
- package/dist/protocol-xZu-wb0n.d.cts +239 -0
- package/dist/shared/index.cjs +386 -0
- package/dist/shared/index.d.cts +4 -0
- package/dist/shared/index.d.ts +4 -0
- package/dist/shared/index.js +310 -0
- package/dist/types-BKREdsyr.d.cts +32 -0
- package/dist/types-BKREdsyr.d.ts +32 -0
- package/package.json +44 -4
- package/dist/client/batch-mock-collector.d.ts +0 -87
- package/dist/client/batch-mock-collector.js +0 -223
- package/dist/client/util.d.ts +0 -1
- package/dist/client/util.js +0 -3
- package/dist/connect.cjs +0 -299
- package/dist/connect.d.cts +0 -95
- package/dist/server/index.d.ts +0 -1
- package/dist/server/index.js +0 -1
- package/dist/server/test-mock-mcp-server.d.ts +0 -73
- package/dist/server/test-mock-mcp-server.js +0 -392
- package/dist/types.d.ts +0 -42
- package/dist/types.js +0 -2
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
-
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
-
import { WebSocketServer, WebSocket } from "ws";
|
|
5
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
6
|
-
import path from "node:path";
|
|
7
|
-
import packageJson from "../../package.json" with { type: "json" };
|
|
8
|
-
import { BATCH_MOCK_REQUEST, BATCH_MOCK_RESPONSE, } from "../types.js";
|
|
9
|
-
const DEFAULT_PORT = 3002;
|
|
10
|
-
const DEFAULT_BATCH_TTL_MS = 5 * 60 * 1000;
|
|
11
|
-
/**
|
|
12
|
-
* Bridges the integration-test process and the MCP client, making it possible
|
|
13
|
-
* to generate realistic mock data on demand.
|
|
14
|
-
*/
|
|
15
|
-
export class TestMockMCPServer {
|
|
16
|
-
logger;
|
|
17
|
-
options;
|
|
18
|
-
wss;
|
|
19
|
-
cleanupTimer;
|
|
20
|
-
mcpServer;
|
|
21
|
-
transport;
|
|
22
|
-
started = false;
|
|
23
|
-
actualPort;
|
|
24
|
-
pendingBatches = new Map();
|
|
25
|
-
clients = new Set();
|
|
26
|
-
batchCounter = 0;
|
|
27
|
-
constructor(options = {}) {
|
|
28
|
-
this.logger = options.logger ?? console;
|
|
29
|
-
this.options = {
|
|
30
|
-
port: options.port,
|
|
31
|
-
logger: this.logger,
|
|
32
|
-
batchTtlMs: options.batchTtlMs ?? DEFAULT_BATCH_TTL_MS,
|
|
33
|
-
sweepIntervalMs: options.sweepIntervalMs,
|
|
34
|
-
enableMcpTransport: options.enableMcpTransport ?? true,
|
|
35
|
-
transportFactory: options.transportFactory,
|
|
36
|
-
serverName: options.serverName ?? "test-mock-server",
|
|
37
|
-
serverVersion: options.serverVersion ?? packageJson.version ?? "0.0.0",
|
|
38
|
-
mockLogOptions: options.mockLogOptions,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Start both the WebSocket server (for the test runner) and the MCP server
|
|
43
|
-
* (for the AI client).
|
|
44
|
-
*/
|
|
45
|
-
async start() {
|
|
46
|
-
if (this.started) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
await this.startWebSocketServer();
|
|
50
|
-
if (this.options.enableMcpTransport) {
|
|
51
|
-
await this.startMcpServer();
|
|
52
|
-
}
|
|
53
|
-
this.started = true;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Shut down all transports and clear pending batches.
|
|
57
|
-
*/
|
|
58
|
-
async stop() {
|
|
59
|
-
if (this.cleanupTimer) {
|
|
60
|
-
clearInterval(this.cleanupTimer);
|
|
61
|
-
this.cleanupTimer = undefined;
|
|
62
|
-
}
|
|
63
|
-
for (const ws of this.clients) {
|
|
64
|
-
ws.close();
|
|
65
|
-
}
|
|
66
|
-
this.clients.clear();
|
|
67
|
-
await new Promise((resolve) => {
|
|
68
|
-
if (!this.wss) {
|
|
69
|
-
resolve();
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
this.wss.close(() => resolve());
|
|
73
|
-
this.wss = undefined;
|
|
74
|
-
});
|
|
75
|
-
if (this.transport) {
|
|
76
|
-
await this.transport.close().catch((error) => {
|
|
77
|
-
this.logger.warn("Failed to close MCP transport:", error);
|
|
78
|
-
});
|
|
79
|
-
this.transport = undefined;
|
|
80
|
-
}
|
|
81
|
-
this.pendingBatches.clear();
|
|
82
|
-
this.mcpServer = undefined;
|
|
83
|
-
this.started = false;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Expose the TCP port that the WebSocket server is listening on. Useful when
|
|
87
|
-
* `port=0` is supplied for ephemeral environments or tests.
|
|
88
|
-
*/
|
|
89
|
-
get port() {
|
|
90
|
-
return this.actualPort ?? this.options.port;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Return summaries of all batches that are awaiting AI-provided mock data.
|
|
94
|
-
*/
|
|
95
|
-
getPendingBatches() {
|
|
96
|
-
return Array.from(this.pendingBatches.values()).map(({ batchId, timestamp, requests }) => ({
|
|
97
|
-
batchId,
|
|
98
|
-
timestamp,
|
|
99
|
-
requestCount: requests.length,
|
|
100
|
-
requests,
|
|
101
|
-
}));
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Send AI-generated mock data back to the corresponding test process.
|
|
105
|
-
*/
|
|
106
|
-
async provideMockData(args) {
|
|
107
|
-
const { batchId, mocks } = args;
|
|
108
|
-
const batch = this.pendingBatches.get(batchId);
|
|
109
|
-
if (!batch) {
|
|
110
|
-
throw new Error(`Batch not found: ${batchId}`);
|
|
111
|
-
}
|
|
112
|
-
const missing = mocks.find((mock) => !batch.requests.some((request) => request.requestId === mock.requestId));
|
|
113
|
-
if (missing) {
|
|
114
|
-
throw new Error(`Mock data references unknown requestId: ${missing.requestId}`);
|
|
115
|
-
}
|
|
116
|
-
if (batch.ws.readyState !== WebSocket.OPEN) {
|
|
117
|
-
this.pendingBatches.delete(batchId);
|
|
118
|
-
throw new Error(`Test process disconnected before mocks were provided for ${batchId}`);
|
|
119
|
-
}
|
|
120
|
-
try {
|
|
121
|
-
await this.persistMockBatch(batch, mocks);
|
|
122
|
-
}
|
|
123
|
-
catch (error) {
|
|
124
|
-
this.logger.warn(`Failed to persist mock batch ${batchId}:`, error);
|
|
125
|
-
}
|
|
126
|
-
const payload = {
|
|
127
|
-
type: BATCH_MOCK_RESPONSE,
|
|
128
|
-
batchId,
|
|
129
|
-
mocks,
|
|
130
|
-
};
|
|
131
|
-
batch.ws.send(JSON.stringify(payload));
|
|
132
|
-
this.pendingBatches.delete(batchId);
|
|
133
|
-
this.logger.error(`โ
Delivered ${mocks.length} mock(s) to test process for ${batchId}`);
|
|
134
|
-
return this.buildToolResponse(JSON.stringify({
|
|
135
|
-
success: true,
|
|
136
|
-
message: `Provided mock data for ${batchId}`,
|
|
137
|
-
}));
|
|
138
|
-
}
|
|
139
|
-
async startWebSocketServer() {
|
|
140
|
-
if (this.wss) {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
const desiredPort = this.options.port ?? DEFAULT_PORT;
|
|
144
|
-
await new Promise((resolve, reject) => {
|
|
145
|
-
const wss = new WebSocketServer({ port: desiredPort });
|
|
146
|
-
this.wss = wss;
|
|
147
|
-
wss.once("listening", () => {
|
|
148
|
-
const address = wss.address();
|
|
149
|
-
this.actualPort = address?.port ?? desiredPort;
|
|
150
|
-
this.logger.error(`๐ WebSocket server listening on ws://localhost:${this.actualPort}`);
|
|
151
|
-
resolve();
|
|
152
|
-
});
|
|
153
|
-
wss.once("error", (error) => {
|
|
154
|
-
this.logger.error("Failed to start WebSocket server:", error);
|
|
155
|
-
reject(error);
|
|
156
|
-
});
|
|
157
|
-
wss.on("connection", (ws) => this.handleConnection(ws));
|
|
158
|
-
});
|
|
159
|
-
if (this.options.batchTtlMs > 0) {
|
|
160
|
-
const interval = this.options.sweepIntervalMs ??
|
|
161
|
-
Math.min(this.options.batchTtlMs, 30_000);
|
|
162
|
-
this.cleanupTimer = setInterval(() => this.sweepExpiredBatches(), interval);
|
|
163
|
-
this.cleanupTimer.unref?.();
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
async startMcpServer() {
|
|
167
|
-
if (this.mcpServer) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
const serverName = this.options.serverName ?? "test-mock-server";
|
|
171
|
-
const serverVersion = this.options.serverVersion ??
|
|
172
|
-
packageJson.version ??
|
|
173
|
-
"0.0.0";
|
|
174
|
-
this.mcpServer = new Server({
|
|
175
|
-
name: serverName,
|
|
176
|
-
version: serverVersion,
|
|
177
|
-
}, {
|
|
178
|
-
capabilities: { tools: {} },
|
|
179
|
-
});
|
|
180
|
-
this.mcpServer.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
181
|
-
tools: [
|
|
182
|
-
{
|
|
183
|
-
name: "get_pending_batches",
|
|
184
|
-
description: "Inspect pending mock batches produced by the test run",
|
|
185
|
-
inputSchema: {
|
|
186
|
-
type: "object",
|
|
187
|
-
properties: {},
|
|
188
|
-
required: [],
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
name: "provide_batch_mock_data",
|
|
193
|
-
description: "Provide mock data for a specific batch",
|
|
194
|
-
inputSchema: {
|
|
195
|
-
type: "object",
|
|
196
|
-
properties: {
|
|
197
|
-
batchId: {
|
|
198
|
-
type: "string",
|
|
199
|
-
},
|
|
200
|
-
mocks: {
|
|
201
|
-
type: "array",
|
|
202
|
-
items: {
|
|
203
|
-
type: "object",
|
|
204
|
-
properties: {
|
|
205
|
-
requestId: { type: "string" },
|
|
206
|
-
data: {
|
|
207
|
-
type: "object",
|
|
208
|
-
},
|
|
209
|
-
status: {
|
|
210
|
-
type: "number",
|
|
211
|
-
},
|
|
212
|
-
headers: {
|
|
213
|
-
type: "object",
|
|
214
|
-
},
|
|
215
|
-
delayMs: {
|
|
216
|
-
type: "number",
|
|
217
|
-
},
|
|
218
|
-
},
|
|
219
|
-
required: ["requestId", "data"],
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
required: ["batchId", "mocks"],
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
],
|
|
227
|
-
}));
|
|
228
|
-
this.mcpServer.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
229
|
-
const toolName = request.params.name;
|
|
230
|
-
if (toolName === "get_pending_batches") {
|
|
231
|
-
this.logger.error("๐ MCP client inspected pending batches");
|
|
232
|
-
return this.buildToolResponse(JSON.stringify(this.getPendingBatches(), null, 2));
|
|
233
|
-
}
|
|
234
|
-
if (toolName === "provide_batch_mock_data") {
|
|
235
|
-
const args = request.params.arguments;
|
|
236
|
-
if (!isProvideBatchMockDataArgs(args)) {
|
|
237
|
-
throw new Error("Invalid arguments for provide_batch_mock_data");
|
|
238
|
-
}
|
|
239
|
-
return this.provideMockData(args);
|
|
240
|
-
}
|
|
241
|
-
throw new Error(`Unknown tool: ${toolName}`);
|
|
242
|
-
});
|
|
243
|
-
this.transport =
|
|
244
|
-
this.options.transportFactory?.() ?? new StdioServerTransport();
|
|
245
|
-
await this.mcpServer.connect(this.transport);
|
|
246
|
-
this.logger.error("โ
MCP server is ready (stdio transport)");
|
|
247
|
-
}
|
|
248
|
-
handleConnection(ws) {
|
|
249
|
-
this.logger.error("๐ Test process connected");
|
|
250
|
-
this.clients.add(ws);
|
|
251
|
-
ws.on("message", (data) => this.handleClientMessage(ws, data));
|
|
252
|
-
ws.on("close", () => {
|
|
253
|
-
this.logger.error("๐ Test process disconnected");
|
|
254
|
-
this.clients.delete(ws);
|
|
255
|
-
this.dropBatchesForClient(ws);
|
|
256
|
-
});
|
|
257
|
-
ws.on("error", (error) => {
|
|
258
|
-
this.logger.error("Test process WebSocket error:", error);
|
|
259
|
-
this.dropBatchesForClient(ws);
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
handleClientMessage(ws, data) {
|
|
263
|
-
let payload;
|
|
264
|
-
try {
|
|
265
|
-
payload = JSON.parse(data.toString());
|
|
266
|
-
}
|
|
267
|
-
catch (error) {
|
|
268
|
-
this.logger.error("Failed to parse WebSocket message:", error);
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
if (payload.type !== BATCH_MOCK_REQUEST) {
|
|
272
|
-
this.logger.warn("Unsupported message type received:", payload.type);
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
if (!Array.isArray(payload.requests) || payload.requests.length === 0) {
|
|
276
|
-
this.logger.warn("Received a batch without requests");
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
this.handleBatchRequest(ws, payload.requests);
|
|
280
|
-
}
|
|
281
|
-
handleBatchRequest(ws, requests) {
|
|
282
|
-
const batchId = `batch-${++this.batchCounter}`;
|
|
283
|
-
const timestamp = new Date().toISOString();
|
|
284
|
-
const expiresAt = this.options.batchTtlMs
|
|
285
|
-
? Date.now() + this.options.batchTtlMs
|
|
286
|
-
: undefined;
|
|
287
|
-
this.pendingBatches.set(batchId, {
|
|
288
|
-
batchId,
|
|
289
|
-
timestamp,
|
|
290
|
-
requestCount: requests.length,
|
|
291
|
-
requests,
|
|
292
|
-
ws,
|
|
293
|
-
expiresAt,
|
|
294
|
-
});
|
|
295
|
-
this.logger.error([
|
|
296
|
-
`๐ฅ Received ${requests.length} request(s) (${batchId})`,
|
|
297
|
-
...requests.map((req, index) => ` ${index + 1}. ${req.method} ${req.endpoint} (${req.requestId})`),
|
|
298
|
-
].join("\n"));
|
|
299
|
-
this.logger.error("โณ Awaiting mock data from MCP client...");
|
|
300
|
-
}
|
|
301
|
-
dropBatchesForClient(ws) {
|
|
302
|
-
for (const [batchId, batch] of this.pendingBatches) {
|
|
303
|
-
if (batch.ws === ws) {
|
|
304
|
-
this.pendingBatches.delete(batchId);
|
|
305
|
-
this.logger.warn(`๐งน Dropped pending batch ${batchId} because the test client disconnected`);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
sweepExpiredBatches() {
|
|
310
|
-
const now = Date.now();
|
|
311
|
-
for (const [batchId, batch] of this.pendingBatches) {
|
|
312
|
-
if (batch.expiresAt && batch.expiresAt <= now) {
|
|
313
|
-
this.pendingBatches.delete(batchId);
|
|
314
|
-
this.logger.warn(`๐งน Removed expired batch ${batchId} (waited more than ${this.options.batchTtlMs / 1000}s)`);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
async persistMockBatch(batch, mocks) {
|
|
319
|
-
const mockLogOptions = this.options.mockLogOptions;
|
|
320
|
-
if (!mockLogOptions?.enabled) {
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
const directory = path.resolve(process.cwd(), mockLogOptions.directory ?? "logs");
|
|
324
|
-
await mkdir(directory, { recursive: true });
|
|
325
|
-
const entry = this.buildLogEntry(batch, mocks);
|
|
326
|
-
const filePath = path.join(directory, `mock-${batch.batchId}.json`);
|
|
327
|
-
await writeFile(filePath, JSON.stringify(entry, null, 2), "utf8");
|
|
328
|
-
this.logger.error(`๐ Saved mock batch ${batch.batchId} to ${filePath}`);
|
|
329
|
-
}
|
|
330
|
-
buildLogEntry(batch, mocks) {
|
|
331
|
-
const mockMap = new Map(mocks.map((mock) => [mock.requestId, mock]));
|
|
332
|
-
return {
|
|
333
|
-
batchId: batch.batchId,
|
|
334
|
-
timestamp: batch.timestamp,
|
|
335
|
-
requestCount: batch.requestCount,
|
|
336
|
-
context: this.extractBatchContext(batch.requests),
|
|
337
|
-
requests: batch.requests.map((request) => ({
|
|
338
|
-
...request,
|
|
339
|
-
mock: mockMap.get(request.requestId),
|
|
340
|
-
})),
|
|
341
|
-
mocks,
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
extractBatchContext(requests) {
|
|
345
|
-
const contextKeys = ["testCaseId", "testFile", "testTitle", "testName"];
|
|
346
|
-
const context = {};
|
|
347
|
-
for (const key of contextKeys) {
|
|
348
|
-
const requestWithValue = requests.find((request) => request.metadata && request.metadata[key] !== undefined);
|
|
349
|
-
if (requestWithValue?.metadata) {
|
|
350
|
-
context[key] = requestWithValue.metadata[key];
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
const metadataSnapshots = requests
|
|
354
|
-
.map((request) => request.metadata)
|
|
355
|
-
.filter((metadata) => {
|
|
356
|
-
if (!metadata) {
|
|
357
|
-
return false;
|
|
358
|
-
}
|
|
359
|
-
return Object.keys(metadata).length > 0;
|
|
360
|
-
});
|
|
361
|
-
if (metadataSnapshots.length > 0) {
|
|
362
|
-
context.metadata = metadataSnapshots;
|
|
363
|
-
}
|
|
364
|
-
return Object.keys(context).length > 0 ? context : undefined;
|
|
365
|
-
}
|
|
366
|
-
buildToolResponse(text) {
|
|
367
|
-
return {
|
|
368
|
-
content: [
|
|
369
|
-
{
|
|
370
|
-
type: "text",
|
|
371
|
-
text,
|
|
372
|
-
},
|
|
373
|
-
],
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
function isProvideBatchMockDataArgs(value) {
|
|
378
|
-
if (!value || typeof value !== "object") {
|
|
379
|
-
return false;
|
|
380
|
-
}
|
|
381
|
-
const candidate = value;
|
|
382
|
-
if (typeof candidate.batchId !== "string" || !Array.isArray(candidate.mocks)) {
|
|
383
|
-
return false;
|
|
384
|
-
}
|
|
385
|
-
return candidate.mocks.every((mock) => {
|
|
386
|
-
if (!mock || typeof mock !== "object") {
|
|
387
|
-
return false;
|
|
388
|
-
}
|
|
389
|
-
const descriptor = mock;
|
|
390
|
-
return typeof descriptor.requestId === "string" && "data" in descriptor;
|
|
391
|
-
});
|
|
392
|
-
}
|
package/dist/types.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export declare const BATCH_MOCK_REQUEST: "BATCH_MOCK_REQUEST";
|
|
2
|
-
export declare const BATCH_MOCK_RESPONSE: "BATCH_MOCK_RESPONSE";
|
|
3
|
-
/**
|
|
4
|
-
* Shape of a mock request emitted by the test process.
|
|
5
|
-
*/
|
|
6
|
-
export interface MockRequestDescriptor {
|
|
7
|
-
requestId: string;
|
|
8
|
-
endpoint: string;
|
|
9
|
-
method: string;
|
|
10
|
-
body?: unknown;
|
|
11
|
-
headers?: Record<string, string>;
|
|
12
|
-
metadata?: Record<string, unknown>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Shape of the mock data that needs to be returned for a request.
|
|
16
|
-
*/
|
|
17
|
-
export interface MockResponseDescriptor {
|
|
18
|
-
requestId: string;
|
|
19
|
-
data: unknown;
|
|
20
|
-
status?: number;
|
|
21
|
-
headers?: Record<string, string>;
|
|
22
|
-
delayMs?: number;
|
|
23
|
-
}
|
|
24
|
-
export interface BatchMockRequestMessage {
|
|
25
|
-
type: typeof BATCH_MOCK_REQUEST;
|
|
26
|
-
requests: MockRequestDescriptor[];
|
|
27
|
-
}
|
|
28
|
-
export interface BatchMockResponseMessage {
|
|
29
|
-
type: typeof BATCH_MOCK_RESPONSE;
|
|
30
|
-
batchId: string;
|
|
31
|
-
mocks: MockResponseDescriptor[];
|
|
32
|
-
}
|
|
33
|
-
export interface PendingBatchSummary {
|
|
34
|
-
batchId: string;
|
|
35
|
-
timestamp: string;
|
|
36
|
-
requestCount: number;
|
|
37
|
-
requests: MockRequestDescriptor[];
|
|
38
|
-
}
|
|
39
|
-
export interface ProvideBatchMockDataArgs {
|
|
40
|
-
batchId: string;
|
|
41
|
-
mocks: MockResponseDescriptor[];
|
|
42
|
-
}
|
package/dist/types.js
DELETED