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/generators/utils/glob.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.glob = void 0;
const globs_1 = require("../../utils/globs");
const workspace_context_1 = require("../../utils/workspace-context");
const minimatch = require("minimatch");
/**
 * Performs a tree-aware glob search on the files in a workspace. Able to find newly
 * created files and hides deleted files before the updates are committed to disk.
 * Paths should be unix-style with forward slashes.
 *
 * @param tree The file system tree
 * @param patterns A list of glob patterns
 * @returns Normalized paths in the workspace that match the provided glob patterns.
 */
function glob(tree, patterns) {
    const matches = new Set((0, workspace_context_1.globWithWorkspaceContext)(tree.root, patterns));
    const combinedGlob = (0, globs_1.combineGlobPatterns)(patterns);
    const matcher = minimatch.makeRe(combinedGlob);
    if (!matcher) {
        throw new Error('Invalid glob pattern: ' + combinedGlob);
    }
    for (const change of tree.listChanges()) {
        if (change.type !== 'UPDATE' && matcher.test(change.path)) {
            if (change.type === 'CREATE') {
                matches.add(change.path);
            }
            else if (change.type === 'DELETE') {
                matches.delete(change.path);
            }
        }
    }
    return Array.from(matches);
}
exports.glob = glob;