sst 2.0.19 → 2.0.20

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": "sst",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "bin": {
5
5
  "sst": "cli/sst.js"
6
6
  },
package/sst.mjs CHANGED
@@ -4185,6 +4185,9 @@ async function publishAssets4(stacks) {
4185
4185
  return results;
4186
4186
  }
4187
4187
  async function deployMany(stacks) {
4188
+ if (stacks.length === 0) {
4189
+ throw new VisibleError("No stacks to deploy");
4190
+ }
4188
4191
  Logger.debug(
4189
4192
  "Deploying stacks",
4190
4193
  stacks.map((s) => s.stackName)
@@ -4375,6 +4378,7 @@ var init_deploy = __esm({
4375
4378
  init_credentials();
4376
4379
  init_logger();
4377
4380
  init_monitor();
4381
+ init_error();
4378
4382
  }
4379
4383
  });
4380
4384
 
package/stacks/deploy.js CHANGED
@@ -2,6 +2,7 @@ import { useBus } from "../bus.js";
2
2
  import { useAWSClient, useAWSProvider } from "../credentials.js";
3
3
  import { Logger } from "../logger.js";
4
4
  import { filterOutputs, isFailed, monitor, } from "./monitor.js";
5
+ import { VisibleError } from "../error.js";
5
6
  export async function publishAssets(stacks) {
6
7
  Logger.debug("Publishing assets");
7
8
  const provider = await useAWSProvider();
@@ -20,6 +21,9 @@ export async function publishAssets(stacks) {
20
21
  return results;
21
22
  }
22
23
  export async function deployMany(stacks) {
24
+ if (stacks.length === 0) {
25
+ throw new VisibleError("No stacks to deploy");
26
+ }
23
27
  Logger.debug("Deploying stacks", stacks.map((s) => s.stackName));
24
28
  const { CloudFormationStackArtifact } = await import("aws-cdk-lib/cx-api");
25
29
  await useAWSProvider();