@codesys/mcp-toolkit 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/scripts/create_project.py +24 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.4.4] - 2025-05-02
|
|
9
|
+
### Fixed
|
|
10
|
+
- Fixed "unexpected token 'C'" error in create_project script
|
|
11
|
+
- Improved Windows path handling in create_project.py with better logging and error detection
|
|
12
|
+
- Added additional debugging output for raw string path processing
|
|
13
|
+
|
|
8
14
|
## [1.4.3] - 2025-05-02
|
|
9
15
|
### Fixed
|
|
10
16
|
- Fixed "Cannot import name redirect_stdout" error in session script execution
|
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
import sys, scriptengine as script_engine, os, shutil, time, traceback
|
|
2
|
-
# Placeholders -
|
|
3
|
-
#
|
|
2
|
+
# Placeholders for paths - note that these might be prefixed with r' for raw strings
|
|
3
|
+
# from the TypeScript/Node.js side due to Windows path handling
|
|
4
4
|
TEMPLATE_PROJECT_PATH_RAW = '{TEMPLATE_PROJECT_PATH}' # Path to Standard.project
|
|
5
5
|
PROJECT_FILE_PATH_RAW = '{PROJECT_FILE_PATH}' # Path for the new project (Target Path)
|
|
6
6
|
|
|
7
|
-
# Process
|
|
7
|
+
# Process paths that might be Python raw strings (r'path')
|
|
8
8
|
def extract_path(path_str):
|
|
9
|
-
if
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
# Check if path starts with r' prefix and ends with ' (raw string notation)
|
|
10
|
+
if isinstance(path_str, str):
|
|
11
|
+
if path_str.startswith("r'") and path_str.endswith("'"):
|
|
12
|
+
try:
|
|
13
|
+
# Extract the content between r' and '
|
|
14
|
+
return path_str[2:-1]
|
|
15
|
+
except Exception as e:
|
|
16
|
+
print("DEBUG: Error extracting raw string content: %s" % e)
|
|
17
|
+
return path_str
|
|
12
18
|
return path_str
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
# Process template path and project file path
|
|
21
|
+
try:
|
|
22
|
+
TEMPLATE_PROJECT_PATH = extract_path(TEMPLATE_PROJECT_PATH_RAW)
|
|
23
|
+
PROJECT_FILE_PATH = extract_path(PROJECT_FILE_PATH_RAW)
|
|
24
|
+
print("DEBUG: Processed paths:")
|
|
25
|
+
print("DEBUG: TEMPLATE_PROJECT_PATH_RAW: %s" % TEMPLATE_PROJECT_PATH_RAW)
|
|
26
|
+
print("DEBUG: TEMPLATE_PROJECT_PATH (processed): %s" % TEMPLATE_PROJECT_PATH)
|
|
27
|
+
print("DEBUG: PROJECT_FILE_PATH_RAW: %s" % PROJECT_FILE_PATH_RAW)
|
|
28
|
+
print("DEBUG: PROJECT_FILE_PATH (processed): %s" % PROJECT_FILE_PATH)
|
|
29
|
+
except Exception as path_proc_err:
|
|
30
|
+
print("CRITICAL: Error processing path variables: %s" % path_proc_err)
|
|
31
|
+
traceback.print_exc()
|
|
16
32
|
|
|
17
33
|
print("DEBUG: Processed TEMPLATE_PROJECT_PATH: %s" % TEMPLATE_PROJECT_PATH)
|
|
18
34
|
print("DEBUG: Processed PROJECT_FILE_PATH: %s" % PROJECT_FILE_PATH)
|