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/web.enelar.com.co/node_modules/nx/src/commands-runner/create-command-graph.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createCommandGraph = void 0;
const task_graph_utils_1 = require("../tasks-runner/task-graph-utils");
const output_1 = require("../utils/output");
function createCommandGraph(projectGraph, projectNames, nxArgs) {
    const dependencies = {};
    for (const projectName of projectNames) {
        if (projectGraph.dependencies[projectName].length >= 1) {
            dependencies[projectName] = [
                ...new Set(projectGraph.dependencies[projectName]
                    .map((projectDep) => projectDep.target)
                    .filter((projectDep) => projectGraph.nodes[projectDep])).values(),
            ];
        }
        else {
            dependencies[projectName] = [];
        }
    }
    const roots = Object.keys(dependencies).filter((d) => dependencies[d].length === 0);
    const commandGraph = {
        dependencies,
        roots,
    };
    const cycle = (0, task_graph_utils_1.findCycle)(commandGraph);
    if (cycle) {
        if (process.env.NX_IGNORE_CYCLES === 'true' || nxArgs.nxIgnoreCycles) {
            output_1.output.warn({
                title: `The command graph has a circular dependency`,
                bodyLines: [`${cycle.join(' --> ')}`],
            });
            (0, task_graph_utils_1.makeAcyclic)(commandGraph);
        }
        else {
            output_1.output.error({
                title: `Could not execute command because the project graph has a circular dependency`,
                bodyLines: [`${cycle.join(' --> ')}`],
            });
            process.exit(1);
        }
    }
    return commandGraph;
}
exports.createCommandGraph = createCommandGraph;