sst 2.21.3 → 2.21.5

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.
@@ -196,6 +196,7 @@ export async function useLocalServer(opts) {
196
196
  false,
197
197
  ],
198
198
  ]);
199
+ publish("function.invoked", evt.properties);
199
200
  updateFunction(evt.properties.functionID, (draft) => {
200
201
  if (draft.invocations.length >= 25)
201
202
  draft.invocations.pop();
@@ -235,6 +236,7 @@ export async function useLocalServer(opts) {
235
236
  publish("log", [
236
237
  ["e", Date.now(), evt.properties.functionID, evt.properties.requestID],
237
238
  ]);
239
+ publish("function.success", evt.properties);
238
240
  updateFunction(evt.properties.functionID, (draft) => {
239
241
  const invocation = draft.invocations.find((x) => x.id === evt.properties.requestID);
240
242
  if (!invocation)
@@ -250,6 +252,7 @@ export async function useLocalServer(opts) {
250
252
  publish("log", [
251
253
  ["e", Date.now(), evt.properties.functionID, evt.properties.requestID],
252
254
  ]);
255
+ publish("function.error", evt.properties);
253
256
  updateFunction(evt.properties.functionID, (draft) => {
254
257
  const invocation = draft.invocations.find((x) => x.id === evt.properties.requestID);
255
258
  if (!invocation)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.21.3",
4
+ "version": "2.21.5",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
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);
@@ -7176,6 +7177,7 @@ async function useLocalServer(opts) {
7176
7177
  false
7177
7178
  ]
7178
7179
  ]);
7180
+ publish("function.invoked", evt.properties);
7179
7181
  updateFunction(evt.properties.functionID, (draft) => {
7180
7182
  if (draft.invocations.length >= 25)
7181
7183
  draft.invocations.pop();
@@ -7217,6 +7219,7 @@ async function useLocalServer(opts) {
7217
7219
  publish("log", [
7218
7220
  ["e", Date.now(), evt.properties.functionID, evt.properties.requestID]
7219
7221
  ]);
7222
+ publish("function.success", evt.properties);
7220
7223
  updateFunction(evt.properties.functionID, (draft) => {
7221
7224
  const invocation = draft.invocations.find(
7222
7225
  (x) => x.id === evt.properties.requestID
@@ -7234,6 +7237,7 @@ async function useLocalServer(opts) {
7234
7237
  publish("log", [
7235
7238
  ["e", Date.now(), evt.properties.functionID, evt.properties.requestID]
7236
7239
  ]);
7240
+ publish("function.error", evt.properties);
7237
7241
  updateFunction(evt.properties.functionID, (draft) => {
7238
7242
  const invocation = draft.invocations.find(
7239
7243
  (x) => x.id === evt.properties.requestID
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();