Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFR] Added axios dependency #19

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
# For git password please use your generated git token, not a clear text password

VSCODE_EXECUTABLE_PATH='/usr/share/code/code'
VSIX_FILE_PATH="/home/sshveta/Work/kai-ci/"
VSIX_FILE_PATH='/home/sshveta/Work/kai-ci/'
VSIX_FILE_NAME='konveyor-linux-0.0.1.vsix'
VSIX_DOWNLOAD_URL= 'https://github.com/konveyor/editor-extensions/releases/download/v0.0.1-dev%2B20241017/konveyor-linux-0.0.1.vsix'
PLUGIN_URL= 'https://github.com/konveyor/editor-extensions/releases/download/'
PLUGIN_VERSION= 'v0.0.1-dev%2B'

# For Windows Path needs to be given in below format
# VSCODE_EXECUTABLE_PATH='C:/Users/nonadmin/AppData/Local/Programs/Microsoft VS Code/Code.exe'
# VSIX_FILE_PATH='C:/Users/nonadmin/kai-ci/'
10 changes: 4 additions & 6 deletions e2e/pages/vscode.pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ class VSCode {
* launches VSCode
* @param executablePath path to the vscode binary
*/
public static async init(
executablePath: string,
): Promise<VSCode> {
public static async init(executablePath: string): Promise<VSCode> {
try {
const vsixFilePath = getKAIPluginPath();
if (vsixFilePath) {
console.log(`Installing extension from VSIX file: ${vsixFilePath}`);
await VSCode.installExtensionFromVSIX(vsixFilePath);
} else {
console.warn(
'VSIX_FILE_PATH environment variable is not set. Skipping extension installation.',
'VSIX_FILE_PATH environment variable is not set. Skipping extension installation.'
);
}

Expand All @@ -50,14 +48,14 @@ class VSCode {
* This method is static because it is independent of the instance.
*/
private static async installExtensionFromVSIX(
vsixFilePath: string,
vsixFilePath: string
): Promise<void> {
await downloadLatestKAIPlugin();

try {
// Execute command to install VSIX file using VSCode CLI
console.log(`Installing extension from ${vsixFilePath}...`);
execSync(`code --install-extension '${vsixFilePath}'`, {
execSync(`code --install-extension "${vsixFilePath}"`, {
stdio: 'inherit',
});
console.log('Extension installed successfully.');
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
},
"dependencies": {
"agent-base": "^6.0.2",
"axios": "^1.7.7",
"balanced-match": "^1.0.2",
"boolean": "^3.2.0",
"brace-expansion": "^1.1.11",
Expand Down