@bifravst/aws-cdk-lambda-helpers 1.9.22 → 1.9.24

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.
@@ -1,5 +1,5 @@
1
- import { Construct } from 'constructs';
2
1
  import { aws_logs as Logs } from 'aws-cdk-lib';
2
+ import { Construct } from 'constructs';
3
3
  export declare class LambdaLogGroup extends Construct {
4
4
  readonly logGroup: Logs.LogGroup;
5
5
  constructor(parent: Construct, id: string, retention?: Logs.RetentionDays);
@@ -1,5 +1,5 @@
1
- import { Construct } from 'constructs';
2
1
  import { aws_logs as Logs, Names, RemovalPolicy, Stack } from 'aws-cdk-lib';
2
+ import { Construct } from 'constructs';
3
3
  export class LambdaLogGroup extends Construct {
4
4
  logGroup;
5
5
  constructor(parent, id, retention = Logs.RetentionDays.ONE_DAY) {
@@ -1,7 +1,7 @@
1
- import { aws_lambda as Lambda, Duration, Stack, } from 'aws-cdk-lib';
1
+ import { Permissions as SettingsPermissions } from '@bifravst/aws-ssm-settings-helpers/cdk';
2
+ import { Duration, aws_lambda as Lambda, Stack, } from 'aws-cdk-lib';
2
3
  import { Construct } from 'constructs';
3
4
  import { LambdaLogGroup } from './LambdaLogGroup.js';
4
- import { Permissions as SettingsPermissions } from '@bifravst/aws-ssm-settings-helpers/cdk';
5
5
  import { LambdaSource } from './LambdaSource.js';
6
6
  /**
7
7
  * Creates a Lambda function with useful defaults:
package/dist/src/cdk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './LambdaSource.js';
2
- export * from './LambdaLogGroup.js';
3
1
  export * from './IoTActionRole.js';
2
+ export * from './LambdaLogGroup.js';
3
+ export * from './LambdaSource.js';
4
4
  export * from './PackedLambdaFn.js';
package/dist/src/cdk.js CHANGED
@@ -1,4 +1,4 @@
1
- export * from './LambdaSource.js';
2
- export * from './LambdaLogGroup.js';
3
1
  export * from './IoTActionRole.js';
2
+ export * from './LambdaLogGroup.js';
3
+ export * from './LambdaSource.js';
4
4
  export * from './PackedLambdaFn.js';
@@ -1,6 +1,6 @@
1
- import { describe, it } from 'node:test';
2
1
  import assert from 'node:assert/strict';
3
2
  import path from 'node:path';
3
+ import { describe, it } from 'node:test';
4
4
  import { checkSumOfFiles } from './checksumOfFiles.js';
5
5
  void describe('checkSumOfFiles()', () => {
6
6
  void it('should calculate a checksum of files', async () => assert.equal(await checkSumOfFiles([
@@ -1,5 +1,5 @@
1
- import { describe, it } from 'node:test';
2
1
  import assert from 'node:assert/strict';
2
+ import { describe, it } from 'node:test';
3
3
  import { commonParent } from './commonParent.js';
4
4
  void describe('commonParent()', () => {
5
5
  void it('should return the common parent directory', () => assert.equal(commonParent([
@@ -1,10 +1,10 @@
1
1
  import assert from 'node:assert/strict';
2
- import { it, describe } from 'node:test';
3
- import { ImportFromFolderNameError, packLambda } from './packLambda.js';
4
- import path, { dirname } from 'node:path';
5
- import { fileURLToPath } from 'node:url';
6
2
  import fs from 'node:fs/promises';
7
3
  import os from 'node:os';
4
+ import path, { dirname } from 'node:path';
5
+ import { describe, it } from 'node:test';
6
+ import { fileURLToPath } from 'node:url';
7
+ import { ImportFromFolderNameError, packLambda } from './packLambda.js';
8
8
  const tmpDir = os.tmpdir();
9
9
  void describe('packLambda()', () => {
10
10
  // See https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/93#issuecomment-2042201321
@@ -1,12 +1,12 @@
1
1
  import swc from '@swc/core';
2
2
  import { createWriteStream } from 'node:fs';
3
+ import path from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
3
5
  import { parse } from 'path';
4
6
  import yazl from 'yazl';
5
7
  import { checkSumOfFiles } from './checksumOfFiles.js';
6
8
  import { commonParent } from './commonParent.js';
7
9
  import { findDependencies } from './findDependencies.js';
8
- import { fileURLToPath } from 'node:url';
9
- import path from 'node:path';
10
10
  const removeCommonAncestor = (parentDir) => (file) => {
11
11
  const p = parse(file);
12
12
  const jsFileName = [
@@ -2,10 +2,10 @@ import { spawn } from 'child_process';
2
2
  import { createWriteStream } from 'fs';
3
3
  import { copyFile, mkdir, readFile, rm, stat, writeFile } from 'fs/promises';
4
4
  import { glob } from 'glob';
5
+ import { fileURLToPath } from 'node:url';
5
6
  import path from 'path';
6
7
  import { ZipFile } from 'yazl';
7
8
  import { checkSumOfFiles, checkSumOfStrings } from './checksumOfFiles.js';
8
- import { fileURLToPath } from 'node:url';
9
9
  export const packLayer = async ({ id, dependencies, baseDir, distDir, installCommand, }) => {
10
10
  const base = baseDir ?? process.cwd();
11
11
  const dist = distDir ?? path.join(base, 'dist', 'layers');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bifravst/aws-cdk-lambda-helpers",
3
- "version": "1.9.22",
3
+ "version": "1.9.24",
4
4
  "description": "Helper functions which simplify working with TypeScript lambdas for AWS CDK.",
5
5
  "exports": {
6
6
  ".": {
@@ -51,11 +51,11 @@
51
51
  "author": "Nordic Semiconductor ASA | nordicsemi.no",
52
52
  "license": "BSD-3-Clause",
53
53
  "devDependencies": {
54
- "@aws-sdk/client-cloudformation": "3.624.0",
54
+ "@aws-sdk/client-cloudformation": "3.629.0",
55
55
  "@bifravst/cloudformation-helpers": "9.1.1",
56
56
  "@bifravst/eslint-config-typescript": "6.1.13",
57
57
  "@bifravst/from-env": "3.0.2",
58
- "@bifravst/prettier-config": "1.0.4",
58
+ "@bifravst/prettier-config": "1.1.0",
59
59
  "@commitlint/config-conventional": "19.2.2",
60
60
  "@types/aws-lambda": "8.10.143",
61
61
  "@types/node": "20.14.15",
@@ -113,7 +113,7 @@
113
113
  "yazl": "2.5.1"
114
114
  },
115
115
  "peerDependencies": {
116
- "@bifravst/aws-ssm-settings-helpers": "^1.2.8",
116
+ "@bifravst/aws-ssm-settings-helpers": "^1.2.10",
117
117
  "aws-cdk-lib": "^2.151.0",
118
118
  "constructs": "^10.3.0"
119
119
  }