lambda-live-debugger 1.0.6 → 1.1.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 +3 -2
- package/dist/configuration/getConfigFromCliArgs.mjs +2 -2
- package/dist/configuration/getConfigFromWizard.mjs +4 -4
- package/dist/constants.mjs +1 -1
- package/dist/extension/extension.zip +0 -0
- package/dist/extension/nodejs/node_modules/interceptor.js +2 -7
- package/dist/extension/nodejs/node_modules/interceptor.js.map +2 -2
- package/dist/frameworks/cdkFramework.mjs +6 -1
- package/dist/frameworks/cdkFrameworkWorker.mjs +1 -1
- package/dist/frameworks/samFramework.mjs +4 -0
- package/dist/frameworks/slsFramework.mjs +3 -0
- package/dist/frameworks/terraformFramework.mjs +3 -0
- package/dist/lambdaConnection.mjs +1 -1
- package/dist/lldebugger.mjs +1 -2
- package/dist/logger.mjs +2 -3
- package/dist/resourceDiscovery.d.ts +5 -0
- package/dist/types/resourcesDiscovery.d.ts +14 -0
- package/package.json +1 -1
|
@@ -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
|
}
|
|
@@ -390,7 +395,7 @@ export class CdkFramework {
|
|
|
390
395
|
const contextFromLldConfig = config.context?.reduce((acc, arg) => {
|
|
391
396
|
const [key, value] = arg.split('=');
|
|
392
397
|
if (key && value) {
|
|
393
|
-
acc[key] = value;
|
|
398
|
+
acc[key.trim()] = value.trim();
|
|
394
399
|
}
|
|
395
400
|
return acc;
|
|
396
401
|
}, {});
|
|
@@ -11,7 +11,7 @@ parentPort.on('message', async (data) => {
|
|
|
11
11
|
// this is global variable to store the data from the CDK code once it is executed
|
|
12
12
|
global.lambdas = [];
|
|
13
13
|
|
|
14
|
-
Logger.verbose(`[Worker
|
|
14
|
+
Logger.verbose(`[Worker] Received message`, data);
|
|
15
15
|
|
|
16
16
|
// execute code to get the data into global.lambdas
|
|
17
17
|
await import(data.compileOutput);
|
|
@@ -112,7 +112,7 @@ async function onMessageFromLambda(message) {
|
|
|
112
112
|
await ioTServiceConnection.publish(payload, `${topic}/${message.data.workerId}`);
|
|
113
113
|
}
|
|
114
114
|
else {
|
|
115
|
-
// if we are in
|
|
115
|
+
// if we are in Observability mode, mark the worker as processed
|
|
116
116
|
lambdasProcessingObservableMode.delete(message.data.functionId);
|
|
117
117
|
}
|
|
118
118
|
}
|
package/dist/lldebugger.mjs
CHANGED
|
@@ -22,7 +22,6 @@ import { LambdaConnection } from './lambdaConnection.mjs';
|
|
|
22
22
|
async function run() {
|
|
23
23
|
const version = await getVersion();
|
|
24
24
|
Logger.log(`Welcome to Lambda Live Debugger 🐞 version ${version}.`);
|
|
25
|
-
Logger.important('To keep the project moving forward, please fill out the feedback form at https://forms.gle/v6ekZtuB45Rv3EyW9. Your input is greatly appreciated!');
|
|
26
25
|
await Configuration.readConfig();
|
|
27
26
|
Logger.setVerbose(Configuration.config.verbose === true);
|
|
28
27
|
Logger.verbose(`Parameters: \n${Object.entries(Configuration.config)
|
|
@@ -40,7 +39,7 @@ async function run() {
|
|
|
40
39
|
return;
|
|
41
40
|
}
|
|
42
41
|
let message = `Starting the debugger ${Configuration.config.observable
|
|
43
|
-
? 'in
|
|
42
|
+
? 'in Observability mode'
|
|
44
43
|
: `(ID ${Configuration.config.debuggerId})`}...`;
|
|
45
44
|
if (Configuration.config.remove) {
|
|
46
45
|
message = `Removing Lambda Live Debugger${Configuration.config.remove === 'all' ? ' including layer' : ''}...`;
|
package/dist/logger.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
const orange = '#D24E01';
|
|
3
2
|
let verboseEnabled = false;
|
|
4
3
|
/**
|
|
5
4
|
* Log a message
|
|
@@ -20,7 +19,7 @@ function log(...args) {
|
|
|
20
19
|
* @param args The arguments to log
|
|
21
20
|
*/
|
|
22
21
|
function important(...args) {
|
|
23
|
-
args = args.map((arg) => typeof arg === 'string' ? chalk.
|
|
22
|
+
args = args.map((arg) => (typeof arg === 'string' ? chalk.yellow(arg) : arg));
|
|
24
23
|
console.log(...args);
|
|
25
24
|
}
|
|
26
25
|
/**
|
|
@@ -36,7 +35,7 @@ function error(...args) {
|
|
|
36
35
|
* @param args The arguments to log
|
|
37
36
|
*/
|
|
38
37
|
function warn(...args) {
|
|
39
|
-
args = args.map((arg) => typeof arg === 'string' ? chalk.
|
|
38
|
+
args = args.map((arg) => (typeof arg === 'string' ? chalk.yellow(arg) : arg));
|
|
40
39
|
console.warn(...args);
|
|
41
40
|
}
|
|
42
41
|
/**
|
|
@@ -15,6 +15,11 @@ declare function getLambdas(config: LldConfig): Promise<{
|
|
|
15
15
|
forceBundle?: boolean | undefined;
|
|
16
16
|
bundlingType?: import("./types/resourcesDiscovery.js").BundlingType | undefined;
|
|
17
17
|
esBuildOptions?: import("./types/resourcesDiscovery.js").EsBuildOptions | undefined;
|
|
18
|
+
metadata: {
|
|
19
|
+
framework: string;
|
|
20
|
+
stackName?: string | undefined;
|
|
21
|
+
cdkPath?: string | undefined;
|
|
22
|
+
};
|
|
18
23
|
}[] | undefined>;
|
|
19
24
|
export declare const ResourceDiscovery: {
|
|
20
25
|
getSupportedFrameworksNames: typeof getSupportedFrameworksNames;
|
|
@@ -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",
|