{"version":3,"file":"resolve-working-dirs.mjs","sources":["../../src/utils/resolve-working-dirs.ts"],"sourcesContent":["import path from 'node:path';\n\n/**\n * Resolve the working directories based on the instance options.\n *\n * Behavior:\n * - `appDir` is the directory where Strapi will write every file (schemas, generated APIs, controllers or services)\n * - `distDir` is the directory where Strapi will read configurations, schemas and any compiled code\n *\n * Default values:\n * - If `appDir` is `undefined`, it'll be set to `process.cwd()`\n * - If `distDir` is `undefined`, it'll be set to `appDir`\n */\nexport const resolveWorkingDirectories = (opts: { appDir?: string; distDir?: string }) => {\n const cwd = process.cwd();\n\n const appDir = opts.appDir ? path.resolve(cwd, opts.appDir) : cwd;\n const distDir = opts.distDir ? path.resolve(cwd, opts.distDir) : appDir;\n\n return { appDir, distDir };\n};\n"],"names":["resolveWorkingDirectories","opts","cwd","process","appDir","path","resolve","distDir"],"mappings":";;AAEA;;;;;;;;;;IAWaA,MAAAA,yBAAAA,GAA4B,CAACC,IAAAA,GAAAA;IACxC,MAAMC,GAAAA,GAAMC,QAAQD,GAAG,EAAA;IAEvB,MAAME,MAAAA,GAASH,IAAKG,CAAAA,MAAM,GAAGC,IAAAA,CAAKC,OAAO,CAACJ,GAAAA,EAAKD,IAAKG,CAAAA,MAAM,CAAIF,GAAAA,GAAAA;IAC9D,MAAMK,OAAAA,GAAUN,IAAKM,CAAAA,OAAO,GAAGF,IAAAA,CAAKC,OAAO,CAACJ,GAAAA,EAAKD,IAAKM,CAAAA,OAAO,CAAIH,GAAAA,MAAAA;IAEjE,OAAO;AAAEA,QAAAA,MAAAA;AAAQG,QAAAA;AAAQ,KAAA;AAC3B;;;;"}