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/daemon/socket-utils.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeResult = exports.killSocketOrPath = exports.FULL_OS_SOCKET_PATH = exports.isWindows = void 0;
const fs_1 = require("fs");
const os_1 = require("os");
const path_1 = require("path");
const tmp_dir_1 = require("./tmp-dir");
exports.isWindows = (0, os_1.platform)() === 'win32';
/**
 * For IPC with the daemon server we use unix sockets or windows named pipes, depending on the user's operating system.
 *
 * See https://nodejs.org/dist/latest-v14.x/docs/api/net.html#net_identifying_paths_for_ipc_connections for a full breakdown
 * of OS differences between Unix domain sockets and named pipes.
 */
exports.FULL_OS_SOCKET_PATH = exports.isWindows
    ? '\\\\.\\pipe\\nx\\' + (0, path_1.resolve)(tmp_dir_1.DAEMON_SOCKET_PATH)
    : (0, path_1.resolve)(tmp_dir_1.DAEMON_SOCKET_PATH);
function killSocketOrPath() {
    try {
        (0, fs_1.unlinkSync)(exports.FULL_OS_SOCKET_PATH);
    }
    catch { }
}
exports.killSocketOrPath = killSocketOrPath;
// Include the original stack trace within the serialized error so that the client can show it to the user.
function serializeError(error) {
    if (!error) {
        return null;
    }
    return JSON.stringify(error, Object.getOwnPropertyNames(error));
}
// Prepare a serialized project graph result for sending over IPC from the server to the client
function serializeResult(error, serializedProjectGraph, serializedSourceMaps) {
    // We do not want to repeat work `JSON.stringify`ing an object containing the potentially large project graph so merge as strings
    return `{ "error": ${serializeError(error)}, "projectGraph": ${serializedProjectGraph}, "sourceMaps": ${serializedSourceMaps} }`;
}
exports.serializeResult = serializeResult;