@warp-drive/holodeck 0.1.0-alpha.14 → 0.1.0-alpha.15
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/package.json +8 -8
- package/server/index.js +11 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warp-drive/holodeck",
|
|
3
3
|
"description": "⚡️ Simple, Fast HTTP Mocking for Tests",
|
|
4
|
-
"version": "0.1.0-alpha.
|
|
4
|
+
"version": "0.1.0-alpha.15",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Chris Thoburn <runspired@users.noreply.github.com>",
|
|
7
7
|
"repository": {
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"ensure-cert": "./server/ensure-cert.js"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@warp-drive/utilities": "5.8.0-alpha.
|
|
43
|
-
"@warp-drive/legacy": "5.8.0-alpha.
|
|
44
|
-
"@warp-drive/core": "5.8.0-alpha.
|
|
42
|
+
"@warp-drive/utilities": "5.8.0-alpha.15",
|
|
43
|
+
"@warp-drive/legacy": "5.8.0-alpha.15",
|
|
44
|
+
"@warp-drive/core": "5.8.0-alpha.15"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"@warp-drive/utilities": {
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"@babel/preset-env": "^7.28.3",
|
|
58
58
|
"@babel/preset-typescript": "^7.27.1",
|
|
59
59
|
"@babel/runtime": "^7.28.3",
|
|
60
|
-
"@warp-drive/utilities": "5.8.0-alpha.
|
|
61
|
-
"@warp-drive/legacy": "5.8.0-alpha.
|
|
62
|
-
"@warp-drive/core": "5.8.0-alpha.
|
|
63
|
-
"@warp-drive/internal-config": "5.8.0-alpha.
|
|
60
|
+
"@warp-drive/utilities": "5.8.0-alpha.15",
|
|
61
|
+
"@warp-drive/legacy": "5.8.0-alpha.15",
|
|
62
|
+
"@warp-drive/core": "5.8.0-alpha.15",
|
|
63
|
+
"@warp-drive/internal-config": "5.8.0-alpha.15",
|
|
64
64
|
"vite": "^7.1.3"
|
|
65
65
|
},
|
|
66
66
|
"exports": {
|
package/server/index.js
CHANGED
|
@@ -301,6 +301,10 @@ function createTestHandler(projectRoot) {
|
|
|
301
301
|
body: body ? body : null,
|
|
302
302
|
testRequestNumber,
|
|
303
303
|
});
|
|
304
|
+
|
|
305
|
+
console.log(
|
|
306
|
+
`Replaying mock for ${req.method} ${niceUrl} (test: ${testId} request #${testRequestNumber}) from '${cacheKey}' if available`
|
|
307
|
+
);
|
|
304
308
|
return replayRequest(context, cacheKey);
|
|
305
309
|
}
|
|
306
310
|
} catch (e) {
|
|
@@ -369,6 +373,12 @@ async function waitForLog(server, logMessage) {
|
|
|
369
373
|
}
|
|
370
374
|
}
|
|
371
375
|
|
|
376
|
+
async function reprintLogs(server) {
|
|
377
|
+
for await (const chunk of server.stdout) {
|
|
378
|
+
process.stdout.write(chunk);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
372
382
|
/*
|
|
373
383
|
{ port?: number, projectRoot: string }
|
|
374
384
|
*/
|
|
@@ -385,6 +395,7 @@ export async function createServer(options, useBun = false) {
|
|
|
385
395
|
});
|
|
386
396
|
|
|
387
397
|
await waitForLog(server, 'Serving Holodeck HTTP Mocks');
|
|
398
|
+
void reprintLogs(server);
|
|
388
399
|
|
|
389
400
|
return {
|
|
390
401
|
terminate() {
|