lambda-live-debugger 0.0.113 → 0.0.115
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/.prettierrc +3 -1
- package/README.md +31 -33
- package/dist/awsCredentials.d.ts +2 -2
- package/dist/awsCredentials.mjs +1 -1
- package/dist/cloudFormation.d.ts +1 -1
- package/dist/cloudFormation.mjs +7 -7
- package/dist/configuration/getConfigFromCliArgs.d.ts +1 -1
- package/dist/configuration/getConfigFromCliArgs.mjs +22 -22
- package/dist/configuration/getConfigFromTsConfigFile.d.ts +1 -1
- package/dist/configuration/getConfigFromTsConfigFile.mjs +9 -9
- package/dist/configuration/getConfigFromWizard.d.ts +1 -1
- package/dist/configuration/getConfigFromWizard.mjs +91 -78
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.mjs +15 -15
- package/dist/constants.mjs +2 -2
- package/dist/extension/extension.zip +0 -0
- package/dist/extension/nodejs/node_modules/interceptor.js +764 -255
- package/dist/extension/nodejs/node_modules/interceptor.js.map +4 -4
- package/dist/fileWatcher.mjs +11 -11
- package/dist/frameworks/cdkFramework.d.ts +5 -5
- package/dist/frameworks/cdkFramework.mjs +41 -41
- package/dist/frameworks/cdkFrameworkWorker.mjs +13 -13
- package/dist/frameworks/iFrameworks.d.ts +2 -2
- package/dist/frameworks/samFramework.d.ts +3 -3
- package/dist/frameworks/samFramework.mjs +19 -19
- package/dist/frameworks/slsFramework.d.ts +4 -4
- package/dist/frameworks/slsFramework.mjs +22 -22
- package/dist/frameworks/terraformFramework.d.ts +4 -4
- package/dist/frameworks/terraformFramework.mjs +34 -34
- package/dist/getDirname.mjs +3 -3
- package/dist/gitignore.mjs +11 -11
- package/dist/index.d.ts +8 -8
- package/dist/index.mjs +4 -4
- package/dist/infraDeploy.mjs +39 -39
- package/dist/ioTService.d.ts +6 -6
- package/dist/ioTService.mjs +19 -19
- package/dist/lambdaConnection.mjs +15 -15
- package/dist/lldebugger.mjs +23 -24
- package/dist/logger.d.ts +28 -7
- package/dist/logger.mjs +46 -8
- package/dist/nodeEsBuild.mjs +30 -30
- package/dist/nodeHandler.d.ts +1 -1
- package/dist/nodeHandler.mjs +4 -4
- package/dist/nodeWorker.d.ts +1 -1
- package/dist/nodeWorker.mjs +14 -14
- package/dist/nodeWorkerRunner.mjs +9 -9
- package/dist/resourceDiscovery.d.ts +1 -1
- package/dist/resourceDiscovery.mjs +8 -8
- package/dist/types/lambdaProps.d.ts +1 -1
- package/dist/types/lldConfig.d.ts +4 -4
- package/dist/types/resourcesDiscovery.d.ts +2 -2
- package/dist/utils/findNpmPath.mjs +6 -6
- package/dist/utils/findPackageJson.mjs +6 -6
- package/dist/utils/getRootFolder.mjs +4 -4
- package/dist/utils/removeUndefinedProperties.mjs +1 -1
- package/dist/version.mjs +5 -5
- package/dist/vsCode.mjs +34 -34
- package/eslint.config.js +18 -18
- package/fix-imports.js +13 -13
- package/package.json +4 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import inquirer from
|
|
2
|
-
import { defaultObservableInterval, configFileDefaultName, } from
|
|
3
|
-
import path from
|
|
4
|
-
import fs from
|
|
5
|
-
import { ResourceDiscovery } from
|
|
6
|
-
import { GitIgnore } from
|
|
7
|
-
import { VsCode } from
|
|
8
|
-
import { Logger } from
|
|
9
|
-
import { Configuration } from
|
|
1
|
+
import inquirer from 'inquirer';
|
|
2
|
+
import { defaultObservableInterval, configFileDefaultName, } from '../constants.mjs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import fs from 'fs/promises';
|
|
5
|
+
import { ResourceDiscovery } from '../resourceDiscovery.mjs';
|
|
6
|
+
import { GitIgnore } from '../gitignore.mjs';
|
|
7
|
+
import { VsCode } from '../vsCode.mjs';
|
|
8
|
+
import { Logger } from '../logger.mjs';
|
|
9
|
+
import { Configuration } from '../configuration.mjs';
|
|
10
10
|
const configFileName = path.resolve(configFileDefaultName);
|
|
11
11
|
/**
|
|
12
12
|
* Get configuration from wizard
|
|
@@ -17,46 +17,46 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
17
17
|
let lambdasList;
|
|
18
18
|
let answers = await inquirer.prompt([
|
|
19
19
|
{
|
|
20
|
-
type:
|
|
21
|
-
name:
|
|
22
|
-
message: `Which framework are you using (detected: ${currentFramework ??
|
|
23
|
-
choices: [...supportedFrameworks,
|
|
20
|
+
type: 'list',
|
|
21
|
+
name: 'framework',
|
|
22
|
+
message: `Which framework are you using (detected: ${currentFramework ?? '?'})?`,
|
|
23
|
+
choices: [...supportedFrameworks, 'other'],
|
|
24
24
|
default: configFromCliArgs.framework ??
|
|
25
25
|
currentConfig?.framework ??
|
|
26
26
|
currentFramework,
|
|
27
27
|
},
|
|
28
28
|
]);
|
|
29
|
-
if (answers.framework ===
|
|
29
|
+
if (answers.framework === 'other') {
|
|
30
30
|
answers.framework = undefined;
|
|
31
31
|
}
|
|
32
32
|
const oldContext = currentConfig?.context ?? [];
|
|
33
33
|
if (configFromCliArgs.context?.length) {
|
|
34
34
|
oldContext.push(...configFromCliArgs.context);
|
|
35
35
|
}
|
|
36
|
-
if (answers.framework ===
|
|
36
|
+
if (answers.framework === 'cdk') {
|
|
37
37
|
const cdkAnswers = await inquirer.prompt([
|
|
38
38
|
{
|
|
39
|
-
type:
|
|
40
|
-
name:
|
|
41
|
-
message:
|
|
39
|
+
type: 'input',
|
|
40
|
+
name: 'context',
|
|
41
|
+
message: 'Would you like to enter CDK context (example: environment=development)?',
|
|
42
42
|
default: oldContext.length > 0 ? oldContext.shift() : undefined,
|
|
43
43
|
},
|
|
44
44
|
]);
|
|
45
|
-
if (cdkAnswers.context && cdkAnswers.context.trim() !==
|
|
45
|
+
if (cdkAnswers.context && cdkAnswers.context.trim() !== '') {
|
|
46
46
|
answers.context = [cdkAnswers.context.trim()];
|
|
47
47
|
}
|
|
48
48
|
// more context
|
|
49
49
|
while (true) {
|
|
50
50
|
const moreContextAnswers = await inquirer.prompt([
|
|
51
51
|
{
|
|
52
|
-
type:
|
|
53
|
-
name:
|
|
54
|
-
message:
|
|
52
|
+
type: 'input',
|
|
53
|
+
name: 'context',
|
|
54
|
+
message: 'Would you like to enter more CDK context?',
|
|
55
55
|
default: oldContext.length > 0 ? oldContext.shift() : undefined,
|
|
56
56
|
},
|
|
57
57
|
]);
|
|
58
58
|
if (moreContextAnswers.context &&
|
|
59
|
-
moreContextAnswers.context.trim() !==
|
|
59
|
+
moreContextAnswers.context.trim() !== '') {
|
|
60
60
|
answers.context = [
|
|
61
61
|
...(answers.context ?? []),
|
|
62
62
|
moreContextAnswers.context.trim(),
|
|
@@ -67,23 +67,23 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
if (answers.framework ===
|
|
70
|
+
if (answers.framework === 'sls') {
|
|
71
71
|
const slsAnswers = await inquirer.prompt([
|
|
72
72
|
{
|
|
73
|
-
type:
|
|
74
|
-
name:
|
|
75
|
-
message:
|
|
73
|
+
type: 'input',
|
|
74
|
+
name: 'stage',
|
|
75
|
+
message: 'Would you like to enter Serverless Framework stage?',
|
|
76
76
|
default: configFromCliArgs.stage ?? currentConfig?.stage,
|
|
77
77
|
},
|
|
78
78
|
]);
|
|
79
79
|
answers = { ...answers, ...slsAnswers };
|
|
80
80
|
}
|
|
81
|
-
if (answers.framework ===
|
|
81
|
+
if (answers.framework === 'sam') {
|
|
82
82
|
const samAnswers = await inquirer.prompt([
|
|
83
83
|
{
|
|
84
|
-
type:
|
|
85
|
-
name:
|
|
86
|
-
message:
|
|
84
|
+
type: 'input',
|
|
85
|
+
name: 'configEnv',
|
|
86
|
+
message: 'Would you like to enter SAM environment?',
|
|
87
87
|
default: configFromCliArgs.configEnv ?? currentConfig?.configEnv,
|
|
88
88
|
},
|
|
89
89
|
]);
|
|
@@ -92,9 +92,9 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
92
92
|
// monorepo subfolder
|
|
93
93
|
const answersSubfolder = await inquirer.prompt([
|
|
94
94
|
{
|
|
95
|
-
type:
|
|
96
|
-
name:
|
|
97
|
-
message:
|
|
95
|
+
type: 'input',
|
|
96
|
+
name: 'subfolder',
|
|
97
|
+
message: 'If you are using monorepo, enter subfolder where the framework is instaled.',
|
|
98
98
|
default: configFromCliArgs.subfolder ?? currentConfig?.subfolder,
|
|
99
99
|
},
|
|
100
100
|
]);
|
|
@@ -105,9 +105,9 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
105
105
|
// do you want to use observable mode?
|
|
106
106
|
const answersObservable = await inquirer.prompt([
|
|
107
107
|
{
|
|
108
|
-
type:
|
|
109
|
-
name:
|
|
110
|
-
message:
|
|
108
|
+
type: 'confirm',
|
|
109
|
+
name: 'observable',
|
|
110
|
+
message: 'Do you want to use observable mode, which just sends events to the debugger and do not use the respose?',
|
|
111
111
|
default: configFromCliArgs.observable !== undefined
|
|
112
112
|
? configFromCliArgs.observable
|
|
113
113
|
: currentConfig?.observable,
|
|
@@ -117,8 +117,8 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
117
117
|
if (answers.observable) {
|
|
118
118
|
const observableAnswers = await inquirer.prompt([
|
|
119
119
|
{
|
|
120
|
-
type:
|
|
121
|
-
name:
|
|
120
|
+
type: 'number',
|
|
121
|
+
name: 'interval',
|
|
122
122
|
message: `Would you like to enter observable mode interval at which events are sent to the debugger? Default is ${defaultObservableInterval}`,
|
|
123
123
|
default: configFromCliArgs.observable !== undefined
|
|
124
124
|
? configFromCliArgs.observable
|
|
@@ -136,21 +136,21 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
136
136
|
}
|
|
137
137
|
const answersAws = await inquirer.prompt([
|
|
138
138
|
{
|
|
139
|
-
type:
|
|
140
|
-
name:
|
|
141
|
-
message:
|
|
139
|
+
type: 'input',
|
|
140
|
+
name: 'profile',
|
|
141
|
+
message: 'Would you like to use named AWS profile?',
|
|
142
142
|
default: configFromCliArgs.profile ?? currentConfig?.profile,
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
|
-
type:
|
|
146
|
-
name:
|
|
147
|
-
message:
|
|
145
|
+
type: 'input',
|
|
146
|
+
name: 'region',
|
|
147
|
+
message: 'Would you like to specify AWS region?',
|
|
148
148
|
default: configFromCliArgs.region ?? currentConfig?.region,
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
|
-
type:
|
|
152
|
-
name:
|
|
153
|
-
message:
|
|
151
|
+
type: 'input',
|
|
152
|
+
name: 'role',
|
|
153
|
+
message: 'Would you like to specify AWS role?',
|
|
154
154
|
default: configFromCliArgs.role ?? currentConfig?.role,
|
|
155
155
|
},
|
|
156
156
|
]);
|
|
@@ -158,31 +158,31 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
158
158
|
// do you want to filter which Lambdas to debug?
|
|
159
159
|
const answersFilter = await inquirer.prompt([
|
|
160
160
|
{
|
|
161
|
-
type:
|
|
162
|
-
name:
|
|
163
|
-
message:
|
|
164
|
-
choices: [
|
|
161
|
+
type: 'list',
|
|
162
|
+
name: 'function',
|
|
163
|
+
message: 'Would you like to filter which Lambdas to debug?',
|
|
164
|
+
choices: ['All', 'Pick one', 'Filter by name'],
|
|
165
165
|
default: currentConfig?.function === undefined
|
|
166
|
-
?
|
|
167
|
-
: (currentConfig?.function).includes(
|
|
168
|
-
?
|
|
169
|
-
:
|
|
166
|
+
? 'All'
|
|
167
|
+
: (currentConfig?.function).includes('*')
|
|
168
|
+
? 'Filter by name'
|
|
169
|
+
: 'Pick one',
|
|
170
170
|
},
|
|
171
171
|
]);
|
|
172
|
-
if (answersFilter.function ===
|
|
172
|
+
if (answersFilter.function === 'Pick one') {
|
|
173
173
|
// I need to use congiration settings I accquired so far to get the list of lambdas
|
|
174
174
|
const configTemp = getConfigFromAnswers(answers);
|
|
175
175
|
Configuration.setConfig(configTemp); // not complete config
|
|
176
176
|
lambdasList = await ResourceDiscovery.getLambdas(getConfigFromAnswers(answers));
|
|
177
177
|
if (!lambdasList) {
|
|
178
|
-
throw new Error(
|
|
178
|
+
throw new Error('No Lambdas found');
|
|
179
179
|
}
|
|
180
180
|
// get list of lambdas
|
|
181
181
|
const lambdas = await inquirer.prompt([
|
|
182
182
|
{
|
|
183
|
-
type:
|
|
184
|
-
name:
|
|
185
|
-
message:
|
|
183
|
+
type: 'list',
|
|
184
|
+
name: 'function',
|
|
185
|
+
message: 'Pick Lambda to debug',
|
|
186
186
|
choices: lambdasList.map((l) => l.functionName),
|
|
187
187
|
default: currentConfig?.function ?? lambdasList[0].functionName,
|
|
188
188
|
},
|
|
@@ -192,12 +192,12 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
192
192
|
lambdasList.find((l) => l.functionName === lambdas.function),
|
|
193
193
|
];
|
|
194
194
|
}
|
|
195
|
-
else if (answersFilter.function ===
|
|
195
|
+
else if (answersFilter.function === 'Filter by name') {
|
|
196
196
|
const filter = await inquirer.prompt([
|
|
197
197
|
{
|
|
198
|
-
type:
|
|
199
|
-
name:
|
|
200
|
-
message:
|
|
198
|
+
type: 'input',
|
|
199
|
+
name: 'name',
|
|
200
|
+
message: 'Enter Lambda name to filter. Use * as wildcard',
|
|
201
201
|
default: configFromCliArgs.function ?? currentConfig?.function,
|
|
202
202
|
},
|
|
203
203
|
]);
|
|
@@ -208,8 +208,8 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
208
208
|
if (!answers.remove) {
|
|
209
209
|
const answersSave = await inquirer.prompt([
|
|
210
210
|
{
|
|
211
|
-
type:
|
|
212
|
-
name:
|
|
211
|
+
type: 'confirm',
|
|
212
|
+
name: 'save',
|
|
213
213
|
message: `Would you like to save these settings to ${configFileDefaultName}?`,
|
|
214
214
|
},
|
|
215
215
|
]);
|
|
@@ -219,8 +219,8 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
219
219
|
if (!(await GitIgnore.doesExistInGitIgnore())) {
|
|
220
220
|
const answersGitIgnore = await inquirer.prompt([
|
|
221
221
|
{
|
|
222
|
-
type:
|
|
223
|
-
name:
|
|
222
|
+
type: 'confirm',
|
|
223
|
+
name: 'gitignore',
|
|
224
224
|
message: `Would you like to add ${configFileDefaultName} to .gitignore?`,
|
|
225
225
|
},
|
|
226
226
|
]);
|
|
@@ -229,8 +229,8 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
229
229
|
if (!(await VsCode.isConfigured())) {
|
|
230
230
|
const answersVsCode = await inquirer.prompt([
|
|
231
231
|
{
|
|
232
|
-
type:
|
|
233
|
-
name:
|
|
232
|
+
type: 'confirm',
|
|
233
|
+
name: 'vscode',
|
|
234
234
|
message: `Would you like to add configuration to VsCode?`,
|
|
235
235
|
},
|
|
236
236
|
]);
|
|
@@ -238,9 +238,9 @@ export async function getConfigFromWizard({ configFromCliArgs, supportedFramewor
|
|
|
238
238
|
}
|
|
239
239
|
const answersVerbose = await inquirer.prompt([
|
|
240
240
|
{
|
|
241
|
-
type:
|
|
242
|
-
name:
|
|
243
|
-
message:
|
|
241
|
+
type: 'confirm',
|
|
242
|
+
name: 'verbose',
|
|
243
|
+
message: 'Do you want to use verbose logging? This will log all events to the console.',
|
|
244
244
|
default: currentConfig?.verbose === true,
|
|
245
245
|
},
|
|
246
246
|
]);
|
|
@@ -271,18 +271,31 @@ async function saveConfiguration(config) {
|
|
|
271
271
|
import { type LldConfigTs } from "lambda-live-debugger";
|
|
272
272
|
|
|
273
273
|
export default {
|
|
274
|
+
// Framework to use
|
|
274
275
|
framework: "${config.framework}",
|
|
276
|
+
// AWS CDK context
|
|
275
277
|
context: ${config.context ? JSON.stringify(config.context) : undefined},
|
|
278
|
+
// Serverless Framework stage
|
|
276
279
|
stage: "${config.stage}",
|
|
280
|
+
// Monorepo subfolder
|
|
277
281
|
subfolder: "${config.subfolder}",
|
|
282
|
+
// Filter by function name. You can use * as a wildcard
|
|
278
283
|
function: "${config.function}",
|
|
284
|
+
// AWS profile
|
|
279
285
|
profile: "${config.profile}",
|
|
286
|
+
// AWS region
|
|
280
287
|
region: "${config.region}",
|
|
288
|
+
// AWS role
|
|
281
289
|
role: "${config.role}",
|
|
290
|
+
// SAM environment
|
|
282
291
|
configEnv: "${config.configEnv}",
|
|
292
|
+
// Observable mode
|
|
283
293
|
observable: ${config.observable},
|
|
294
|
+
// Observable mode interval
|
|
284
295
|
interval: ${config.interval === defaultObservableInterval ? undefined : config.interval},
|
|
296
|
+
// Verbose logs
|
|
285
297
|
verbose: ${config.verbose},
|
|
298
|
+
// Modify Lambda function list or support custom framework
|
|
286
299
|
//getLambdas: async (foundLambdas) => {
|
|
287
300
|
// you can customize the list of lambdas here or create your own
|
|
288
301
|
// return foundLambdas;
|
|
@@ -292,9 +305,9 @@ export default {
|
|
|
292
305
|
// remove lines that contains undefined or ""
|
|
293
306
|
const configContentCleaned = configContent
|
|
294
307
|
.trim()
|
|
295
|
-
.split(
|
|
296
|
-
.filter((l) => !l.includes(
|
|
297
|
-
.join(
|
|
308
|
+
.split('\n')
|
|
309
|
+
.filter((l) => !l.includes('undefined') && !l.includes('""'))
|
|
310
|
+
.join('\n');
|
|
298
311
|
await fs.writeFile(configFileName, configContentCleaned);
|
|
299
312
|
}
|
|
300
313
|
function getConfigFromAnswers(answers) {
|
|
@@ -319,7 +332,7 @@ function getConfigFromAnswers(answers) {
|
|
|
319
332
|
vscode: answers.vscode,
|
|
320
333
|
};
|
|
321
334
|
//remove undefined and empty strings
|
|
322
|
-
Object.keys(config).forEach((key) => config[key] === undefined || config[key] ===
|
|
335
|
+
Object.keys(config).forEach((key) => config[key] === undefined || config[key] === ''
|
|
323
336
|
? delete config[key]
|
|
324
337
|
: {});
|
|
325
338
|
return config;
|
package/dist/configuration.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LambdaProps } from
|
|
2
|
-
import { LldConfig } from
|
|
1
|
+
import { LambdaProps } from './types/lambdaProps.js';
|
|
2
|
+
import { LldConfig } from './types/lldConfig.js';
|
|
3
3
|
/**
|
|
4
4
|
* Read configuration from CLI args, config file or wizard
|
|
5
5
|
*/
|
package/dist/configuration.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as crypto from
|
|
1
|
+
import * as crypto from 'crypto';
|
|
2
2
|
// @ts-ignore // does not have types
|
|
3
|
-
import mid from
|
|
4
|
-
import { getConfigFromWizard } from
|
|
5
|
-
import { getConfigFromCliArgs } from
|
|
6
|
-
import { getConfigTsFromConfigFile } from
|
|
7
|
-
import { configFileDefaultName } from
|
|
8
|
-
import { ResourceDiscovery } from
|
|
9
|
-
import { Logger } from
|
|
3
|
+
import mid from 'node-machine-id';
|
|
4
|
+
import { getConfigFromWizard } from './configuration/getConfigFromWizard.mjs';
|
|
5
|
+
import { getConfigFromCliArgs } from './configuration/getConfigFromCliArgs.mjs';
|
|
6
|
+
import { getConfigTsFromConfigFile } from './configuration/getConfigFromTsConfigFile.mjs';
|
|
7
|
+
import { configFileDefaultName } from './constants.mjs';
|
|
8
|
+
import { ResourceDiscovery } from './resourceDiscovery.mjs';
|
|
9
|
+
import { Logger } from './logger.mjs';
|
|
10
10
|
let config;
|
|
11
11
|
const lambdas = {};
|
|
12
12
|
let lambdasList = undefined;
|
|
@@ -66,19 +66,19 @@ async function readConfig() {
|
|
|
66
66
|
async function generateDebuggerId(observableMode) {
|
|
67
67
|
if (observableMode) {
|
|
68
68
|
// if we are in observable mode, we don't need to generate a unique id
|
|
69
|
-
return
|
|
69
|
+
return 'OBSERVABLE_MODE';
|
|
70
70
|
}
|
|
71
71
|
const args = process.argv;
|
|
72
|
-
const argsString = args.join(
|
|
72
|
+
const argsString = args.join(' ');
|
|
73
73
|
const deviceId = await mid.machineId();
|
|
74
74
|
// get the current directory
|
|
75
75
|
const currentDir = process.cwd();
|
|
76
76
|
// combine and hash the args and the device id
|
|
77
|
-
const hash = crypto.createHash(
|
|
77
|
+
const hash = crypto.createHash('md5');
|
|
78
78
|
hash.update(argsString);
|
|
79
79
|
hash.update(deviceId);
|
|
80
80
|
hash.update(currentDir);
|
|
81
|
-
return hash.digest(
|
|
81
|
+
return hash.digest('hex');
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Add a Lambda to the configuration
|
|
@@ -142,10 +142,10 @@ function saveDiscoveredLambdas(lambdasListNew) {
|
|
|
142
142
|
for (const lambda of lambdasListNew) {
|
|
143
143
|
addLambda(lambda);
|
|
144
144
|
}
|
|
145
|
-
Logger.log(
|
|
145
|
+
Logger.log('Found the following Lambdas to debug:');
|
|
146
146
|
Logger.log(` - ${getLambdas()
|
|
147
147
|
.map((f) => `${f.functionName} code: ${f.codePath}`)
|
|
148
|
-
.join(
|
|
148
|
+
.join('\n - ')}`);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
@@ -159,7 +159,7 @@ export const Configuration = {
|
|
|
159
159
|
readConfig,
|
|
160
160
|
get config() {
|
|
161
161
|
if (!config) {
|
|
162
|
-
throw new Error(
|
|
162
|
+
throw new Error('Config not initialized. Call readConfig() first.');
|
|
163
163
|
}
|
|
164
164
|
return config;
|
|
165
165
|
},
|
package/dist/constants.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// we drop temporary files in this folder
|
|
2
|
-
export const outputFolder =
|
|
2
|
+
export const outputFolder = '.lldebugger';
|
|
3
3
|
// we drop compiled files in this folder
|
|
4
4
|
export const assetsFolder = `${outputFolder}/assets`;
|
|
5
5
|
// the period in which we receive events in observable mode
|
|
6
6
|
export const defaultObservableInterval = 3000;
|
|
7
7
|
// the default name of the configuration file
|
|
8
|
-
export const configFileDefaultName =
|
|
8
|
+
export const configFileDefaultName = 'lldebugger.config.ts';
|
|
Binary file
|