UNPKG

@redocly/cli

Version:

[@Redocly](https://redocly.com) CLI is your all-in-one OpenAPI utility. It builds, manages, improves, and quality-checks your OpenAPI descriptions, all of which comes in handy for various phases of the API Lifecycle. Create your own rulesets to make API g

20 lines (17 loc) 518 B
import * as semver from 'semver'; import * as path from 'path'; import * as process from 'process'; import { yellow } from 'colorette'; try { const { engines } = require(path.join(__dirname, '../package.json')); const version = engines.node; if (!semver.satisfies(process.version, version)) { process.stderr.write( yellow( `\n⚠️ Warning: failed to satisfy expected node version. Expected: "${version}", Current "${process.version}"\n\n` ) ); } } catch (e) { // Do nothing }