Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@bifravst/aws-cdk-lambda-helpers

Package Overview
Dependencies
Maintainers
2
Versions
701
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bifravst/aws-cdk-lambda-helpers - npm Package Compare versions

Comparing version
3.5.139
to
4.0.1
+5
-5
dist/src/findDependencies.d.ts

@@ -6,7 +6,7 @@ /**

sourceFilePath: string;
imports?: string[];
visited?: string[];
packages?: Set<string>;
tsConfigFilePath?: string;
importsSubpathPatterns?: Record<string, string>;
imports?: string[] | undefined;
visited?: string[] | undefined;
packages?: Set<string> | undefined;
tsConfigFilePath?: string | undefined;
importsSubpathPatterns?: Record<string, string> | undefined;
}) => {

@@ -13,0 +13,0 @@ dependencies: string[];

@@ -77,8 +77,4 @@ import { readFileSync, statSync } from 'node:fs';

if (moduleSpecifier === key) {
const fullResolvedPath = path.join(path.parse(tsConfigFilePath).dir, tsConfig.compilerOptions.baseUrl, resolvedPath);
importsSubpathPatterns[key] = [
tsConfig.compilerOptions.baseUrl,
path.sep,
resolvedPath
].join('');
const fullResolvedPath = path.join(path.parse(tsConfigFilePath).dir, resolvedPath);
importsSubpathPatterns[key] = resolvedPath;
return {

@@ -93,9 +89,5 @@ resolvedPath: fullResolvedPath

if (maybeMatch?.groups?.wildcard === undefined) continue;
importsSubpathPatterns[key] = [
tsConfig.compilerOptions.baseUrl,
path.sep,
resolvedPath
].join('');
importsSubpathPatterns[key] = resolvedPath;
return {
resolvedPath: path.resolve(path.parse(tsConfigFilePath).dir, tsConfig.compilerOptions.baseUrl, resolvedPath.replace('*', maybeMatch.groups.wildcard))
resolvedPath: path.resolve(path.parse(tsConfigFilePath).dir, resolvedPath.replace('*', maybeMatch.groups.wildcard))
};

@@ -102,0 +94,0 @@ }

@@ -30,3 +30,3 @@ import { Permissions as SettingsPermissions } from '@bifravst/aws-ssm-settings-helpers/cdk';

architecture: architecture ?? Lambda.Architecture.ARM_64,
runtime: props.runtime ?? Lambda.Runtime.NODEJS_22_X,
runtime: props.runtime ?? Lambda.Runtime.NODEJS_24_X,
timeout: Duration.seconds(5),

@@ -33,0 +33,0 @@ memorySize: 1792,

@@ -16,5 +16,5 @@ export type PackedLambda = {

*/
tsConfigFilePath?: string;
debug?: (label: string, info: string) => void;
progress?: (label: string, info: string) => void;
tsConfigFilePath?: string | undefined;
debug?: ((label: string, info: string) => void) | undefined;
progress?: ((label: string, info: string) => void) | undefined;
}) => Promise<{

@@ -21,0 +21,0 @@ handler: string;

@@ -5,17 +5,17 @@ import { type PackedLambda } from './packLambda.ts';

sourceFilePath: string;
handlerFunction?: string;
handlerFunction?: string | undefined;
/**
* @default process.cwd()
*/
baseDir?: string;
baseDir?: string | undefined;
/**
* @default ${baseDir}/dist/lambdas
*/
distDir?: string;
distDir?: string | undefined;
/**
* Pass the path to the tsconfig.json file if you want to use paths from the tsconfig.json file.
*/
tsConfigFilePath?: string;
debug?: (label: string, info: string) => void;
progress?: (label: string, info: string) => void;
tsConfigFilePath?: string | undefined;
debug?: ((label: string, info: string) => void) | undefined;
progress?: ((label: string, info: string) => void) | undefined;
}) => Promise<PackedLambda>;

@@ -11,14 +11,14 @@ export type PackedLayer = {

*/
baseDir?: string;
baseDir?: string | undefined;
/**
* @default ${baseDir}/dist/layers
*/
distDir?: string;
distDir?: string | undefined;
/**
* Returns the command to run, the first element is the command (e.g. `npm`) and the rest are its arguments.
*/
installCommand?: (args: {
installCommand?: ((args: {
packageFilePath: string;
packageLockFilePath: string;
}) => [string, ...Array<string>];
}) => [string, ...string[]]) | undefined;
}) => Promise<PackedLayer>;
import { spawn } from 'child_process';
import { createWriteStream } from 'fs';
import { copyFile, mkdir, readFile, rm, stat, writeFile } from 'fs/promises';
import { glob } from 'glob';
import { glob } from 'node:fs/promises';
import { fileURLToPath } from 'node:url';

@@ -87,10 +87,11 @@ import path from 'path';

});
const filesToAdd = await glob(`**`, {
cwd: layerDir,
nodir: true
});
const zipfile = new ZipFile();
filesToAdd.forEach((f)=>{
for await (const f of glob(`**`, {
cwd: layerDir
})){
if ((await stat(path.join(layerDir, f))).isDirectory()) {
continue;
}
zipfile.addFile(path.join(layerDir, f), f);
});
}
if (hasNpmRcFile) {

@@ -97,0 +98,0 @@ zipfile.addFile(path.join(nodejsDir, '.npmrc'), 'nodejs/.npmrc');

@@ -7,2 +7,2 @@ import { type CloudFormationClient } from '@aws-sdk/client-cloudformation';

lambda: LambdaClient;
}) => (stackName: string, packedLambdas: Record<string, PackedLambda>, debug?: (...args: Array<any>) => void) => Promise<void>;
}) => (stackName: string, packedLambdas: Record<string, PackedLambda>, debug?: ((...args: any[]) => void) | undefined) => Promise<void>;
{
"name": "@bifravst/aws-cdk-lambda-helpers",
"version": "3.5.139",
"version": "4.0.1",
"description": "Helper functions which simplify working with TypeScript lambdas for AWS CDK.",

@@ -37,3 +37,3 @@ "exports": {

"prepare": "husky",
"prepublishOnly": "node --experimental-strip-types npm-compile.ts && npx tsc -P tsconfig.npm.json --outDir ./dist/src"
"prepublishOnly": "node --experimental-strip-types npm-compile.ts && npx tsgo -P tsconfig.npm.json --outDir ./dist/src"
},

@@ -57,4 +57,4 @@ "repository": {

"devDependencies": {
"@aws-sdk/client-cloudformation": "3.946.0",
"@aws-sdk/client-dynamodb": "3.946.0",
"@aws-sdk/client-cloudformation": "3.962.0",
"@aws-sdk/client-dynamodb": "3.962.0",
"@bifravst/cloudformation-helpers": "9.1.1",

@@ -64,10 +64,11 @@ "@bifravst/eslint-config-typescript": "6.4.4",

"@bifravst/prettier-config": "1.1.17",
"@commitlint/config-conventional": "19.8.1",
"@commitlint/config-conventional": "20.3.0",
"@swc/cli": "0.7.9",
"@types/aws-lambda": "8.10.159",
"@types/node": "24.9.1",
"@types/node": "25.0.3",
"@types/unzip-stream": "0.3.4",
"@types/yazl": "3.3.0",
"cdk": "2.1033.0",
"commitlint": "19.8.1",
"@typescript/native-preview": "7.0.0-dev.20260105.1",
"cdk": "2.1100.1",
"commitlint": "20.3.0",
"husky": "9.1.7",

@@ -119,6 +120,5 @@ "id128": "1.6.6",

"dependencies": {
"@swc/core": "1.15.3",
"@swc/core": "1.15.8",
"fp-ts": "2.16.11",
"glob": "11.1.0",
"p-retry": "7.1.0",
"p-retry": "7.1.1",
"typescript": "5.9.3",

@@ -128,7 +128,7 @@ "yazl": "3.3.1"

"peerDependencies": {
"@aws-sdk/client-lambda": "^3.946.0",
"@aws-sdk/client-lambda": "^3.962.0",
"@bifravst/aws-ssm-settings-helpers": "^1.2.257",
"aws-cdk-lib": "^2.232.1",
"constructs": "^10.4.3"
"aws-cdk-lib": "^2.233.0",
"constructs": "^10.4.4"
}
}