@etm-professional-control/winccoa-mcp-server 1.0.6 → 1.0.8

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/.env.example CHANGED
@@ -58,9 +58,9 @@ WINCCOA_FIELD=default
58
58
  # Project Instructions (optional)
59
59
  # IMPORTANT: Path must be relative to the WinCC OA project directory (not the MCP server directory)
60
60
  # For demo/testing: Use the included demo project instructions
61
- WINCCOA_PROJECT_INSTRUCTIONS=./javascript/mcpServer/config/demo-project-instructions.md
61
+ # WINCCOA_PROJECT_INSTRUCTIONS=./javascript/mcpServer/demo-project-instructions.md
62
62
  # For production: Create your own project-specific instructions
63
- # WINCCOA_PROJECT_INSTRUCTIONS=/path/to/your/project-instructions.md
63
+ # WINCCOA_PROJECT_INSTRUCTIONS=javascript/mcpServer/project-instructions.md
64
64
 
65
65
 
66
66
  # ====================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etm-professional-control/winccoa-mcp-server",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "MCP Server for WinCC OA with field-specific configurations",
5
5
  "type": "module",
6
6
  "bin": {
package/postinstall.cjs CHANGED
@@ -65,18 +65,38 @@ try {
65
65
  console.log('Copied package.json');
66
66
  }
67
67
 
68
+
69
+ // Copy demo-project-instructions.md
70
+ const demoSrc = path.join(nodeModulesPath, 'config', 'demo-project-instructions.md');
71
+ const demoDest = path.join(installDir, 'demo-project-instructions.md');
72
+ if (fs.existsSync(demoSrc)) {
73
+ fs.copyFileSync(demoSrc, demoDest);
74
+ console.log('Copied demo-project-instructions.md');
75
+ }
76
+
68
77
  const fieldsPathSrc = path.join(srcPath, 'fields');
69
78
  const fieldsPathDest = path.join(installDir, 'fields');
70
79
 
80
+ if(!fs.existsSync(fieldsPathDest)) {
81
+ fs.mkdirSync(fieldsPathDest);
82
+ console.log('Created fields directory');
83
+ }
84
+
71
85
  if (fs.existsSync(fieldsPathSrc)) {
72
86
  // Copy all files from src/fields directory
73
87
  const files = fs.readdirSync(fieldsPathSrc, { withFileTypes: true });
74
88
 
75
89
  for (const file of files) {
90
+ // Skip . and .. entries
91
+ if (file.name === '.' || file.name === '..') {
92
+ continue;
93
+ }
94
+
76
95
  // Copy file
96
+ const sourceFilePath = path.join(fieldsPathSrc, file.name);
77
97
  const destinationFilePath = path.join(fieldsPathDest, file.name);
78
98
  if(!fs.existsSync(destinationFilePath)) {
79
- fs.copyFileSync(srcPath, destinationFilePath);
99
+ fs.copyFileSync(sourceFilePath, destinationFilePath);
80
100
  console.log(`Copied file: ${file.name}`);
81
101
  }
82
102
  }