import require$$4$1 from 'assert';
import { g as gray, b as bold, a as green } from './cli.1da5a031.mjs';
import { t as tryRequireModule } from './cli.bf96fb69.mjs';
import 'events';
import 'fs';
import 'path';
import 'util';
import 'stream';
import 'os';
import 'node:fs';
import 'node:module';
import 'node:url';
import 'node:fs/promises';
import 'node:os';
import 'crypto';
import 'module';
import 'perf_hooks';
import 'vm';
import 'url';
import 'buffer';
import 'tty';
import 'node:path';
import 'constants';
import 'net';
import 'child_process';

const version = "0.0.1";
const engines = {
	node: "^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
};

var assert = require$$4$1;

var clear = function clear(opts) {
    if (typeof (opts) === 'boolean') {
        opts = {
            fullClear: opts
        };
    }

    opts = opts || {};
    assert(typeof (opts) === 'object', 'opts must be an object');

    opts.fullClear = opts.hasOwnProperty('fullClear') ?
        opts.fullClear : true;

    assert(typeof (opts.fullClear) === 'boolean',
        'opts.fullClear must be a boolean');

    if (opts.fullClear === true) {
        process.stdout.write('\x1b[2J');
    }

    process.stdout.write('\x1b[0f');
};

function showBanner(_clear) {
  if (_clear) {
    clear();
  }
  console.log(gray(`RemixKit ${bold(version)}`));
}
function showVersions(cwd) {
  const getPkgVersion = (pkg) => {
    return tryRequireModule(`${pkg}/package.json`, cwd)?.version || "";
  };
  const remixVersion = getPkgVersion("@remix-run/server-runtime") || getPkgVersion("remix");
  console.log(
    gray(
      green(`Remix ${bold(remixVersion)}`)
    )
  );
}

export { showVersions as a, engines as e, showBanner as s };
