File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 41
41
"lint" : " eslint . --fix" ,
42
42
"prettier" : " prettier . --write" ,
43
43
"prepare" : " husky" ,
44
- "add-bang" : " sed -i '1s|^| #!/usr/bin/env node\\ n|' ./dist/lldebugger.mjs" ,
44
+ "add-bang" : " printf ' #!/usr/bin/env node\\ n%s' \" $(cat ./dist/lldebugger.mjs) \" > ./dist/lldebugger.mjs.tmp && mv ./dist/lldebugger.mjs.tmp ./dist/lldebugger.mjs" ,
45
45
"build" : " tsc -p tsconfig.build.json && cp src/nodeWorkerRunner.mjs dist && cp src/frameworks/cdkFrameworkWorker.mjs dist/frameworks && node fix-imports.js && npm run add-bang && npm run bundle-extension" ,
46
46
"bundle-extension" : " cd src/extension && npm run build && cd ../../" ,
47
47
"deploy-github-role" : " aws cloudformation deploy --stack-name lld-deploy-role --template-file cloudformation/gitHubDeployRole.yaml --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM --profile lldebugger" ,
Original file line number Diff line number Diff line change @@ -559,10 +559,19 @@ function getEnvironmentVarablesForDebugger(
559
559
functionId : string ,
560
560
timeout : number | undefined ,
561
561
) : Record < string , string > {
562
+ const baseNodeOptions = '--enable-source-maps' ;
563
+ const additionalNodeOptions =
564
+ Configuration . config . additionalNodeOptions || '' ;
565
+ const nodeOptions = [ baseNodeOptions , additionalNodeOptions ]
566
+ . filter ( Boolean )
567
+ . join ( ' ' ) ;
568
+
569
+ console . log ( 'nodeOptions' , nodeOptions ) ;
570
+
562
571
return {
563
572
LLD_FUNCTION_ID : functionId ,
564
573
AWS_LAMBDA_EXEC_WRAPPER : '/opt/lld-wrapper' ,
565
- NODE_OPTIONS : '--enable-source-maps' ,
574
+ NODE_OPTIONS : nodeOptions ,
566
575
LLD_DEBUGGER_ID : Configuration . config . debuggerId ,
567
576
LLD_INITIAL_TIMEOUT : timeout ? timeout . toString ( ) : '-1' , // should never be negative
568
577
LLD_OBSERVABLE_MODE : Configuration . config . observable ? 'true' : 'false' ,
Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ export type LldConfigBase = {
68
68
* Monorepo subfolder
69
69
*/
70
70
subfolder ?: string ;
71
+
72
+ /**
73
+ * Additional Node options
74
+ */
75
+ additionalNodeOptions ?: string ;
71
76
} & AwsConfiguration ;
72
77
73
78
export type LldConfigCliArgs = {
You can’t perform that action at this time.
0 commit comments