sst 2.0.20 → 2.0.22

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.
@@ -179,20 +179,18 @@ export const dev = (program) => program.command(["dev", "start"], "Work on your
179
179
  lastDeployed = nextChecksum;
180
180
  // Update site env
181
181
  const keys = await SiteEnv.keys();
182
- if (keys.length) {
183
- const result = {};
184
- for (const key of keys) {
185
- const stack = results[key.stack];
186
- const value = stack.outputs[key.output];
187
- let existing = result[key.path];
188
- if (!existing) {
189
- result[key.path] = existing;
190
- existing = result[key.path] = {};
191
- }
192
- existing[key.environment] = value;
182
+ const result = {};
183
+ for (const key of keys) {
184
+ const stack = results[key.stack];
185
+ const value = stack.outputs[key.output];
186
+ let existing = result[key.path];
187
+ if (!existing) {
188
+ result[key.path] = existing;
189
+ existing = result[key.path] = {};
193
190
  }
194
- await SiteEnv.writeValues(result);
191
+ existing[key.environment] = value;
195
192
  }
193
+ await SiteEnv.writeValues(result);
196
194
  // Write outputs.json
197
195
  fs.writeFile(path.join(project.paths.out, "outputs.json"), JSON.stringify(pipe(results, omitBy((_, key) => key.includes("SstSiteEnv")), mapValues((val) => val.outputs)), null, 2));
198
196
  isWorking = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sst",
3
- "version": "2.0.20",
3
+ "version": "2.0.22",
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", {
@@ -6697,20 +6696,18 @@ var dev = (program2) => program2.command(
6697
6696
  }
6698
6697
  lastDeployed = nextChecksum;
6699
6698
  const keys2 = await SiteEnv.keys();
6700
- if (keys2.length) {
6701
- const result = {};
6702
- for (const key of keys2) {
6703
- const stack = results[key.stack];
6704
- const value = stack.outputs[key.output];
6705
- let existing = result[key.path];
6706
- if (!existing) {
6707
- result[key.path] = existing;
6708
- existing = result[key.path] = {};
6709
- }
6710
- existing[key.environment] = value;
6699
+ const result = {};
6700
+ for (const key of keys2) {
6701
+ const stack = results[key.stack];
6702
+ const value = stack.outputs[key.output];
6703
+ let existing = result[key.path];
6704
+ if (!existing) {
6705
+ result[key.path] = existing;
6706
+ existing = result[key.path] = {};
6711
6707
  }
6712
- await SiteEnv.writeValues(result);
6708
+ existing[key.environment] = value;
6713
6709
  }
6710
+ await SiteEnv.writeValues(result);
6714
6711
  fs19.writeFile(
6715
6712
  path19.join(project.paths.out, "outputs.json"),
6716
6713
  JSON.stringify(
@@ -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