Merge pull request #54 from mokoconsulting-tech/dev/security-update-2025-01-17

Unused import A module is imported (using the import statement) but t…
This commit was merged in pull request #54.
This commit is contained in:
2026-01-17 17:32:48 -06:00
committed by GitHub
5 changed files with 1063 additions and 1063 deletions

View File

@@ -32,13 +32,11 @@ USAGE: ./scripts/release/package_extension.py [output_dir] [version]
"""
import argparse
import os
import shutil
import sys
import zipfile
from datetime import datetime
from pathlib import Path
from typing import List, Set
from typing import Set
# Add lib directory to path
sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))
@@ -170,7 +168,7 @@ def create_package(
# Generate ZIP filename
timestamp = datetime.now().strftime("%Y%m%d-%H%M%S")
platform_suffix = f"{ext_info.platform.value}-{ext_info.extension_type}"
zip_filename = f"{repo_name}-{version}-{platform_suffix}.zip"
zip_filename = f"{repo_name}-{version}-{platform_suffix}-{timestamp}.zip"
zip_path = output_path / zip_filename
# Remove existing ZIP if present
@@ -307,6 +305,12 @@ Supports both Joomla and Dolibarr extensions with automatic platform detection.
exclude_patterns=exclude_patterns
)
result = {
"status": "success",
"zip_path": str(zip_path)
}
common.json_output(result)
return 0
except Exception as e:

View File

@@ -41,7 +41,6 @@ sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))
try:
import common
import joomla_manifest
except ImportError:
print("ERROR: Cannot import required libraries", file=sys.stderr)
sys.exit(1)

View File

@@ -33,7 +33,7 @@ BRIEF: Run all validation scripts
import subprocess
import sys
from pathlib import Path
from typing import List, Tuple
from typing import Tuple
# Add lib directory to path
sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))

View File

@@ -33,7 +33,6 @@ NOTE: Checks YAML syntax, structure, and best practices
import sys
from pathlib import Path
from typing import List, Tuple
# Add lib directory to path
sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))

View File

@@ -90,8 +90,6 @@
return scripts.reverse().find(s => (s.getAttribute("src") || "").includes("/gtm.js")) || null;
};
const getAttr = (el, name) => el ? el.getAttribute(name) : null;
const readDatasetCascade = (name) => {
// Check <script>, <html>, <body>, then <meta name="moko:gtm-<name>">
const script = getCurrentScript();