deploy-stack 0.17.5 → 0.17.6
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/bin/cli.js +5 -2
- package/docs/guides/headless.md +6 -3
- package/package.json +1 -1
- package/src/utils/prompts.js +1 -1
package/bin/cli.js
CHANGED
|
@@ -23,7 +23,8 @@ const args = rawArgs.filter((arg) => arg !== '--no-telemetry');
|
|
|
23
23
|
const isHeadless = args.includes('--headless');
|
|
24
24
|
const isDryRun = args.includes('--dry-run');
|
|
25
25
|
const getFlag = (flagName) => {
|
|
26
|
-
const match = args.find(a => a.startsWith(`--${flagName}=`));
|
|
26
|
+
const match = args.find(a => a === `--${flagName}` || a.startsWith(`--${flagName}=`));
|
|
27
|
+
if (match === `--${flagName}`) return true;
|
|
27
28
|
return match ? match.split('=')[1] : undefined;
|
|
28
29
|
};
|
|
29
30
|
const headlessOptions = isHeadless ? {
|
|
@@ -34,7 +35,9 @@ const headlessOptions = isHeadless ? {
|
|
|
34
35
|
size: getFlag('size'),
|
|
35
36
|
healthCheckPath: getFlag('healthCheckPath'),
|
|
36
37
|
desiredCount: getFlag('desiredCount'),
|
|
37
|
-
branch: getFlag('branch')
|
|
38
|
+
branch: getFlag('branch'),
|
|
39
|
+
needsDatabase: getFlag('needsDatabase'),
|
|
40
|
+
enablePrPreviews: getFlag('enablePrPreviews')
|
|
38
41
|
} : {};
|
|
39
42
|
|
|
40
43
|
// 4. Handle commands
|
package/docs/guides/headless.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Headless Mode & Automation Guide
|
|
2
2
|
|
|
3
|
-
The `deploy-stack` CLI is designed to be fully automatable for CI/CD pipelines, custom scripts, and framework plugins (like `vite-plugin-deploy-stack`).
|
|
3
|
+
The `deploy-stack` CLI is designed to be fully automatable for CI/CD pipelines, custom scripts, Cookiecutters, and framework plugins (like `vite-plugin-deploy-stack`).
|
|
4
4
|
|
|
5
5
|
By passing the `--headless` flag, you bypass all interactive terminal prompts.
|
|
6
6
|
|
|
@@ -24,10 +24,13 @@ You can append any of these flags to customize the generated architecture. These
|
|
|
24
24
|
| `--desiredCount=<number>` | Number of container replicas to run (`1` or `2`). | `1` |
|
|
25
25
|
| `--branch=<name>` | The primary Git deployment branch for CI/CD. | `main` |
|
|
26
26
|
| `--dir=<path>` | The directory to generate files into (use `.` for current).| `.` |
|
|
27
|
+
| `--needsDatabase` | Provisions a managed AWS RDS PostgreSQL database alongside Fargate. | `false` |
|
|
27
28
|
| `--enablePrPreviews` | Generates workflows for Ephemeral PR Previews. | `false` |
|
|
28
29
|
| `--yes` | Automatically bypasses confirmation prompts during apply/destroy. | `false` |
|
|
29
30
|
| `--no-telemetry` | Disables anonymous usage analytics. | `false` |
|
|
30
31
|
|
|
32
|
+
*(Note: Boolean flags like `--needsDatabase` and `--enablePrPreviews` can be passed alone or as `--flag=true`).*
|
|
33
|
+
|
|
31
34
|
## Example Usage
|
|
32
35
|
|
|
33
36
|
**Standard Static Site Automation (e.g., Vite/React):**
|
|
@@ -40,7 +43,7 @@ npx deploy-stack --headless --framework=static --region=eu-west-1 --size=micro
|
|
|
40
43
|
npx deploy-stack --headless --framework=nextjs --size=small --desiredCount=2 --yes
|
|
41
44
|
```
|
|
42
45
|
|
|
43
|
-
**
|
|
46
|
+
**Django Setup with Managed RDS Database:**
|
|
44
47
|
```bash
|
|
45
|
-
npx deploy-stack --headless --framework=
|
|
48
|
+
npx deploy-stack --headless --framework=django --needsDatabase
|
|
46
49
|
```
|
package/package.json
CHANGED
package/src/utils/prompts.js
CHANGED
|
@@ -46,7 +46,7 @@ export async function getProjectConfig(isHeadless, headlessOptions, targetDir, d
|
|
|
46
46
|
desiredCount: headlessOptions.desiredCount || '1',
|
|
47
47
|
branch: headlessOptions.branch || 'main',
|
|
48
48
|
needsDatabase: headlessOptions.needsDatabase === 'true' || headlessOptions.needsDatabase === true,
|
|
49
|
-
enablePrPreviews: headlessOptions.enablePrPreviews ||
|
|
49
|
+
enablePrPreviews: headlessOptions.enablePrPreviews === 'true' || headlessOptions.enablePrPreviews === true,
|
|
50
50
|
setupType: 'headless'
|
|
51
51
|
};
|
|
52
52
|
}
|