@bifravst/aws-cdk-lambda-helpers 2.2.0 → 2.2.1
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/src/packLambda.js
CHANGED
@@ -63,7 +63,9 @@ export const packLambda = async ({ sourceFilePath, zipFilePath, tsConfigFilePath
|
|
63
63
|
zipfile.addBuffer(Buffer.from(JSON.stringify({
|
64
64
|
type: 'module',
|
65
65
|
imports: importsSubpathPatterns,
|
66
|
-
dependencies: Object.fromEntries(packages.values()
|
66
|
+
dependencies: Object.fromEntries([...packages.values()]
|
67
|
+
.sort((a, b) => a.localeCompare(b))
|
68
|
+
.map((pkg) => [pkg, '*'])),
|
67
69
|
}), 'utf-8'), 'package.json');
|
68
70
|
progress?.(`added`, 'package.json');
|
69
71
|
await new Promise((resolve) => {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type PackedLambda } from './packLambda.js';
|
2
|
-
export declare const packLambdaFromPath: ({ id, sourceFilePath, handlerFunction: handlerFunctionArg, baseDir: baseDirArg, distDir: distDirArg, tsConfigFilePath, }: {
|
2
|
+
export declare const packLambdaFromPath: ({ id, sourceFilePath, handlerFunction: handlerFunctionArg, baseDir: baseDirArg, distDir: distDirArg, tsConfigFilePath, debug, progress, }: {
|
3
3
|
id: string;
|
4
4
|
sourceFilePath: string;
|
5
5
|
handlerFunction?: string;
|
@@ -15,4 +15,6 @@ export declare const packLambdaFromPath: ({ id, sourceFilePath, handlerFunction:
|
|
15
15
|
* Pass the path to the tsconfig.json file if you want to use paths from the tsconfig.json file.
|
16
16
|
*/
|
17
17
|
tsConfigFilePath?: string;
|
18
|
+
debug?: (label: string, info: string) => void;
|
19
|
+
progress?: (label: string, info: string) => void;
|
18
20
|
}) => Promise<PackedLambda>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { mkdir } from 'node:fs/promises';
|
2
2
|
import path from 'node:path';
|
3
3
|
import { packLambda } from './packLambda.js';
|
4
|
-
export const packLambdaFromPath = async ({ id, sourceFilePath, handlerFunction: handlerFunctionArg, baseDir: baseDirArg, distDir: distDirArg, tsConfigFilePath, }) => {
|
4
|
+
export const packLambdaFromPath = async ({ id, sourceFilePath, handlerFunction: handlerFunctionArg, baseDir: baseDirArg, distDir: distDirArg, tsConfigFilePath, debug, progress, }) => {
|
5
5
|
const distDir = distDirArg ?? path.join(process.cwd(), 'dist', 'lambdas');
|
6
6
|
const baseDir = baseDirArg ?? process.cwd();
|
7
7
|
const handlerFunction = handlerFunctionArg ?? 'handler';
|
@@ -18,6 +18,8 @@ export const packLambdaFromPath = async ({ id, sourceFilePath, handlerFunction:
|
|
18
18
|
sourceFilePath: path.join(baseDir, sourceFilePath),
|
19
19
|
zipFilePath: zipFile,
|
20
20
|
tsConfigFilePath,
|
21
|
+
debug,
|
22
|
+
progress,
|
21
23
|
});
|
22
24
|
return {
|
23
25
|
id,
|