sst 2.30.1 → 2.30.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/BaseSite.d.ts +5 -3
- package/constructs/NextjsSite.d.ts +9 -1
- package/constructs/NextjsSite.js +5 -2
- package/constructs/SsrSite.d.ts +5 -1
- package/constructs/StaticSite.d.ts +4 -1
- package/credentials.d.ts +1 -0
- package/package.json +32 -31
- package/stacks/synth.js +2 -3
- package/support/bootstrap-metadata-function/index.mjs +16628 -12477
- package/support/bridge/bridge.mjs +65 -44
- package/support/custom-resources/index.mjs +38987 -67260
- package/support/event-bus-retrier/index.mjs +22 -45
- package/support/job-manager/index.mjs +25961 -40983
- package/support/rds-migrator/index.mjs +17 -17
- package/support/script-function/index.mjs +5567 -3134
- package/support/ssr-warmer/index.mjs +7300 -5225
package/constructs/BaseSite.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ErrorResponse, DistributionProps, BehaviorOptions, IOrigin } from "aws-cdk-lib/aws-cloudfront";
|
|
2
|
+
export interface BaseSiteFileOptionsFilter {
|
|
3
|
+
include?: string;
|
|
4
|
+
exclude?: string;
|
|
5
|
+
}
|
|
2
6
|
export interface BaseSiteFileOptions {
|
|
3
|
-
filters:
|
|
4
|
-
[key in "include" | "exclude"]?: string;
|
|
5
|
-
}[];
|
|
7
|
+
filters: BaseSiteFileOptionsFilter[];
|
|
6
8
|
cacheControl?: string;
|
|
7
9
|
contentType?: string;
|
|
8
10
|
contentEncoding?: string;
|
|
@@ -5,6 +5,15 @@ import { Size } from "./util/size.js";
|
|
|
5
5
|
import { Bucket } from "aws-cdk-lib/aws-s3";
|
|
6
6
|
import { CachePolicyProps } from "aws-cdk-lib/aws-cloudfront";
|
|
7
7
|
export interface NextjsSiteProps extends Omit<SsrSiteProps, "nodejs"> {
|
|
8
|
+
/**
|
|
9
|
+
* OpenNext version for building the Next.js site.
|
|
10
|
+
* @default Latest OpenNext version
|
|
11
|
+
* @example
|
|
12
|
+
* ```js
|
|
13
|
+
* openNextVersion: "2.2.4",
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
openNextVersion?: string;
|
|
8
17
|
imageOptimization?: {
|
|
9
18
|
/**
|
|
10
19
|
* The amount of memory in MB allocated for image optimization function.
|
|
@@ -100,7 +109,6 @@ type NextjsSiteNormalizedProps = NextjsSiteProps & SsrSiteNormalizedProps;
|
|
|
100
109
|
*/
|
|
101
110
|
export declare class NextjsSite extends SsrSite {
|
|
102
111
|
props: NextjsSiteNormalizedProps;
|
|
103
|
-
private buildId?;
|
|
104
112
|
constructor(scope: Construct, id: string, props?: NextjsSiteProps);
|
|
105
113
|
static buildDefaultServerCachePolicyProps(): CachePolicyProps;
|
|
106
114
|
protected plan(bucket: Bucket): {
|
package/constructs/NextjsSite.js
CHANGED
|
@@ -12,6 +12,7 @@ import { toCdkSize } from "./util/size.js";
|
|
|
12
12
|
import { PolicyStatement } from "aws-cdk-lib/aws-iam";
|
|
13
13
|
import { RetentionDays } from "aws-cdk-lib/aws-logs";
|
|
14
14
|
import { VisibleError } from "../error.js";
|
|
15
|
+
const DEFAULT_OPEN_NEXT_VERSION = "2.2.4";
|
|
15
16
|
const DEFAULT_CACHE_POLICY_ALLOWED_HEADERS = [
|
|
16
17
|
"accept",
|
|
17
18
|
"rsc",
|
|
@@ -31,7 +32,6 @@ const DEFAULT_CACHE_POLICY_ALLOWED_HEADERS = [
|
|
|
31
32
|
* ```
|
|
32
33
|
*/
|
|
33
34
|
export class NextjsSite extends SsrSite {
|
|
34
|
-
buildId;
|
|
35
35
|
constructor(scope, id, props) {
|
|
36
36
|
const { streaming, disableDynamoDBCache, disableIncrementalCache } = {
|
|
37
37
|
streaming: false,
|
|
@@ -41,7 +41,10 @@ export class NextjsSite extends SsrSite {
|
|
|
41
41
|
};
|
|
42
42
|
super(scope, id, {
|
|
43
43
|
buildCommand: [
|
|
44
|
-
"npx
|
|
44
|
+
"npx",
|
|
45
|
+
"--yes",
|
|
46
|
+
`open-next@${props?.openNextVersion ?? DEFAULT_OPEN_NEXT_VERSION}`,
|
|
47
|
+
"build",
|
|
45
48
|
...(streaming ? ["--streaming"] : []),
|
|
46
49
|
...(disableDynamoDBCache
|
|
47
50
|
? ["--dangerously-disable-dynamodb-cache"]
|
package/constructs/SsrSite.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { SSTConstruct } from "./Construct.js";
|
|
|
8
8
|
import { NodeJSProps, FunctionProps } from "./Function.js";
|
|
9
9
|
import { SsrFunction, SsrFunctionProps } from "./SsrFunction.js";
|
|
10
10
|
import { EdgeFunction, EdgeFunctionProps } from "./EdgeFunction.js";
|
|
11
|
-
import { BaseSiteFileOptions, BaseSiteFileOptionsDeprecated, BaseSiteReplaceProps, BaseSiteCdkDistributionProps } from "./BaseSite.js";
|
|
11
|
+
import { BaseSiteFileOptions, BaseSiteFileOptionsFilter, BaseSiteFileOptionsDeprecated, BaseSiteReplaceProps, BaseSiteCdkDistributionProps } from "./BaseSite.js";
|
|
12
12
|
import { Size } from "./util/size.js";
|
|
13
13
|
import { Duration } from "./util/duration.js";
|
|
14
14
|
import { Permissions } from "./util/permission.js";
|
|
@@ -52,7 +52,10 @@ export interface SsrSiteNodeJSProps extends NodeJSProps {
|
|
|
52
52
|
}
|
|
53
53
|
export interface SsrDomainProps extends DistributionDomainProps {
|
|
54
54
|
}
|
|
55
|
+
export interface SsrSiteFileOptionsFilter extends BaseSiteFileOptionsFilter {
|
|
56
|
+
}
|
|
55
57
|
export interface SsrSiteFileOptions extends BaseSiteFileOptions {
|
|
58
|
+
filters: SsrSiteFileOptionsFilter[];
|
|
56
59
|
}
|
|
57
60
|
export interface SsrSiteFileOptionsDeprecated extends BaseSiteFileOptionsDeprecated {
|
|
58
61
|
}
|
|
@@ -288,6 +291,7 @@ export interface SsrSiteProps {
|
|
|
288
291
|
* },
|
|
289
292
|
* ],
|
|
290
293
|
* }
|
|
294
|
+
* ```
|
|
291
295
|
*/
|
|
292
296
|
fileOptions?: SsrSiteFileOptions[];
|
|
293
297
|
};
|
|
@@ -2,7 +2,7 @@ import { Construct } from "constructs";
|
|
|
2
2
|
import { Bucket, BucketProps, IBucket } from "aws-cdk-lib/aws-s3";
|
|
3
3
|
import { IDistribution } from "aws-cdk-lib/aws-cloudfront";
|
|
4
4
|
import { DistributionDomainProps } from "./Distribution.js";
|
|
5
|
-
import { BaseSiteFileOptions, BaseSiteReplaceProps, BaseSiteCdkDistributionProps, BaseSiteFileOptionsDeprecated } from "./BaseSite.js";
|
|
5
|
+
import { BaseSiteFileOptions, BaseSiteFileOptionsFilter, BaseSiteReplaceProps, BaseSiteCdkDistributionProps, BaseSiteFileOptionsDeprecated } from "./BaseSite.js";
|
|
6
6
|
import { SSTConstruct } from "./Construct.js";
|
|
7
7
|
import { FunctionBindingProps } from "./util/functionBinding.js";
|
|
8
8
|
export interface StaticSiteProps {
|
|
@@ -263,7 +263,10 @@ export interface StaticSiteProps {
|
|
|
263
263
|
}
|
|
264
264
|
export interface StaticSiteDomainProps extends DistributionDomainProps {
|
|
265
265
|
}
|
|
266
|
+
export interface StaticSiteFileOptionsFilter extends BaseSiteFileOptionsFilter {
|
|
267
|
+
}
|
|
266
268
|
export interface StaticSiteFileOptions extends BaseSiteFileOptions {
|
|
269
|
+
filters: StaticSiteFileOptionsFilter[];
|
|
267
270
|
}
|
|
268
271
|
export interface StaticSiteFileOptionsDeprecated extends BaseSiteFileOptionsDeprecated {
|
|
269
272
|
}
|
package/credentials.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SdkProvider } from "sst-aws-cdk/lib/api/aws-auth/sdk-provider.js";
|
|
2
|
+
export type {} from "@smithy/types";
|
|
2
3
|
export declare const useAWSCredentialsProvider: () => import("@smithy/types").AwsCredentialIdentityProvider;
|
|
3
4
|
export declare const useAWSCredentials: () => Promise<import("@smithy/types").AwsCredentialIdentity>;
|
|
4
5
|
export declare const useSTSIdentity: () => Promise<import("@aws-sdk/client-sts").GetCallerIdentityCommandOutput>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sideEffects": false,
|
|
3
3
|
"name": "sst",
|
|
4
|
-
"version": "2.30.
|
|
4
|
+
"version": "2.30.3",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sst": "cli/sst.js"
|
|
7
7
|
},
|
|
@@ -25,29 +25,29 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://sst.dev",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aws-cdk/aws-apigatewayv2-alpha": "^2.
|
|
29
|
-
"@aws-cdk/aws-apigatewayv2-authorizers-alpha": "^2.
|
|
30
|
-
"@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.
|
|
31
|
-
"@aws-cdk/cloud-assembly-schema": "2.
|
|
32
|
-
"@aws-cdk/cloudformation-diff": "2.
|
|
33
|
-
"@aws-cdk/cx-api": "2.
|
|
28
|
+
"@aws-cdk/aws-apigatewayv2-alpha": "^2.101.1-alpha.0",
|
|
29
|
+
"@aws-cdk/aws-apigatewayv2-authorizers-alpha": "^2.101.1-alpha.0",
|
|
30
|
+
"@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.101.1-alpha.0",
|
|
31
|
+
"@aws-cdk/cloud-assembly-schema": "2.101.1",
|
|
32
|
+
"@aws-cdk/cloudformation-diff": "2.101.1",
|
|
33
|
+
"@aws-cdk/cx-api": "2.101.1",
|
|
34
34
|
"@aws-crypto/sha256-js": "^5.0.0",
|
|
35
|
-
"@aws-sdk/client-cloudformation": "^3.
|
|
36
|
-
"@aws-sdk/client-ecs": "^3.
|
|
37
|
-
"@aws-sdk/client-eventbridge": "^3.
|
|
38
|
-
"@aws-sdk/client-iam": "^3.
|
|
39
|
-
"@aws-sdk/client-iot": "^3.
|
|
40
|
-
"@aws-sdk/client-iot-data-plane": "^3.
|
|
41
|
-
"@aws-sdk/client-lambda": "^3.
|
|
42
|
-
"@aws-sdk/client-rds-data": "^3.
|
|
43
|
-
"@aws-sdk/client-s3": "^3.
|
|
44
|
-
"@aws-sdk/client-ssm": "^3.
|
|
45
|
-
"@aws-sdk/client-sts": "^3.
|
|
35
|
+
"@aws-sdk/client-cloudformation": "^3.430.0",
|
|
36
|
+
"@aws-sdk/client-ecs": "^3.430.0",
|
|
37
|
+
"@aws-sdk/client-eventbridge": "^3.430.0",
|
|
38
|
+
"@aws-sdk/client-iam": "^3.430.0",
|
|
39
|
+
"@aws-sdk/client-iot": "^3.430.0",
|
|
40
|
+
"@aws-sdk/client-iot-data-plane": "^3.430.0",
|
|
41
|
+
"@aws-sdk/client-lambda": "^3.430.0",
|
|
42
|
+
"@aws-sdk/client-rds-data": "^3.430.0",
|
|
43
|
+
"@aws-sdk/client-s3": "^3.430.0",
|
|
44
|
+
"@aws-sdk/client-ssm": "^3.430.0",
|
|
45
|
+
"@aws-sdk/client-sts": "^3.430.0",
|
|
46
46
|
"@aws-sdk/config-resolver": "^3.374.0",
|
|
47
|
-
"@aws-sdk/credential-providers": "^3.
|
|
47
|
+
"@aws-sdk/credential-providers": "^3.430.0",
|
|
48
48
|
"@aws-sdk/middleware-retry": "^3.374.0",
|
|
49
|
-
"@aws-sdk/middleware-signing": "^3.
|
|
50
|
-
"@aws-sdk/signature-v4-crt": "^3.
|
|
49
|
+
"@aws-sdk/middleware-signing": "^3.428.0",
|
|
50
|
+
"@aws-sdk/signature-v4-crt": "^3.428.0",
|
|
51
51
|
"@aws-sdk/smithy-client": "^3.374.0",
|
|
52
52
|
"@babel/core": "^7.0.0-0",
|
|
53
53
|
"@babel/generator": "^7.20.5",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"@smithy/signature-v4": "^2.0.4",
|
|
56
56
|
"@trpc/server": "9.16.0",
|
|
57
57
|
"adm-zip": "^0.5.10",
|
|
58
|
-
"aws-cdk-lib": "2.
|
|
58
|
+
"aws-cdk-lib": "2.101.1",
|
|
59
59
|
"aws-iot-device-sdk": "^2.2.12",
|
|
60
60
|
"aws-sdk": "^2.1326.0",
|
|
61
61
|
"builtin-modules": "3.2.0",
|
|
62
|
-
"cdk-assets": "2.
|
|
62
|
+
"cdk-assets": "2.101.1",
|
|
63
63
|
"chalk": "^5.2.0",
|
|
64
64
|
"chokidar": "^3.5.3",
|
|
65
65
|
"ci-info": "^3.7.0",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"ora": "^6.1.2",
|
|
88
88
|
"react": "18.2.0",
|
|
89
89
|
"remeda": "^1.3.0",
|
|
90
|
-
"sst-aws-cdk": "2.
|
|
90
|
+
"sst-aws-cdk": "2.101.1",
|
|
91
91
|
"tree-kill": "^1.2.2",
|
|
92
92
|
"undici": "^5.12.0",
|
|
93
93
|
"uuid": "^9.0.0",
|
|
@@ -96,15 +96,16 @@
|
|
|
96
96
|
"zod": "^3.21.4"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
|
-
"@aws-sdk/client-api-gateway": "^3.
|
|
100
|
-
"@aws-sdk/client-cloudfront": "^3.
|
|
101
|
-
"@aws-sdk/client-codebuild": "^3.
|
|
102
|
-
"@aws-sdk/client-sqs": "^3.
|
|
103
|
-
"@aws-sdk/types": "^3.
|
|
99
|
+
"@aws-sdk/client-api-gateway": "^3.430.0",
|
|
100
|
+
"@aws-sdk/client-cloudfront": "^3.430.0",
|
|
101
|
+
"@aws-sdk/client-codebuild": "^3.430.0",
|
|
102
|
+
"@aws-sdk/client-sqs": "^3.430.0",
|
|
103
|
+
"@aws-sdk/types": "^3.428.0",
|
|
104
104
|
"@graphql-tools/merge": "^8.3.16",
|
|
105
105
|
"@sls-next/lambda-at-edge": "^3.7.0",
|
|
106
|
-
"@smithy/types": "^2.
|
|
106
|
+
"@smithy/types": "^2.3.5",
|
|
107
107
|
"@tsconfig/node16": "^1.0.3",
|
|
108
|
+
"@tsconfig/node18": "^18.2.2",
|
|
108
109
|
"@types/adm-zip": "^0.5.0",
|
|
109
110
|
"@types/aws-iot-device-sdk": "^2.2.4",
|
|
110
111
|
"@types/aws-lambda": "^8.10.108",
|
|
@@ -119,7 +120,7 @@
|
|
|
119
120
|
"@types/ws": "^8.5.3",
|
|
120
121
|
"@types/yargs": "^17.0.13",
|
|
121
122
|
"archiver": "^5.3.1",
|
|
122
|
-
"astro-sst": "2.30.
|
|
123
|
+
"astro-sst": "2.30.3",
|
|
123
124
|
"tsx": "^3.12.1",
|
|
124
125
|
"typescript": "^5.2.2",
|
|
125
126
|
"vitest": "^0.33.0"
|
package/stacks/synth.js
CHANGED
|
@@ -4,7 +4,6 @@ import { useAWSProvider, useSTSIdentity } from "../credentials.js";
|
|
|
4
4
|
import * as contextproviders from "sst-aws-cdk/lib/context-providers/index.js";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import { VisibleError } from "../error.js";
|
|
7
|
-
import fs from "fs/promises";
|
|
8
7
|
import { Semaphore } from "../util/semaphore.js";
|
|
9
8
|
const sem = new Semaphore(1);
|
|
10
9
|
export async function synth(opts) {
|
|
@@ -32,8 +31,8 @@ export async function synth(opts) {
|
|
|
32
31
|
...opts,
|
|
33
32
|
buildDir: opts.buildDir || path.join(project.paths.out, "dist"),
|
|
34
33
|
};
|
|
35
|
-
await fs.rm(opts.buildDir
|
|
36
|
-
await fs.mkdir(opts.buildDir
|
|
34
|
+
// await fs.rm(opts.buildDir!, { recursive: true, force: true });
|
|
35
|
+
// await fs.mkdir(opts.buildDir!, { recursive: true });
|
|
37
36
|
const cfg = new Configuration();
|
|
38
37
|
await cfg.load();
|
|
39
38
|
let previous = new Set();
|