lambda-live-debugger 1.0.7 → 1.1.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.
Binary file
@@ -107,6 +107,11 @@ export class CdkFramework {
107
107
  define: lambdaInCdk.bundling?.define,
108
108
  external: external.length > 0 ? external : undefined,
109
109
  },
110
+ metadata: {
111
+ framework: 'cdk',
112
+ stackName: lambdaInCdk.stackName,
113
+ cdkPath: lambdaInCdk.cdkPath,
114
+ },
110
115
  });
111
116
  }
112
117
  }
@@ -146,6 +146,10 @@ export class SamFramework {
146
146
  handler,
147
147
  packageJsonPath,
148
148
  esBuildOptions,
149
+ metadata: {
150
+ framework: 'sam',
151
+ stackName,
152
+ },
149
153
  };
150
154
  lambdasDiscovered.push(lambdaResource);
151
155
  }
@@ -157,6 +157,9 @@ export class SlsFramework {
157
157
  handler,
158
158
  packageJsonPath,
159
159
  esBuildOptions,
160
+ metadata: {
161
+ framework: 'sls',
162
+ },
160
163
  };
161
164
  lambdasDiscovered.push(lambdaResource);
162
165
  }
@@ -99,6 +99,9 @@ export class TerraformFramework {
99
99
  handler,
100
100
  packageJsonPath,
101
101
  esBuildOptions: undefined,
102
+ metadata: {
103
+ framework: 'terraform',
104
+ },
102
105
  };
103
106
  lambdasDiscovered.push(lambdaResource);
104
107
  }
@@ -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,15 +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
- }[] | undefined>;
11
+ declare function getLambdas(config: LldConfig): Promise<LambdaResource[] | undefined>;
19
12
  export declare const ResourceDiscovery: {
20
13
  getSupportedFrameworksNames: typeof getSupportedFrameworksNames;
21
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
  /**
@@ -10,6 +10,20 @@ export type LambdaResource = {
10
10
  forceBundle?: boolean;
11
11
  bundlingType?: BundlingType;
12
12
  esBuildOptions?: EsBuildOptions;
13
+ metadata: {
14
+ /**
15
+ * Framework name
16
+ */
17
+ framework: string;
18
+ /**
19
+ * If framework is CDK or SAM, this is the stack name
20
+ */
21
+ stackName?: string;
22
+ /**
23
+ * If framework is CDK, this is the construct path
24
+ */
25
+ cdkPath?: string;
26
+ };
13
27
  };
14
28
  export declare enum BundlingType {
15
29
  ESBUILD = "ESBUILD",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambda-live-debugger",
3
- "version": "1.0.7",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "description": "Debug Lambda functions locally like it is running in the cloud",
6
6
  "repository": {