sst 2.21.5 → 2.21.7

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.
@@ -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("log", [
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/constructs/App.js CHANGED
@@ -2,7 +2,6 @@ import path from "path";
2
2
  import fs from "fs";
3
3
  import { Stack } from "./Stack.js";
4
4
  import { isSSTConstruct, isStackConstruct, } from "./Construct.js";
5
- import { Function } from "./Function.js";
6
5
  import { bindParameters, bindType } from "./util/functionBinding.js";
7
6
  import { stack } from "./FunctionalStack.js";
8
7
  import { createRequire } from "module";
@@ -230,7 +229,7 @@ export class App extends CDKApp {
230
229
  if (!isSSTConstruct(c)) {
231
230
  return;
232
231
  }
233
- if (c instanceof Function && c._doNotAllowOthersToBind) {
232
+ if ("_doNotAllowOthersToBind" in c && c._doNotAllowOthersToBind) {
234
233
  return;
235
234
  }
236
235
  bindParameters(c);
@@ -353,7 +352,7 @@ export class App extends CDKApp {
353
352
  if (!isSSTConstruct(c)) {
354
353
  return;
355
354
  }
356
- if (c instanceof Function && c._doNotAllowOthersToBind) {
355
+ if ("_doNotAllowOthersToBind" in c && c._doNotAllowOthersToBind) {
357
356
  return;
358
357
  }
359
358
  const className = c.constructor.name;
@@ -431,7 +430,7 @@ export class App extends CDKApp {
431
430
  if (!isSSTConstruct(c)) {
432
431
  return;
433
432
  }
434
- if (c instanceof Function && c._doNotAllowOthersToBind) {
433
+ if ("_doNotAllowOthersToBind" in c && c._doNotAllowOthersToBind) {
435
434
  return;
436
435
  }
437
436
  const binding = bindType(c);
@@ -26,6 +26,8 @@ export declare class SsrFunction extends Construct implements SSTConstruct {
26
26
  private assetReplacer;
27
27
  private assetReplacerPolicy;
28
28
  private props;
29
+ /** @internal */
30
+ _doNotAllowOthersToBind: boolean;
29
31
  constructor(scope: Construct, id: string, props: SsrFunctionProps);
30
32
  get role(): import("aws-cdk-lib/aws-iam").IRole | undefined;
31
33
  get functionArn(): string;
@@ -25,6 +25,8 @@ export class SsrFunction extends Construct {
25
25
  assetReplacer;
26
26
  assetReplacerPolicy;
27
27
  props;
28
+ /** @internal */
29
+ _doNotAllowOthersToBind = true;
28
30
  constructor(scope, id, props) {
29
31
  super(scope, id);
30
32
  this.id = id;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.21.5",
4
+ "version": "2.21.7",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
package/sst.mjs CHANGED
@@ -7168,15 +7168,6 @@ async function useLocalServer(opts) {
7168
7168
  [...sockets.values()].map((s) => s.send(msg));
7169
7169
  }
7170
7170
  bus.subscribe("function.invoked", async (evt) => {
7171
- publish("log", [
7172
- [
7173
- "s",
7174
- Date.now(),
7175
- evt.properties.functionID,
7176
- evt.properties.requestID,
7177
- false
7178
- ]
7179
- ]);
7180
7171
  publish("function.invoked", evt.properties);
7181
7172
  updateFunction(evt.properties.functionID, (draft) => {
7182
7173
  if (draft.invocations.length >= 25)
@@ -7192,17 +7183,7 @@ async function useLocalServer(opts) {
7192
7183
  });
7193
7184
  });
7194
7185
  bus.subscribe("worker.stdout", (evt) => {
7195
- publish("log", [
7196
- [
7197
- "m",
7198
- Date.now(),
7199
- evt.properties.functionID,
7200
- evt.properties.requestID,
7201
- "info",
7202
- evt.properties.message,
7203
- Math.random().toString()
7204
- ]
7205
- ]);
7186
+ publish("worker.stdout", evt.properties);
7206
7187
  updateFunction(evt.properties.functionID, (draft) => {
7207
7188
  const entry = draft.invocations.find(
7208
7189
  (i) => i.id === evt.properties.requestID
@@ -7216,9 +7197,6 @@ async function useLocalServer(opts) {
7216
7197
  });
7217
7198
  });
7218
7199
  bus.subscribe("function.success", (evt) => {
7219
- publish("log", [
7220
- ["e", Date.now(), evt.properties.functionID, evt.properties.requestID]
7221
- ]);
7222
7200
  publish("function.success", evt.properties);
7223
7201
  updateFunction(evt.properties.functionID, (draft) => {
7224
7202
  const invocation = draft.invocations.find(
@@ -7234,9 +7212,6 @@ async function useLocalServer(opts) {
7234
7212
  });
7235
7213
  });
7236
7214
  bus.subscribe("function.error", (evt) => {
7237
- publish("log", [
7238
- ["e", Date.now(), evt.properties.functionID, evt.properties.requestID]
7239
- ]);
7240
7215
  publish("function.error", evt.properties);
7241
7216
  updateFunction(evt.properties.functionID, (draft) => {
7242
7217
  const invocation = draft.invocations.find(