Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let searchableTransformerFlag = false;
if (directiveMap.directives.includes('searchable')) {
searchableTransformerFlag = true;
}
const buildConfig = {
buildParameters,
projectDirectory: options.dryrun ? false : resourceDir,
transformersFactory: transformerListFactory,
transformersFactoryArgs: [searchableTransformerFlag, storageConfig],
rootStackFileName: 'cloudformation-template.json',
currentCloudBackendDirectory: previouslyDeployedBackendDir,
disableResolverOverrides: options.disableResolverOverrides,
};
const transformerOutput = await TransformPackage.buildAPIProject(buildConfig);
context.print.success(`\nGraphQL schema compiled successfully.\n\nEdit your schema at ${schemaFilePath} or \
place .graphql files in a directory at ${schemaDirPath}`);
const jsonString = JSON.stringify(parameters, null, 4);
if (!options.dryRun) {
fs.writeFileSync(parametersFilePath, jsonString, 'utf8');
}
return transformerOutput;
}