Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 57 additions & 80 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"dependencies": {
"@vizzly-testing/honeydiff": "^0.10.0",
"ansis": "^4.2.0",
"better-sqlite3": "^12.6.2",
"commander": "^14.0.0",
"cosmiconfig": "^9.0.0",
"dotenv": "^17.2.1",
Expand Down
6 changes: 6 additions & 0 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import {
generateStaticReport,
getReportFileUrl,
} from './services/static-report-generator.js';
import { bootstrapLegacyStateIfNeeded } from './tdd/state-store.js';
import { openBrowser } from './utils/browser.js';
import { colors } from './utils/colors.js';
import { loadConfig } from './utils/config-loader.js';
Expand Down Expand Up @@ -331,6 +332,11 @@ output.configure({
json: jsonArg,
});

bootstrapLegacyStateIfNeeded({
workingDir: process.cwd(),
output,
});

const config = await loadConfig(configPath, {});
const services = createServices(config);
const pluginServices = createPluginServices(services);
Expand Down
10 changes: 10 additions & 0 deletions src/commands/tdd-daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ export async function tddStartCommand(options = {}, globalOptions = {}) {
// The registry acts as a soft reservation, and findAvailablePort does
// an actual TCP bind test to minimize this window.
port = await registry.findAvailablePort();
if (port == null) {
output.header('tdd', 'local');
output.print(
` ${output.statusDot('error')} No available port found after trying 100 ports starting at 47392`
);
output.blank();
output.hint('Free a running TDD server and try again');
output.hint('Or specify a port manually: vizzly tdd start --port <port>');
return;
}
autoAllocated = port !== 47392;
}

Expand Down
Loading