{"version":3,"file":"index.cjs","names":["hideBin","getConfig","generate"],"sources":["../../src/index.ts"],"sourcesContent":["import yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { getConfig } from '@tanstack/router-generator'\nimport { generate } from './generate'\nimport { watch } from './watch'\n\nmain()\n\nexport function main() {\n  yargs(hideBin(process.argv))\n    .scriptName('tsr')\n    .usage('$0 <cmd> [args]')\n    .command('generate', 'Generate the routes for a project', async () => {\n      const config = getConfig()\n      await generate(config, process.cwd())\n    })\n    .command(\n      'watch',\n      'Continuously watch and generate the routes for a project',\n      () => {\n        watch(process.cwd())\n      },\n    )\n    .help().argv\n}\n"],"mappings":";;;;;;;;;AAMA,KAAK;AAEL,SAAgB,OAAO;CACrB,CAAA,GAAA,MAAA,QAAA,EAAA,GAAMA,cAAAA,QAAAA,CAAQ,QAAQ,IAAI,CAAC,CAAC,CACzB,WAAW,KAAK,CAAC,CACjB,MAAM,iBAAiB,CAAC,CACxB,QAAQ,YAAY,qCAAqC,YAAY;EACpE,MAAM,UAAA,GAASC,2BAAAA,UAAAA,CAAU;EACzB,MAAMC,iBAAAA,SAAS,QAAQ,QAAQ,IAAI,CAAC;CACtC,CAAC,CAAC,CACD,QACC,SACA,kEACM;EACJ,cAAA,MAAM,QAAQ,IAAI,CAAC;CACrB,CACF,CAAC,CACA,KAAK,CAAC,CAAC;AACZ"}