From 7aa5ea8287043fb7dd8d3ab5bce487914360b5a5 Mon Sep 17 00:00:00 2001 From: atishj99 Date: Tue, 11 Aug 2026 15:37:49 +0530 Subject: [PATCH 1/2] release workflow fix --- .github/workflows/delete-packages-and-releases.yml | 3 --- .github/workflows/nightly.yml | 1 - .github/workflows/release.yml | 4 ---- 3 files changed, 8 deletions(-) diff --git a/.github/workflows/delete-packages-and-releases.yml b/.github/workflows/delete-packages-and-releases.yml index 80ca0d8c..3d8cd83d 100644 --- a/.github/workflows/delete-packages-and-releases.yml +++ b/.github/workflows/delete-packages-and-releases.yml @@ -7,9 +7,6 @@ on: description: 'Tag to delete' required: true type: string - secrets: - GITHUB_TOKEN: - required: true workflow_dispatch: inputs: tag: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index f0654a0e..ae89eff2 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -21,5 +21,4 @@ jobs: packages: write # For publishing packages uses: Checkmarx/ast-cli-javascript-wrapper/.github/workflows/release.yml@abe950ede3b052dfc236f730cf11cc290af53d1c secrets: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eefbd17a..53f58f1b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,8 +24,6 @@ on: default: true type: boolean secrets: - GITHUB_TOKEN: - required: true ECHO_LIBRARIES_ACCESS_KEY: required: true workflow_dispatch: @@ -65,8 +63,6 @@ jobs: uses: Checkmarx/ast-cli-javascript-wrapper/.github/workflows/delete-packages-and-releases.yml@abe950ede3b052dfc236f730cf11cc290af53d1c with: tag: ${{ inputs.jsTag }} - secrets: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} if: inputs.dev == true release: name: Release JavaScript Wrapper From f23531e68386c13ae4d6536e88e7cd7927ea43d3 Mon Sep 17 00:00:00 2001 From: atishj99 Date: Tue, 11 Aug 2026 16:33:55 +0530 Subject: [PATCH 2/2] adding test coverage to 80%+ --- src/tests/LoggerConfigTest.test.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/tests/LoggerConfigTest.test.ts diff --git a/src/tests/LoggerConfigTest.test.ts b/src/tests/LoggerConfigTest.test.ts new file mode 100644 index 00000000..c3f4cd9b --- /dev/null +++ b/src/tests/LoggerConfigTest.test.ts @@ -0,0 +1,26 @@ +import { getLoggerWithFilePath, logger } from '../main/wrapper/loggerConfig'; +import * as fs from 'fs'; +import * as path from 'path'; + +describe('Logger Configuration', () => { + it('should initialize logger with file path', () => { + const tempDir = path.join(__dirname, '../../tmp'); + if (!fs.existsSync(tempDir)) { + fs.mkdirSync(tempDir, { recursive: true }); + } + + const logFilePath = path.join(tempDir, 'test.log'); + + // This should call configurationWithFile and cover line 4 + getLoggerWithFilePath(logFilePath); + + expect(logger).toBeDefined(); + }); + + it('should initialize logger without file path', () => { + // This should call configurationWithoutFile + getLoggerWithFilePath(); + + expect(logger).toBeDefined(); + }); +});