deploy-stack 0.12.0 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deploy-stack",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "Provision production-ready AWS infrastructure and CI/CD pipelines in seconds.",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -61,7 +61,7 @@ export async function mainStack({ isHeadless = false, headlessOptions = {} } = {
61
61
  intro(color.bgCyan(color.black(' deploy-stack ☁️ ')));
62
62
 
63
63
  // 2. Ask for the target directory FIRST
64
- const projectName = await text({
64
+ projectName = await text({
65
65
  message: 'Where should we generate the infrastructure? (Type "." for current directory)',
66
66
  placeholder: '.',
67
67
  initialValue: '.',
@@ -334,8 +334,10 @@ export async function mainStack({ isHeadless = false, headlessOptions = {} } = {
334
334
 
335
335
  const isGitInitialized = fsSync.existsSync(path.join(targetDir, '.git'));
336
336
 
337
- const cdStep = projectName === '.' ? '' : `1. cd ${projectName}\n `;
338
- const applyStep = `${cdStep}npx deploy-stack apply`;
337
+ const needsCd = projectName && projectName !== '.';
338
+ const applyStep = needsCd
339
+ ? `cd ${projectName} && npx deploy-stack apply`
340
+ : 'npx deploy-stack apply';
339
341
 
340
342
  const gitInstructions = isGitInitialized
341
343
  ? `git add . && git commit -m "chore: add AWS infrastructure and CI/CD" && git push`