lambda-live-debugger 0.0.96 → 0.0.97
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.
|
@@ -20,10 +20,13 @@ export async function getConfigFromWizard({ supportedFrameworks, currentFramewor
|
|
|
20
20
|
type: "list",
|
|
21
21
|
name: "framework",
|
|
22
22
|
message: `Which framework are you using (detected: ${currentFramework ?? "?"})?`,
|
|
23
|
-
choices: supportedFrameworks,
|
|
23
|
+
choices: [...supportedFrameworks, "other"],
|
|
24
24
|
default: currentConfig?.framework ?? currentFramework,
|
|
25
25
|
},
|
|
26
26
|
]);
|
|
27
|
+
if (answers.framework === "other") {
|
|
28
|
+
answers.framework = undefined;
|
|
29
|
+
}
|
|
27
30
|
const oldContext = currentConfig?.context ?? [];
|
|
28
31
|
if (answers.framework === "cdk") {
|
|
29
32
|
const cdkAnswers = await inquirer.prompt([
|
|
Binary file
|
|
@@ -21,7 +21,7 @@ parentPort.on("message", async (data) => {
|
|
|
21
21
|
const __dirname = path.resolve("./x"); // CDK needs this, pure magic
|
|
22
22
|
eval(codeFile);
|
|
23
23
|
|
|
24
|
-
if (global.lambdas.length === 0) {
|
|
24
|
+
if (!global.lambdas || global.lambdas?.length === 0) {
|
|
25
25
|
throw new Error("No Lambda functions found in the CDK code");
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -33,29 +33,15 @@ parentPort.on("message", async (data) => {
|
|
|
33
33
|
path: lambda.code?.path,
|
|
34
34
|
},
|
|
35
35
|
cdkPath: lambda.node.defaultChild.node.path,
|
|
36
|
-
bundling:
|
|
36
|
+
bundling: {
|
|
37
|
+
...lambda.bundling,
|
|
38
|
+
commandHooks: undefined, // can not be serialized
|
|
39
|
+
},
|
|
37
40
|
}));
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
parentPort.postMessage(lambdas);
|
|
45
|
-
} catch (error) {
|
|
46
|
-
handleError(error);
|
|
47
|
-
}
|
|
42
|
+
Logger.verbose(
|
|
43
|
+
`[CDK] [Worker] Sending found lambdas`,
|
|
44
|
+
JSON.stringify(lambdas, null, 2)
|
|
45
|
+
);
|
|
46
|
+
parentPort.postMessage(lambdas);
|
|
48
47
|
});
|
|
49
|
-
|
|
50
|
-
process.on("unhandledRejection", (error) => {
|
|
51
|
-
Logger.error(`[CDK] [Worker] Unhandled Rejection`, error);
|
|
52
|
-
handleError(error);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
function handleError(error) {
|
|
56
|
-
parentPort.postMessage({
|
|
57
|
-
errorType: error.name ?? "Error",
|
|
58
|
-
errorMessage: error.message,
|
|
59
|
-
trace: error.stack,
|
|
60
|
-
});
|
|
61
|
-
}
|
package/dist/infraDeploy.mjs
CHANGED
|
@@ -114,13 +114,13 @@ async function deployLayer() {
|
|
|
114
114
|
await getLambdaClient().send(deleteLayerVersionCommand);
|
|
115
115
|
}
|
|
116
116
|
else {
|
|
117
|
-
Logger.
|
|
117
|
+
Logger.log(`${layerDescription} already deployed.`);
|
|
118
118
|
return existingLayer.LayerVersionArn;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
// Read the ZIP file containing your layer code
|
|
122
122
|
const layerContent = await fs.readFile(layerZipPathFullPath);
|
|
123
|
-
Logger.
|
|
123
|
+
Logger.log(`Deploying ${layerDescription}`);
|
|
124
124
|
// Create the command for publishing a new layer version
|
|
125
125
|
const publishLayerVersionCommand = new PublishLayerVersionCommand({
|
|
126
126
|
LayerName: layerName,
|
package/dist/lldebugger.mjs
CHANGED
|
@@ -22,6 +22,7 @@ import { LambdaConnection } from "./lambdaConnection.mjs";
|
|
|
22
22
|
*/
|
|
23
23
|
async function run() {
|
|
24
24
|
const version = await getVersion();
|
|
25
|
+
Logger.log(`Welcome to Lambda Live Debugger version ${version}`);
|
|
25
26
|
await Configuration.readConfig();
|
|
26
27
|
Logger.setVerbose(Configuration.config.verbose === true);
|
|
27
28
|
Logger.verbose(`Parameters: \n${Object.entries(Configuration.config)
|
|
@@ -38,7 +39,7 @@ async function run() {
|
|
|
38
39
|
if (!Configuration.config.start && !Configuration.config.remove) {
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
41
|
-
Logger.log(`
|
|
42
|
+
Logger.log(`Starting the debugger
|
|
42
43
|
${Configuration.config.observable
|
|
43
44
|
? "in observable mode"
|
|
44
45
|
: `(ID ${Configuration.config.debuggerId})`}
|
package/dist/nodeEsBuild.mjs
CHANGED
|
@@ -148,7 +148,12 @@ async function build(input) {
|
|
|
148
148
|
};
|
|
149
149
|
// remove all undefined values just to make it cleaner
|
|
150
150
|
removeUndefinedProperties(options);
|
|
151
|
-
|
|
151
|
+
if (Configuration.config.verbose) {
|
|
152
|
+
Logger.verbose(`[Function ${input.functionId}] Building ${handlerCodePath} with options:`, JSON.stringify(options, null, 2));
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
Logger.log(`[Function ${input.functionId}] Building ${handlerCodePath}`);
|
|
156
|
+
}
|
|
152
157
|
ctx = await esbuild.context(options);
|
|
153
158
|
}
|
|
154
159
|
const result = await ctx.rebuild();
|