BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/tinyglobby/node_modules/fdir/dist
Run
Logout
Edit File
Size: 2.12 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/tinyglobby/node_modules/fdir/dist/optimizer.js
Text
Base64
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.findMaxDepth = exports.findDirectoryPatterns = exports.findCommonRoots = void 0; // Glob Optimizations: // 1. Find common roots and only iterate on them // For example: // 1. "node_modules/**/*.ts" only requires us to search in node_modules // folder. // 2. Similarly, multiple glob patterns can have common deterministic roots // The optimizer's job is to find these roots and only crawl them. // 3. If any of the glob patterns have a globstar i.e. **/ in them, we // should bail out. // 2. Find out if glob is requesting only directories // 3. Find maximum depth requested // 4. If glob contains a root that doesn't exist, bail out const braces_1 = require("braces"); const glob_parent_1 = __importDefault(require("glob-parent")); function findCommonRoots(patterns) { const allRoots = new Set(); patterns = patterns.map((p) => (p.includes("{") ? (0, braces_1.expand)(p) : p)).flat(); for (const pattern of patterns) { const parent = (0, glob_parent_1.default)(pattern); if (parent === ".") return []; allRoots.add(parent); } return Array.from(allRoots.values()).filter((root) => { for (const r of allRoots) { if (r === root) continue; if (root.startsWith(r)) return false; } return true; }); } exports.findCommonRoots = findCommonRoots; function findDirectoryPatterns(patterns) { return patterns.filter((p) => p.endsWith("/")); } exports.findDirectoryPatterns = findDirectoryPatterns; function findMaxDepth(patterns) { const isGlobstar = patterns.some((p) => p.includes("**/") || p.includes("/**") || p === "**"); if (isGlobstar) return false; const maxDepth = patterns.reduce((depth, p) => { return Math.max(depth, p.split("/").filter(Boolean).length); }, 0); return maxDepth; } exports.findMaxDepth = findMaxDepth;
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
api
DIR
-
drwxr-xr-x
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
builder
DIR
-
drwxr-xr-x
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.d.ts
125 B
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
973 B
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
optimizer.d.ts
222 B
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
optimizer.js
2.12 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
types.d.ts
1.93 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
types.js
77 B
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.d.ts
352 B
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js
1.29 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).