lambda-live-debugger 1.1.0 → 1.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.
@@ -102,7 +102,7 @@ async function build(input) {
102
102
  isESM = false;
103
103
  }
104
104
  let ctx = input.oldCtx;
105
- Logger.verbose(`[Function ${input.functionId}] Module type: ${isESM ? 'ESM' : 'CJS'})`);
105
+ Logger.verbose(`[Function ${input.functionId}] Module type: ${isESM ? 'ESM' : 'CJS'}`);
106
106
  if (!ctx) {
107
107
  const optionsDefault = {
108
108
  entryPoints: [handlerCodePath],
@@ -103,13 +103,6 @@ async function stopAllWorkers() {
103
103
  for (const worker of workers.values()) {
104
104
  if (worker.used) {
105
105
  worker.toKill = true;
106
- // set timout for 5 minutes and kill the worker if it is still running
107
- setTimeout(() => {
108
- if (worker.toKill) {
109
- worker.toKill = false;
110
- void worker.terminate();
111
- }
112
- }, 300000);
113
106
  }
114
107
  else {
115
108
  promises.push(worker.terminate());
@@ -65,7 +65,7 @@ process.on('unhandledRejection', (error) => {
65
65
  function handleError(error) {
66
66
  parentPort.postMessage({
67
67
  errorType: error.name ?? 'Error',
68
- errorMessage: error.message,
68
+ errorMessage: error.message ?? error.toString(),
69
69
  trace: error.stack,
70
70
  });
71
71
  }
@@ -1,4 +1,5 @@
1
1
  import { LldConfig } from './types/lldConfig.js';
2
+ import { LambdaResource } from './types/resourcesDiscovery.js';
2
3
  /**
3
4
  * Get the names of the supported frameworks
4
5
  */
@@ -7,20 +8,7 @@ declare function getSupportedFrameworksNames(): string[];
7
8
  * Get the name of the current framework
8
9
  */
9
10
  declare function getCurrentFrameworkName(config: LldConfig): Promise<string | undefined>;
10
- declare function getLambdas(config: LldConfig): Promise<{
11
- codePath: string;
12
- functionName: string;
13
- packageJsonPath?: string | undefined;
14
- handler?: string | undefined;
15
- forceBundle?: boolean | undefined;
16
- bundlingType?: import("./types/resourcesDiscovery.js").BundlingType | undefined;
17
- esBuildOptions?: import("./types/resourcesDiscovery.js").EsBuildOptions | undefined;
18
- metadata: {
19
- framework: string;
20
- stackName?: string | undefined;
21
- cdkPath?: string | undefined;
22
- };
23
- }[] | undefined>;
11
+ declare function getLambdas(config: LldConfig): Promise<LambdaResource[] | undefined>;
24
12
  export declare const ResourceDiscovery: {
25
13
  getSupportedFrameworksNames: typeof getSupportedFrameworksNames;
26
14
  getCurrentFrameworkName: typeof getCurrentFrameworkName;
@@ -56,6 +56,10 @@ async function getLambdas(config) {
56
56
  return resources.map((r) => ({
57
57
  ...r,
58
58
  codePath: path.resolve(r.codePath),
59
+ esBuildOptions: {
60
+ ...r.esBuildOptions,
61
+ metafile: true,
62
+ },
59
63
  }));
60
64
  }
61
65
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambda-live-debugger",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "description": "Debug Lambda functions locally like it is running in the cloud",
6
6
  "repository": {