diff --git a/examples/container-lambda-worker/package.json b/examples/container-lambda-worker/package.json index b1b9561..807e8b6 100644 --- a/examples/container-lambda-worker/package.json +++ b/examples/container-lambda-worker/package.json @@ -13,14 +13,14 @@ "devDependencies": { "@types/jest": "^29.5.4", "@types/node": "20.5.9", - "aws-cdk": "2.96.2", + "aws-cdk": "2.162.0", "jest": "^29.6.4", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", "typescript": "~5.2.2" }, "dependencies": { - "aws-cdk-lib": "2.96.2", + "aws-cdk-lib": "2.162.0", "cdk-ecr-deployment": "^2.5.30", "constructs": "^10.0.0", "source-map-support": "^0.5.21" diff --git a/examples/simple-authenticated-api/lib/simple-authenticated-api-stack.ts b/examples/simple-authenticated-api/lib/simple-authenticated-api-stack.ts index 2656b44..8609d21 100644 --- a/examples/simple-authenticated-api/lib/simple-authenticated-api-stack.ts +++ b/examples/simple-authenticated-api/lib/simple-authenticated-api-stack.ts @@ -2,7 +2,7 @@ import * as cdk from "aws-cdk-lib"; // import { aws_ec2 as ec2 } from "aws-cdk-lib"; import { aws_s3 as s3 } from "aws-cdk-lib"; import { aws_sns as sns } from "aws-cdk-lib"; -import * as apigatewayv2_alpha from "@aws-cdk/aws-apigatewayv2-alpha"; +import * as apigatewayv2 from "aws-cdk-lib/aws-apigatewayv2"; import { Construct } from "constructs"; import { AuthenticatedApi, AuthenticatedApiFunction } from "../../../lib"; @@ -152,28 +152,28 @@ export class SimpleAuthenticatedApiStack extends cdk.Stack { { name: "route1", path: "/1/route1", - method: apigatewayv2_alpha.HttpMethod.GET, + method: apigatewayv2.HttpMethod.GET, lambda: route1Handler, requiredScope: "analytics:admin", }, { name: "route2", path: "/1/route2", - method: apigatewayv2_alpha.HttpMethod.GET, + method: apigatewayv2.HttpMethod.GET, lambda: route2Handler, isPublic: true, }, { name: "route3", path: "/1/route3/{id}", - method: apigatewayv2_alpha.HttpMethod.GET, + method: apigatewayv2.HttpMethod.GET, lambda: route3Handler, requiredScope: "analytics:admin", }, { name: "route4", path: "/1/route4/{id}/route4", - method: apigatewayv2_alpha.HttpMethod.GET, + method: apigatewayv2.HttpMethod.GET, lambda: route4Handler, requiredScope: "analytics:admin", }, @@ -208,7 +208,7 @@ export class SimpleAuthenticatedApiStack extends cdk.Stack { name: "simple authenticated api docs", baseUrl: `${documentationBucket.bucketWebsiteUrl}/api-documentation/index.html`, path: "/api-documentation", - method: apigatewayv2_alpha.HttpMethod.GET, + method: apigatewayv2.HttpMethod.GET, }); console.log(`Regional domain name: ${api.domainName.regionalDomainName}`); diff --git a/examples/simple-authenticated-api/package.json b/examples/simple-authenticated-api/package.json index a43742a..6fedd0a 100644 --- a/examples/simple-authenticated-api/package.json +++ b/examples/simple-authenticated-api/package.json @@ -13,14 +13,14 @@ "devDependencies": { "@types/jest": "^29.5.4", "@types/node": "20.5.9", - "aws-cdk": "2.96.2", + "aws-cdk": "2.162.0", "jest": "^29.6.4", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", "typescript": "~5.2.2" }, "dependencies": { - "aws-cdk-lib": "2.96.2", + "aws-cdk-lib": "2.162.0", "constructs": "^10.0.0", "esbuild": "^0.19.3", "source-map-support": "^0.5.21", diff --git a/examples/simple-cdn-site-hosting-construct/package.json b/examples/simple-cdn-site-hosting-construct/package.json index a79d4f5..2e579bd 100644 --- a/examples/simple-cdn-site-hosting-construct/package.json +++ b/examples/simple-cdn-site-hosting-construct/package.json @@ -13,14 +13,14 @@ "devDependencies": { "@types/jest": "^29.5.4", "@types/node": "20.5.9", - "aws-cdk": "2.96.2", + "aws-cdk": "2.162.0", "jest": "^29.6.4", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", "typescript": "~5.2.2" }, "dependencies": { - "aws-cdk-lib": "2.96.2", + "aws-cdk-lib": "2.162.0", "constructs": "10.2.70", "path": "^0.12.7", "source-map-support": "^0.5.21" diff --git a/examples/simple-lambda-worker/package.json b/examples/simple-lambda-worker/package.json index 114262f..8603372 100644 --- a/examples/simple-lambda-worker/package.json +++ b/examples/simple-lambda-worker/package.json @@ -13,14 +13,14 @@ "devDependencies": { "@types/jest": "^29.5.4", "@types/node": "20.5.9", - "aws-cdk": "2.96.2", + "aws-cdk": "2.162.0", "jest": "^29.6.4", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", "typescript": "~5.2.2" }, "dependencies": { - "aws-cdk-lib": "2.96.2", + "aws-cdk-lib": "2.162.0", "constructs": "^10.0.0", "esbuild": "^0.19.3", "source-map-support": "^0.5.21" diff --git a/examples/simple-talis-cdk-stack/package.json b/examples/simple-talis-cdk-stack/package.json index 3db517b..737ca66 100644 --- a/examples/simple-talis-cdk-stack/package.json +++ b/examples/simple-talis-cdk-stack/package.json @@ -15,12 +15,12 @@ "@types/node": "20.5.9", "jest": "^29.6.4", "ts-jest": "^29.1.1", - "aws-cdk": "2.96.2", + "aws-cdk": "2.162.0", "ts-node": "^10.9.1", "typescript": "~5.2.2" }, "dependencies": { - "aws-cdk-lib": "2.96.2", + "aws-cdk-lib": "2.162.0", "constructs": "^10.0.0", "source-map-support": "^0.5.21" } diff --git a/lib/authenticated-api/authenticated-api.ts b/lib/authenticated-api/authenticated-api.ts index 96ad25d..2c7662c 100644 --- a/lib/authenticated-api/authenticated-api.ts +++ b/lib/authenticated-api/authenticated-api.ts @@ -1,9 +1,8 @@ import * as cdk from "aws-cdk-lib"; import * as acm from "aws-cdk-lib/aws-certificatemanager"; -import { aws_apigatewayv2 as apigatewayv2 } from "aws-cdk-lib"; -import * as apigatewayv2_alpha from "@aws-cdk/aws-apigatewayv2-alpha"; -import * as authorizers_alpha from "@aws-cdk/aws-apigatewayv2-authorizers-alpha"; -import * as integrations_alpha from "@aws-cdk/aws-apigatewayv2-integrations-alpha"; +import * as apigatewayv2 from "aws-cdk-lib/aws-apigatewayv2"; +import * as authorizers from "aws-cdk-lib/aws-apigatewayv2-authorizers"; +import * as integrations from "aws-cdk-lib/aws-apigatewayv2-integrations"; import { aws_cloudwatch as cloudwatch } from "aws-cdk-lib"; import { aws_cloudwatch_actions as cloudwatchActions } from "aws-cdk-lib"; import { aws_logs as awslogs } from "aws-cdk-lib"; @@ -22,10 +21,10 @@ const DEFAULT_LAMBDA_DURATION_THRESHOLD = cdk.Duration.minutes(1); export class AuthenticatedApi extends Construct { readonly apiId: string; readonly httpApiId: string; - readonly domainName: apigatewayv2_alpha.DomainName; + readonly domainName: apigatewayv2.DomainName; - private httpApi: apigatewayv2_alpha.HttpApi; - private authorizer: apigatewayv2_alpha.IHttpRouteAuthorizer; + private httpApi: apigatewayv2.HttpApi; + private authorizer: apigatewayv2.IHttpRouteAuthorizer; private alarmAction: cloudwatch.IAlarmAction; constructor(scope: Construct, id: string, props: AuthenticatedApiProps) { @@ -39,7 +38,7 @@ export class AuthenticatedApi extends Construct { `To use a custom domain name both certificateArn and domainName must be specified`, ); } - this.domainName = new apigatewayv2_alpha.DomainName(this, "domain-name", { + this.domainName = new apigatewayv2.DomainName(this, "domain-name", { domainName: props.domainName, certificate: acm.Certificate.fromCertificateArn( this, @@ -48,24 +47,20 @@ export class AuthenticatedApi extends Construct { ), }); const apiName = `${props.prefix}${props.name}`; - const apiGatewayProps: apigatewayv2_alpha.HttpApiProps = { + const apiGatewayProps: apigatewayv2.HttpApiProps = { apiName: apiName, defaultDomainMapping: { domainName: this.domainName }, ...(props.corsDomain && { corsPreflight: { allowHeaders: ["*"], - allowMethods: [apigatewayv2_alpha.CorsHttpMethod.ANY], + allowMethods: [apigatewayv2.CorsHttpMethod.ANY], allowCredentials: props.corsAllowCredentials ?? true, allowOrigins: props.corsDomain, }, }), }; - this.httpApi = new apigatewayv2_alpha.HttpApi( - this, - apiName, - apiGatewayProps, - ); + this.httpApi = new apigatewayv2.HttpApi(this, apiName, apiGatewayProps); this.apiId = this.httpApi.apiId; this.httpApiId = this.httpApi.httpApiId; @@ -178,12 +173,12 @@ export class AuthenticatedApi extends Construct { }, ); - this.authorizer = new authorizers_alpha.HttpLambdaAuthorizer( + this.authorizer = new authorizers.HttpLambdaAuthorizer( "lambda-authorizer", authLambda, { authorizerName: `${apiName}-http-lambda-authoriser`, - responseTypes: [authorizers_alpha.HttpLambdaResponseType.SIMPLE], // Define if returns simple and/or iam response + responseTypes: [authorizers.HttpLambdaResponseType.SIMPLE], // Define if returns simple and/or iam response }, ); @@ -195,7 +190,7 @@ export class AuthenticatedApi extends Construct { if (props.lambdaRoutes) { for (const routeProps of props.lambdaRoutes) { - const integration = new integrations_alpha.HttpLambdaIntegration( + const integration = new integrations.HttpLambdaIntegration( "http-lambda-integration", routeProps.lambda, ); @@ -309,7 +304,7 @@ export class AuthenticatedApi extends Construct { this.httpApi.addRoutes({ path: routeProps.path, methods: [routeProps.method], - integration: new integrations_alpha.HttpUrlIntegration( + integration: new integrations.HttpUrlIntegration( routeProps.name, routeProps.baseUrl, { diff --git a/lib/authenticated-api/route-lambda-props.ts b/lib/authenticated-api/route-lambda-props.ts index 7e1d81e..899dabe 100644 --- a/lib/authenticated-api/route-lambda-props.ts +++ b/lib/authenticated-api/route-lambda-props.ts @@ -1,12 +1,12 @@ import * as cdk from "aws-cdk-lib"; -import * as apigatewayv2_alpha from "@aws-cdk/aws-apigatewayv2-alpha"; +import * as apigatewayv2 from "aws-cdk-lib/aws-apigatewayv2"; import { AuthenticatedApiFunction } from "./authenticated-api-function"; export interface RouteLambdaProps { name: string; path: string; - method: apigatewayv2_alpha.HttpMethod; + method: apigatewayv2.HttpMethod; isPublic?: boolean; // Defaults to false requiredScope?: string; lambda: AuthenticatedApiFunction; diff --git a/lib/authenticated-api/route-url-props.ts b/lib/authenticated-api/route-url-props.ts index 3640fca..81483fc 100644 --- a/lib/authenticated-api/route-url-props.ts +++ b/lib/authenticated-api/route-url-props.ts @@ -1,10 +1,10 @@ -import * as apigatewayv2_alpha from "@aws-cdk/aws-apigatewayv2-alpha"; +import * as apigatewayv2 from "aws-cdk-lib/aws-apigatewayv2"; export interface RouteUrlProps { name: string; baseUrl: string; path: string; - method: apigatewayv2_alpha.HttpMethod; + method: apigatewayv2.HttpMethod; isPublic?: boolean; // Defaults to false requiredScope?: string; } diff --git a/package-lock.json b/package-lock.json index f3f007d..c02aa96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,10 +8,7 @@ "name": "talis-cdk-constructs", "version": "0.1.0", "dependencies": { - "@aws-cdk/aws-apigatewayv2-alpha": "2.96.2-alpha.0", - "@aws-cdk/aws-apigatewayv2-authorizers-alpha": "2.96.2-alpha.0", - "@aws-cdk/aws-apigatewayv2-integrations-alpha": "2.96.2-alpha.0", - "aws-cdk-lib": "2.96.2", + "aws-cdk-lib": "2.162.0", "axios": "^1.5.0", "constructs": "^10.0.0", "eslint": "^8.49.0", @@ -20,9 +17,6 @@ "talis-node": "github:talis/talis-node#v0.2.1", "uuid": "^9.0.0" }, - "bin": { - "cdk": "bin/cdk.js" - }, "devDependencies": { "@commitlint/cli": "^17.6.1", "@commitlint/config-conventional": "^17.6.1", @@ -31,7 +25,7 @@ "@types/node": "20.5.9", "@types/uuid": "^9.0.4", "@typescript-eslint/eslint-plugin": "^6.7.2", - "aws-cdk": "2.96.2", + "aws-cdk": "2.162.0", "aws-sdk": "^2.1363.0", "conventional-changelog-conventionalcommits": "^5.0.0", "esbuild": "^0.19.3", @@ -66,9 +60,9 @@ } }, "node_modules/@aws-cdk/asset-awscli-v1": { - "version": "2.2.200", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.200.tgz", - "integrity": "sha512-Kf5J8DfJK4wZFWT2Myca0lhwke7LwHcHBo+4TvWOGJrFVVKVuuiLCkzPPRBQQVDj0Vtn2NBokZAz8pfMpAqAKg==" + "version": "2.2.206", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.206.tgz", + "integrity": "sha512-l2eAROXoPOXNyXt3lGUEveHo/U8c0IX7RTjgf2qy1LcZw6IkUIIIy/erQ6bBqZ5SibRfFAoXSBBC+gFfGyZDcA==" }, "node_modules/@aws-cdk/asset-kubectl-v20": { "version": "2.1.2", @@ -76,46 +70,40 @@ "integrity": "sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==" }, "node_modules/@aws-cdk/asset-node-proxy-agent-v6": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.0.1.tgz", - "integrity": "sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.0.tgz", + "integrity": "sha512-7bY3J8GCVxLupn/kNmpPc5VJz8grx+4RKfnnJiO1LG+uxkZfANZG3RMHhE+qQxxwkyQ9/MfPtTpf748UhR425A==" }, - "node_modules/@aws-cdk/aws-apigatewayv2-alpha": { - "version": "2.96.2-alpha.0", - "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-alpha/-/aws-apigatewayv2-alpha-2.96.2-alpha.0.tgz", - "integrity": "sha512-HNfgzJiViiAjMM9WGz//trDVnwYtojzhjWq2cyNIopM2A/RfU7HNGbVKQl0io+nO7NfUiI14ppFgERQY8JO6+w==", - "engines": { - "node": ">= 14.15.0" - }, - "peerDependencies": { - "aws-cdk-lib": "2.96.2", - "constructs": "^10.0.0" + "node_modules/@aws-cdk/cloud-assembly-schema": { + "version": "38.0.1", + "resolved": "https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-38.0.1.tgz", + "integrity": "sha512-KvPe+NMWAulfNVwY7jenFhzhuLhLqJ/OPy5jx7wUstbjnYnjRVLpUHPU3yCjXFE0J8cuJVdx95BJ4rOs66Pi9w==", + "bundleDependencies": [ + "jsonschema", + "semver" + ], + "dependencies": { + "jsonschema": "^1.4.1", + "semver": "^7.6.3" } }, - "node_modules/@aws-cdk/aws-apigatewayv2-authorizers-alpha": { - "version": "2.96.2-alpha.0", - "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-authorizers-alpha/-/aws-apigatewayv2-authorizers-alpha-2.96.2-alpha.0.tgz", - "integrity": "sha512-pFLjyJnK+HAJAZgX4owIKMihajgpsPJQh22RDtpozXcOXpPRkBNssRT6W12lfurIU7wSHONlJ0y+/A5K3yTp6w==", + "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/jsonschema": { + "version": "1.4.1", + "inBundle": true, + "license": "MIT", "engines": { - "node": ">= 14.15.0" - }, - "peerDependencies": { - "@aws-cdk/aws-apigatewayv2-alpha": "2.96.2-alpha.0", - "aws-cdk-lib": "2.96.2", - "constructs": "^10.0.0" + "node": "*" } }, - "node_modules/@aws-cdk/aws-apigatewayv2-integrations-alpha": { - "version": "2.96.2-alpha.0", - "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-integrations-alpha/-/aws-apigatewayv2-integrations-alpha-2.96.2-alpha.0.tgz", - "integrity": "sha512-5rhxTTkxR8GenCRkNFNMv8UmH3cfOldjKpOZYpML0KK7jxtYz8ElIJMCSOQazi7dSnETtYKaGLpfvuyEpB4Wpw==", - "engines": { - "node": ">= 14.15.0" + "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver": { + "version": "7.6.3", + "inBundle": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, - "peerDependencies": { - "@aws-cdk/aws-apigatewayv2-alpha": "2.96.2-alpha.0", - "aws-cdk-lib": "2.96.2", - "constructs": "^10.0.0" + "engines": { + "node": ">=10" } }, "node_modules/@babel/code-frame": { @@ -3074,9 +3062,9 @@ } }, "node_modules/aws-cdk": { - "version": "2.96.2", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.96.2.tgz", - "integrity": "sha512-13ERpPV99OFAD75PLOtl0rRMXTWn6bCrmUPwYKkLwIMkj2xWCBiwo2Y9Qg+UzEszm5NMHA1N4ichSvuZ0mt2IQ==", + "version": "2.162.0", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.162.0.tgz", + "integrity": "sha512-wuqX+qKeqJHKTDoEJtdxIQOzOcMxCxlowcqE9YMn8PiDn7NsvIgfub4Jyh8TLfLRxukaVIpNqUG1PYiSX9Y50Q==", "dev": true, "bin": { "cdk": "bin/cdk" @@ -3089,9 +3077,9 @@ } }, "node_modules/aws-cdk-lib": { - "version": "2.96.2", - "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.96.2.tgz", - "integrity": "sha512-wDAdPUfNlteLQKrapd5c7hNYHWPzHmFfuMSrddFCajjoscsnd0LeUxM2yAzwJV7vLNp00q2SgUZqRQHcN98dmg==", + "version": "2.162.0", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.162.0.tgz", + "integrity": "sha512-Mx/8N9w+yqQONsGIFFk9Rl0JOu9nNWpU+JLlr73mHvhwxzhCT2XEZnS98UUiwuAcJYwl0c2Eh32joxj/txh3JA==", "bundleDependencies": [ "@balena/dockerignore", "case", @@ -3102,21 +3090,24 @@ "punycode", "semver", "table", - "yaml" + "yaml", + "mime-types" ], "dependencies": { - "@aws-cdk/asset-awscli-v1": "^2.2.200", + "@aws-cdk/asset-awscli-v1": "^2.2.202", "@aws-cdk/asset-kubectl-v20": "^2.1.2", - "@aws-cdk/asset-node-proxy-agent-v6": "^2.0.1", + "@aws-cdk/asset-node-proxy-agent-v6": "^2.1.0", + "@aws-cdk/cloud-assembly-schema": "^38.0.0", "@balena/dockerignore": "^1.0.2", "case": "1.6.3", - "fs-extra": "^11.1.1", - "ignore": "^5.2.4", + "fs-extra": "^11.2.0", + "ignore": "^5.3.2", "jsonschema": "^1.4.1", + "mime-types": "^2.1.35", "minimatch": "^3.1.2", - "punycode": "^2.3.0", - "semver": "^7.5.4", - "table": "^6.8.1", + "punycode": "^2.3.1", + "semver": "^7.6.3", + "table": "^6.8.2", "yaml": "1.10.2" }, "engines": { @@ -3132,14 +3123,14 @@ "license": "Apache-2.0" }, "node_modules/aws-cdk-lib/node_modules/ajv": { - "version": "8.12.0", + "version": "8.17.1", "inBundle": true, "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -3229,8 +3220,13 @@ "inBundle": true, "license": "MIT" }, + "node_modules/aws-cdk-lib/node_modules/fast-uri": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT" + }, "node_modules/aws-cdk-lib/node_modules/fs-extra": { - "version": "11.1.1", + "version": "11.2.0", "inBundle": true, "license": "MIT", "dependencies": { @@ -3248,7 +3244,7 @@ "license": "ISC" }, "node_modules/aws-cdk-lib/node_modules/ignore": { - "version": "5.2.4", + "version": "5.3.2", "inBundle": true, "license": "MIT", "engines": { @@ -3292,15 +3288,23 @@ "inBundle": true, "license": "MIT" }, - "node_modules/aws-cdk-lib/node_modules/lru-cache": { - "version": "6.0.0", + "node_modules/aws-cdk-lib/node_modules/mime-db": { + "version": "1.52.0", "inBundle": true, - "license": "ISC", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/aws-cdk-lib/node_modules/mime-types": { + "version": "2.1.35", + "inBundle": true, + "license": "MIT", "dependencies": { - "yallist": "^4.0.0" + "mime-db": "1.52.0" }, "engines": { - "node": ">=10" + "node": ">= 0.6" } }, "node_modules/aws-cdk-lib/node_modules/minimatch": { @@ -3315,7 +3319,7 @@ } }, "node_modules/aws-cdk-lib/node_modules/punycode": { - "version": "2.3.0", + "version": "2.3.1", "inBundle": true, "license": "MIT", "engines": { @@ -3331,12 +3335,9 @@ } }, "node_modules/aws-cdk-lib/node_modules/semver": { - "version": "7.5.4", + "version": "7.6.3", "inBundle": true, "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -3385,7 +3386,7 @@ } }, "node_modules/aws-cdk-lib/node_modules/table": { - "version": "6.8.1", + "version": "6.8.2", "inBundle": true, "license": "BSD-3-Clause", "dependencies": { @@ -3400,26 +3401,13 @@ } }, "node_modules/aws-cdk-lib/node_modules/universalify": { - "version": "2.0.0", + "version": "2.0.1", "inBundle": true, "license": "MIT", "engines": { "node": ">= 10.0.0" } }, - "node_modules/aws-cdk-lib/node_modules/uri-js": { - "version": "4.4.1", - "inBundle": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/aws-cdk-lib/node_modules/yallist": { - "version": "4.0.0", - "inBundle": true, - "license": "ISC" - }, "node_modules/aws-cdk-lib/node_modules/yaml": { "version": "1.10.2", "inBundle": true, diff --git a/package.json b/package.json index 4f2c318..86b6978 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@types/node": "20.5.9", "@types/uuid": "^9.0.4", "@typescript-eslint/eslint-plugin": "^6.7.2", - "aws-cdk": "2.96.2", + "aws-cdk": "2.162.0", "aws-sdk": "^2.1363.0", "esbuild": "^0.19.3", "eslint-config-prettier": "^9.0.0", @@ -49,10 +49,7 @@ "typescript": "~5.2.2" }, "dependencies": { - "@aws-cdk/aws-apigatewayv2-alpha": "2.96.2-alpha.0", - "@aws-cdk/aws-apigatewayv2-authorizers-alpha": "2.96.2-alpha.0", - "@aws-cdk/aws-apigatewayv2-integrations-alpha": "2.96.2-alpha.0", - "aws-cdk-lib": "2.96.2", + "aws-cdk-lib": "2.162.0", "axios": "^1.5.0", "constructs": "^10.0.0", "eslint": "^8.49.0", diff --git a/src/lambda/api/PersonaAuthorizer.d.ts b/src/lambda/api/PersonaAuthorizer.d.ts index 2fa7b68..20caa71 100644 --- a/src/lambda/api/PersonaAuthorizer.d.ts +++ b/src/lambda/api/PersonaAuthorizer.d.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { PersonaClient } from "talis-node"; type ParsedArn = { method: string; @@ -45,4 +44,3 @@ export declare class PersonaAuthorizer { pathMatch(pathDefinition: string, path: string): boolean; } export {}; -/* eslint-enable @typescript-eslint/no-explicit-any */ diff --git a/src/lambda/api/authorizer.js b/src/lambda/api/authorizer.js index e6d24e7..5be3f6d 100644 --- a/src/lambda/api/authorizer.js +++ b/src/lambda/api/authorizer.js @@ -1,8 +1,10 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const PersonaAuthorizer_1 = require("./PersonaAuthorizer"); +/* eslint-disable @typescript-eslint/no-explicit-any */ module.exports.validateToken = async (event, context) => { const route = new PersonaAuthorizer_1.PersonaAuthorizer(event, context); return await route.handle(); }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXplci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImF1dGhvcml6ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwyREFBd0Q7QUFFeEQsTUFBTSxDQUFDLE9BQU8sQ0FBQyxhQUFhLEdBQUcsS0FBSyxFQUFFLEtBQVUsRUFBRSxPQUFZLEVBQUUsRUFBRTtJQUNoRSxNQUFNLEtBQUssR0FBRyxJQUFJLHFDQUFpQixDQUFDLEtBQUssRUFBRSxPQUFPLENBQUMsQ0FBQztJQUNwRCxPQUFPLE1BQU0sS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDO0FBQzlCLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFBlcnNvbmFBdXRob3JpemVyIH0gZnJvbSBcIi4vUGVyc29uYUF1dGhvcml6ZXJcIjtcblxubW9kdWxlLmV4cG9ydHMudmFsaWRhdGVUb2tlbiA9IGFzeW5jIChldmVudDogYW55LCBjb250ZXh0OiBhbnkpID0+IHtcbiAgY29uc3Qgcm91dGUgPSBuZXcgUGVyc29uYUF1dGhvcml6ZXIoZXZlbnQsIGNvbnRleHQpO1xuICByZXR1cm4gYXdhaXQgcm91dGUuaGFuZGxlKCk7XG59O1xuIl19 \ No newline at end of file +/* eslint-enable @typescript-eslint/no-explicit-any */ +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXplci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImF1dGhvcml6ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwyREFBd0Q7QUFFeEQsdURBQXVEO0FBQ3ZELE1BQU0sQ0FBQyxPQUFPLENBQUMsYUFBYSxHQUFHLEtBQUssRUFBRSxLQUFVLEVBQUUsT0FBWSxFQUFFLEVBQUU7SUFDaEUsTUFBTSxLQUFLLEdBQUcsSUFBSSxxQ0FBaUIsQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFDcEQsT0FBTyxNQUFNLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQztBQUM5QixDQUFDLENBQUM7QUFDRixzREFBc0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQZXJzb25hQXV0aG9yaXplciB9IGZyb20gXCIuL1BlcnNvbmFBdXRob3JpemVyXCI7XG5cbi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbm1vZHVsZS5leHBvcnRzLnZhbGlkYXRlVG9rZW4gPSBhc3luYyAoZXZlbnQ6IGFueSwgY29udGV4dDogYW55KSA9PiB7XG4gIGNvbnN0IHJvdXRlID0gbmV3IFBlcnNvbmFBdXRob3JpemVyKGV2ZW50LCBjb250ZXh0KTtcbiAgcmV0dXJuIGF3YWl0IHJvdXRlLmhhbmRsZSgpO1xufTtcbi8qIGVzbGludC1lbmFibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuIl19 \ No newline at end of file diff --git a/test/fixtures/infra/resource_prefixer_test_cases.ts b/test/fixtures/infra/resource_prefixer_test_cases.ts index f342798..66089ac 100644 --- a/test/fixtures/infra/resource_prefixer_test_cases.ts +++ b/test/fixtures/infra/resource_prefixer_test_cases.ts @@ -1,5 +1,5 @@ import { aws_dynamodb as dynamodb } from "aws-cdk-lib"; -import * as apigatewayv2_alpha from "@aws-cdk/aws-apigatewayv2-alpha"; +import * as apigatewayv2 from "aws-cdk-lib/aws-apigatewayv2"; import { Construct } from "constructs"; import { Constructor } from "../../../lib"; @@ -27,7 +27,7 @@ export const ResourcePrefixerTestCases: Array = [ }, }, { - resourceType: apigatewayv2_alpha.HttpApi, + resourceType: apigatewayv2.HttpApi, resourceProps: { apiName: "api-name", }, diff --git a/test/infra/authenticated-api/authenticated-api.test.ts b/test/infra/authenticated-api/authenticated-api.test.ts index 0fd2a48..39eed65 100644 --- a/test/infra/authenticated-api/authenticated-api.test.ts +++ b/test/infra/authenticated-api/authenticated-api.test.ts @@ -1,6 +1,6 @@ import * as cdk from "aws-cdk-lib"; import { aws_ec2 as ec2 } from "aws-cdk-lib"; -import * as apigatewayv2_alpha from "@aws-cdk/aws-apigatewayv2-alpha"; +import * as apigatewayv2 from "aws-cdk-lib/aws-apigatewayv2"; import { aws_sns as sns } from "aws-cdk-lib"; import { Template, Match } from "aws-cdk-lib/assertions"; import * as path from "path"; @@ -77,13 +77,13 @@ describe("AuthenticatedApi", () => { { name: "route1", path: "/1/test-route-1", - method: apigatewayv2_alpha.HttpMethod.GET, + method: apigatewayv2.HttpMethod.GET, lambda: route1Handler, }, { name: "route2", path: "/1/test-route-2", - method: apigatewayv2_alpha.HttpMethod.GET, + method: apigatewayv2.HttpMethod.GET, lambda: route2Handler, isPublic: true, }, @@ -357,13 +357,13 @@ describe("AuthenticatedApi", () => { name: "route1", baseUrl: "https://www.example.com", path: "/api/index.html", - method: apigatewayv2_alpha.HttpMethod.GET, + method: apigatewayv2.HttpMethod.GET, }, { name: "route2", baseUrl: "https://www.example.com", path: "/docs/index.html", - method: apigatewayv2_alpha.HttpMethod.GET, + method: apigatewayv2.HttpMethod.GET, }, ], });