lambda-live-debugger 0.0.118 → 0.0.120

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/.prettierignore CHANGED
@@ -3,4 +3,5 @@ dist
3
3
  cdk.out
4
4
  .serverless
5
5
  .aws-sam
6
- src/extension/aws
6
+ src/extension/aws
7
+ *.html
package/README.md CHANGED
@@ -29,6 +29,8 @@ Contact me via:
29
29
  - [GitHub Issues](https://github.com/ServerlessLife/lambda-live-debugger/issues)
30
30
  - [LinkedIn](http://www.linkedin.com/in/marko-serverlesslife)
31
31
 
32
+ Also, check out my blog: [www.serverlesslife.com](https://www.serverlesslife.com) and follow me on [X (Twitter)](https://twitter.com/ServerlessL).
33
+
32
34
  ## The Problem Statement
33
35
 
34
36
  Serverless is amazing and solves many issues with traditional systems. However, writing code for Lambda functions can be challenging. The cycle of writing, deploying, running, fixing, and redeploying is time-consuming and tedious. You could use tools to run Lambda locally or use unit/integration tests; those approaches often don't replicate the actual environment closely enough.
package/_config.yml CHANGED
@@ -1 +1,22 @@
1
1
  theme: jekyll-theme-primer
2
+ title: Lambda Live Debugger
3
+ author: Marko (ServerlessLife)
4
+ email: marko@serverlesslife.com
5
+ keywords: aws, lambda, debugger, serverless, aws-lambda, javascript, typescript, dev-tools, lambda-debugger, aws-cdk, serverless-framework, sls, aws-sam, sam, terraform, local-debugging, cloud-development
6
+ description: Tool for remote debugging AWS Lambda functions
7
+ url: https://www.lldebugger.com
8
+ image:
9
+ path: https://www.lldebugger.com/logo.png
10
+ width: 289
11
+ height: 266
12
+ alt: Lambda Live Debugger
13
+ logo: https://www.lldebugger.com/logo.png
14
+ twitter:
15
+ username: ServerlessL
16
+ og_image: https://www.lldebugger.com/logo.png
17
+ social:
18
+ links:
19
+ - 'https://twitter.com/ServerlessL'
20
+ - 'https://www.linkedin.com/in/marko-serverlesslife/'
21
+ favicon: ./favicon.ico
22
+ avatar: https://www.lldebugger.com/logo.png
@@ -0,0 +1,37 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: site.lang | default: "en-US" }}">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+
8
+ {% seo %}
9
+
10
+ <meta property="og:image" content="https://www.lldebugger.com/logo_landscape.jpg">
11
+ <meta name="twitter:image" content="https://www.lldebugger.com/logo_landscape.jpg">
12
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
13
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
14
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
15
+ <link rel="manifest" href="/site.webmanifest">
16
+
17
+ <link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
18
+ {% include head-custom.html %}
19
+ </head>
20
+ <body>
21
+ <div class="container-lg px-3 my-5 markdown-body">
22
+ {% if site.title and site.title != page.title %}
23
+ <h1><a href="{{ "/" | absolute_url }}">{{ site.title }}</a></h1>
24
+ {% endif %}
25
+
26
+ {{ content }}
27
+
28
+ {% if site.github.private != true and site.github.license %}
29
+ <div class="footer border-top border-gray-light mt-5 pt-3 text-right text-gray">
30
+ This site is open source. {% github_edit_link "Improve this page" %}.
31
+ </div>
32
+ {% endif %}
33
+ </div>
34
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
35
+ <script>anchors.add();</script>
36
+ </body>
37
+ </html>
Binary file
Binary file
Binary file
Binary file
@@ -334,7 +334,7 @@ async function attachLayerToLambda(functionName, functionId, layerArn) {
334
334
  },
335
335
  },
336
336
  //Timeout: LlDebugger.argOptions.observable ? undefined : 300, // Increase the timeout to 5 minutes
337
- Timeout: 300,
337
+ Timeout: Math.max(initialTimeout, 300), // Increase the timeout to min. 5 minutes
338
338
  });
339
339
  await getLambdaClient().send(updateFunctionConfigurationCommand);
340
340
  Logger.verbose(`[Function ${functionName}] Lambda layer and environment variables updated`);
@@ -68,10 +68,10 @@ function startWorker(input) {
68
68
  //type: "module",
69
69
  });
70
70
  worker.stdout.on('data', (data) => {
71
- Logger.verbose(`[Function ${input.functionId}] [Worker ${input.workerId}] `, data.toString());
71
+ Logger.log(`[Function ${input.functionId}]`, data.toString());
72
72
  });
73
73
  worker.stderr.on('data', (data) => {
74
- Logger.verbose(`[Function ${input.functionId}] [Worker ${input.workerId}] `, data.toString());
74
+ Logger.log(`[Function ${input.functionId}]`, data.toString());
75
75
  });
76
76
  worker.on('exit', () => {
77
77
  Logger.verbose(`[Function ${input.functionId}] [Worker ${input.workerId}] Worker exited`);
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { createRequire as topLevelCreateRequire } from 'module';
2
3
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3
4
  const require = topLevelCreateRequire(import.meta.url);
@@ -15,6 +16,12 @@ parentPort.on('message', async (data) => {
15
16
  const mod = await import(workerData.artifactFile);
16
17
  const fn = mod[workerData.handler];
17
18
 
19
+ if (!fn) {
20
+ throw new Error(
21
+ `Handler '${workerData.handler}' not found for function '${workerData.functionId}'`,
22
+ );
23
+ }
24
+
18
25
  try {
19
26
  const context = {
20
27
  ...data.context,
Binary file
Binary file
package/favicon.ico ADDED
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambda-live-debugger",
3
- "version": "0.0.118",
3
+ "version": "0.0.120",
4
4
  "type": "module",
5
5
  "description": "Debug Lambda functions locally like it is running in the cloud",
6
6
  "repository": {
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "",
3
+ "short_name": "",
4
+ "icons": [
5
+ {
6
+ "src": "/android-chrome-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "/android-chrome-512x512.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "theme_color": "#ffffff",
17
+ "background_color": "#ffffff",
18
+ "display": "standalone"
19
+ }