"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateTsConfig = generateTsConfig;
function generateTsConfig({ backend: { modules, tsConfigReferences } }) {
    const paths = [];
    for (const m of modules) {
        paths.push(`"@${m.name}/*": ["./libs/${m.name}/src/*"]`, `"@${m.name}": ["./libs/${m.name}/src"]`);
    }
    for (const reference of tsConfigReferences) {
        paths.push(`"@${reference}/*": ["./libs/${reference}/src/*"]`, `"@${reference}": ["./libs/${reference}/src"]`);
    }
    return /*json*/ `
  {
  "ts-node": {
    "require": ["tsconfig-paths/register"]
  },
  "exclude": ["jest.config.ts"],
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "target": "ESNext",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "skipLibCheck": true,
    "noImplicitAny": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "noImplicitOverride": true,
    "strictBindCallApply": true,
    "strictFunctionTypes": true,
    "strictNullChecks": true,
    "strictPropertyInitialization": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "resolveJsonModule": true,
    "useUnknownInCatchVariables": true,
    "esModuleInterop": true,

    "paths": {
      ${paths.toSorted((a, b) => a.localeCompare(b)).join(',\n')}
    }
  }
}
`;
}
//# sourceMappingURL=tsconfig.generator.js.map