in projenrc/generate-packages.ts [31:60]
export function generatePackages(root: typescript.TypeScriptProject, options: GeneratePackagesOptions): CloudFormationTypeProject[] {
const types: CloudFormation.DescribeTypeOutput[] = readdirSync(TYPE_DESCRIPTIONS).map(file => {
return JSON.parse(readFileSync(join(TYPE_DESCRIPTIONS, file), 'utf8'));
});
const excludes = options.excludeTypes ?? [];
const shouldExclude = (type: CloudFormation.DescribeTypeOutput) => type.TypeName && excludes.includes(type.TypeName);
const shouldDeprecate = (type: CloudFormation.DescribeTypeOutput) => type.TypeName && type.TypeName in deprecatedTypes;
const projects = new Array<CloudFormationTypeProject>();
for (const type of types) {
if (shouldExclude(type)) {
console.log(`Excluding type ${type.TypeName}`);
continue;
}
const p = new CloudFormationTypeProject(root, {
packagesDir: options.dir,
type: type,
prerelease: options.prerelease,
readmeDeprecatedMessage: shouldDeprecate(type) ? deprecatedTypes[type.TypeName!] : undefined,
});
projects.push(p);
}
return projects;
}