{"version":3,"file":"ensureTsConfig.js","names":[],"sources":["esm/vite/ensureTsConfig.js"],"sourcesContent":["import { writeFile } from \"node:fs/promises\";\nimport { existsAsync } from \"../utils/existsAsync\";\nfunction ensureTSConfig() {\n  existsAsync(\"tsconfig.json\").then((hasTsConfig) => {\n    if (!hasTsConfig) {\n      console.info(\n        `[one] adding default tsconfig.json. to disable set one/vite { config: { tsConfigPaths: false } }`\n      );\n      writeFile(\n        \"tsconfig.json\",\n        `{\n\"compilerOptions\": {\n  \"baseUrl\": \".\",\n  \"paths\": {\n    \"~/*\": [\"./*\"]\n  },\n  \"strict\": true,\n  \"rootDir\": \".\",\n  \"module\": \"Preserve\",\n  // allows react-native style imports without path extensions, for compat with platform-specific files\n  \"moduleResolution\": \"Bundler\",\n  \"preserveSymlinks\": true,\n  \"skipLibCheck\": true,\n  \"jsx\": \"react-jsx\",\n  \"noImplicitAny\": false,\n  \"types\": [\n    \"node\",\n    \"react\",\n    \"vite/client\"\n  ],\n  \"lib\": [\n    \"dom\",\n    \"esnext\"\n  ]\n},\n\"exclude\": [\n  \"node_modules\",\n  \"**/test\",\n  \"**/dist\",\n  \"**/types\",\n  \"**/__tests__\"\n],\n}\n`\n      );\n    }\n  });\n}\nexport {\n  ensureTSConfig\n};\n//# sourceMappingURL=ensureTsConfig.js.map\n"],"mappings":";;;;AAEA,SAAS,iBAAiB;CACxB,YAAY,eAAe,CAAC,CAAC,MAAM,gBAAgB;EACjD,IAAI,CAAC,aAAa;GAChB,QAAQ,KACN,kGACF;GACA,UACE,iBACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCF;EACF;CACF,CAAC;AACH"}