fix: improve CLI error handling and user guidance
- Add Node.js >= 22 runtime version check before any imports - Add EADDRINUSE error handlers for HTTP and WebSocket servers - Fix misleading 'Couldn't parse Quartz configuration' error message - Add actionable guidance to sync/upgrade/push failure messages - Add --concurrency validation (must be >= 1)
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
#!/usr/bin/env -S node --no-deprecation
|
||||
const [major] = process.versions.node.split(".").map(Number)
|
||||
if (major < 22) {
|
||||
console.error(
|
||||
`\nQuartz requires Node.js >= 22, but you are running Node.js ${process.version}.\n` +
|
||||
`Please upgrade: https://nodejs.org/\n`,
|
||||
)
|
||||
process.exit(1)
|
||||
}
|
||||
import yargs from "yargs"
|
||||
import { hideBin } from "yargs/helpers"
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user