From 09aaede9ad2a6a5106c65e0aa6df88b08a4c28f9 Mon Sep 17 00:00:00 2001 From: Chanan Merari Date: Sun, 13 Oct 2024 11:55:08 +0300 Subject: [PATCH] [PCSUP-25325] - Fixed activation error log --- CHANGELOG.md | 7 +++++++ package.json | 6 ++++-- src/extension.ts | 30 +++++++++++++++--------------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2281192..3c6004f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [1.0.22] - 2024-10-13 + +### Fixed + +- Fixed an issue where an error log wasn't triggered on extension activation failure +- Fixed an issue where trailing slashes on Prisma URl configuration caused scan issues + ## [1.0.21] - 2024-09-15 ### Added diff --git a/package.json b/package.json index 9c253b7..d6d6e16 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "repository": "https://github.com/bridgecrewio/prisma-cloud-vscode-plugin", "icon": "static/icons/prisma.png", "description": "a static code analysis tool to scan code for Infrastructure-as-Code (IaC) misconfigurations, Software Composition Analysis (SCA) issues and Secrets vulnerabilities.", - "version": "1.0.21", + "version": "1.0.22", "engines": { "vscode": "^1.79.0" }, @@ -31,7 +31,9 @@ "prisma-cloud": [ { "id": "general", - "name": "General Actions" + "name": "General Actions", + "visibility": "collapsed", + "initialSize": 1 }, { "id": "iac-misconfiguration", diff --git a/src/extension.ts b/src/extension.ts index bf99645..437276e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,21 +1,22 @@ import * as vscode from 'vscode'; -import { registerCommands } from './commands'; -import { CONFIG } from './config'; -import { COMMAND } from './constants'; -import { registerWindowEvents, registerWorkspaceEvents } from './events'; -import logger, { initiateLogger } from './logger'; -import { initializeServices } from './services'; -import { initializeAnalyticsService } from './services/analyticsService'; -import { initializeAuthenticationService } from './services/authenticationService'; -import { CustomersModulesService, initializeCustomersModulesService } from './services/customersModulesService'; -import { lineClickDisposable, registerCustomHighlight } from './services/customPopupService'; -import { initializeInstallationId } from './utils'; -import { registerCheckovResultView } from './views/interface/checkovResult'; -import { registerSidebar } from './views/interface/primarySidebar'; +import {registerCommands} from './commands'; +import {CONFIG} from './config'; +import {COMMAND} from './constants'; +import {registerWindowEvents, registerWorkspaceEvents} from './events'; +import logger, {initiateLogger} from './logger'; +import {initializeServices} from './services'; +import {initializeAnalyticsService} from './services/analyticsService'; +import {initializeAuthenticationService} from './services/authenticationService'; +import {CustomersModulesService, initializeCustomersModulesService} from './services/customersModulesService'; +import {lineClickDisposable, registerCustomHighlight} from './services/customPopupService'; +import {initializeInstallationId} from './utils'; +import {registerCheckovResultView} from './views/interface/checkovResult'; +import {registerSidebar} from './views/interface/primarySidebar'; export async function activate(context: vscode.ExtensionContext) { try { + registerCommands(context); initiateLogger(context.logUri.fsPath); logger.info(`Initiating Prisma Cloud VS Code extension version ${vscode.extensions.getExtension(CONFIG.extensionId)?.packageJSON.version}`); logger.info(`Plugin path: ${context.extensionPath}`); @@ -24,7 +25,6 @@ export async function activate(context: vscode.ExtensionContext) { await initializeAuthenticationService(context); await initializeCustomersModulesService(context); initializeAnalyticsService(context); - registerCommands(context); initializeServices(context); registerWindowEvents(); registerWorkspaceEvents(); @@ -33,7 +33,7 @@ export async function activate(context: vscode.ExtensionContext) { registerCustomHighlight(context); vscode.commands.executeCommand(COMMAND.CHECKOV_INSTALL, [context]); } catch (e) { - logger.crit('Failed to initialize extension', e); + logger.error('Failed to initialize extension', e); } }