sst 2.21.4 → 2.21.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/cli/local/server.js +1 -26
- package/package.json +1 -1
- package/sst.mjs +5 -29
- package/stacks/synth.js +4 -4
package/cli/local/server.js
CHANGED
|
@@ -187,15 +187,6 @@ export async function useLocalServer(opts) {
|
|
|
187
187
|
[...sockets.values()].map((s) => s.send(msg));
|
|
188
188
|
}
|
|
189
189
|
bus.subscribe("function.invoked", async (evt) => {
|
|
190
|
-
publish("log", [
|
|
191
|
-
[
|
|
192
|
-
"s",
|
|
193
|
-
Date.now(),
|
|
194
|
-
evt.properties.functionID,
|
|
195
|
-
evt.properties.requestID,
|
|
196
|
-
false,
|
|
197
|
-
],
|
|
198
|
-
]);
|
|
199
190
|
publish("function.invoked", evt.properties);
|
|
200
191
|
updateFunction(evt.properties.functionID, (draft) => {
|
|
201
192
|
if (draft.invocations.length >= 25)
|
|
@@ -211,17 +202,7 @@ export async function useLocalServer(opts) {
|
|
|
211
202
|
});
|
|
212
203
|
});
|
|
213
204
|
bus.subscribe("worker.stdout", (evt) => {
|
|
214
|
-
publish("
|
|
215
|
-
[
|
|
216
|
-
"m",
|
|
217
|
-
Date.now(),
|
|
218
|
-
evt.properties.functionID,
|
|
219
|
-
evt.properties.requestID,
|
|
220
|
-
"info",
|
|
221
|
-
evt.properties.message,
|
|
222
|
-
Math.random().toString(),
|
|
223
|
-
],
|
|
224
|
-
]);
|
|
205
|
+
publish("worker.stdout", evt.properties);
|
|
225
206
|
updateFunction(evt.properties.functionID, (draft) => {
|
|
226
207
|
const entry = draft.invocations.find((i) => i.id === evt.properties.requestID);
|
|
227
208
|
if (!entry)
|
|
@@ -233,9 +214,6 @@ export async function useLocalServer(opts) {
|
|
|
233
214
|
});
|
|
234
215
|
});
|
|
235
216
|
bus.subscribe("function.success", (evt) => {
|
|
236
|
-
publish("log", [
|
|
237
|
-
["e", Date.now(), evt.properties.functionID, evt.properties.requestID],
|
|
238
|
-
]);
|
|
239
217
|
publish("function.success", evt.properties);
|
|
240
218
|
updateFunction(evt.properties.functionID, (draft) => {
|
|
241
219
|
const invocation = draft.invocations.find((x) => x.id === evt.properties.requestID);
|
|
@@ -249,9 +227,6 @@ export async function useLocalServer(opts) {
|
|
|
249
227
|
});
|
|
250
228
|
});
|
|
251
229
|
bus.subscribe("function.error", (evt) => {
|
|
252
|
-
publish("log", [
|
|
253
|
-
["e", Date.now(), evt.properties.functionID, evt.properties.requestID],
|
|
254
|
-
]);
|
|
255
230
|
publish("function.error", evt.properties);
|
|
256
231
|
updateFunction(evt.properties.functionID, (draft) => {
|
|
257
232
|
const invocation = draft.invocations.find((x) => x.id === evt.properties.requestID);
|
package/package.json
CHANGED
package/sst.mjs
CHANGED
|
@@ -6433,8 +6433,6 @@ async function synth(opts) {
|
|
|
6433
6433
|
const cfg = new Configuration();
|
|
6434
6434
|
await cfg.load();
|
|
6435
6435
|
let previous2 = /* @__PURE__ */ new Set();
|
|
6436
|
-
const context = cfg.context.all;
|
|
6437
|
-
context[cxapi5.PATH_METADATA_ENABLE_CONTEXT] = project.config.cdk?.pathMetadata ?? false;
|
|
6438
6436
|
while (true) {
|
|
6439
6437
|
const app = new App2(
|
|
6440
6438
|
{
|
|
@@ -6449,7 +6447,10 @@ async function synth(opts) {
|
|
|
6449
6447
|
},
|
|
6450
6448
|
{
|
|
6451
6449
|
outdir: opts.buildDir,
|
|
6452
|
-
context
|
|
6450
|
+
context: {
|
|
6451
|
+
...cfg.context.all,
|
|
6452
|
+
[cxapi5.PATH_METADATA_ENABLE_CONTEXT]: project.config.cdk?.pathMetadata ?? false
|
|
6453
|
+
}
|
|
6453
6454
|
}
|
|
6454
6455
|
);
|
|
6455
6456
|
await opts.fn(app);
|
|
@@ -7167,15 +7168,6 @@ async function useLocalServer(opts) {
|
|
|
7167
7168
|
[...sockets.values()].map((s) => s.send(msg));
|
|
7168
7169
|
}
|
|
7169
7170
|
bus.subscribe("function.invoked", async (evt) => {
|
|
7170
|
-
publish("log", [
|
|
7171
|
-
[
|
|
7172
|
-
"s",
|
|
7173
|
-
Date.now(),
|
|
7174
|
-
evt.properties.functionID,
|
|
7175
|
-
evt.properties.requestID,
|
|
7176
|
-
false
|
|
7177
|
-
]
|
|
7178
|
-
]);
|
|
7179
7171
|
publish("function.invoked", evt.properties);
|
|
7180
7172
|
updateFunction(evt.properties.functionID, (draft) => {
|
|
7181
7173
|
if (draft.invocations.length >= 25)
|
|
@@ -7191,17 +7183,7 @@ async function useLocalServer(opts) {
|
|
|
7191
7183
|
});
|
|
7192
7184
|
});
|
|
7193
7185
|
bus.subscribe("worker.stdout", (evt) => {
|
|
7194
|
-
publish("
|
|
7195
|
-
[
|
|
7196
|
-
"m",
|
|
7197
|
-
Date.now(),
|
|
7198
|
-
evt.properties.functionID,
|
|
7199
|
-
evt.properties.requestID,
|
|
7200
|
-
"info",
|
|
7201
|
-
evt.properties.message,
|
|
7202
|
-
Math.random().toString()
|
|
7203
|
-
]
|
|
7204
|
-
]);
|
|
7186
|
+
publish("worker.stdout", evt.properties);
|
|
7205
7187
|
updateFunction(evt.properties.functionID, (draft) => {
|
|
7206
7188
|
const entry = draft.invocations.find(
|
|
7207
7189
|
(i) => i.id === evt.properties.requestID
|
|
@@ -7215,9 +7197,6 @@ async function useLocalServer(opts) {
|
|
|
7215
7197
|
});
|
|
7216
7198
|
});
|
|
7217
7199
|
bus.subscribe("function.success", (evt) => {
|
|
7218
|
-
publish("log", [
|
|
7219
|
-
["e", Date.now(), evt.properties.functionID, evt.properties.requestID]
|
|
7220
|
-
]);
|
|
7221
7200
|
publish("function.success", evt.properties);
|
|
7222
7201
|
updateFunction(evt.properties.functionID, (draft) => {
|
|
7223
7202
|
const invocation = draft.invocations.find(
|
|
@@ -7233,9 +7212,6 @@ async function useLocalServer(opts) {
|
|
|
7233
7212
|
});
|
|
7234
7213
|
});
|
|
7235
7214
|
bus.subscribe("function.error", (evt) => {
|
|
7236
|
-
publish("log", [
|
|
7237
|
-
["e", Date.now(), evt.properties.functionID, evt.properties.requestID]
|
|
7238
|
-
]);
|
|
7239
7215
|
publish("function.error", evt.properties);
|
|
7240
7216
|
updateFunction(evt.properties.functionID, (draft) => {
|
|
7241
7217
|
const invocation = draft.invocations.find(
|
package/stacks/synth.js
CHANGED
|
@@ -41,9 +41,6 @@ export async function synth(opts) {
|
|
|
41
41
|
const cfg = new Configuration();
|
|
42
42
|
await cfg.load();
|
|
43
43
|
let previous = new Set();
|
|
44
|
-
const context = cfg.context.all;
|
|
45
|
-
context[cxapi.PATH_METADATA_ENABLE_CONTEXT] =
|
|
46
|
-
project.config.cdk?.pathMetadata ?? false;
|
|
47
44
|
while (true) {
|
|
48
45
|
const app = new App({
|
|
49
46
|
account: identity.Account,
|
|
@@ -56,7 +53,10 @@ export async function synth(opts) {
|
|
|
56
53
|
isActiveStack: opts.isActiveStack,
|
|
57
54
|
}, {
|
|
58
55
|
outdir: opts.buildDir,
|
|
59
|
-
context
|
|
56
|
+
context: {
|
|
57
|
+
...cfg.context.all,
|
|
58
|
+
[cxapi.PATH_METADATA_ENABLE_CONTEXT]: project.config.cdk?.pathMetadata ?? false,
|
|
59
|
+
},
|
|
60
60
|
});
|
|
61
61
|
await opts.fn(app);
|
|
62
62
|
await app.finish();
|