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/api-storage/node_modules/@swc/cli/lib/swc/sources.js.map
{"version":3,"sources":["../../src/swc/sources.ts"],"sourcesContent":["import glob from \"fast-glob\";\nimport slash from \"slash\";\nimport { stat } from \"fs\";\nimport { join, basename, extname } from \"path\";\nimport { minimatch } from \"minimatch\";\n\n/**\n * Find all input files based on source globs\n */\nexport async function globSources(\n    sources: string[],\n    only: string[],\n    ignore: string[],\n    includeDotfiles = false\n): Promise<string[]> {\n    const globConfig: glob.Options = {\n        dot: includeDotfiles,\n        ignore,\n    };\n\n    const files = await Promise.all(\n        sources\n            .filter(\n                source =>\n                    includeDotfiles ||\n                    source === \".\" ||\n                    !basename(source).startsWith(\".\")\n            )\n            .map(source => {\n                return new Promise<string[]>(resolve => {\n                    stat(source, (err, stat) => {\n                        if (err) {\n                            resolve([]);\n                            return;\n                        }\n                        if (!stat.isDirectory()) {\n                            resolve([source]);\n                        } else {\n                            glob(slash(join(source, \"**\")), globConfig)\n                                .then(matches => resolve(matches))\n                                .catch(() => resolve([]));\n                        }\n                    });\n                });\n            })\n    );\n\n    const f = files.flat().filter(filename => {\n        return (\n            !only ||\n            only.length === 0 ||\n            only.some(only => minimatch(slash(filename), only))\n        );\n    });\n\n    return Array.from(new Set<string>(f));\n}\n\ntype Split = [compilable: string[], copyable: string[]];\n\n/**\n * Test if a filename ends with a compilable extension.\n */\nexport function isCompilableExtension(\n    filename: string,\n    allowedExtension: string[]\n): boolean {\n    const ext = extname(filename);\n    return allowedExtension.includes(ext);\n}\n\n/**\n * Split file list to files that can be compiled and copied\n */\nexport function splitCompilableAndCopyable(\n    files: string[],\n    allowedExtension: string[],\n    copyFiles: boolean\n): Split {\n    const compilable: string[] = [];\n    const copyable: string[] = [];\n\n    for (const file of files) {\n        const isCompilable = isCompilableExtension(file, allowedExtension);\n\n        if (isCompilable) {\n            compilable.push(file);\n        } else if (copyFiles) {\n            copyable.push(file);\n        }\n    }\n\n    return [compilable, copyable];\n}\n\nexport async function requireChokidar() {\n    try {\n        const { default: chokidar } = await import(\"chokidar\");\n        return chokidar;\n    } catch (err) {\n        console.error(\n            \"The optional dependency chokidar is not installed and is required for \" +\n                \"--watch. Chokidar is likely not supported on your platform.\"\n        );\n        throw err;\n    }\n}\n\nexport async function watchSources(sources: string[], includeDotfiles = false) {\n    const chokidar = await requireChokidar();\n\n    return chokidar.watch(sources, {\n        ignored: includeDotfiles\n            ? undefined\n            : (filename: string) => basename(filename).startsWith(\".\"),\n        ignoreInitial: true,\n        awaitWriteFinish: {\n            stabilityThreshold: 50,\n            pollInterval: 10,\n        },\n    });\n}\n"],"names":["globSources","isCompilableExtension","requireChokidar","splitCompilableAndCopyable","watchSources","sources","only","ignore","includeDotfiles","globConfig","dot","files","Promise","all","filter","source","basename","startsWith","map","resolve","stat","err","isDirectory","glob","slash","join","then","matches","catch","f","flat","filename","length","some","minimatch","Array","from","Set","allowedExtension","ext","extname","includes","copyFiles","compilable","copyable","file","isCompilable","push","default","chokidar","console","error","watch","ignored","undefined","ignoreInitial","awaitWriteFinish","stabilityThreshold","pollInterval"],"mappings":";;;;;;;;;;;IASsBA,WAAW;eAAXA;;IAsDNC,qBAAqB;eAArBA;;IAgCMC,eAAe;eAAfA;;IArBNC,0BAA0B;eAA1BA;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