sst 2.49.5 → 2.49.8
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/AstroSite.d.ts +1 -1
- package/constructs/EdgeFunction.d.ts +1 -1
- package/constructs/EdgeFunction.js +7 -5
- package/constructs/Function.d.ts +2 -1
- package/constructs/Function.js +1 -0
- package/constructs/Job.d.ts +1 -1
- package/constructs/Job.js +2 -0
- package/constructs/NextjsSite.d.ts +1 -1
- package/constructs/RemixSite.d.ts +1 -1
- package/constructs/SolidStartSite.d.ts +1 -1
- package/constructs/SsrFunction.d.ts +2 -2
- package/constructs/SsrFunction.js +7 -5
- package/constructs/SsrSite.d.ts +2 -2
- package/constructs/SvelteKitSite.d.ts +1 -1
- package/constructs/deprecated/NextjsSite.d.ts +1 -1
- package/constructs/deprecated/NextjsSite.js +3 -0
- package/constructs/deprecated/cross-region-helper.js +3 -3
- package/credentials.js +4 -3
- package/iot.js +2 -2
- package/package.json +3 -3
- package/package.json.bak +3 -3
- package/stacks/deploy.js +4 -3
- package/stacks/synth.js +5 -4
- package/util/user-configuration.js +11 -8
|
@@ -43,7 +43,7 @@ export declare class AstroSite extends SsrSite {
|
|
|
43
43
|
data: {
|
|
44
44
|
mode: "placeholder" | "deployed";
|
|
45
45
|
path: string;
|
|
46
|
-
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x";
|
|
46
|
+
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x";
|
|
47
47
|
customDomainUrl: string | undefined;
|
|
48
48
|
url: string | undefined;
|
|
49
49
|
edge: boolean | undefined;
|
|
@@ -9,7 +9,7 @@ import { Permissions } from "./util/permission.js";
|
|
|
9
9
|
export interface EdgeFunctionProps {
|
|
10
10
|
bundle?: string;
|
|
11
11
|
handler: string;
|
|
12
|
-
runtime?: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x";
|
|
12
|
+
runtime?: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x";
|
|
13
13
|
timeout?: number | Duration;
|
|
14
14
|
memorySize?: number | Size;
|
|
15
15
|
permissions?: Permissions;
|
|
@@ -345,11 +345,13 @@ export class EdgeFunction extends Construct {
|
|
|
345
345
|
S3Bucket: assetBucket,
|
|
346
346
|
S3Key: assetKey,
|
|
347
347
|
},
|
|
348
|
-
Runtime: runtime === "
|
|
349
|
-
? Runtime.
|
|
350
|
-
: runtime === "
|
|
351
|
-
? Runtime.
|
|
352
|
-
:
|
|
348
|
+
Runtime: runtime === "nodejs24.x"
|
|
349
|
+
? Runtime.NODEJS_24_X.name
|
|
350
|
+
: runtime === "nodejs22.x"
|
|
351
|
+
? Runtime.NODEJS_22_X.name
|
|
352
|
+
: runtime === "nodejs20.x"
|
|
353
|
+
? Runtime.NODEJS_20_X.name
|
|
354
|
+
: Runtime.NODEJS_18_X.name,
|
|
353
355
|
MemorySize: typeof memorySize === "string"
|
|
354
356
|
? toCdkSize(memorySize).toMebibytes()
|
|
355
357
|
: memorySize,
|
package/constructs/Function.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare const supportedRuntimes: {
|
|
|
18
18
|
"nodejs18.x": CDKRuntime;
|
|
19
19
|
"nodejs20.x": CDKRuntime;
|
|
20
20
|
"nodejs22.x": CDKRuntime;
|
|
21
|
+
"nodejs24.x": CDKRuntime;
|
|
21
22
|
"python3.7": CDKRuntime;
|
|
22
23
|
"python3.8": CDKRuntime;
|
|
23
24
|
"python3.9": CDKRuntime;
|
|
@@ -798,7 +799,7 @@ export declare class Function extends CDKFunction implements SSTConstruct {
|
|
|
798
799
|
type: "Function";
|
|
799
800
|
data: {
|
|
800
801
|
arn: string;
|
|
801
|
-
runtime: "container" | "rust" | "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "python3.7" | "python3.8" | "python3.9" | "python3.10" | "python3.11" | "python3.12" | "python3.13" | "dotnetcore3.1" | "dotnet6" | "dotnet8" | "java8" | "java11" | "java17" | "java21" | "go1.x" | "go" | undefined;
|
|
802
|
+
runtime: "container" | "rust" | "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x" | "python3.7" | "python3.8" | "python3.9" | "python3.10" | "python3.11" | "python3.12" | "python3.13" | "dotnetcore3.1" | "dotnet6" | "dotnet8" | "java8" | "java11" | "java17" | "java21" | "go1.x" | "go" | undefined;
|
|
802
803
|
handler: string | undefined;
|
|
803
804
|
missingSourcemap: boolean | undefined;
|
|
804
805
|
localId: string;
|
package/constructs/Function.js
CHANGED
|
@@ -37,6 +37,7 @@ const supportedRuntimes = {
|
|
|
37
37
|
"nodejs18.x": CDKRuntime.NODEJS_18_X,
|
|
38
38
|
"nodejs20.x": CDKRuntime.NODEJS_20_X,
|
|
39
39
|
"nodejs22.x": CDKRuntime.NODEJS_22_X,
|
|
40
|
+
"nodejs24.x": CDKRuntime.NODEJS_24_X,
|
|
40
41
|
"python3.7": CDKRuntime.PYTHON_3_7,
|
|
41
42
|
"python3.8": CDKRuntime.PYTHON_3_8,
|
|
42
43
|
"python3.9": CDKRuntime.PYTHON_3_9,
|
package/constructs/Job.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ export interface JobProps {
|
|
|
109
109
|
* })
|
|
110
110
|
*```
|
|
111
111
|
*/
|
|
112
|
-
runtime?: "nodejs" | "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "container";
|
|
112
|
+
runtime?: "nodejs" | "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x" | "container";
|
|
113
113
|
/**
|
|
114
114
|
* For "nodejs" runtime, point to the entry point and handler function.
|
|
115
115
|
* Of the format: `/path/to/file.function`.
|
package/constructs/Job.js
CHANGED
|
@@ -285,6 +285,7 @@ export class Job extends Construct {
|
|
|
285
285
|
"nodejs18.x": "amazon/aws-lambda-nodejs:18.2023.12.14.13",
|
|
286
286
|
"nodejs20.x": "amazon/aws-lambda-nodejs:20.2023.12.14.13",
|
|
287
287
|
"nodejs22.x": "amazon/aws-lambda-nodejs:22.2024.11.22.14",
|
|
288
|
+
"nodejs24.x": "amazon/aws-lambda-nodejs:24.2025.12.21.13",
|
|
288
289
|
},
|
|
289
290
|
x86_64: {
|
|
290
291
|
nodejs: "amazon/aws-lambda-nodejs:16",
|
|
@@ -292,6 +293,7 @@ export class Job extends Construct {
|
|
|
292
293
|
"nodejs18.x": "amazon/aws-lambda-nodejs:18",
|
|
293
294
|
"nodejs20.x": "amazon/aws-lambda-nodejs:20",
|
|
294
295
|
"nodejs22.x": "amazon/aws-lambda-nodejs:22",
|
|
296
|
+
"nodejs24.x": "amazon/aws-lambda-nodejs:24",
|
|
295
297
|
},
|
|
296
298
|
};
|
|
297
299
|
const image = LinuxBuildImage.fromDockerRegistry(
|
|
@@ -163,7 +163,7 @@ export declare class NextjsSite extends SsrSite {
|
|
|
163
163
|
data: {
|
|
164
164
|
mode: "placeholder" | "deployed";
|
|
165
165
|
path: string;
|
|
166
|
-
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x";
|
|
166
|
+
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x";
|
|
167
167
|
customDomainUrl: string | undefined;
|
|
168
168
|
url: string | undefined;
|
|
169
169
|
edge: boolean | undefined;
|
|
@@ -101,7 +101,7 @@ export declare class RemixSite extends SsrSite {
|
|
|
101
101
|
data: {
|
|
102
102
|
mode: "placeholder" | "deployed";
|
|
103
103
|
path: string;
|
|
104
|
-
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x";
|
|
104
|
+
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x";
|
|
105
105
|
customDomainUrl: string | undefined;
|
|
106
106
|
url: string | undefined;
|
|
107
107
|
edge: boolean | undefined;
|
|
@@ -80,7 +80,7 @@ export declare class SolidStartSite extends SsrSite {
|
|
|
80
80
|
data: {
|
|
81
81
|
mode: "placeholder" | "deployed";
|
|
82
82
|
path: string;
|
|
83
|
-
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x";
|
|
83
|
+
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x";
|
|
84
84
|
customDomainUrl: string | undefined;
|
|
85
85
|
url: string | undefined;
|
|
86
86
|
edge: boolean | undefined;
|
|
@@ -11,7 +11,7 @@ import { Duration } from "./util/duration.js";
|
|
|
11
11
|
export interface SsrFunctionProps extends Omit<FunctionOptions, "memorySize" | "timeout" | "runtime"> {
|
|
12
12
|
bundle?: string;
|
|
13
13
|
handler: string;
|
|
14
|
-
runtime?: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x";
|
|
14
|
+
runtime?: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x";
|
|
15
15
|
timeout?: number | Duration;
|
|
16
16
|
memorySize?: number | Size;
|
|
17
17
|
permissions?: Permissions;
|
|
@@ -58,7 +58,7 @@ export declare class SsrFunction extends Construct implements SSTConstruct {
|
|
|
58
58
|
type: "Function";
|
|
59
59
|
data: {
|
|
60
60
|
arn: string;
|
|
61
|
-
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | undefined;
|
|
61
|
+
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x" | undefined;
|
|
62
62
|
handler: string;
|
|
63
63
|
missingSourcemap: boolean | undefined;
|
|
64
64
|
localId: string;
|
|
@@ -107,11 +107,13 @@ export class SsrFunction extends Construct {
|
|
|
107
107
|
handler: handler.split(path.sep).join(path.posix.sep),
|
|
108
108
|
logRetention: logRetention ?? RetentionDays.THREE_DAYS,
|
|
109
109
|
code: Code.fromBucket(Bucket.fromBucketName(this, "IServerFunctionBucket", assetBucket), assetKey),
|
|
110
|
-
runtime: runtime === "
|
|
111
|
-
? Runtime.
|
|
112
|
-
: runtime === "
|
|
113
|
-
? Runtime.
|
|
114
|
-
:
|
|
110
|
+
runtime: runtime === "nodejs24.x"
|
|
111
|
+
? Runtime.NODEJS_24_X
|
|
112
|
+
: runtime === "nodejs22.x"
|
|
113
|
+
? Runtime.NODEJS_22_X
|
|
114
|
+
: runtime === "nodejs20.x"
|
|
115
|
+
? Runtime.NODEJS_20_X
|
|
116
|
+
: Runtime.NODEJS_18_X,
|
|
115
117
|
architecture,
|
|
116
118
|
memorySize: typeof memorySize === "string"
|
|
117
119
|
? toCdkSize(memorySize).toMebibytes()
|
package/constructs/SsrSite.d.ts
CHANGED
|
@@ -139,7 +139,7 @@ export interface SsrSiteProps {
|
|
|
139
139
|
* runtime: "nodejs20.x",
|
|
140
140
|
* ```
|
|
141
141
|
*/
|
|
142
|
-
runtime?: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x";
|
|
142
|
+
runtime?: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x";
|
|
143
143
|
/**
|
|
144
144
|
* Used to configure nodejs function properties
|
|
145
145
|
*/
|
|
@@ -465,7 +465,7 @@ export declare abstract class SsrSite extends Construct implements SSTConstruct
|
|
|
465
465
|
data: {
|
|
466
466
|
mode: "placeholder" | "deployed";
|
|
467
467
|
path: string;
|
|
468
|
-
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x";
|
|
468
|
+
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x";
|
|
469
469
|
customDomainUrl: string | undefined;
|
|
470
470
|
url: string | undefined;
|
|
471
471
|
edge: boolean | undefined;
|
|
@@ -121,7 +121,7 @@ export declare class SvelteKitSite extends SsrSite {
|
|
|
121
121
|
data: {
|
|
122
122
|
mode: "placeholder" | "deployed";
|
|
123
123
|
path: string;
|
|
124
|
-
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x";
|
|
124
|
+
runtime: "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x";
|
|
125
125
|
customDomainUrl: string | undefined;
|
|
126
126
|
url: string | undefined;
|
|
127
127
|
edge: boolean | undefined;
|
|
@@ -1039,6 +1039,9 @@ export class NextjsSite extends Construct {
|
|
|
1039
1039
|
return replaceValues;
|
|
1040
1040
|
}
|
|
1041
1041
|
normalizeRuntime(runtime) {
|
|
1042
|
+
if (runtime === "nodejs24.x") {
|
|
1043
|
+
return lambda.Runtime.NODEJS_24_X;
|
|
1044
|
+
}
|
|
1042
1045
|
if (runtime === "nodejs22.x") {
|
|
1043
1046
|
return lambda.Runtime.NODEJS_22_X;
|
|
1044
1047
|
}
|
|
@@ -18,7 +18,7 @@ export function getOrCreateBucket(scope) {
|
|
|
18
18
|
const provider = new lambda.Function(stack, providerId, {
|
|
19
19
|
code: lambda.Code.fromAsset(path.join(__dirname, "../../support/edge-function")),
|
|
20
20
|
handler: "s3-bucket.handler",
|
|
21
|
-
runtime: lambda.Runtime.
|
|
21
|
+
runtime: lambda.Runtime.NODEJS_22_X,
|
|
22
22
|
timeout: Duration.minutes(15),
|
|
23
23
|
memorySize: 1024,
|
|
24
24
|
initialPolicy: [
|
|
@@ -50,7 +50,7 @@ export function createFunction(scope, name, role, bucketName, functionParams) {
|
|
|
50
50
|
provider = new lambda.Function(stack, providerId, {
|
|
51
51
|
code: lambda.Code.fromAsset(path.join(__dirname, "../../support/edge-function")),
|
|
52
52
|
handler: "edge-lambda.handler",
|
|
53
|
-
runtime: lambda.Runtime.
|
|
53
|
+
runtime: lambda.Runtime.NODEJS_22_X,
|
|
54
54
|
timeout: Duration.minutes(15),
|
|
55
55
|
memorySize: 1024,
|
|
56
56
|
initialPolicy: [
|
|
@@ -88,7 +88,7 @@ export function createVersion(scope, name, functionArn) {
|
|
|
88
88
|
provider = new lambda.Function(stack, providerId, {
|
|
89
89
|
code: lambda.Code.fromAsset(path.join(__dirname, "../../support/edge-function")),
|
|
90
90
|
handler: "edge-lambda-version.handler",
|
|
91
|
-
runtime: lambda.Runtime.
|
|
91
|
+
runtime: lambda.Runtime.NODEJS_22_X,
|
|
92
92
|
timeout: Duration.minutes(15),
|
|
93
93
|
memorySize: 1024,
|
|
94
94
|
initialPolicy: [
|
package/credentials.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
2
3
|
import { fromNodeProviderChain } from "@aws-sdk/credential-providers";
|
|
3
4
|
import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
|
|
4
5
|
import { Logger } from "./logger.js";
|
|
@@ -121,9 +122,9 @@ export function useAWSClient(client, force = false) {
|
|
|
121
122
|
}
|
|
122
123
|
export const useAWSProvider = lazy(async () => {
|
|
123
124
|
const cdkToolkitUrl = await import.meta.resolve("@aws-cdk/toolkit-lib");
|
|
124
|
-
const cdkToolkitPath =
|
|
125
|
-
const { SdkProvider } = await import(path.resolve(cdkToolkitPath, "..", "api", "aws-auth", "sdk-provider.js"));
|
|
126
|
-
const { IoHelper } = await import(path.resolve(cdkToolkitPath, "..", "api", "io", "private", "io-helper.js"));
|
|
125
|
+
const cdkToolkitPath = fileURLToPath(cdkToolkitUrl);
|
|
126
|
+
const { SdkProvider } = await import(pathToFileURL(path.resolve(cdkToolkitPath, "..", "api", "aws-auth", "sdk-provider.js")).href);
|
|
127
|
+
const { IoHelper } = await import(pathToFileURL(path.resolve(cdkToolkitPath, "..", "api", "io", "private", "io-helper.js")).href);
|
|
127
128
|
const project = useProject();
|
|
128
129
|
return new SdkProvider(useAWSCredentialsProvider(), project.config.region, {
|
|
129
130
|
ioHelper: IoHelper.fromActionAwareIoHost({
|
package/iot.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IoTClient, DescribeEndpointCommand } from "@aws-sdk/client-iot";
|
|
2
2
|
import { useAWSClient, useAWSCredentials } from "./credentials.js";
|
|
3
3
|
import { VisibleError } from "./error.js";
|
|
4
|
+
import { lazy } from "./util/lazy.js";
|
|
5
|
+
import { Logger } from "./logger.js";
|
|
4
6
|
export const useIOTEndpoint = lazy(async () => {
|
|
5
7
|
const iot = useAWSClient(IoTClient);
|
|
6
8
|
Logger.debug("Getting IoT endpoint");
|
|
@@ -15,10 +17,8 @@ export const useIOTEndpoint = lazy(async () => {
|
|
|
15
17
|
import iot from "aws-iot-device-sdk";
|
|
16
18
|
import { useBus } from "./bus.js";
|
|
17
19
|
import { useProject } from "./project.js";
|
|
18
|
-
import { Logger } from "./logger.js";
|
|
19
20
|
import { useBootstrap } from "./bootstrap.js";
|
|
20
21
|
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
21
|
-
import { lazy } from "./util/lazy.js";
|
|
22
22
|
export const useIOT = lazy(async () => {
|
|
23
23
|
const bus = useBus();
|
|
24
24
|
const endpoint = await useIOTEndpoint();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sideEffects": false,
|
|
3
3
|
"name": "sst",
|
|
4
|
-
"version": "2.49.
|
|
4
|
+
"version": "2.49.8",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sst": "cli/sst.js"
|
|
7
7
|
},
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"homepage": "https://sst.dev",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@aws-cdk/aws-lambda-python-alpha": "2.201.0-alpha.0",
|
|
29
|
-
"@aws-cdk/cloud-assembly-schema": "
|
|
29
|
+
"@aws-cdk/cloud-assembly-schema": "48.0.0",
|
|
30
30
|
"@aws-cdk/cloudformation-diff": "2.182.0",
|
|
31
31
|
"@aws-cdk/cx-api": "2.201.0",
|
|
32
32
|
"@aws-cdk/toolkit-lib": "1.1.1",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@smithy/signature-v4": "2.0.16",
|
|
55
55
|
"@trpc/server": "9.18.0",
|
|
56
56
|
"adm-zip": "0.5.14",
|
|
57
|
-
"aws-cdk-lib": "2.
|
|
57
|
+
"aws-cdk-lib": "2.224.0",
|
|
58
58
|
"aws-iot-device-sdk": "^2.2.13",
|
|
59
59
|
"aws-sdk": "^2.1501.0",
|
|
60
60
|
"builtin-modules": "3.2.0",
|
package/package.json.bak
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
},
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"name": "sst",
|
|
8
|
-
"version": "2.49.
|
|
8
|
+
"version": "2.49.8",
|
|
9
9
|
"bin": {
|
|
10
10
|
"sst": "cli/sst.js"
|
|
11
11
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"homepage": "https://sst.dev",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@aws-cdk/aws-lambda-python-alpha": "2.201.0-alpha.0",
|
|
39
|
-
"@aws-cdk/cloud-assembly-schema": "
|
|
39
|
+
"@aws-cdk/cloud-assembly-schema": "48.0.0",
|
|
40
40
|
"@aws-cdk/cloudformation-diff": "2.182.0",
|
|
41
41
|
"@aws-cdk/cx-api": "2.201.0",
|
|
42
42
|
"@aws-cdk/toolkit-lib": "1.1.1",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@smithy/signature-v4": "2.0.16",
|
|
65
65
|
"@trpc/server": "9.18.0",
|
|
66
66
|
"adm-zip": "0.5.14",
|
|
67
|
-
"aws-cdk-lib": "2.
|
|
67
|
+
"aws-cdk-lib": "2.224.0",
|
|
68
68
|
"aws-iot-device-sdk": "^2.2.13",
|
|
69
69
|
"aws-sdk": "^2.1501.0",
|
|
70
70
|
"builtin-modules": "3.2.0",
|
package/stacks/deploy.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
2
3
|
import { useBus } from "../bus.js";
|
|
3
4
|
import { useProject } from "../project.js";
|
|
4
5
|
import { useAWSClient, useAWSProvider } from "../credentials.js";
|
|
@@ -193,9 +194,9 @@ async function addInUseExports(stackArtifact, cfnStack) {
|
|
|
193
194
|
}
|
|
194
195
|
async function createCdkDeployments() {
|
|
195
196
|
const cdkToolkitUrl = await import.meta.resolve("@aws-cdk/toolkit-lib");
|
|
196
|
-
const cdkToolkitPath =
|
|
197
|
-
const { Deployments } = await import(path.resolve(cdkToolkitPath, "..", "api", "deployments", "deployments.js"));
|
|
198
|
-
const { IoHelper } = await import(path.resolve(cdkToolkitPath, "..", "api", "io", "private", "io-helper.js"));
|
|
197
|
+
const cdkToolkitPath = fileURLToPath(cdkToolkitUrl);
|
|
198
|
+
const { Deployments } = await import(pathToFileURL(path.resolve(cdkToolkitPath, "..", "api", "deployments", "deployments.js")).href);
|
|
199
|
+
const { IoHelper } = await import(pathToFileURL(path.resolve(cdkToolkitPath, "..", "api", "io", "private", "io-helper.js")).href);
|
|
199
200
|
const provider = await useAWSProvider();
|
|
200
201
|
await useAWSProvider();
|
|
201
202
|
const ioHelper = IoHelper.fromActionAwareIoHost({
|
package/stacks/synth.js
CHANGED
|
@@ -2,6 +2,7 @@ import { Logger } from "../logger.js";
|
|
|
2
2
|
import { useProject } from "../project.js";
|
|
3
3
|
import { useAWSProvider, useSTSIdentity } from "../credentials.js";
|
|
4
4
|
import path from "path";
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
5
6
|
import { VisibleError } from "../error.js";
|
|
6
7
|
import { Semaphore } from "../util/semaphore.js";
|
|
7
8
|
import { Configuration } from "../util/user-configuration.js";
|
|
@@ -11,10 +12,10 @@ export async function synth(opts) {
|
|
|
11
12
|
const { App } = await import("../constructs/App.js");
|
|
12
13
|
const cxapi = await import("@aws-cdk/cx-api");
|
|
13
14
|
const cdkToolkitUrl = await import.meta.resolve("@aws-cdk/toolkit-lib");
|
|
14
|
-
const cdkToolkitPath =
|
|
15
|
-
const { IoHelper } = await import(path.resolve(cdkToolkitPath, "..", "api", "io", "private", "io-helper.js"));
|
|
16
|
-
const { PluginHost } = await import(path.resolve(cdkToolkitPath, "..", "api", "plugin", "plugin.js"));
|
|
17
|
-
const { provideContextValues } = await import(path.resolve(cdkToolkitPath, "..", "context-providers", "index.js"));
|
|
15
|
+
const cdkToolkitPath = fileURLToPath(cdkToolkitUrl);
|
|
16
|
+
const { IoHelper } = await import(pathToFileURL(path.resolve(cdkToolkitPath, "..", "api", "io", "private", "io-helper.js")).href);
|
|
17
|
+
const { PluginHost } = await import(pathToFileURL(path.resolve(cdkToolkitPath, "..", "api", "plugin", "plugin.js")).href);
|
|
18
|
+
const { provideContextValues } = await import(pathToFileURL(path.resolve(cdkToolkitPath, "..", "context-providers", "index.js")).href);
|
|
18
19
|
const project = useProject();
|
|
19
20
|
const cwd = process.cwd();
|
|
20
21
|
process.chdir(project.paths.root);
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
import * as os from "os";
|
|
3
2
|
import * as fs_path from "path";
|
|
4
3
|
import * as fs from "fs";
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
5
5
|
export const PROJECT_CONFIG = "cdk.json";
|
|
6
6
|
export const USER_DEFAULTS = "~/.cdk.json";
|
|
7
7
|
const CONTEXT_KEY = "context";
|
|
8
|
-
let cdkToolkitPath;
|
|
8
|
+
let cdkToolkitPath = "";
|
|
9
|
+
let cdkToolkitUrl = "";
|
|
9
10
|
try {
|
|
10
|
-
|
|
11
|
-
cdkToolkitPath =
|
|
11
|
+
cdkToolkitUrl = await import.meta.resolve("@aws-cdk/toolkit-lib");
|
|
12
|
+
cdkToolkitPath = fileURLToPath(cdkToolkitUrl);
|
|
12
13
|
}
|
|
13
14
|
catch (e) {
|
|
14
15
|
// Fallback for test environment where import.meta.resolve is not available
|
|
15
16
|
const module = await import("module");
|
|
16
17
|
const require = module.createRequire(import.meta.url);
|
|
17
18
|
cdkToolkitPath = require.resolve("@aws-cdk/toolkit-lib");
|
|
19
|
+
cdkToolkitUrl = pathToFileURL(cdkToolkitPath).href;
|
|
18
20
|
}
|
|
19
|
-
const { ToolkitError } = await import(
|
|
20
|
-
const { Context, PROJECT_CONTEXT } = await import(fs_path.resolve(cdkToolkitPath, "..", "api", "context.js"));
|
|
21
|
-
const { Settings } = await import(fs_path.resolve(cdkToolkitPath, "..", "api", "settings.js"))
|
|
22
|
-
|
|
21
|
+
const { ToolkitError } = await import(cdkToolkitUrl);
|
|
22
|
+
const { Context, PROJECT_CONTEXT } = await import(pathToFileURL(fs_path.resolve(cdkToolkitPath, "..", "api", "context.js")).href);
|
|
23
|
+
const { Settings } = await import(pathToFileURL(fs_path.resolve(cdkToolkitPath, "..", "api", "settings.js"))
|
|
24
|
+
.href);
|
|
25
|
+
const { Tags } = await import(pathToFileURL(fs_path.resolve(cdkToolkitPath, "..", "api", "tags", "index.js")).href);
|
|
23
26
|
export var Command;
|
|
24
27
|
(function (Command) {
|
|
25
28
|
Command["LS"] = "ls";
|