'use strict';
import { promises } from 'fs';
import { getDotenvConfig } from '../../../fd-toolbox/infra/env-config.js';
import { files, nonRootProjectPaths, buildPaths, packagesPath } from '../../../base-repo/app-constants/project-paths.js';
import { modulePathAliases } from '../../../base-repo/app-constants/aliases.js';
import { fileSuffixes } from '../../../base-repo/constants/internal-extensions.js';
import { typescriptCompilerLiterals } from '../../../base-repo/app-constants/internal-system-constants.js';

var __defProp=Object['defineProperty'],__name=(_0x225a52,_0x283ab8)=>__defProp(_0x225a52,'name',{'value':_0x283ab8,'configurable':!![]});async function generateTsConfig(){getDotenvConfig();const _0x4a1d66={'compilerOptions':createCompilerOptions(),'include':getIncludePaths(),'exclude':getExcludePaths()};return promises['writeFile'](files['tsconfigResources'],JSON['stringify'](_0x4a1d66,void(-0x1e00+-0x1*0x1d09+0x3b09),-0xb*0x16f+0x1fe7+-0x101e));}__name(generateTsConfig,'generateTsConfig');function createCompilerOptions(){return {'target':typescriptCompilerLiterals['targetEs2022'],'experimentalDecorators':!![],'emitDecoratorMetadata':!![],'lib':[typescriptCompilerLiterals['libDom'],typescriptCompilerLiterals['libDomIterable'],typescriptCompilerLiterals['moduleEsNext']],'allowJs':!![],'skipLibCheck':!![],'strict':!![],'esModuleInterop':!![],'module':typescriptCompilerLiterals['moduleEsNext'],'moduleResolution':typescriptCompilerLiterals['moduleResolutionBundler'],'resolveJsonModule':!![],'isolatedModules':!![],'jsx':typescriptCompilerLiterals['jsxPreserve'],'incremental':!![],'plugins':[{'name':typescriptCompilerLiterals['nextPlugin']}],'paths':modulePathAliases,'forceConsistentCasingInFileNames':!![],'noFallthroughCasesInSwitch':!![],'sourceMap':!![],'importHelpers':!![],'noEmitHelpers':!![],'downlevelIteration':!![],'pretty':!![],'noUnusedLocals':!![],'noUnusedParameters':!![],'noPropertyAccessFromIndexSignature':!![],'noImplicitOverride':!![],'useUnknownInCatchVariables':!![],'noEmit':![],'declarationDir':nonRootProjectPaths['currentDir']+buildPaths['buildPackagesTypes'],'rootDir':'./','outDir':nonRootProjectPaths['currentDir']+buildPaths['buildPackagesTypesOutput'],'noEmitOnError':!![]};}__name(createCompilerOptions,'createCompilerOptions');function getIncludePaths(){return [''+('**/*'+fileSuffixes['resourceTs']),''+('**/*'+fileSuffixes['handlers']),''+('**/*'+fileSuffixes['resourceExt'])];}__name(getIncludePaths,'getIncludePaths');function getExcludePaths(){const _0x123cd7=[nonRootProjectPaths['npmCommands']+'/'+packagesPath['createSaasKitApp'],''+packagesPath['packagesRanksters']];return _0x123cd7;}__name(getExcludePaths,'getExcludePaths');

export { generateTsConfig };
