From e74a2122706ec3a443b8acfa264f2aba6bbf72a3 Mon Sep 17 00:00:00 2001 From: "@sladg" Date: Sun, 26 Feb 2023 00:26:49 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(domains):=20rework=20how=20dom?= =?UTF-8?q?ains=20are=20passed,=20allow=20for=20many,=20auto-guess=20zone?= =?UTF-8?q?=20(#73,=20#79)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow for passing multiple domains. Get domains from CLI, automatically select the most fitting one. BREAKING CHANGE: Changed CLI interface, different way to pass domains #73, #79 --- lib/cdk/config.ts | 8 +-- lib/cdk/stack.ts | 42 +++++++------- lib/cdk/types.ts | 13 ++++- lib/cdk/utils/cfnCertificate.ts | 21 +++++-- lib/cdk/utils/cfnDistro.ts | 7 ++- lib/cdk/utils/dnsRecords.ts | 70 ++++++++++++++++++++--- lib/cdk/utils/redirect.ts | 13 ++--- lib/cli.ts | 9 +-- lib/cli/deploy.ts | 9 +-- package-lock.json | 98 ++++++++++++++++----------------- package.json | 8 +-- 11 files changed, 182 insertions(+), 116 deletions(-) diff --git a/lib/cdk/config.ts b/lib/cdk/config.ts index fd53b5e..97c8f23 100644 --- a/lib/cdk/config.ts +++ b/lib/cdk/config.ts @@ -22,21 +22,21 @@ const RawEnvConfig = cleanEnv(process.env, { LAMBDA_RUNTIME: str({ default: RuntimeEnum.NODEJS_16_X, choices: Object.values(RuntimeEnum) }), IMAGE_LAMBDA_TIMEOUT: num({ default: IMAGE_LAMBDA_DEFAULT_TIMEOUT }), IMAGE_LAMBDA_MEMORY: num({ default: IMAGE_LAMBDA_DEFAULT_MEMORY }), - HOSTED_ZONE: str({ default: undefined }), - DNS_PREFIX: str({ default: undefined }), CUSTOM_API_DOMAIN: str({ default: undefined }), REDIRECT_FROM_APEX: bool({ default: false }), + DOMAIN_NAMES: str({ default: undefined }), + PROFILE: str({ default: undefined }), }) export const envConfig = { + profile: RawEnvConfig.PROFILE, stackName: RawEnvConfig.STACK_NAME, lambdaMemory: RawEnvConfig.LAMBDA_MEMORY, lambdaTimeout: RawEnvConfig.LAMBDA_TIMEOUT, lambdaRuntime: runtimeMap[RawEnvConfig.LAMBDA_RUNTIME], imageLambdaMemory: RawEnvConfig.IMAGE_LAMBDA_MEMORY, imageLambdaTimeout: RawEnvConfig.IMAGE_LAMBDA_TIMEOUT, - hostedZone: RawEnvConfig.HOSTED_ZONE, - dnsPrefix: RawEnvConfig.DNS_PREFIX, customApiDomain: RawEnvConfig.CUSTOM_API_DOMAIN, redirectFromApex: RawEnvConfig.REDIRECT_FROM_APEX, + domainNames: RawEnvConfig.DOMAIN_NAMES ? RawEnvConfig.DOMAIN_NAMES.split(',').map((a) => a.trim()) : [], } diff --git a/lib/cdk/stack.ts b/lib/cdk/stack.ts index b95a317..a20c6ea 100644 --- a/lib/cdk/stack.ts +++ b/lib/cdk/stack.ts @@ -4,13 +4,12 @@ import { ICertificate } from 'aws-cdk-lib/aws-certificatemanager' import { IDistribution } from 'aws-cdk-lib/aws-cloudfront' import { HttpOrigin } from 'aws-cdk-lib/aws-cloudfront-origins' import { Function } from 'aws-cdk-lib/aws-lambda' -import { HostedZone, IHostedZone } from 'aws-cdk-lib/aws-route53' import { Bucket } from 'aws-cdk-lib/aws-s3' -import { CustomStackProps } from './types' +import { CustomStackProps, MappedDomain } from './types' import { setupApiGateway, SetupApiGwProps } from './utils/apiGw' import { setupCfnCertificate, SetupCfnCertificateProps } from './utils/cfnCertificate' import { setupCfnDistro, SetupCfnDistroProps } from './utils/cfnDistro' -import { setupDnsRecords, SetupDnsRecordsProps } from './utils/dnsRecords' +import { PrepareDomainProps, prepareDomains, setupDnsRecords, SetupDnsRecordsProps } from './utils/dnsRecords' import { setupImageLambda, SetupImageLambdaProps } from './utils/imageLambda' import { setupApexRedirect, SetupApexRedirectProps } from './utils/redirect' import { setupAssetsBucket, UploadAssetsProps, uploadStaticAssets } from './utils/s3' @@ -23,22 +22,17 @@ export class NextStandaloneStack extends Stack { assetsBucket?: Bucket cfnDistro?: IDistribution cfnCertificate?: ICertificate - hostedZone?: IHostedZone - domainName?: string + domains: MappedDomain[] constructor(scope: App, id: string, config: CustomStackProps) { super(scope, id, config) console.log("CDK's config:", config) - if (config.hostedZone) { - this.hostedZone = HostedZone.fromLookup(this, 'HostedZone_certificate', { domainName: config.hostedZone }) - this.domainName = config.dnsPrefix ? `${config.dnsPrefix}.${config.hostedZone}` : config.hostedZone + if (!!config.customApiDomain && config.domainNames.length > 1) { + throw new Error('Cannot use Apex redirect with multiple domains') } - console.log('Hosted zone:', this.hostedZone?.zoneName) - console.log('Normalized domain name:', this.domainName) - this.assetsBucket = this.setupAssetsBucket() this.imageLambda = this.setupImageLambda({ @@ -68,10 +62,16 @@ export class NextStandaloneStack extends Stack { serverBasePath: config.apigwServerPath, }) - if (!!this.hostedZone && !!this.domainName) { + if (config.domainNames.length > 0) { + this.domains = this.prepareDomains({ + domains: config.domainNames, + profile: config.awsProfile, + }) + } + + if (this.domains.length > 0) { this.cfnCertificate = this.setupCfnCertificate({ - hostedZone: this.hostedZone, - domainName: this.domainName, + domains: this.domains, }) } @@ -80,7 +80,7 @@ export class NextStandaloneStack extends Stack { apiGateway: this.apiGateway, imageBasePath: config.apigwImagePath, serverBasePath: config.apigwServerPath, - domainName: this.domainName, + domains: this.domains, certificate: this.cfnCertificate, customApiOrigin: config.customApiDomain ? new HttpOrigin(config.customApiDomain) : undefined, }) @@ -91,22 +91,24 @@ export class NextStandaloneStack extends Stack { cfnDistribution: this.cfnDistro, }) - if (!!this.hostedZone && !!this.domainName) { + if (this.domains.length > 0) { this.setupDnsRecords({ cfnDistro: this.cfnDistro, - hostedZone: this.hostedZone, - dnsPrefix: config.dnsPrefix, + domains: this.domains, }) if (!!config.redirectFromApex) { this.setupApexRedirect({ - sourceHostedZone: this.hostedZone, - targetDomain: this.domainName, + domain: this.domains[0], }) } } } + prepareDomains(props: PrepareDomainProps) { + return prepareDomains(this, props) + } + setupAssetsBucket() { return setupAssetsBucket(this) } diff --git a/lib/cdk/types.ts b/lib/cdk/types.ts index 5cbc50b..4746e23 100644 --- a/lib/cdk/types.ts +++ b/lib/cdk/types.ts @@ -1,5 +1,6 @@ import { StackProps } from 'aws-cdk-lib' import { Runtime } from 'aws-cdk-lib/aws-lambda' +import { IHostedZone } from 'aws-cdk-lib/aws-route53' export interface CustomStackProps extends StackProps { apigwServerPath: string @@ -17,8 +18,14 @@ export interface CustomStackProps extends StackProps { lambdaRuntime: Runtime imageLambdaTimeout?: number imageLambdaMemory?: number - hostedZone?: string - dnsPrefix?: string + domainNames: string[] + redirectFromApex: boolean + awsProfile?: string customApiDomain?: string - redirectFromApex?: boolean +} + +export interface MappedDomain { + recordName: string + domain: string + zone: IHostedZone } diff --git a/lib/cdk/utils/cfnCertificate.ts b/lib/cdk/utils/cfnCertificate.ts index b0b5e39..a4fbd9c 100644 --- a/lib/cdk/utils/cfnCertificate.ts +++ b/lib/cdk/utils/cfnCertificate.ts @@ -1,15 +1,24 @@ import { CfnOutput, Stack } from 'aws-cdk-lib' -import { DnsValidatedCertificate } from 'aws-cdk-lib/aws-certificatemanager' -import { IHostedZone } from 'aws-cdk-lib/aws-route53' +import { Certificate, CertificateValidation } from 'aws-cdk-lib/aws-certificatemanager' +import { MappedDomain } from '../types' export interface SetupCfnCertificateProps { - hostedZone: IHostedZone - domainName: string + domains: MappedDomain[] } -export const setupCfnCertificate = (scope: Stack, { hostedZone, domainName }: SetupCfnCertificateProps) => { +export const setupCfnCertificate = (scope: Stack, { domains }: SetupCfnCertificateProps) => { + const [firstDomain, ...otherDomains] = domains + // us-east-1 is needed for Cloudfront to accept certificate. - const certificate = new DnsValidatedCertificate(scope, 'Certificate', { domainName, hostedZone, region: 'us-east-1' }) + // https://github.com/aws/aws-cdk/issues/8934 + const multiZoneMap = domains.reduce((acc, curr) => ({ ...acc, [curr.domain]: curr.zone }), {}) + + const certificate = new Certificate(scope, 'Certificate', { + domainName: firstDomain.domain, + + subjectAlternativeNames: otherDomains.map((a) => a.domain), + validation: CertificateValidation.fromDnsMultiZone(multiZoneMap), + }) new CfnOutput(scope, 'certificateArn', { value: certificate.certificateArn }) diff --git a/lib/cdk/utils/cfnDistro.ts b/lib/cdk/utils/cfnDistro.ts index a850ecb..d9d6478 100644 --- a/lib/cdk/utils/cfnDistro.ts +++ b/lib/cdk/utils/cfnDistro.ts @@ -14,9 +14,10 @@ import { } from 'aws-cdk-lib/aws-cloudfront' import { HttpOrigin, S3Origin } from 'aws-cdk-lib/aws-cloudfront-origins' import { Bucket } from 'aws-cdk-lib/aws-s3' +import { MappedDomain } from '../types' export interface SetupCfnDistroProps { - domainName?: string + domains: MappedDomain[] certificate?: ICertificate apiGateway: HttpApi imageBasePath: string @@ -27,7 +28,7 @@ export interface SetupCfnDistroProps { export const setupCfnDistro = ( scope: Stack, - { apiGateway, imageBasePath, serverBasePath, assetsBucket, domainName, certificate, customApiOrigin }: SetupCfnDistroProps, + { apiGateway, imageBasePath, serverBasePath, assetsBucket, domains, certificate, customApiOrigin }: SetupCfnDistroProps, ) => { const apiGwDomainName = `${apiGateway.apiId}.execute-api.${scope.region}.amazonaws.com` @@ -75,7 +76,7 @@ export const setupCfnDistro = ( comment: `CloudFront distribution for ${scope.stackName}`, enableIpv6: true, priceClass: PriceClass.PRICE_CLASS_100, - domainNames: domainName ? [domainName] : undefined, + domainNames: domains.length > 0 ? domains.map((a) => a.domain) : undefined, certificate, defaultBehavior: { origin: serverOrigin, diff --git a/lib/cdk/utils/dnsRecords.ts b/lib/cdk/utils/dnsRecords.ts index 80a0b14..a87aa32 100644 --- a/lib/cdk/utils/dnsRecords.ts +++ b/lib/cdk/utils/dnsRecords.ts @@ -1,20 +1,74 @@ import { CfnOutput, Stack } from 'aws-cdk-lib' import { IDistribution } from 'aws-cdk-lib/aws-cloudfront' -import { AaaaRecord, ARecord, IHostedZone, RecordTarget } from 'aws-cdk-lib/aws-route53' +import { AaaaRecord, ARecord, HostedZone, RecordTarget } from 'aws-cdk-lib/aws-route53' import { CloudFrontTarget } from 'aws-cdk-lib/aws-route53-targets' +import { execSync } from 'child_process' +import { MappedDomain } from '../types' +import { readFileSync } from 'fs' +import { tmpdir } from 'os' +import path from 'path' + +export interface PrepareDomainProps { + domains: string[] + profile?: string +} export interface SetupDnsRecordsProps { - dnsPrefix?: string - hostedZone: IHostedZone + domains: MappedDomain[] cfnDistro: IDistribution } -export const setupDnsRecords = (scope: Stack, { dnsPrefix: recordName, hostedZone: zone, cfnDistro }: SetupDnsRecordsProps) => { +// AWS-CDK does not have a way to retrieve the hosted zones in given account, so we need to go around. +const getAvailableHostedZones = (profile?: string): string[] => { + const tmpDir = path.join(tmpdir(), 'hosted-zones.json') + const profileFlag = profile ? `--profile ${profile}` : '' + execSync(`aws route53 list-hosted-zones --output json ${profileFlag} > ${tmpDir}`) + const output = JSON.parse(readFileSync(tmpDir, 'utf8')) + return output.HostedZones.map((zone: any) => zone.Name) +} + +const matchDomainToHostedZone = (domainToMatch: string, zones: string[]) => { + const matchedZone = zones.reduce((acc, curr) => { + const matchRegex = new RegExp(`(.*)${curr}$`) + + const isMatching = !!`${domainToMatch}.`.match(matchRegex) + const isMoreSpecific = curr.split('.').length > (acc?.split('.').length ?? 0) + + if (isMatching && isMoreSpecific) { + return curr + } else { + return acc + } + }, null as string | null) + + if (!matchedZone) { + throw new Error(`No hosted zone found for domain: ${domainToMatch}`) + } + + return matchedZone.replace('/.$/', '') +} + +export const prepareDomains = (scope: Stack, { domains, profile }: PrepareDomainProps): MappedDomain[] => { + const zones = getAvailableHostedZones(profile) + + return domains.map((domain, index) => { + const hostedZone = matchDomainToHostedZone(domain, zones) + const recordName = domain.replace(hostedZone, '') + + const zone = HostedZone.fromLookup(scope, `Zone_${index}`, { domainName: hostedZone }) + + return { zone, recordName, domain } + }) +} + +export const setupDnsRecords = (scope: Stack, { domains, cfnDistro }: SetupDnsRecordsProps) => { const target = RecordTarget.fromAlias(new CloudFrontTarget(cfnDistro)) - const dnsARecord = new ARecord(scope, 'AAliasRecord', { recordName, target, zone }) - const dnsAaaaRecord = new AaaaRecord(scope, 'AaaaAliasRecord', { recordName, target, zone }) + domains.forEach(({ recordName, zone }, index) => { + const dnsARecord = new ARecord(scope, `AAliasRecord_${index}`, { recordName, target, zone }) + const dnsAaaaRecord = new AaaaRecord(scope, `AaaaAliasRecord_${index}`, { recordName, target, zone }) - new CfnOutput(scope, 'dns_A_Record', { value: dnsARecord.domainName }) - new CfnOutput(scope, 'dns_AAAA_Record', { value: dnsAaaaRecord.domainName }) + new CfnOutput(scope, `dns_A_Record_${index}`, { value: dnsARecord.domainName }) + new CfnOutput(scope, `dns_AAAA_Record_${index}`, { value: dnsAaaaRecord.domainName }) + }) } diff --git a/lib/cdk/utils/redirect.ts b/lib/cdk/utils/redirect.ts index 99d302e..fc9f4fd 100644 --- a/lib/cdk/utils/redirect.ts +++ b/lib/cdk/utils/redirect.ts @@ -1,18 +1,17 @@ import { CfnOutput, Stack } from 'aws-cdk-lib' -import { IHostedZone } from 'aws-cdk-lib/aws-route53' import { HttpsRedirect } from 'aws-cdk-lib/aws-route53-patterns' +import { MappedDomain } from '../types' export interface SetupApexRedirectProps { - sourceHostedZone: IHostedZone - targetDomain: string + domain: MappedDomain } -export const setupApexRedirect = (scope: Stack, { sourceHostedZone, targetDomain }: SetupApexRedirectProps) => { +export const setupApexRedirect = (scope: Stack, { domain }: SetupApexRedirectProps) => { new HttpsRedirect(scope, `ApexRedirect`, { // Currently supports only apex (root) domain. - zone: sourceHostedZone, - targetDomain, + zone: domain.zone, + targetDomain: domain.recordName, }) - new CfnOutput(scope, 'RedirectFrom', { value: sourceHostedZone.zoneName }) + new CfnOutput(scope, 'RedirectFrom', { value: domain.zone.zoneName }) } diff --git a/lib/cli.ts b/lib/cli.ts index a2329a5..5470ea4 100644 --- a/lib/cli.ts +++ b/lib/cli.ts @@ -60,8 +60,7 @@ program .option('--imageLambdaTimeout ', 'Set timeout for lambda function handling image optimization.', Number, IMAGE_LAMBDA_DEFAULT_TIMEOUT) .option('--imageLambdaMemory ', 'Set memory for lambda function handling image optimization.', Number, IMAGE_LAMBDA_DEFAULT_MEMORY) .option('--lambdaRuntime ', "Specify version of NodeJS to use as Lambda's runtime. Options: node14, node16, node18.", 'node16') - .option('--hostedZone ', 'Hosted zone domain name to be used for creating DNS records (example: example.com).', undefined) - .option('--domainNamePrefix ', 'Prefix for creating DNS records, if left undefined, hostedZone will be used (example: app).', undefined) + .option('--domains ', 'Comma-separated list of domains to use. (example: mydomain.com,mydonain.au,other.domain.com)', undefined) .option('--customApiDomain ', 'Domain to forward the requests to /api routes, by default API routes will be handled by the server lambda.', undefined) .option('--redirectFromApex', 'Redirect from apex domain to specified address.', false) .option('--profile ', 'AWS profile to use with CDK.', undefined) @@ -78,10 +77,9 @@ program lambdaRuntime, imageLambdaMemory, imageLambdaTimeout, - hostedZone, - domainNamePrefix, customApiDomain, redirectFromApex, + domains, hotswap, profile, } = options @@ -97,10 +95,9 @@ program lambdaRuntime, imageLambdaMemory, imageLambdaTimeout, - hostedZone, - domainNamePrefix, customApiDomain, redirectFromApex, + domains, hotswap, profile, }), diff --git a/lib/cli/deploy.ts b/lib/cli/deploy.ts index 8c838fc..ee26ef7 100644 --- a/lib/cli/deploy.ts +++ b/lib/cli/deploy.ts @@ -11,8 +11,7 @@ interface Props { imageLambdaMemory?: number imageLambdaTimeout?: number customApiDomain?: string - hostedZone?: string - domainNamePrefix?: string + domains?: string redirectFromApex?: boolean profile?: string hotswap: boolean @@ -30,8 +29,7 @@ export const deployHandler = async ({ lambdaRuntime, imageLambdaMemory, imageLambdaTimeout, - domainNamePrefix, - hostedZone, + domains, customApiDomain, redirectFromApex, hotswap, @@ -58,8 +56,7 @@ export const deployHandler = async ({ ...(lambdaRuntime && { LAMBDA_RUNTIME: lambdaRuntime.toString() }), ...(imageLambdaMemory && { IMAGE_LAMBDA_MEMORY: imageLambdaMemory.toString() }), ...(imageLambdaTimeout && { IMAGE_LAMBDA_TIMEOUT: imageLambdaTimeout.toString() }), - ...(hostedZone && { HOSTED_ZONE: hostedZone }), - ...(domainNamePrefix && { DNS_PREFIX: domainNamePrefix }), + ...(domains && { DOMAINS: domains }), ...(customApiDomain && { CUSTOM_API_DOMAIN: customApiDomain }), ...(redirectFromApex && { REDIRECT_FROM_APEX: redirectFromApex.toString() }), } diff --git a/package-lock.json b/package-lock.json index d9094e0..323f9ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sladg/nextjs-lambda", - "version": "6.2.2", + "version": "6.2.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sladg/nextjs-lambda", - "version": "6.2.2", + "version": "6.2.3", "license": "MIT", "dependencies": { "@sladg/imaginex-lambda": "0.7.0" @@ -25,20 +25,20 @@ "node": ">=16.15" }, "peerDependencies": { - "@aws-cdk/aws-apigatewayv2-alpha": "^2.64.0-alpha.0", - "@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.64.0-alpha.0", + "@aws-cdk/aws-apigatewayv2-alpha": "^2.66.1-alpha.0", + "@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.66.1-alpha.0", "@types/archiver": "^5.3.1", "@types/node": "^18.13.0", - "aws-cdk": "^2.64.0", - "aws-cdk-lib": "^2.64.0", + "aws-cdk": "^2.66.1", + "aws-cdk-lib": "^2.66.1", "envalid": "^7.3.1", "next": "^12.2 || ^13" } }, "node_modules/@aws-cdk/asset-awscli-v1": { - "version": "2.2.68", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.68.tgz", - "integrity": "sha512-/rx5dTFSSyKtYa1VOFuqt+hjQv5AnEc3x0OAmaHRhHWIepgUQ3aPHCyln/izgnwR4Y4albsptxoerM4lGEoaUg==", + "version": "2.2.81", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.81.tgz", + "integrity": "sha512-5dyk8sY45DJm8QKm9n+q1iDBhkXWE87aBg/GY9mC8sarN8UpnNiQFN54BCbX0uykjGG8rJnNxq+5pAS2+tgjWg==", "peer": true }, "node_modules/@aws-cdk/asset-kubectl-v20": { @@ -48,35 +48,35 @@ "peer": true }, "node_modules/@aws-cdk/asset-node-proxy-agent-v5": { - "version": "2.0.57", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.57.tgz", - "integrity": "sha512-oLxJ9VQdSP2L8EALzChmWdzgq5wc4UidJfWYTCfuiZox6r0vW5ftYIffVgE/+iA0WxRstJUQz/nmpOeGfNbQDQ==", + "version": "2.0.67", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.67.tgz", + "integrity": "sha512-7XpvxIps4/XzZdaYnXIJEvwVX4LyWFmaZtOv03c2C2fm6YGrvWoTRSx+zifN0KJimsSUVoqWwHs8f1miee1Juw==", "peer": true }, "node_modules/@aws-cdk/aws-apigatewayv2-alpha": { - "version": "2.64.0-alpha.0", - "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-alpha/-/aws-apigatewayv2-alpha-2.64.0-alpha.0.tgz", - "integrity": "sha512-/pRlT5Z7i2uIXJ9ZNOHWnNNSwpnsiXOtL++8/mb2gyxih6VjwBBmKk2b+MX0uE0X55OhViOc0Uh7GyPWwkHvjw==", + "version": "2.66.1-alpha.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-alpha/-/aws-apigatewayv2-alpha-2.66.1-alpha.0.tgz", + "integrity": "sha512-MXw6rblb5PqRr2oJCMLpSU9XQewxmsLdC4TuNLpHeTqhzzERaJf3hfZX7f7Z2e8XXbkUh0QldX6DUz5nkPXocg==", "peer": true, "engines": { "node": ">= 14.15.0" }, "peerDependencies": { - "aws-cdk-lib": "^2.64.0", + "aws-cdk-lib": "^2.66.1", "constructs": "^10.0.0" } }, "node_modules/@aws-cdk/aws-apigatewayv2-integrations-alpha": { - "version": "2.64.0-alpha.0", - "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-integrations-alpha/-/aws-apigatewayv2-integrations-alpha-2.64.0-alpha.0.tgz", - "integrity": "sha512-WACfXYe7xVBzvRC3agMCVP8Bm+MZSHTsJLoye2DXwGPHzed54AzlUJ+1d7TJkeWyujL2R4L9YLUCiwnRe+LBtQ==", + "version": "2.66.1-alpha.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-integrations-alpha/-/aws-apigatewayv2-integrations-alpha-2.66.1-alpha.0.tgz", + "integrity": "sha512-niXQ0lqkjoOutasEPYoBWOaTjsnikiUl3wO+XCJ8LoqPNrEvwh0C1C8gFg3K9GVvwHW9Or6NRoQ1xPyveZl9xA==", "peer": true, "engines": { "node": ">= 14.15.0" }, "peerDependencies": { - "@aws-cdk/aws-apigatewayv2-alpha": "2.64.0-alpha.0", - "aws-cdk-lib": "^2.64.0", + "@aws-cdk/aws-apigatewayv2-alpha": "2.66.1-alpha.0", + "aws-cdk-lib": "^2.66.1", "constructs": "^10.0.0" } }, @@ -643,9 +643,9 @@ "dev": true }, "node_modules/aws-cdk": { - "version": "2.64.0", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.64.0.tgz", - "integrity": "sha512-iXkvVeYKt6Glboeicrb3QxC6K6o25+zitM/UTfgVzDlKEvC4hwQp1KqXy/caN7SfA6X2N0LJmXfC99T4cvIH0A==", + "version": "2.66.1", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.66.1.tgz", + "integrity": "sha512-exm97/VOH6yZPN2is3UC0acc6KF56AANvCg2gAEhyu6dPBueKxNCzrvsjNg/vmXrA8HqJ2jYJMg88YRNaUfylA==", "peer": true, "bin": { "cdk": "bin/cdk" @@ -658,9 +658,9 @@ } }, "node_modules/aws-cdk-lib": { - "version": "2.64.0", - "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.64.0.tgz", - "integrity": "sha512-IrgL7thb6TeOyHgyR/qKWTdA9FBb9lv7Z9QPDzCNJlkKI+0ANjYHy3RYV8Gd+1+kc6l8DG9Z1elij40YCr/Ptg==", + "version": "2.66.1", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.66.1.tgz", + "integrity": "sha512-xMnKXOnsoJLoDyl6L3BUYLPa9bqw8UoBlFGGH4gbzpBPViv9b49xvYuW+BLf7bK7IVgTzYQ+VmZKaFsj+VFouA==", "bundleDependencies": [ "@balena/dockerignore", "case", @@ -674,9 +674,9 @@ ], "peer": true, "dependencies": { - "@aws-cdk/asset-awscli-v1": "^2.2.52", + "@aws-cdk/asset-awscli-v1": "^2.2.69", "@aws-cdk/asset-kubectl-v20": "^2.1.1", - "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.42", + "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.58", "@balena/dockerignore": "^1.0.2", "case": "1.6.3", "fs-extra": "^9.1.0", @@ -2477,9 +2477,9 @@ }, "dependencies": { "@aws-cdk/asset-awscli-v1": { - "version": "2.2.68", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.68.tgz", - "integrity": "sha512-/rx5dTFSSyKtYa1VOFuqt+hjQv5AnEc3x0OAmaHRhHWIepgUQ3aPHCyln/izgnwR4Y4albsptxoerM4lGEoaUg==", + "version": "2.2.81", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.81.tgz", + "integrity": "sha512-5dyk8sY45DJm8QKm9n+q1iDBhkXWE87aBg/GY9mC8sarN8UpnNiQFN54BCbX0uykjGG8rJnNxq+5pAS2+tgjWg==", "peer": true }, "@aws-cdk/asset-kubectl-v20": { @@ -2489,22 +2489,22 @@ "peer": true }, "@aws-cdk/asset-node-proxy-agent-v5": { - "version": "2.0.57", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.57.tgz", - "integrity": "sha512-oLxJ9VQdSP2L8EALzChmWdzgq5wc4UidJfWYTCfuiZox6r0vW5ftYIffVgE/+iA0WxRstJUQz/nmpOeGfNbQDQ==", + "version": "2.0.67", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.67.tgz", + "integrity": "sha512-7XpvxIps4/XzZdaYnXIJEvwVX4LyWFmaZtOv03c2C2fm6YGrvWoTRSx+zifN0KJimsSUVoqWwHs8f1miee1Juw==", "peer": true }, "@aws-cdk/aws-apigatewayv2-alpha": { - "version": "2.64.0-alpha.0", - "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-alpha/-/aws-apigatewayv2-alpha-2.64.0-alpha.0.tgz", - "integrity": "sha512-/pRlT5Z7i2uIXJ9ZNOHWnNNSwpnsiXOtL++8/mb2gyxih6VjwBBmKk2b+MX0uE0X55OhViOc0Uh7GyPWwkHvjw==", + "version": "2.66.1-alpha.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-alpha/-/aws-apigatewayv2-alpha-2.66.1-alpha.0.tgz", + "integrity": "sha512-MXw6rblb5PqRr2oJCMLpSU9XQewxmsLdC4TuNLpHeTqhzzERaJf3hfZX7f7Z2e8XXbkUh0QldX6DUz5nkPXocg==", "peer": true, "requires": {} }, "@aws-cdk/aws-apigatewayv2-integrations-alpha": { - "version": "2.64.0-alpha.0", - "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-integrations-alpha/-/aws-apigatewayv2-integrations-alpha-2.64.0-alpha.0.tgz", - "integrity": "sha512-WACfXYe7xVBzvRC3agMCVP8Bm+MZSHTsJLoye2DXwGPHzed54AzlUJ+1d7TJkeWyujL2R4L9YLUCiwnRe+LBtQ==", + "version": "2.66.1-alpha.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/aws-apigatewayv2-integrations-alpha/-/aws-apigatewayv2-integrations-alpha-2.66.1-alpha.0.tgz", + "integrity": "sha512-niXQ0lqkjoOutasEPYoBWOaTjsnikiUl3wO+XCJ8LoqPNrEvwh0C1C8gFg3K9GVvwHW9Or6NRoQ1xPyveZl9xA==", "peer": true, "requires": {} }, @@ -2842,23 +2842,23 @@ "dev": true }, "aws-cdk": { - "version": "2.64.0", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.64.0.tgz", - "integrity": "sha512-iXkvVeYKt6Glboeicrb3QxC6K6o25+zitM/UTfgVzDlKEvC4hwQp1KqXy/caN7SfA6X2N0LJmXfC99T4cvIH0A==", + "version": "2.66.1", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.66.1.tgz", + "integrity": "sha512-exm97/VOH6yZPN2is3UC0acc6KF56AANvCg2gAEhyu6dPBueKxNCzrvsjNg/vmXrA8HqJ2jYJMg88YRNaUfylA==", "peer": true, "requires": { "fsevents": "2.3.2" } }, "aws-cdk-lib": { - "version": "2.64.0", - "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.64.0.tgz", - "integrity": "sha512-IrgL7thb6TeOyHgyR/qKWTdA9FBb9lv7Z9QPDzCNJlkKI+0ANjYHy3RYV8Gd+1+kc6l8DG9Z1elij40YCr/Ptg==", + "version": "2.66.1", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.66.1.tgz", + "integrity": "sha512-xMnKXOnsoJLoDyl6L3BUYLPa9bqw8UoBlFGGH4gbzpBPViv9b49xvYuW+BLf7bK7IVgTzYQ+VmZKaFsj+VFouA==", "peer": true, "requires": { - "@aws-cdk/asset-awscli-v1": "^2.2.52", + "@aws-cdk/asset-awscli-v1": "^2.2.69", "@aws-cdk/asset-kubectl-v20": "^2.1.1", - "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.42", + "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.58", "@balena/dockerignore": "^1.0.2", "case": "1.6.3", "fs-extra": "^9.1.0", diff --git a/package.json b/package.json index e68af6b..e2744d5 100644 --- a/package.json +++ b/package.json @@ -37,12 +37,12 @@ "typescript": "^4.9.5" }, "peerDependencies": { - "@aws-cdk/aws-apigatewayv2-alpha": "^2.64.0-alpha.0", - "@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.64.0-alpha.0", + "@aws-cdk/aws-apigatewayv2-alpha": "^2.66.1-alpha.0", + "@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.66.1-alpha.0", "@types/archiver": "^5.3.1", "@types/node": "^18.13.0", - "aws-cdk": "^2.64.0", - "aws-cdk-lib": "^2.64.0", + "aws-cdk": "^2.66.1", + "aws-cdk-lib": "^2.66.1", "envalid": "^7.3.1", "next": "^12.2 || ^13" },