Skip to content

Commit 6c95d2c

Browse files
committed
fix: update deploy script
1 parent f4b5b29 commit 6c95d2c

File tree

5 files changed

+51
-5
lines changed

5 files changed

+51
-5
lines changed

.github/workflows/publish-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ jobs:
6969
shell: bash
7070

7171
- name: Compile .ts files
72-
run: npx tsc
72+
run: npm run tsc
7373
shell: bash
7474

75-
7675
- name: Configure git
7776
run: |
7877
git config user.name "${GITHUB_ACTOR}"

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [7.0.1] - 2024-11-18
9+
10+
- Android SDK version: 12.0.0
11+
- iOS SDK version: 6.6.3
12+
13+
### Cordova
14+
15+
#### Fixed
16+
17+
- Removed conflicting export on npmjs
18+
819
## [7.0.0] - 2024-11-15
920

1021
- Android SDK version: 12.0.0

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-talsec-plugin-freerasp",
3-
"version": "7.0.0",
3+
"version": "7.0.1",
44
"description": "Cordova plugin for improving app security and threat monitoring on Android and iOS mobile devices.",
55
"cordova": {
66
"id": "cordova-talsec-plugin-freerasp",
@@ -12,7 +12,8 @@
1212
"scripts": {
1313
"eslint": "eslint . --ext ts",
1414
"prettier": "prettier \"**/*.{ts,js,html,css}\"",
15-
"typecheck": "tsc --noEmit"
15+
"typecheck": "tsc --noEmit",
16+
"tsc": "tsc && node scripts/remove-export.js && prettier --write www/talsec.*"
1617
},
1718
"repository": {
1819
"type": "git",

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
44
id="cordova-talsec-plugin-freerasp"
5-
version="7.0.0">
5+
version="7.0.1">
66

77
<name>freerasp</name>
88
<author>Talsec (info@talsec.app)</author>

scripts/remove-export.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
// Function to remove `export {};` from the second-to-last line
5+
const removeExportStatement = (filePath) => {
6+
try {
7+
// Read the file content
8+
const fileContent = fs.readFileSync(filePath, 'utf8');
9+
10+
// Split the file into lines
11+
const lines = fileContent.split('\n');
12+
13+
// Identify the second-to-last line
14+
const secondToLastLineIndex = lines.length - 2;
15+
16+
// Check if the second-to-last line is `export {};`
17+
if (lines[secondToLastLineIndex].trim() !== 'export {};') {
18+
console.log(
19+
`No 'export {};' found on the second-to-last line in ${filePath}`,
20+
);
21+
return;
22+
}
23+
lines.splice(secondToLastLineIndex, 1); // Remove the second-to-last line
24+
const updatedContent = lines.join('\n');
25+
26+
// Write the updated content back to the file
27+
fs.writeFileSync(filePath, updatedContent, 'utf8');
28+
console.log(`Removed 'export {};' from the file.`);
29+
} catch (error) {
30+
console.error(`Error processing the file: ${error.message}`);
31+
}
32+
};
33+
34+
const filePath = path.resolve(__dirname, '../www/talsec.js');
35+
removeExportStatement(filePath);

0 commit comments

Comments
 (0)