lambda-live-debugger 1.7.4 → 1.8.0

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/README.md CHANGED
@@ -19,6 +19,12 @@ It supports the following frameworks:
19
19
 
20
20
  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.
21
21
 
22
+ Lambda Live Debugger provides several features that aren't supported by SST or Serverless Framework v4:
23
+
24
+ - **Observability mode** – Enables debugging without impacting the system, so it can even be used in production.
25
+ - **Quick toggle** – Debug mode can be turned off and back on almost instantly without requiring a redeploy like other solutions.
26
+ - **Selective debugging** – You can debug only one or a few functions at a time, which is crucial for large and complex systems. Running many Lambdas simultaneously on a single machine can be confusing and can slow down your computer.
27
+
22
28
  ## How It Works
23
29
 
24
30
  Lambda Live Debugger connects to your deployed Lambda, routes requests to your computer, and sends responses back to the deployed Lambda. This allows you to debug locally, but the system behaves as if the code is running in the cloud with the same permissions. In case of code changes, you do not have to redeploy. The code is reloaded automatically without deploying or even restarting the debugger.
@@ -114,6 +120,7 @@ The configuration is saved to `lldebugger.config.ts`.
114
120
  --config-env <evironment> SAM environment
115
121
  --sam-config-file <file> SAM configuration file
116
122
  --sam-template-file <file> SAM template file
123
+ --sam-stack-name <name> SAM stack name;
117
124
  --profile <profile> AWS profile to use
118
125
  --region <region> AWS region to use
119
126
  --role <role> AWS role to use
@@ -24,6 +24,7 @@ export async function getConfigFromCliArgs(supportedFrameworks = []) {
24
24
  program.option('--config-env <evironment>', 'SAM environment');
25
25
  program.option('--sam-config-file <file>', 'SAM configuration file');
26
26
  program.option('--sam-template-file <file>', 'SAM template file');
27
+ program.option('--sam-stack-name <name>', 'SAM stack name');
27
28
  program.option('--profile <profile>', 'AWS profile to use');
28
29
  program.option('--region <region>', 'AWS region to use');
29
30
  program.option('--role <role>', 'AWS role to use');
@@ -100,6 +100,12 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
100
100
  message: 'Would you like to enter SAM template file (default = template.yaml)?',
101
101
  default: configFromCliArgs.samTemplateFile ?? currentConfig?.samTemplateFile,
102
102
  },
103
+ {
104
+ type: 'input',
105
+ name: 'samStackName',
106
+ message: 'Would you like to enter SAM stack name and not use the one from config?',
107
+ default: configFromCliArgs.samStackName ?? currentConfig?.samStackName,
108
+ },
103
109
  ]);
104
110
  answers = { ...answers, ...samAnswers };
105
111
  }
@@ -339,6 +345,8 @@ export default {
339
345
  samConfigFile: "${config.samConfigFile}",
340
346
  // SAM framework template file
341
347
  samTemplateFile: "${config.samTemplateFile}",
348
+ // SAM framework stack name
349
+ samStackName: "${config.samStackName}",
342
350
  // Observable mode
343
351
  observable: ${config.observable},
344
352
  // Observable mode interval
@@ -381,6 +389,7 @@ function getConfigFromAnswers(answers) {
381
389
  configEnv: answers.configEnv,
382
390
  samConfigFile: answers.samConfigFile,
383
391
  samTemplateFile: answers.samTemplateFile,
392
+ samStackName: answers.samStackName,
384
393
  observable: answers.observable,
385
394
  interval: answers.interval !== undefined
386
395
  ? answers.interval
Binary file
@@ -73,7 +73,13 @@ export class SamFramework {
73
73
  else {
74
74
  samConfig = yaml.parse(samConfigContent);
75
75
  }
76
- const stackName = samConfig[environment]?.global?.parameters?.stack_name;
76
+ let stackName;
77
+ if (config.samStackName) {
78
+ stackName = config.samStackName;
79
+ }
80
+ else {
81
+ stackName = samConfig[environment]?.global?.parameters?.stack_name;
82
+ }
77
83
  if (!stackName) {
78
84
  throw new Error(`Stack name not found in ${samConfigFile}`);
79
85
  }
@@ -48,6 +48,10 @@ export type LldConfigBase = {
48
48
  * SAM framework cli parameter template-file
49
49
  */
50
50
  samTemplateFile?: string;
51
+ /**
52
+ * SAM framework cli parameter stack-name
53
+ */
54
+ samStackName?: string;
51
55
  /**
52
56
  * Resources discovery function
53
57
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambda-live-debugger",
3
- "version": "1.7.4",
3
+ "version": "1.8.0",
4
4
  "type": "module",
5
5
  "description": "Debug Lambda functions locally like it is running in the cloud",
6
6
  "repository": {
@@ -80,7 +80,7 @@
80
80
  },
81
81
  "devDependencies": {
82
82
  "@eslint/js": "^9.24.0",
83
- "@tsconfig/node20": "^20.1.5",
83
+ "@tsconfig/node22": "^22.0.1",
84
84
  "@types/aws-iot-device-sdk": "^2.2.8",
85
85
  "@types/eslint-config-prettier": "^6.11.3",
86
86
  "@types/inquirer": "^9.0.7",
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "@tsconfig/node20/tsconfig.json",
2
+ "extends": "@tsconfig/node22/tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "./dist",
5
5
  "rootDir": "./src",
@@ -1,4 +1,4 @@
1
1
  {
2
- "extends": "@tsconfig/node20/tsconfig.json",
2
+ "extends": "@tsconfig/node22/tsconfig.json",
3
3
  "exclude": ["node_modules", "dist", "src/extension"]
4
4
  }