deploy-stack 0.12.0 → 0.12.3

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.3",
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 --yes`
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`
@@ -2,6 +2,10 @@
2
2
  FROM node:22-alpine AS builder
3
3
  WORKDIR /app
4
4
 
5
+ # FIX 1: Upgrade Alpine system packages & upgrade global NPM to patch 'tar' and 'pacote' CVEs
6
+ RUN apk upgrade --no-cache && \
7
+ npm install -g npm@latest
8
+
5
9
  # Copy package files and install dependencies
6
10
  COPY package.json package-lock.json* ./
7
11
  RUN npm ci
@@ -17,6 +21,18 @@ RUN npm run build
17
21
  FROM node:22-alpine AS runner
18
22
  WORKDIR /app
19
23
 
24
+ # FIX 2: Upgrade Alpine packages and absolutely destroy npm, yarn, and corepack
25
+ # to eliminate all remaining Critical/High container vulnerabilities.
26
+ RUN apk upgrade --no-cache && \
27
+ rm -rf /usr/local/lib/node_modules/npm \
28
+ /usr/local/bin/npm \
29
+ /usr/local/bin/npx \
30
+ /opt/yarn-* \
31
+ /usr/local/bin/yarn \
32
+ /usr/local/bin/yarnpkg \
33
+ /usr/local/lib/node_modules/corepack \
34
+ /usr/local/bin/corepack
35
+
20
36
  ENV NODE_ENV=production
21
37
  ENV PORT={{PORT}}
22
38
  ENV HOSTNAME="0.0.0.0"