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O,CAAC,KAAK;IACtB,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB;IAC5C,SAAS,EAAE,OAAO,CAAC,QAAQ;IAC3B,cAAc,EAAE;QACd,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;KACjC;CACF,CAAC,CAAC","sourcesContent":["#! /usr/bin/env node\nimport { Option, program } from 'commander';\nimport { replaceTscAliasPaths } from '..';\n\nconst { version } = require('../../package.json');\n\nprogram\n .name('tsc-alias')\n .version(version)\n .option('-p, --project ', 'path to tsconfig.json')\n .option('-w, --watch', 'Observe file changes')\n .option(\n '--outDir, --dir ',\n 'Run in a folder leaving the \"outDir\" of the tsconfig.json (relative path to tsconfig)'\n )\n .option(\n '-f, --resolve-full-paths',\n 'Attempt to fully resolve import paths if the corresponding .js file can be found'\n )\n .addOption(\n new Option(\n '-fe, --resolve-full-extension [ext]',\n 'Specify the extension of incomplete import paths, works with resolveFullPaths'\n )\n .choices(['.js', '.mjs', '.cjs'])\n .default('.js')\n )\n .option(\n '-s, --silent',\n 'Reduced terminal output (default: true) [deprecated]'\n )\n .option('-v, --verbose', 'Additional information is send to the terminal')\n .option('--debug', 'Debug information is send to the terminal')\n .option('-r, --replacer ', 'path to optional extra replacer')\n .option('--inputglob ', 'Overwrite glob used for file scanning')\n .option(\n '--outputcheck ',\n 'Overwrite file extensions used for path resolution'\n )\n .parseAsync(process.argv);\n\nconst options = program.opts();\n\nreplaceTscAliasPaths({\n resolveFullExtension: options.resolveFullExtension,\n configFile: options.project,\n watch: !!options.watch,\n outDir: options.dir,\n verbose: !!options.verbose,\n debug: !!options.debug,\n resolveFullPaths: !!options.resolveFullPaths,\n replacers: options.replacer,\n fileExtensions: {\n inputGlob: options.inputglob,\n outputCheck: options.outputcheck\n }\n});\n"]}