@beesolve/email-service 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/cdk.js +8 -20
  2. package/package.json +1 -1
package/dist/cdk.js CHANGED
@@ -1,5 +1,9 @@
1
1
  // packages/service-email/cdk.ts
2
- import { SqsWithDlq } from "@beesolve/cdk-constructs";
2
+ import {
3
+ getRevision,
4
+ Nodejs24Function,
5
+ SqsWithDlq
6
+ } from "@beesolve/cdk-constructs";
3
7
  import { Duration, RemovalPolicy } from "aws-cdk-lib";
4
8
  import {
5
9
  AttributeType,
@@ -9,11 +13,6 @@ import {
9
13
  } from "aws-cdk-lib/aws-dynamodb";
10
14
  import { EventBus } from "aws-cdk-lib/aws-events";
11
15
  import { Effect, PolicyStatement } from "aws-cdk-lib/aws-iam";
12
- import {
13
- Architecture,
14
- Runtime
15
- } from "aws-cdk-lib/aws-lambda";
16
- import { NodejsFunction } from "aws-cdk-lib/aws-lambda-nodejs";
17
16
  import {
18
17
  BlockPublicAccess,
19
18
  Bucket,
@@ -27,8 +26,6 @@ import {
27
26
  EventDestination
28
27
  } from "aws-cdk-lib/aws-ses";
29
28
  import { Construct } from "constructs";
30
- import { resolve } from "node:path";
31
- var __dirname = "/Users/ivan/data/work/github.com/beesolve/p/packages/packages/service-email";
32
29
 
33
30
  class Emails extends Construct {
34
31
  table;
@@ -83,21 +80,12 @@ class Emails extends Construct {
83
80
  }
84
81
  ]
85
82
  });
86
- const handler = new NodejsFunction(this, "SqsHandler", {
83
+ const handler = new Nodejs24Function(this, "SqsHandler", {
87
84
  description: "Email queue handler",
88
- entry: resolve(__dirname, "./src/handler.ts"),
89
- handler: "handler",
90
- bundling: {
91
- minify: isProd,
92
- sourceMap: isProd,
93
- sourcesContent: false,
94
- target: "es2022"
95
- },
85
+ entry: "./src/handler.ts",
96
86
  memorySize: props.handler?.memorySize ?? 256,
97
87
  timeout: props.handler?.timeout ?? Duration.seconds(30),
98
88
  reservedConcurrentExecutions: props.handler?.reservedConcurrentExecutions ?? 2,
99
- runtime: Runtime.NODEJS_24_X,
100
- architecture: Architecture.ARM_64,
101
89
  environment: {
102
90
  BUCKET_NAME: this.bucket.bucketName,
103
91
  TABLE_NAME: this.table.tableName,
@@ -107,7 +95,7 @@ class Emails extends Construct {
107
95
  EVENT_BUS_ARN: eventBus.eventBusArn,
108
96
  DEFAULT_CONFIGURATION_SET_NAME: defaultConfigurationSet.configurationSetName
109
97
  },
110
- depsLockFilePath: resolve(`${__dirname}/../../bun.lock`)
98
+ revision: getRevision(true)
111
99
  });
112
100
  this.table.grantReadWriteData(handler);
113
101
  this.bucket.grantRead(handler);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@beesolve/email-service",
3
3
  "description": "",
4
- "version": "0.1.2",
4
+ "version": "0.1.4",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"