| Server IP : 159.203.156.69 / Your IP : 216.73.217.172 Web Server : nginx/1.24.0 System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/tanviranik.com/node_modules/vinext/dist/utils/ |
Upload File : |
{"version":3,"file":"vinext-root.js","names":[],"sources":["../../src/utils/vinext-root.ts"],"sourcesContent":["import path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\n/**\n * Resolve the root directory of the vinext package at runtime.\n *\n * Both the CLI pre-flight check (`cli.ts`) and the standalone output emitter\n * (`build/standalone.ts`) need to locate vinext's package root so they can\n * verify that `dist/` exists and copy vinext's runtime files into standalone\n * output. Centralising the logic here ensures the two callers stay in sync.\n *\n * The resolution works for both the compiled output layout and for running\n * directly from source:\n *\n * - Compiled layout: this file lives at `dist/utils/vinext-root.js`\n * → two levels up (`../..`) is the package root.\n * - Source layout: this file lives at `src/utils/vinext-root.ts`\n * → two levels up (`../..`) is the package root.\n *\n * If an explicit root is provided (e.g. from a test fixture), it is returned\n * as-is after resolving to an absolute path.\n */\nexport function resolveVinextPackageRoot(explicitRoot?: string): string {\n if (explicitRoot) {\n return path.resolve(explicitRoot);\n }\n const currentDir = path.dirname(fileURLToPath(import.meta.url));\n // src/utils/vinext-root.ts → ../.. → package root\n // dist/utils/vinext-root.js → ../.. → package root\n return path.resolve(currentDir, \"..\", \"..\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,yBAAyB,cAA+B;CACtE,IAAI,cACF,OAAO,KAAK,QAAQ,aAAa;CAEnC,MAAM,aAAa,KAAK,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;CAG/D,OAAO,KAAK,QAAQ,YAAY,MAAM,KAAK"}