Skip to content

Commit e7338d0

Browse files
committed
Fix merge conflicts in pnpm-lock file
2 parents 7975b4c + bc7ab36 commit e7338d0

File tree

15 files changed

+159
-106
lines changed

15 files changed

+159
-106
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workspaces/common-libs/playwright-vscode-tester/src/browser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ export class VSBrowser {
9494
"extensions.autoUpdate": false,
9595
"chat.disableAIFeatures": true,
9696
"github.copilot.enable": false,
97-
"github.copilot.chat.enable": false
97+
"github.copilot.chat.enable": false,
98+
"workbench.secondarySideBar.defaultVisibility": "hidden"
9899
};
99100
if (Object.keys(this.customSettings).length > 0) {
100101
console.log('Detected user defined code settings');

workspaces/mi/mi-core/src/state-machine-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ export interface VisualizerLocation {
269269
connectorData?: any[];
270270
previousContext?: any;
271271
env?: { [key: string]: string | undefined };
272+
isLoading?: boolean;
272273
}
273274

274275
export interface PopupVisualizerLocation extends VisualizerLocation {

workspaces/mi/mi-extension/package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,19 @@
162162
"type": "boolean",
163163
"default": true,
164164
"description": "Update car plugin version automatically"
165+
},
166+
"MI.logging.loggingLevel": {
167+
"type": "string",
168+
"enum": [
169+
"off",
170+
"error",
171+
"warn",
172+
"info",
173+
"debug"
174+
],
175+
"default": "error",
176+
"description": "The verbosity of logging. The Order is off < error < warn < info < debug.",
177+
"scope": "window"
165178
}
166179
}
167180
},

workspaces/mi/mi-extension/src/RPCLayer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ async function getContext(projectUri: string): Promise<VisualizerLocation> {
9999
diagnostics: context.diagnostics,
100100
dataMapperProps: context.dataMapperProps,
101101
errors: context.errors,
102+
isLoading: context.isLoading,
102103
env: {
103104
MI_AUTH_ORG: process.env.MI_AUTH_ORG || '',
104105
MI_AUTH_CLIENT_ID: process.env.MI_AUTH_CLIENT_ID || '',

workspaces/mi/mi-extension/src/debugger/debugHelper.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import axios from 'axios';
2929
import * as net from 'net';
3030
import { MACHINE_VIEW } from '@wso2/mi-core';
3131
import { getStateMachine } from '../stateMachine';
32-
import { ERROR_LOG, INFO_LOG, logDebug } from '../util/logger';
32+
import { logDebug, LogLevel } from '../util/logger';
3333
import * as toml from "@iarna/toml";
3434
import { DebuggerConfig } from './config';
3535
import { ChildProcess } from 'child_process';
@@ -104,7 +104,7 @@ export function checkServerReadiness(): Promise<void> {
104104
.then((response: { status: number; data: any; }) => {
105105
if (response.status === 200) {
106106
if (response.data.status === 'ready') {
107-
logDebug('Server is ready with CApp deployed', INFO_LOG);
107+
logDebug('Server is ready with CApp deployed', LogLevel.INFO);
108108
resolve();
109109
} else {
110110
reject(response.data.status);
@@ -115,7 +115,7 @@ export function checkServerReadiness(): Promise<void> {
115115
if (elapsedTime < maxTimeout) {
116116
setTimeout(checkReadiness, retryInterval);
117117
} else {
118-
logDebug('Timeout reached while checking server readiness', ERROR_LOG);
118+
logDebug('Timeout reached while checking server readiness', LogLevel.ERROR);
119119
reject('CApp has encountered deployment issues. Please refer to the output for error logs.');
120120
}
121121
}
@@ -126,7 +126,7 @@ export function checkServerReadiness(): Promise<void> {
126126
setTimeout(checkReadiness, retryInterval);
127127
} else {
128128
const errorMsg = error?.errors[0]?.message;
129-
logDebug(`Error while checking for Server readiness: ${errorMsg}`, ERROR_LOG);
129+
logDebug(`Error while checking for Server readiness: ${errorMsg}`, LogLevel.ERROR);
130130
reject(`CApp has encountered deployment issues. Please refer to the output for error logs.`);
131131
}
132132
});
@@ -224,7 +224,7 @@ export async function executeBuildTask(projectUri: string, serverPath: string, s
224224
const sourceFiles = await getCarFiles(targetDirectory);
225225
if (sourceFiles.length === 0) {
226226
const errorMessage = "No .car files were found in the target directory. Built without copying to the server's carbonapps directory.";
227-
logDebug(errorMessage, ERROR_LOG);
227+
logDebug(errorMessage, LogLevel.ERROR);
228228
reject(errorMessage);
229229
} else {
230230
const targetPath = path.join(serverPath, 'repository', 'deployment', 'server', 'carbonapps');
@@ -233,7 +233,7 @@ export async function executeBuildTask(projectUri: string, serverPath: string, s
233233
fs.copyFileSync(sourceFile.fsPath, destinationFile);
234234
DebuggerConfig.setCopiedCapp(destinationFile);
235235
});
236-
logDebug('Build and copy tasks executed successfully', INFO_LOG);
236+
logDebug('Build and copy tasks executed successfully', LogLevel.INFO);
237237
resolve();
238238
}
239239
} catch (err) {
@@ -426,7 +426,7 @@ export async function executeTasks(projectUri: string, serverPath: string, isDeb
426426
resolve();
427427
// Proceed with connecting to the port
428428
} else {
429-
logDebug('Server is running, but the debugger command port not acitve', ERROR_LOG);
429+
logDebug('Server is running, but the debugger command port not acitve', LogLevel.ERROR);
430430
reject(`Server command port isn't actively listening. Stop any running MI servers and restart the debugger.`);
431431
}
432432
});
@@ -444,7 +444,7 @@ export async function executeTasks(projectUri: string, serverPath: string, isDeb
444444
}
445445
}).catch((error) => {
446446
reject(error);
447-
logDebug(`Error executing BuildTask: ${error}`, ERROR_LOG);
447+
logDebug(`Error executing BuildTask: ${error}`, LogLevel.ERROR);
448448
});
449449
});
450450

@@ -457,7 +457,7 @@ export async function executeTasks(projectUri: string, serverPath: string, isDeb
457457
resolve();
458458
// Proceed with connecting to the port
459459
} else {
460-
logDebug(`The ${DebuggerConfig.getCommandPort()} port is not actively listening or the timeout has been reached.`, ERROR_LOG);
460+
logDebug(`The ${DebuggerConfig.getCommandPort()} port is not actively listening or the timeout has been reached.`, LogLevel.ERROR);
461461
reject(`Server command port isn't actively listening. Stop any running MI servers and restart the debugger.`);
462462
}
463463
});
@@ -519,7 +519,7 @@ export async function deleteCapp(serverPath: string): Promise<void> {
519519
resolve();
520520
}
521521
} catch (err) {
522-
logDebug(`Error deleting Capp: ${err}`, ERROR_LOG);
522+
logDebug(`Error deleting Capp: ${err}`, LogLevel.ERROR);
523523
reject(err);
524524
}
525525
});
@@ -534,7 +534,7 @@ export async function deleteCopiedCapAndLibs() {
534534
await deleteSpecificFiles(copiedLibs);
535535

536536
} catch (err) {
537-
logDebug(`Failed to delete Capp and Libs: ${err}`, ERROR_LOG);
537+
logDebug(`Failed to delete Capp and Libs: ${err}`, LogLevel.ERROR);
538538
throw err;
539539
}
540540
}
@@ -549,7 +549,7 @@ export async function deleteSpecificFiles(filesToDelete: string[]): Promise<void
549549
}
550550
resolve();
551551
} catch (err) {
552-
logDebug(`Error deleting files: ${err}`, ERROR_LOG);
552+
logDebug(`Error deleting files: ${err}`, LogLevel.ERROR);
553553
reject(err);
554554
}
555555
});
@@ -581,7 +581,7 @@ export function createTempDebugBatchFile(batchFilePath: string, binPath: string)
581581

582582
fs.readFile(destFilePath, 'utf8', (err, data) => {
583583
if (err) {
584-
logDebug(`Error reading the micro-integrator-debug.bat file: ${err}`, ERROR_LOG);
584+
logDebug(`Error reading the micro-integrator-debug.bat file: ${err}`, LogLevel.ERROR);
585585
reject(`Error while reading the micro-integrator-debug.bat file: ${err}`);
586586
return;
587587
}
@@ -590,7 +590,7 @@ export function createTempDebugBatchFile(batchFilePath: string, binPath: string)
590590

591591
fs.writeFile(destFilePath, updatedContent, 'utf8', (err) => {
592592
if (err) {
593-
logDebug(`Error writing the micro-integrator-debug.bat file: ${err}`, ERROR_LOG);
593+
logDebug(`Error writing the micro-integrator-debug.bat file: ${err}`, LogLevel.ERROR);
594594
reject(`Error while updating the micro-integrator-debug.bat file: ${err}`);
595595
return;
596596
}
@@ -622,7 +622,7 @@ export async function readPortOffset(serverConfigPath: string): Promise<number |
622622
}
623623
return undefined;
624624
} catch (error) {
625-
logDebug(`Failed to read or parse deployment.toml: ${error}`, ERROR_LOG);
625+
logDebug(`Failed to read or parse deployment.toml: ${error}`, LogLevel.ERROR);
626626
return undefined;
627627
}
628628
}
@@ -656,7 +656,7 @@ export async function setManagementCredentials(serverConfigPath: string) {
656656
}
657657
}
658658
} catch (error) {
659-
logDebug(`Failed to read or parse deployment.toml: ${error}`, ERROR_LOG);
659+
logDebug(`Failed to read or parse deployment.toml: ${error}`, LogLevel.ERROR);
660660
}
661661
}
662662

workspaces/mi/mi-extension/src/debugger/debugger.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { checkServerReadiness, isADiagramView } from './debugHelper';
2626
import { webviews } from '../visualizer/webview';
2727
import { extension } from '../MIExtensionContext';
2828
import { reject } from 'lodash';
29-
import { ERROR_LOG, INFO_LOG, logDebug } from '../util/logger';
29+
import { LogLevel, logDebug } from '../util/logger';
3030

3131
export interface RuntimeBreakpoint {
3232
id: number;
@@ -83,7 +83,7 @@ export class Debugger extends EventEmitter {
8383
try {
8484
const workspace = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(path));
8585
if (!workspace) {
86-
logDebug(`No workspace found for path: ${path}`, ERROR_LOG);
86+
logDebug(`No workspace found for path: ${path}`, LogLevel.ERROR);
8787
return;
8888
}
8989
const projectUri = workspace.uri.fsPath;
@@ -133,7 +133,7 @@ export class Debugger extends EventEmitter {
133133
// LS call for breakpoint info
134134
const breakpointInfo = await this.getBreakpointInformation(breakpointPerFile, normalizedPath);
135135
if (!breakpointInfo) {
136-
logDebug(`No breakpoint information available for path: ${normalizedPath}`, ERROR_LOG);
136+
logDebug(`No breakpoint information available for path: ${normalizedPath}`, LogLevel.ERROR);
137137
return vscodeBreakpointsPerFile;
138138
}
139139
// map the runtime breakpoint to the breakpoint info
@@ -165,7 +165,7 @@ export class Debugger extends EventEmitter {
165165
};
166166
this.runtimeVscodeBreakpointMap.set(runtimeBreakpointInfo, breakpointPerFile[i]);
167167
} else {
168-
logDebug(`Breakpoint Information for ${breakpointPerFile[i]?.filePath}:${breakpointPerFile[i]?.line} is null`, ERROR_LOG);
168+
logDebug(`Breakpoint Information for ${breakpointPerFile[i]?.filePath}:${breakpointPerFile[i]?.line} is null`, LogLevel.ERROR);
169169
}
170170
}
171171

@@ -178,7 +178,7 @@ export class Debugger extends EventEmitter {
178178
return vscodeBreakpointsPerFile;
179179
}
180180
} catch (error) {
181-
logDebug(`Error updating breakpoints: ${error}`, ERROR_LOG);
181+
logDebug(`Error updating breakpoints: ${error}`, LogLevel.ERROR);
182182
return Promise.reject(error);
183183
}
184184
}
@@ -187,7 +187,7 @@ export class Debugger extends EventEmitter {
187187
try {
188188
const workspace = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(path));
189189
if (!workspace) {
190-
logDebug(`No workspace found for path: ${path}`, ERROR_LOG);
190+
logDebug(`No workspace found for path: ${path}`, LogLevel.ERROR);
191191
return;
192192
}
193193
const projectUri = workspace.uri.fsPath;
@@ -225,7 +225,7 @@ export class Debugger extends EventEmitter {
225225
// LS call for breakpoint info
226226
const breakpointInfo = await this.getBreakpointInformation(stepOverBreakpoints, normalizedPath);
227227
if (!breakpointInfo) {
228-
logDebug(`No step-over breakpoint information available for path: ${normalizedPath}`, ERROR_LOG);
228+
logDebug(`No step-over breakpoint information available for path: ${normalizedPath}`, LogLevel.ERROR);
229229
return;
230230
}
231231
// map the runtime breakpoint to the breakpoint info
@@ -257,7 +257,7 @@ export class Debugger extends EventEmitter {
257257
};
258258
this.stepOverBreakpointMap.set(runtimeBreakpointInfo, stepOverBreakpoints[i]);
259259
} else {
260-
logDebug(`Breakpoint Information for ${stepOverBreakpoints[i]?.filePath}:${stepOverBreakpoints[i]?.line} is null`, ERROR_LOG);
260+
logDebug(`Breakpoint Information for ${stepOverBreakpoints[i]?.filePath}:${stepOverBreakpoints[i]?.line} is null`, LogLevel.ERROR);
261261
}
262262
}
263263
if (this.isDebuggerActive) {
@@ -274,7 +274,7 @@ export class Debugger extends EventEmitter {
274274
public async getBreakpointInformation(breakpoints: RuntimeBreakpoint[], filePath: string): Promise<BreakpointInfo[]> {
275275
const workspace = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(filePath));
276276
if (!workspace) {
277-
logDebug(`No workspace found for path: ${filePath}`, ERROR_LOG);
277+
logDebug(`No workspace found for path: ${filePath}`, LogLevel.ERROR);
278278
throw new Error(`No workspace found for path: ${filePath}`);
279279
}
280280
const projectUri = workspace.uri.fsPath;
@@ -391,17 +391,17 @@ export class Debugger extends EventEmitter {
391391
}
392392
resolve();
393393
}).catch((error) => {
394-
logDebug(`Error while sending the resume command: ${error}`, ERROR_LOG);
394+
logDebug(`Error while sending the resume command: ${error}`, LogLevel.ERROR);
395395
reject(`Error while resuming the debugger server: ${error}`);
396396
});
397397

398398
}).catch((error) => {
399-
logDebug(`Error while checking server readiness: ${error}`, ERROR_LOG);
399+
logDebug(`Error while checking server readiness: ${error}`, LogLevel.ERROR);
400400
reject(error);
401401
});
402402

403403
}).catch((error) => {
404-
logDebug(`Error while connecting the debugger to the MI server: ${error}`, ERROR_LOG);
404+
logDebug(`Error while connecting the debugger to the MI server: ${error}`, LogLevel.ERROR);
405405
reject(`Error while connecting the debugger to the MI server: ${error}`);
406406
});
407407
});
@@ -419,7 +419,7 @@ export class Debugger extends EventEmitter {
419419

420420
// Error handling for the command client
421421
this.commandClient?.on('error', (error) => {
422-
logDebug(`Command client error: ${error}`, ERROR_LOG);
422+
logDebug(`Command client error: ${error}`, LogLevel.ERROR);
423423
reject(error); // Reject the promise if there's an error
424424
});
425425

@@ -430,7 +430,7 @@ export class Debugger extends EventEmitter {
430430

431431
// Error handling for the event client
432432
this.eventClient?.on('error', (error) => {
433-
logDebug(`Event client error: ${error}`, ERROR_LOG);
433+
logDebug(`Event client error: ${error}`, LogLevel.ERROR);
434434
reject(error);
435435
});
436436

@@ -450,7 +450,7 @@ export class Debugger extends EventEmitter {
450450
const message = incompleteMessage.slice(0, newlineIndex);
451451

452452
// Call a function with the received message
453-
logDebug(`Event received: ${message}`, INFO_LOG);
453+
logDebug(`Event received: ${message}`, LogLevel.INFO);
454454

455455
// convert to eventData to json
456456
const eventDataJson = JSON.parse(message);
@@ -591,7 +591,7 @@ export class Debugger extends EventEmitter {
591591
let incompleteMessage = '';
592592

593593
// Send request on the command port
594-
logDebug(`Command: ${request}`, INFO_LOG);
594+
logDebug(`Command: ${request}`, LogLevel.INFO);
595595
this.commandClient?.write(request);
596596

597597
// Listen for response from the command port
@@ -609,7 +609,7 @@ export class Debugger extends EventEmitter {
609609
const message = incompleteMessage.slice(0, newlineIndex);
610610

611611
// Call a function with the received message
612-
logDebug(`Command response: ${message}`, INFO_LOG);
612+
logDebug(`Command response: ${message}`, LogLevel.INFO);
613613
resolve(message); // Resolve the promise with the message
614614

615615
// Remove the processed message from incompleteMessage
@@ -644,7 +644,7 @@ export class Debugger extends EventEmitter {
644644

645645
variables.push(jsonResponse);
646646
} catch (error) {
647-
logDebug(`Error sending properties-command for ${context}: ${error}`, ERROR_LOG);
647+
logDebug(`Error sending properties-command for ${context}: ${error}`, LogLevel.ERROR);
648648
}
649649
}
650650
return variables;

workspaces/mi/mi-extension/src/debugger/tasks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import * as path from 'path';
2020
import * as vscode from 'vscode';
2121
import * as fs from 'fs';
2222
import { createTempDebugBatchFile, setJavaHomeInEnvironmentAndPath } from './debugHelper';
23-
import { ERROR_LOG, logDebug } from '../util/logger';
23+
import { LogLevel, logDebug } from '../util/logger';
2424
import { Uri, workspace } from "vscode";
2525
import { MVN_COMMANDS } from "../constants";
2626

@@ -151,7 +151,7 @@ export function getStopTask(serverPath: string): vscode.Task | undefined {
151151
const command = `${binPath} stop`;
152152

153153
if (!fs.existsSync(binPath)) {
154-
logDebug(`${binPath} does not exist`, ERROR_LOG);
154+
logDebug(`${binPath} does not exist`, LogLevel.ERROR);
155155
return;
156156
}
157157

@@ -177,7 +177,7 @@ export function getStopCommand(serverPath: string): string | undefined {
177177
const command = `"${binPath}" stop`;
178178

179179
if (!fs.existsSync(binPath)) {
180-
logDebug(`${binPath} does not exist`, ERROR_LOG);
180+
logDebug(`${binPath} does not exist`, LogLevel.ERROR);
181181
return;
182182
}
183183

0 commit comments

Comments
 (0)