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/utils/workspace-root.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.workspaceRootInner = exports.setWorkspaceRoot = exports.workspaceRoot = void 0;
const path = require("path");
const fileutils_1 = require("./fileutils");
/**
 * The root of the workspace
 */
exports.workspaceRoot = workspaceRootInner(process.cwd(), process.cwd());
// Required for integration tests in projects which depend on Nx at runtime, such as lerna and angular-eslint
function setWorkspaceRoot(root) {
    exports.workspaceRoot = root;
}
exports.setWorkspaceRoot = setWorkspaceRoot;
function workspaceRootInner(dir, candidateRoot) {
    if (process.env.NX_WORKSPACE_ROOT_PATH)
        return process.env.NX_WORKSPACE_ROOT_PATH;
    if (path.dirname(dir) === dir)
        return candidateRoot;
    const matches = [
        path.join(dir, 'nx.json'),
        path.join(dir, 'nx'),
        path.join(dir, 'nx.bat'),
    ];
    if (matches.some((x) => (0, fileutils_1.fileExists)(x))) {
        return dir;
        // This handles the case where we have a workspace which uses npm / yarn / pnpm
        // workspaces, and has a project which contains Nx in its dependency tree.
        // e.g. packages/my-lib/package.json contains @nx/devkit, which references Nx and is
        // thus located in //packages/my-lib/node_modules/nx/package.json
    }
    else if ((0, fileutils_1.fileExists)(path.join(dir, 'node_modules', 'nx', 'package.json'))) {
        return workspaceRootInner(path.dirname(dir), dir);
    }
    else {
        return workspaceRootInner(path.dirname(dir), candidateRoot);
    }
}
exports.workspaceRootInner = workspaceRootInner;