lambda-live-debugger 0.0.100 → 0.0.101

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
@@ -215,7 +215,7 @@ export class CdkFramework {
215
215
  "aws:cdk:bundling-stacks": [],
216
216
  };
217
217
  process.env.CDK_CONTEXT_JSON = JSON.stringify(CDK_CONTEXT_JSON);
218
- Logger.verbose(`[CDK] context:`, JSON.stringify(CDK_CONTEXT_JSON, null, 2));
218
+ Logger.verbose(`[CDK] Context:`, JSON.stringify(CDK_CONTEXT_JSON, null, 2));
219
219
  const lambdas = await new Promise((resolve, reject) => {
220
220
  const worker = new Worker(path.resolve(path.join(getModuleDirname(), "frameworks/cdkFrameworkWorker.mjs")), {
221
221
  workerData: {
@@ -330,7 +330,7 @@ export class CdkFramework {
330
330
  throw new Error(`Entry file not found in ${cdkConfigPath}`);
331
331
  }
332
332
  entryFile = path.resolve(entryFile);
333
- Logger.verbose(`[CDK] entry file: ${entryFile}`);
333
+ Logger.verbose(`[CDK] Entry file: ${entryFile}`);
334
334
  return entryFile;
335
335
  }
336
336
  }
@@ -58,25 +58,25 @@ async function onMessageFromLambda(message) {
58
58
  }
59
59
  }
60
60
  if (Configuration.config.verbose) {
61
- Logger.verbose(`[Function ${message.data.functionId}] response: `, JSON.stringify(message.data, null, 2));
61
+ Logger.verbose(`[Function ${message.data.functionId}] Response: `, JSON.stringify(message.data, null, 2));
62
62
  }
63
63
  else {
64
64
  // first 50 characters of the response
65
65
  const requestPretty = message.data
66
66
  ? JSON.stringify(message.data).substring(0, 100)
67
67
  : "";
68
- Logger.log(`[Function ${message.data.functionId}] request: ${requestPretty}${requestPretty.length < 50 ? "" : "..."}`);
68
+ Logger.log(`[Function ${message.data.functionId}] Request: ${requestPretty}${requestPretty.length < 50 ? "" : "..."}`);
69
69
  }
70
70
  const response = await NodeHandler.invokeLambda(message.data);
71
71
  if (Configuration.config.verbose) {
72
- Logger.verbose(`[Function ${message.data.functionId}] response: `, JSON.stringify(response, null, 2));
72
+ Logger.verbose(`[Function ${message.data.functionId}] Response: `, JSON.stringify(response, null, 2));
73
73
  }
74
74
  else {
75
75
  // first 50 characters of the response
76
76
  const responsePretty = response
77
77
  ? JSON.stringify(response).substring(0, 100)
78
78
  : "";
79
- Logger.log(`[Function ${message.data.functionId}] response: ${responsePretty}${responsePretty.length < 50 ? "" : "..."}`);
79
+ Logger.log(`[Function ${message.data.functionId}] Response: ${responsePretty}${responsePretty.length < 50 ? "" : "..."}`);
80
80
  }
81
81
  if (Configuration.config.observable) {
82
82
  // if we are in observable mode, mark the worker as processed
@@ -96,7 +96,7 @@ async function onMessageFromLambda(message) {
96
96
  }
97
97
  }
98
98
  catch (e) {
99
- Logger.error(`${message.data.functionId} error: `, e.errorMessage);
99
+ Logger.error(`[Function ${message.data.functionId}] Error: `, e);
100
100
  const payload = {
101
101
  type: "ERROR",
102
102
  data: {
@@ -48,6 +48,7 @@ async function getBuild(functionId) {
48
48
  ctx: newBuildAssets.then((b) => b.ctx),
49
49
  current: true,
50
50
  };
51
+ buildCache[functionId] = buildAssets;
51
52
  }
52
53
  const result = await buildAssets.result;
53
54
  if (newBuild) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambda-live-debugger",
3
- "version": "0.0.100",
3
+ "version": "0.0.101",
4
4
  "type": "module",
5
5
  "description": "Debug Lambda functions locally like it is running in the cloud",
6
6
  "repository": {