sst 2.0.19 → 2.0.21

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.21",
4
4
  "bin": {
5
5
  "sst": "cli/sst.js"
6
6
  },
package/runtime/server.js CHANGED
@@ -89,7 +89,6 @@ export const useRuntimeServer = Context.memo(async () => {
89
89
  },
90
90
  limit: "10mb",
91
91
  }), (req, res) => {
92
- console.log(JSON.stringify(req.body, null, 4));
93
92
  Logger.debug("Worker", req.params.workerID, "got response", req.body);
94
93
  const worker = workers.fromID(req.params.workerID);
95
94
  bus.publish("function.success", {
package/sst.mjs CHANGED
@@ -2310,7 +2310,6 @@ var init_server2 = __esm({
2310
2310
  limit: "10mb"
2311
2311
  }),
2312
2312
  (req, res) => {
2313
- console.log(JSON.stringify(req.body, null, 4));
2314
2313
  Logger.debug("Worker", req.params.workerID, "got response", req.body);
2315
2314
  const worker = workers.fromID(req.params.workerID);
2316
2315
  bus.publish("function.success", {
@@ -4185,6 +4184,9 @@ async function publishAssets4(stacks) {
4185
4184
  return results;
4186
4185
  }
4187
4186
  async function deployMany(stacks) {
4187
+ if (stacks.length === 0) {
4188
+ throw new VisibleError("No stacks to deploy");
4189
+ }
4188
4190
  Logger.debug(
4189
4191
  "Deploying stacks",
4190
4192
  stacks.map((s) => s.stackName)
@@ -4375,6 +4377,7 @@ var init_deploy = __esm({
4375
4377
  init_credentials();
4376
4378
  init_logger();
4377
4379
  init_monitor();
4380
+ init_error();
4378
4381
  }
4379
4382
  });
4380
4383
 
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();
@@ -14669,16 +14669,23 @@ while (true) {
14669
14669
  );
14670
14670
  continue;
14671
14671
  }
14672
- await (0, import_undici.fetch)(
14673
- `${input.url}/runtime/invocation/${context.awsRequestId}/response`,
14674
- {
14675
- method: "POST",
14676
- headers: {
14677
- "Content-Type": "application/json"
14678
- },
14679
- body: JSON.stringify(response)
14672
+ while (true) {
14673
+ try {
14674
+ await (0, import_undici.fetch)(
14675
+ `${input.url}/runtime/invocation/${context.awsRequestId}/response`,
14676
+ {
14677
+ method: "POST",
14678
+ headers: {
14679
+ "Content-Type": "application/json"
14680
+ },
14681
+ body: JSON.stringify(response)
14682
+ }
14683
+ );
14684
+ break;
14685
+ } catch {
14686
+ await new Promise((resolve) => setTimeout(resolve, 500));
14680
14687
  }
14681
- );
14688
+ }
14682
14689
  }
14683
14690
  /*! Bundled license information:
14684
14691