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/hasher/hash-task.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hashTask = exports.hashTasksThatDoNotDependOnOutputsOfOtherTasks = void 0;
const utils_1 = require("../tasks-runner/utils");
const project_graph_1 = require("../project-graph/project-graph");
const task_hasher_1 = require("./task-hasher");
const nx_json_1 = require("../config/nx-json");
async function hashTasksThatDoNotDependOnOutputsOfOtherTasks(hasher, projectGraph, taskGraph, nxJson) {
    performance.mark('hashMultipleTasks:start');
    const tasks = Object.values(taskGraph.tasks);
    const tasksWithHashers = await Promise.all(tasks.map(async (task) => {
        const customHasher = await (0, utils_1.getCustomHasher)(task, projectGraph);
        return { task, customHasher };
    }));
    const tasksToHash = tasksWithHashers
        .filter(({ task, customHasher }) => {
        // If a task has a custom hasher, it might depend on the outputs of other tasks
        if (customHasher) {
            return false;
        }
        return !(taskGraph.dependencies[task.id].length > 0 &&
            (0, task_hasher_1.getInputs)(task, projectGraph, nxJson).depsOutputs.length > 0);
    })
        .map((t) => t.task);
    const hashes = await hasher.hashTasks(tasksToHash, taskGraph);
    for (let i = 0; i < tasksToHash.length; i++) {
        tasksToHash[i].hash = hashes[i].value;
        tasksToHash[i].hashDetails = hashes[i].details;
    }
    performance.mark('hashMultipleTasks:end');
    performance.measure('hashMultipleTasks', 'hashMultipleTasks:start', 'hashMultipleTasks:end');
}
exports.hashTasksThatDoNotDependOnOutputsOfOtherTasks = hashTasksThatDoNotDependOnOutputsOfOtherTasks;
async function hashTask(hasher, projectGraph, taskGraph, task, env) {
    performance.mark('hashSingleTask:start');
    const customHasher = await (0, utils_1.getCustomHasher)(task, projectGraph);
    const projectsConfigurations = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph);
    const { value, details } = await (customHasher
        ? customHasher(task, {
            hasher,
            projectGraph,
            taskGraph,
            workspaceConfig: projectsConfigurations,
            projectsConfigurations,
            nxJsonConfiguration: (0, nx_json_1.readNxJson)(),
            env,
        })
        : hasher.hashTask(task, taskGraph, env));
    task.hash = value;
    task.hashDetails = details;
    performance.mark('hashSingleTask:end');
    performance.measure('hashSingleTask', 'hashSingleTask:start', 'hashSingleTask:end');
}
exports.hashTask = hashTask;