diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 9018e80..e4c996c 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -69,10 +69,9 @@ jobs: shell: bash - name: Compile .ts files - run: npx tsc + run: npm run tsc shell: bash - - name: Configure git run: | git config user.name "${GITHUB_ACTOR}" diff --git a/CHANGELOG.md b/CHANGELOG.md index a11a170..af8111d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [7.0.1] - 2024-11-18 + +- Android SDK version: 12.0.0 +- iOS SDK version: 6.6.3 + +### Cordova + +#### Fixed + +- Removed conflicting export on npmjs + ## [7.0.0] - 2024-11-15 - Android SDK version: 12.0.0 diff --git a/package.json b/package.json index 5c0fb7f..9fecd6d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-talsec-plugin-freerasp", - "version": "7.0.0", + "version": "7.0.1", "description": "Cordova plugin for improving app security and threat monitoring on Android and iOS mobile devices.", "cordova": { "id": "cordova-talsec-plugin-freerasp", @@ -12,7 +12,8 @@ "scripts": { "eslint": "eslint . --ext ts", "prettier": "prettier \"**/*.{ts,js,html,css}\"", - "typecheck": "tsc --noEmit" + "typecheck": "tsc --noEmit", + "tsc": "tsc && node scripts/remove-export.js && prettier --write www/talsec.*" }, "repository": { "type": "git", diff --git a/plugin.xml b/plugin.xml index 1dd6e1e..19a6ba4 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="7.0.1"> freerasp Talsec (info@talsec.app) diff --git a/scripts/remove-export.js b/scripts/remove-export.js new file mode 100644 index 0000000..178ff89 --- /dev/null +++ b/scripts/remove-export.js @@ -0,0 +1,35 @@ +const fs = require('fs'); +const path = require('path'); + +// Function to remove `export {};` from the second-to-last line +const removeExportStatement = (filePath) => { + try { + // Read the file content + const fileContent = fs.readFileSync(filePath, 'utf8'); + + // Split the file into lines + const lines = fileContent.split('\n'); + + // Identify the second-to-last line + const secondToLastLineIndex = lines.length - 2; + + // Check if the second-to-last line is `export {};` + if (lines[secondToLastLineIndex].trim() !== 'export {};') { + console.log( + `No 'export {};' found on the second-to-last line in ${filePath}`, + ); + return; + } + lines.splice(secondToLastLineIndex, 1); // Remove the second-to-last line + const updatedContent = lines.join('\n'); + + // Write the updated content back to the file + fs.writeFileSync(filePath, updatedContent, 'utf8'); + console.log(`Removed 'export {};' from the file.`); + } catch (error) { + console.error(`Error processing the file: ${error.message}`); + } +}; + +const filePath = path.resolve(__dirname, '../www/talsec.js'); +removeExportStatement(filePath);