Comparing version 1.1.4 to 1.1.5
@@ -22,2 +22,3 @@ import { promises as fs } from 'node:fs'; | ||
const templatesToAdd = await resolveDependencies(selected, azdPath); | ||
debug('Resolved core templates with dependencies:', templatesToAdd); | ||
console.info('Resolved core templates with dependencies:'); | ||
@@ -34,7 +35,8 @@ const coreTemplateBasePath = path.join(azdPath, AZD_BICEP_PATH); | ||
await copyCoreTemplates(templatesToAdd, azdPath, targetPath); | ||
console.info(`Added ${chalk.cyan(templatesToAdd.length)} core templates to your project.`); | ||
console.info(`Add completed.`); | ||
} | ||
async function resolveDependencies(selected, azdPath) { | ||
const dependencyInfo = await getBicepDependencyInfo(selected, path.join(azdPath, AZD_BICEP_PATH)); | ||
return dependencyInfo.all; | ||
const selectedFiles = selected.map((file) => path.join(azdPath, AZD_BICEP_PATH, file)); | ||
return [...new Set([...selectedFiles, ...dependencyInfo.all])]; | ||
} | ||
@@ -51,2 +53,3 @@ async function copyCoreTemplates(selected, azdPath, targetPath) { | ||
await fs.copyFile(source, destination); | ||
console.info(chalk.cyan(`Added: ${path.join(AZD_INFRA_PATH, coreFile)}`)); | ||
} | ||
@@ -53,0 +56,0 @@ catch (error_) { |
@@ -42,3 +42,3 @@ import { promises as fs } from 'node:fs'; | ||
} | ||
console.info('Clean up completed.'); | ||
console.info('Fix completed.'); | ||
} | ||
@@ -45,0 +45,0 @@ async function fixMissingModules(targetPath, missingModules) { |
@@ -52,3 +52,3 @@ import { promises as fs } from 'node:fs'; | ||
await Promise.all(updatePromises); | ||
console.info('Update successful.'); | ||
console.info('Update completed.'); | ||
} | ||
@@ -55,0 +55,0 @@ async function compareInfraFiles(infraInfo, azdPath) { |
{ | ||
"name": "azd-infra", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Manages your Azure Developer CLI projects' infrastructure", | ||
@@ -5,0 +5,0 @@ "type": "module", |
30754
644