import { d as defineCommand, b as legacyRootDirArgs, e as extendsArgs, f as envNameArgs, a as dotEnvArgs, l as logLevelArgs, c as cwdArgs } from '../shared/nuxi.C0YEEVs2.mjs';
import buildCommand from './build.mjs';
import 'node:crypto';
import 'node:path';
import 'node:process';
import '../shared/nuxi.DQjfoGl0.mjs';
import 'node:util';
import 'node:tty';
import 'node:url';
import '../shared/nuxi.DvsQ9ry-.mjs';
import 'node:fs';
import '../shared/nuxi.BLb4POFS.mjs';
import 'node:assert';
import 'node:v8';
import '../shared/nuxi.BiWTNJI4.mjs';
import '../shared/nuxi.C_u-rG9b.mjs';
import '../shared/nuxi.CrvQqJcE.mjs';
import '../shared/nuxi.Do0aYBCO.mjs';

const generate = defineCommand({
  meta: {
    name: "generate",
    description: "Build Nuxt and prerender all routes"
  },
  args: {
    ...cwdArgs,
    ...logLevelArgs,
    preset: {
      type: "string",
      description: "Nitro server preset"
    },
    ...dotEnvArgs,
    ...envNameArgs,
    ...extendsArgs,
    ...legacyRootDirArgs
  },
  async run(ctx) {
    ctx.args.prerender = true;
    await buildCommand.run(
      // @ts-expect-error types do not match
      ctx
    );
  }
});

export { generate as default };
