HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/api-parametros/node_modules/@nestjs/cli/commands/start.command.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StartCommand = void 0;
const ui_1 = require("../lib/ui");
const remaining_flags_1 = require("../lib/utils/remaining-flags");
const abstract_command_1 = require("./abstract.command");
class StartCommand extends abstract_command_1.AbstractCommand {
    load(program) {
        program
            .command('start [app]')
            .allowUnknownOption()
            .option('-c, --config [path]', 'Path to nest-cli configuration file.')
            .option('-p, --path [path]', 'Path to tsconfig file.')
            .option('-w, --watch', 'Run in watch mode (live-reload).')
            .option('-b, --builder [name]', 'Builder to be used (tsc, webpack, swc).')
            .option('--watchAssets', 'Watch non-ts (e.g., .graphql) files mode.')
            .option('-d, --debug [hostport] ', 'Run in debug mode (with --inspect flag).')
            .option('--webpack', 'Use webpack for compilation (deprecated option, use --builder instead).')
            .option('--webpackPath [path]', 'Path to webpack configuration.')
            .option('--type-check', 'Enable type checking (when SWC is used).')
            .option('--tsc', 'Use typescript compiler for compilation.')
            .option('--sourceRoot [sourceRoot]', 'Points at the root of the source code for the single project in standard mode structures, or the default project in monorepo mode structures.')
            .option('--entryFile [entryFile]', "Path to the entry file where this command will work with. Defaults to the one defined at your Nest's CLI config file.")
            .option('-e, --exec [binary]', 'Binary to run (default: "node").')
            .option('--preserveWatchOutput', 'Use "preserveWatchOutput" option when using tsc watch mode.')
            .description('Run Nest application.')
            .action(async (app, command) => {
            const options = [];
            options.push({
                name: 'config',
                value: command.config,
            });
            const isWebpackEnabled = command.tsc ? false : command.webpack;
            options.push({ name: 'webpack', value: isWebpackEnabled });
            options.push({ name: 'debug', value: command.debug });
            options.push({ name: 'watch', value: !!command.watch });
            options.push({ name: 'watchAssets', value: !!command.watchAssets });
            options.push({
                name: 'path',
                value: command.path,
            });
            options.push({
                name: 'webpackPath',
                value: command.webpackPath,
            });
            options.push({
                name: 'exec',
                value: command.exec,
            });
            options.push({
                name: 'sourceRoot',
                value: command.sourceRoot,
            });
            options.push({
                name: 'entryFile',
                value: command.entryFile,
            });
            options.push({
                name: 'preserveWatchOutput',
                value: !!command.preserveWatchOutput &&
                    !!command.watch &&
                    !isWebpackEnabled,
            });
            const availableBuilders = ['tsc', 'webpack', 'swc'];
            if (command.builder && !availableBuilders.includes(command.builder)) {
                console.error(ui_1.ERROR_PREFIX +
                    ` Invalid builder option: ${command.builder}. Available builders: ${availableBuilders.join(', ')}`);
                return;
            }
            options.push({
                name: 'builder',
                value: command.builder,
            });
            if (command.typeCheck && command.builder !== 'swc') {
                console.warn(ui_1.INFO_PREFIX +
                    ` "typeCheck" will not have any effect when "builder" is not "swc".`);
            }
            options.push({
                name: 'typeCheck',
                value: command.typeCheck,
            });
            const inputs = [];
            inputs.push({ name: 'app', value: app });
            const flags = (0, remaining_flags_1.getRemainingFlags)(program);
            try {
                await this.action.handle(inputs, options, flags);
            }
            catch (err) {
                process.exit(1);
            }
        });
    }
}
exports.StartCommand = StartCommand;