lambda-live-debugger 0.0.97 → 0.0.98
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
|
|
@@ -7,7 +7,7 @@ import { findPackageJson } from "../utils/findPackageJson.mjs";
|
|
|
7
7
|
import { CloudFormation } from "../cloudFormation.mjs";
|
|
8
8
|
import { Logger } from "../logger.mjs";
|
|
9
9
|
import { Worker } from "node:worker_threads";
|
|
10
|
-
import { getModuleDirname } from "../getDirname.mjs";
|
|
10
|
+
import { getModuleDirname, getProjectDirname } from "../getDirname.mjs";
|
|
11
11
|
import { Configuration } from "../configuration.mjs";
|
|
12
12
|
/**
|
|
13
13
|
* Support for AWS CDK framework
|
|
@@ -190,7 +190,7 @@ export class CdkFramework {
|
|
|
190
190
|
});
|
|
191
191
|
},
|
|
192
192
|
};
|
|
193
|
-
const compileOutput = path.
|
|
193
|
+
const compileOutput = path.join(getProjectDirname(), outputFolder, `compiledCdk.js`);
|
|
194
194
|
try {
|
|
195
195
|
// Build CDK code
|
|
196
196
|
await esbuild.build({
|
|
@@ -6,7 +6,7 @@ import { Logger } from "./logger.mjs";
|
|
|
6
6
|
|
|
7
7
|
Logger.setVerbose(workerData.verbose);
|
|
8
8
|
Logger.verbose(
|
|
9
|
-
`[Function ${workerData.functionId}] [Worker ${workerData.workerId}] Worker started`
|
|
9
|
+
`[Function ${workerData.functionId}] [Worker ${workerData.workerId}] Worker started. File: ${workerData.artifactFile}, Handler: ${workerData.handler}`
|
|
10
10
|
);
|
|
11
11
|
|
|
12
12
|
parentPort.on("message", async (data) => {
|
package/dist/vsCode.mjs
CHANGED
|
@@ -22,16 +22,16 @@ async function getVsCodeLaunchConfig(lldConfig) {
|
|
|
22
22
|
};
|
|
23
23
|
const moduleDirname = getModuleDirname();
|
|
24
24
|
//Logger.log("Module folder", moduleDirname);
|
|
25
|
-
const
|
|
25
|
+
const projectDirname = getProjectDirname();
|
|
26
26
|
//Logger.log("Current folder", currentFolder);
|
|
27
|
-
const localFolder = path.join(
|
|
27
|
+
const localFolder = path.resolve(path.join(projectDirname, "node_modules/.bin/lld"));
|
|
28
28
|
let runtimeExecutableSet = false;
|
|
29
29
|
//if installed locally
|
|
30
30
|
if (moduleDirname.startsWith("/home/")) {
|
|
31
31
|
Logger.verbose("Lambda Live Debugger is installed locally");
|
|
32
32
|
// check if file exists
|
|
33
33
|
try {
|
|
34
|
-
|
|
34
|
+
Logger.log("Checking local folder for runtimeExecutable setting for VsCode configuration", localFolder);
|
|
35
35
|
await fs.access(localFolder, fs.constants.F_OK);
|
|
36
36
|
config.configurations[0].runtimeExecutable = localRuntimeExecutable;
|
|
37
37
|
runtimeExecutableSet = true;
|
|
@@ -46,11 +46,13 @@ async function getVsCodeLaunchConfig(lldConfig) {
|
|
|
46
46
|
}
|
|
47
47
|
if (!runtimeExecutableSet) {
|
|
48
48
|
Logger.verbose(`Setting absolute path for runtimeExecutable setting for VsCode configuration`);
|
|
49
|
+
const localFolderSubfolder = path.resolve("node_modules/.bin/lld");
|
|
49
50
|
const globalModule1 = path.join(moduleDirname, "..", "..", ".bin/lld");
|
|
50
51
|
const globalModule2 = path.join(moduleDirname, "..", "..", "bin/lld");
|
|
51
52
|
const globalModule3 = path.join(moduleDirname, "..", "..", "..", "..", "bin/lld");
|
|
52
53
|
const possibleFolders = {
|
|
53
54
|
[localFolder]: "${workspaceFolder}/node_modules/.bin/lld",
|
|
55
|
+
[localFolderSubfolder]: localFolderSubfolder,
|
|
54
56
|
[globalModule1]: globalModule1,
|
|
55
57
|
[globalModule2]: globalModule2,
|
|
56
58
|
[globalModule3]: globalModule3,
|