sst 2.19.1 → 2.19.2

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.
@@ -19,7 +19,8 @@ export type CronMetadata = ExtractMetadata<Cron>;
19
19
  import type { EventBus } from "./EventBus.js";
20
20
  export type EventBusMetadata = ExtractMetadata<EventBus>;
21
21
  import type { Function as Fn } from "./Function.js";
22
- export type FunctionMetadata = ExtractMetadata<Fn>;
22
+ import type { SsrFunction } from "./SsrFunction.js";
23
+ export type FunctionMetadata = ExtractMetadata<Fn> | ExtractMetadata<SsrFunction>;
23
24
  import type { KinesisStream } from "./KinesisStream.js";
24
25
  export type KinesisStreamMetadata = ExtractMetadata<KinesisStream>;
25
26
  import type { NextjsSite as SlsNextjsSite } from "./deprecated/NextjsSite.js";
@@ -20,7 +20,8 @@ export interface SsrFunctionProps extends Omit<FunctionOptions, "memorySize" | "
20
20
  copyFiles?: FunctionCopyFilesProps[];
21
21
  logRetention?: RetentionDays;
22
22
  }
23
- export declare class SsrFunction extends Construct {
23
+ export declare class SsrFunction extends Construct implements SSTConstruct {
24
+ readonly id: string;
24
25
  function: CdkFunction;
25
26
  private assetReplacer;
26
27
  private assetReplacerPolicy;
@@ -41,4 +42,16 @@ export declare class SsrFunction extends Construct {
41
42
  private buildAssetFromBundle;
42
43
  private updateCodeReplacer;
43
44
  private updateFunction;
45
+ /** @internal */
46
+ getConstructMetadata(): {
47
+ type: "Function";
48
+ data: {
49
+ arn: string;
50
+ handler: string;
51
+ localId: string;
52
+ secrets: string[];
53
+ };
54
+ };
55
+ /** @internal */
56
+ getFunctionBinding(): undefined;
44
57
  }
@@ -20,12 +20,14 @@ const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
20
20
  // Construct
21
21
  /////////////////////
22
22
  export class SsrFunction extends Construct {
23
+ id;
23
24
  function;
24
25
  assetReplacer;
25
26
  assetReplacerPolicy;
26
27
  props;
27
28
  constructor(scope, id, props) {
28
29
  super(scope, id);
30
+ this.id = id;
29
31
  this.props = {
30
32
  ...props,
31
33
  environment: props.environment || {},
@@ -202,4 +204,20 @@ export class SsrFunction extends Construct {
202
204
  };
203
205
  code.bindToResource(cfnFunction);
204
206
  }
207
+ /** @internal */
208
+ getConstructMetadata() {
209
+ return {
210
+ type: "Function",
211
+ data: {
212
+ arn: this.functionArn,
213
+ handler: this.props.handler,
214
+ localId: this.node.addr,
215
+ secrets: [],
216
+ },
217
+ };
218
+ }
219
+ /** @internal */
220
+ getFunctionBinding() {
221
+ return undefined;
222
+ }
205
223
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.19.1",
4
+ "version": "2.19.2",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },