@codesys/mcp-toolkit 1.1.12 → 1.1.13
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_pou.py +10 -10
- package/package.json +1 -1
- package/src/scripts/create_pou.py +10 -10
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.1.13] - 2025-05-06
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fixed remaining f-string formatting in create_pou.py script
|
|
12
|
+
- Restored compatibility with older Python versions in path formatting
|
|
13
|
+
|
|
8
14
|
## [1.1.12] - 2025-05-06
|
|
9
15
|
|
|
10
16
|
### Fixed
|
|
@@ -40,22 +40,22 @@ try:
|
|
|
40
40
|
# Get project name from file path to build the likely full path
|
|
41
41
|
project_name = os.path.splitext(os.path.basename(PROJECT_FILE_PATH))[0]
|
|
42
42
|
potential_paths = [
|
|
43
|
-
PARENT_PATH_REL,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
PARENT_PATH_REL, # Original "Application"
|
|
44
|
+
"%s.%s" % (project_name, PARENT_PATH_REL), # "projectName.Application"
|
|
45
|
+
"%s/%s" % (project_name, PARENT_PATH_REL), # "projectName/Application"
|
|
46
|
+
project_name # Just the project name itself might work
|
|
47
47
|
]
|
|
48
48
|
|
|
49
|
-
print(
|
|
49
|
+
print("DEBUG: Parent path is simply 'Application', trying several variants to find it")
|
|
50
50
|
|
|
51
51
|
# Try each potential path until one works
|
|
52
52
|
parent_object = None
|
|
53
53
|
for path in potential_paths:
|
|
54
|
-
print(
|
|
54
|
+
print("DEBUG: Attempting to find parent with path: '%s'" % path)
|
|
55
55
|
parent_candidate = find_object_by_path_robust(primary_project, path, "parent container")
|
|
56
56
|
if parent_candidate:
|
|
57
57
|
parent_object = parent_candidate
|
|
58
|
-
print(
|
|
58
|
+
print("DEBUG: Successfully found parent using path: '%s'" % path)
|
|
59
59
|
break
|
|
60
60
|
|
|
61
61
|
if not parent_object:
|
|
@@ -66,14 +66,14 @@ try:
|
|
|
66
66
|
app = primary_project.active_application
|
|
67
67
|
if app:
|
|
68
68
|
parent_object = app
|
|
69
|
-
print(
|
|
69
|
+
print("DEBUG: Found application object directly: %s" % app.get_name())
|
|
70
70
|
if not parent_object and hasattr(primary_project, 'find'):
|
|
71
71
|
apps = primary_project.find("Application", True)
|
|
72
72
|
if apps:
|
|
73
73
|
parent_object = apps[0]
|
|
74
|
-
print(
|
|
74
|
+
print("DEBUG: Found application via search: %s" % parent_object.get_name())
|
|
75
75
|
except Exception as e:
|
|
76
|
-
print(
|
|
76
|
+
print("ERROR: Direct application access also failed: %s" % e)
|
|
77
77
|
else:
|
|
78
78
|
# Use the provided path normally
|
|
79
79
|
parent_object = find_object_by_path_robust(primary_project, PARENT_PATH_REL, "parent container")
|
package/package.json
CHANGED
|
@@ -40,22 +40,22 @@ try:
|
|
|
40
40
|
# Get project name from file path to build the likely full path
|
|
41
41
|
project_name = os.path.splitext(os.path.basename(PROJECT_FILE_PATH))[0]
|
|
42
42
|
potential_paths = [
|
|
43
|
-
PARENT_PATH_REL,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
PARENT_PATH_REL, # Original "Application"
|
|
44
|
+
"%s.%s" % (project_name, PARENT_PATH_REL), # "projectName.Application"
|
|
45
|
+
"%s/%s" % (project_name, PARENT_PATH_REL), # "projectName/Application"
|
|
46
|
+
project_name # Just the project name itself might work
|
|
47
47
|
]
|
|
48
48
|
|
|
49
|
-
print(
|
|
49
|
+
print("DEBUG: Parent path is simply 'Application', trying several variants to find it")
|
|
50
50
|
|
|
51
51
|
# Try each potential path until one works
|
|
52
52
|
parent_object = None
|
|
53
53
|
for path in potential_paths:
|
|
54
|
-
print(
|
|
54
|
+
print("DEBUG: Attempting to find parent with path: '%s'" % path)
|
|
55
55
|
parent_candidate = find_object_by_path_robust(primary_project, path, "parent container")
|
|
56
56
|
if parent_candidate:
|
|
57
57
|
parent_object = parent_candidate
|
|
58
|
-
print(
|
|
58
|
+
print("DEBUG: Successfully found parent using path: '%s'" % path)
|
|
59
59
|
break
|
|
60
60
|
|
|
61
61
|
if not parent_object:
|
|
@@ -66,14 +66,14 @@ try:
|
|
|
66
66
|
app = primary_project.active_application
|
|
67
67
|
if app:
|
|
68
68
|
parent_object = app
|
|
69
|
-
print(
|
|
69
|
+
print("DEBUG: Found application object directly: %s" % app.get_name())
|
|
70
70
|
if not parent_object and hasattr(primary_project, 'find'):
|
|
71
71
|
apps = primary_project.find("Application", True)
|
|
72
72
|
if apps:
|
|
73
73
|
parent_object = apps[0]
|
|
74
|
-
print(
|
|
74
|
+
print("DEBUG: Found application via search: %s" % parent_object.get_name())
|
|
75
75
|
except Exception as e:
|
|
76
|
-
print(
|
|
76
|
+
print("ERROR: Direct application access also failed: %s" % e)
|
|
77
77
|
else:
|
|
78
78
|
# Use the provided path normally
|
|
79
79
|
parent_object = find_object_by_path_robust(primary_project, PARENT_PATH_REL, "parent container")
|