@beesolve/cdk-constructs 0.1.1 → 0.1.2
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/dist/index.d.ts +9 -1
- package/dist/index.js +48 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -210,4 +210,12 @@ interface SqsWithDlqLambdaInputProps extends SqsWithDlqProps {
|
|
|
210
210
|
readonly disabled?: boolean;
|
|
211
211
|
}
|
|
212
212
|
type BatchingConfig = Pick<SqsEventSourceProps, "batchSize" | "maxBatchingWindow" | "reportBatchItemFailures" | "maxConcurrency">;
|
|
213
|
-
|
|
213
|
+
import { NodejsFunctionProps } from "aws-cdk-lib/aws-lambda-nodejs";
|
|
214
|
+
import { LogGroupProps } from "aws-cdk-lib/aws-logs";
|
|
215
|
+
import { Construct as Construct4 } from "constructs";
|
|
216
|
+
declare const nodejsFunctionDefaultConfig: {
|
|
217
|
+
runtime: Pick<NodejsFunctionProps, "architecture" | "runtime">;
|
|
218
|
+
bundling: NodejsFunctionProps["bundling"];
|
|
219
|
+
logging: (scope: Construct4, id: string, props?: LogGroupProps) => Pick<NodejsFunctionProps, "logFormat" | "logGroup">;
|
|
220
|
+
};
|
|
221
|
+
export { nodejsFunctionDefaultConfig, SqsWithDlqProps, SqsWithDlqLambdaInputProps, SqsWithDlq, EmailAlarms, CloudFrontAccessLoggingSettingsProps, CloudFrontAccessLoggingSettings };
|
package/dist/index.js
CHANGED
|
@@ -240,7 +240,55 @@ class SqsWithDlq extends Construct3 {
|
|
|
240
240
|
return sqs;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
+
// packages/cdk-constructs/src/nodejsFunction.ts
|
|
244
|
+
import { RemovalPolicy } from "aws-cdk-lib";
|
|
245
|
+
import { Architecture, LoggingFormat, Runtime } from "aws-cdk-lib/aws-lambda";
|
|
246
|
+
import {
|
|
247
|
+
Charset,
|
|
248
|
+
OutputFormat,
|
|
249
|
+
SourceMapMode
|
|
250
|
+
} from "aws-cdk-lib/aws-lambda-nodejs";
|
|
251
|
+
import {
|
|
252
|
+
LogGroup,
|
|
253
|
+
RetentionDays
|
|
254
|
+
} from "aws-cdk-lib/aws-logs";
|
|
255
|
+
var nodejsFunctionDefaultConfig = {
|
|
256
|
+
runtime: {
|
|
257
|
+
architecture: Architecture.ARM_64,
|
|
258
|
+
runtime: Runtime.NODEJS_24_X
|
|
259
|
+
},
|
|
260
|
+
bundling: {
|
|
261
|
+
banner: `/* CommonJS polyfills */import { fileURLToPath } from 'node:url';import { createRequire } from 'node:module';const __filename = fileURLToPath(import.meta.url);const __dirname = fileURLToPath(new URL('.', import.meta.url));const require = createRequire(import.meta.url);/* end of CommonJS polyfills */`,
|
|
262
|
+
charset: Charset.UTF8,
|
|
263
|
+
bundleAwsSDK: true,
|
|
264
|
+
externalModules: [],
|
|
265
|
+
format: OutputFormat.ESM,
|
|
266
|
+
keepNames: true,
|
|
267
|
+
mainFields: ["module", "main"],
|
|
268
|
+
minify: true,
|
|
269
|
+
sourceMap: true,
|
|
270
|
+
sourceMapMode: SourceMapMode.EXTERNAL,
|
|
271
|
+
sourcesContent: false,
|
|
272
|
+
target: "node24",
|
|
273
|
+
esbuildArgs: {
|
|
274
|
+
"--resolve-extensions": ".ts,.js,.mjs,.json",
|
|
275
|
+
"--bundle": "",
|
|
276
|
+
"--legal-comments": "none",
|
|
277
|
+
"--splitting": "",
|
|
278
|
+
"--tree-shaking": "true"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
logging: (scope, id, props) => ({
|
|
282
|
+
logGroup: new LogGroup(scope, `${id}LogGroup`, {
|
|
283
|
+
retention: RetentionDays.TWO_WEEKS,
|
|
284
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
285
|
+
...props
|
|
286
|
+
}),
|
|
287
|
+
loggingFormat: LoggingFormat.JSON
|
|
288
|
+
})
|
|
289
|
+
};
|
|
243
290
|
export {
|
|
291
|
+
nodejsFunctionDefaultConfig,
|
|
244
292
|
SqsWithDlq,
|
|
245
293
|
EmailAlarms,
|
|
246
294
|
CloudFrontAccessLoggingSettings
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beesolve/cdk-constructs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://github.com/beesolve/packages/tree/main/packages/cdk-constructs#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"aws-cdk-lib": "^2.236.0",
|
|
27
27
|
"constructs": "^10.4.5",
|
|
28
|
-
"@beesolve/helpers": "0.1.
|
|
28
|
+
"@beesolve/helpers": "0.1.3"
|
|
29
29
|
},
|
|
30
30
|
"type": "module",
|
|
31
31
|
"exports": {
|