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.
- package/cli/commands/dev.js +10 -12
- package/package.json +1 -1
- package/runtime/server.js +0 -1
- package/sst.mjs +10 -13
- package/support/nodejs-runtime/index.mjs +16 -9
package/cli/commands/dev.js
CHANGED
|
@@ -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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
|
|
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
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
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
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
|
-
|
|
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
|
-
|
|
14673
|
-
|
|
14674
|
-
|
|
14675
|
-
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
|
|
14679
|
-
|
|
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
|
|