Skip to content

Commit a3133b9

Browse files
committed
fix: update dependencies
Closes #363 Closes #362 Closes #361 Closes #360 Closes #353 Closes #351 Closes #350 Closes #347 Closes #346 Closes #345 Closes #344
1 parent 510a496 commit a3133b9

File tree

11 files changed

+4687
-5236
lines changed

11 files changed

+4687
-5236
lines changed

cdk/BackendStack.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,22 @@ export class BackendStack extends Stack {
6666
layerVersionName: `${Stack.of(this).stackName}-baseLayer`,
6767
code: new LambdaSource(this, {
6868
id: 'baseLayer',
69-
zipFile: layer.layerZipFile,
69+
zipFilePath: layer.layerZipFilePath,
7070
hash: layer.hash,
7171
}).code,
7272
compatibleArchitectures: [Lambda.Architecture.ARM_64],
73-
compatibleRuntimes: [Lambda.Runtime.NODEJS_20_X],
73+
compatibleRuntimes: [Lambda.Runtime.NODEJS_22_X],
7474
})
7575

7676
const jwtLayerVersion = new Lambda.LayerVersion(this, 'jwtLayer', {
7777
layerVersionName: `${Stack.of(this).stackName}-jwtLayer`,
7878
code: new LambdaSource(this, {
7979
id: 'jwtLayer',
80-
zipFile: jwtLayer.layerZipFile,
80+
zipFilePath: jwtLayer.layerZipFilePath,
8181
hash: jwtLayer.hash,
8282
}).code,
8383
compatibleArchitectures: [Lambda.Architecture.ARM_64],
84-
compatibleRuntimes: [Lambda.Runtime.NODEJS_20_X],
84+
compatibleRuntimes: [Lambda.Runtime.NODEJS_22_X],
8585
})
8686

8787
const publicDevices = new PublicDevices(this)
@@ -112,11 +112,11 @@ export class BackendStack extends Stack {
112112
const cdkLayerVersion = new Lambda.LayerVersion(this, 'cdkLayer', {
113113
code: new LambdaSource(this, {
114114
id: 'cdkLayer',
115-
zipFile: cdkLayer.layerZipFile,
115+
zipFilePath: cdkLayer.layerZipFilePath,
116116
hash: cdkLayer.hash,
117117
}).code,
118118
compatibleArchitectures: [Lambda.Architecture.ARM_64],
119-
compatibleRuntimes: [Lambda.Runtime.NODEJS_20_X],
119+
compatibleRuntimes: [Lambda.Runtime.NODEJS_22_X],
120120
})
121121
const domain = new CustomDomain(this, {
122122
api,

cdk/backend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { IAMClient } from '@aws-sdk/client-iam'
33
import { ensureGitHubOIDCProvider } from '@bifravst/ci'
44
import { fromEnv } from '@bifravst/from-env'
55
import { getCertificateArnForDomain } from '../aws/acm.js'
6-
import pJSON from '../package.json'
6+
import pJSON from '../package.json' assert { type: 'json' }
77
import { BackendApp } from './BackendApp.js'
88
import { pack as packBaseLayer } from './baseLayer.js'
99
import { pack as packCDKLayer } from './cdkLayer.js'

cdk/baseLayer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
packLayer,
33
type PackedLayer,
44
} from '@bifravst/aws-cdk-lambda-helpers/layer'
5-
import type pJson from '../package.json'
5+
import pJson from '../package.json' assert { type: 'json' }
66

77
const dependencies: Array<keyof (typeof pJson)['dependencies']> = [
88
'@bifravst/from-env',

cdk/cdkLayer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
packLayer,
33
type PackedLayer,
44
} from '@bifravst/aws-cdk-lambda-helpers/layer'
5-
import type pJson from '../package.json'
5+
import pJson from '../package.json' assert { type: 'json' }
66

77
const dependencies: Array<keyof (typeof pJson)['devDependencies']> = [
88
'cfn-response',

cdk/jwtLayer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
packLayer,
33
type PackedLayer,
44
} from '@bifravst/aws-cdk-lambda-helpers/layer'
5-
import type pJson from '../package.json'
5+
import pJson from '../package.json' assert { type: 'json' }
66

77
const dependencies: Array<keyof (typeof pJson)['dependencies']> = [
88
'jsonwebtoken',

cdk/packBackendLambdas.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export type BackendLambdas = {
1919
notifyAboutExpiringDevices: PackedLambda
2020
}
2121

22-
const pack = async (id: string) => packLambdaFromPath(id, `lambda/${id}.ts`)
22+
const pack = async (id: string) =>
23+
packLambdaFromPath({ id, sourceFilePath: `lambda/${id}.ts` })
2324

2425
export const packBackendLambdas = async (): Promise<BackendLambdas> => ({
2526
shareDevice: await pack('shareDevice'),
@@ -31,10 +32,10 @@ export const packBackendLambdas = async (): Promise<BackendLambdas> => ({
3132
extendDeviceSharing: await pack('extendDeviceSharing'),
3233
openSSL: await pack('openSSL'),
3334
apiHealthCheck: await pack('apiHealthCheck'),
34-
createCNAMERecord: await packLambdaFromPath(
35-
'createCNAMERecord',
36-
'cdk/resources/api/createCNAMERecord.ts',
37-
),
35+
createCNAMERecord: await packLambdaFromPath({
36+
id: 'createCNAMERecord',
37+
sourceFilePath: 'cdk/resources/api/createCNAMERecord.ts',
38+
}),
3839
jwks: await pack('jwks'),
3940
deviceJwt: await pack('deviceJwt'),
4041
requestToken: await pack('requestToken'),

cdk/resources/api/HealthCheck.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export class ApiHealthCheck extends Construct {
2323
this.fn = new Lambda.Function(this, 'fn', {
2424
handler: lambdaSources.apiHealthCheck.handler,
2525
architecture: Lambda.Architecture.ARM_64,
26-
runtime: Lambda.Runtime.NODEJS_20_X,
26+
runtime: Lambda.Runtime.NODEJS_22_X,
2727
timeout: Duration.seconds(1),
2828
memorySize: 1792,
29-
code: Lambda.Code.fromAsset(lambdaSources.apiHealthCheck.zipFile),
29+
code: Lambda.Code.fromAsset(lambdaSources.apiHealthCheck.zipFilePath),
3030
description: 'Simple health-check resource.',
3131
layers: [baseLayer],
3232
environment: {

cdk/resources/containers/buildOpenSSLLambdaImage.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type { logFn } from '../../../cli/log.js'
1616
const __filename = fileURLToPath(import.meta.url)
1717
const __dirname = path.dirname(__filename)
1818

19-
import pJSON from '../../../package.json'
19+
import pJSON from '../../../package.json' assert { type: 'json' }
2020

2121
export const buildOpenSSLLambdaImage = async (
2222
builder: ImageBuilder,
@@ -26,10 +26,10 @@ export const buildOpenSSLLambdaImage = async (
2626
): Promise<string> => {
2727
const dockerFilePath = path.join(__dirname, 'openssl-lambda')
2828

29-
const { zipFile, hash } = await packLambdaFromPath(
30-
'openSSL',
31-
'lambda/openSSL.ts',
32-
)
29+
const { zipFilePath, hash } = await packLambdaFromPath({
30+
id: 'openSSL',
31+
sourceFilePath: 'lambda/openSSL.ts',
32+
})
3333

3434
const tag = checkSumOfStrings([
3535
await hashFolder(dockerFilePath),
@@ -52,7 +52,7 @@ export const buildOpenSSLLambdaImage = async (
5252

5353
await run({
5454
command: 'unzip',
55-
args: ['-o', zipFile, '-d', path.join(distDir, 'lambda')],
55+
args: ['-o', zipFilePath, '-d', path.join(distDir, 'lambda')],
5656
log: { debug, stderr: debug, stdout: debug },
5757
})
5858

cli/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { program } from 'commander'
1010
import { env } from '../aws/env.js'
1111
import type { StackOutputs } from '../cdk/BackendStack.js'
1212
import { STACK_NAME } from '../cdk/stackConfig.js'
13-
import psjon from '../package.json'
13+
import psjon from '../package.json' assert { type: 'json' }
1414
import type { CommandDefinition } from './commands/CommandDefinition.js'
1515
import { buildContainersCommand } from './commands/build-container.js'
1616
import { configureHelloCommand } from './commands/configure-hello.js'

0 commit comments

Comments
 (0)