{"version":3,"file":"format.mjs","names":[],"sources":["../../src/commands/format.ts"],"sourcesContent":["import { fileURLToPath } from 'node:url';\nimport { x } from 'tinyexec';\nimport type { CommandContext } from '../context.ts';\nimport { local } from '../utils.ts';\n\nconst config = fileURLToPath(new URL('../../oxfmtrc.json', import.meta.url));\n\nexport async function format(ctx: CommandContext) {\n\tconst result = x(local('oxfmt'), ['-c', config, ...ctx.args]);\n\n\tfor await (const line of result) {\n\t\tconsole.info(line);\n\t}\n\tif (result.exitCode) process.exit(result.exitCode);\n}\n"],"mappings":";;;;AAKA,MAAM,SAAS,cAAc,IAAI,IAAI,sBAAsB,OAAO,KAAK,GAAG,CAAC;AAE3E,eAAsB,OAAO,KAAqB;CACjD,MAAM,SAAS,EAAE,MAAM,OAAO,GAAG;EAAC;EAAM;EAAQ,GAAG,IAAI;CAAI,CAAC;CAE5D,WAAW,MAAM,QAAQ,QACxB,QAAQ,KAAK,IAAI;CAElB,IAAI,OAAO,UAAU,QAAQ,KAAK,OAAO,QAAQ;AAClD"}