sst 2.25.1 → 2.25.3

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/constructs/App.js CHANGED
@@ -190,13 +190,13 @@ export class App extends CDKApp {
190
190
  this.createBindingSsmParameters();
191
191
  this.removeGovCloudUnsupportedResourceProperties();
192
192
  useWarning().print();
193
- const bootstrap = await useBootstrap();
194
193
  for (const child of this.node.children) {
195
194
  if (isStackConstruct(child)) {
196
195
  // Tag stacks
197
196
  Tags.of(child).add("sst:app", this.name);
198
197
  Tags.of(child).add("sst:stage", this.stage);
199
- if (child instanceof Stack) {
198
+ if (child instanceof Stack && process.env.NODE_ENV !== "test") {
199
+ const bootstrap = await useBootstrap();
200
200
  const functions = useFunctions();
201
201
  const sourcemaps = functions.sourcemaps.forStack(child.stackName);
202
202
  if (sourcemaps.length) {
@@ -15,7 +15,7 @@ import * as appSyncApiDomain from "./util/appSyncApiDomain.js";
15
15
  import { getFunctionRef, isCDKConstruct } from "./Construct.js";
16
16
  import { Function as Fn, } from "./Function.js";
17
17
  import { useProject } from "../project.js";
18
- import { GraphqlApi, MappingTemplate as CDKMappingTemplate, SchemaFile, } from "aws-cdk-lib/aws-appsync";
18
+ import { GraphqlApi, MappingTemplate as CDKMappingTemplate, SchemaFile, Definition, } from "aws-cdk-lib/aws-appsync";
19
19
  /////////////////////
20
20
  // Construct
21
21
  /////////////////////
@@ -306,7 +306,7 @@ export class AppSyncApi extends Construct {
306
306
  this.cdk.graphqlApi = new GraphqlApi(this, "Api", {
307
307
  name: app.logicalPrefixedName(id),
308
308
  xrayEnabled: true,
309
- schema: mainSchema,
309
+ definition: Definition.fromSchema(mainSchema),
310
310
  domainName: domainData && {
311
311
  certificate: domainData.certificate,
312
312
  domainName: domainData.domainName,
@@ -276,15 +276,10 @@ export class Function extends CDKFunction {
276
276
  this.runtime =
277
277
  supportedRuntimes[props.runtime];
278
278
  cfnFunction.runtime = this.runtime.toString();
279
- /*
280
- if (isJavaRuntime) {
281
- const providedRuntime = (bundle as FunctionBundleJavaProps)
282
- .experimentalUseProvidedRuntime;
283
- if (providedRuntime) {
284
- cfnFunction.runtime = providedRuntime;
285
- }
279
+ if (props.runtime?.startsWith("java") &&
280
+ props.java?.experimentalUseProvidedRuntime) {
281
+ cfnFunction.runtime = props.java?.experimentalUseProvidedRuntime;
286
282
  }
287
- */
288
283
  });
289
284
  }
290
285
  this.id = id;
@@ -30,7 +30,6 @@ export class RemixSite extends SsrSite {
30
30
  assetsBuildDirectory: "public/build",
31
31
  publicPath: "/build/",
32
32
  serverBuildPath: "build/index.js",
33
- serverModuleFormat: "esm",
34
33
  serverPlatform: "node",
35
34
  };
36
35
  // Validate config path
@@ -377,6 +377,7 @@ export class SsrSite extends Construct {
377
377
  blockPublicAccess: BlockPublicAccess.BLOCK_ALL,
378
378
  autoDeleteObjects: true,
379
379
  removalPolicy: RemovalPolicy.DESTROY,
380
+ enforceSSL: true,
380
381
  ...cdk?.bucket,
381
382
  });
382
383
  }
@@ -4,6 +4,14 @@ export declare const EventBus: EventBusResources;
4
4
  import { PutEventsCommandOutput } from "@aws-sdk/client-eventbridge";
5
5
  import { EventBridgeEvent } from "aws-lambda";
6
6
  import { ZodAny, ZodObject, ZodRawShape, z } from "zod";
7
+ /**
8
+ * PutEventsCommandOutput is used in return type of createEvent, in case the consumer of SST builds
9
+ * their project with declaration files, this is not portable. In order to allow TS to generate a
10
+ * declaration file without reference to @aws-sdk/client-eventbridge, we must re-export the type.
11
+ *
12
+ * More information here: https://github.com/microsoft/TypeScript/issues/47663#issuecomment-1519138189
13
+ */
14
+ export { PutEventsCommandOutput };
7
15
  export declare function createEventBuilder<Bus extends keyof typeof EventBus, MetadataShape extends ZodRawShape | undefined, MetadataFunction extends () => any>(props: {
8
16
  bus: Bus;
9
17
  metadata?: MetadataShape;
@@ -41,4 +49,3 @@ export declare function EventHandler<Events extends Event>(_events: Events | Eve
41
49
  }[Events["type"]]) => Promise<void>): (event: EventBridgeEvent<string, any> & {
42
50
  attempts?: number;
43
51
  }) => Promise<void>;
44
- export {};
@@ -27,7 +27,17 @@ export declare function AuthHandler<Providers extends Record<string, Adapter<any
27
27
  sessions?: Sessions;
28
28
  clients: () => Promise<Record<string, string>>;
29
29
  onAuthorize?: (event: APIGatewayProxyEventV2) => Promise<void | keyof Providers>;
30
- onSuccess: (input: Result, response: OnSuccessResponder<SessionValue | Sessions["$type"]>) => Promise<ReturnType<OnSuccessResponder<SessionValue | Sessions["$type"]>[keyof OnSuccessResponder<any>]>>;
30
+ onSuccess: (input: Result, response: OnSuccessResponder<SessionValue | {
31
+ [key in keyof Sessions["$type"]]: {
32
+ type: key;
33
+ properties: Sessions["$type"][key];
34
+ };
35
+ }[keyof Sessions["$type"]]>) => Promise<ReturnType<OnSuccessResponder<SessionValue | {
36
+ [key in keyof Sessions["$type"]]: {
37
+ type: key;
38
+ properties: Sessions["$type"][key];
39
+ };
40
+ }[keyof Sessions["$type"]]>[keyof OnSuccessResponder<any>]>>;
31
41
  onIndex?: (event: APIGatewayProxyEventV2) => Promise<APIGatewayProxyStructuredResultV2>;
32
42
  onError?: (error: UnknownProviderError) => Promise<APIGatewayProxyStructuredResultV2 | undefined>;
33
43
  }): (event: APIGatewayProxyEventV2, context: import("aws-lambda").Context) => Promise<APIGatewayProxyStructuredResultV2>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.25.1",
4
+ "version": "2.25.3",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },