codesysultra 1.0.2 → 1.0.3
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/claude_config.json +13 -0
- package/dist/bin.js +5 -11
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -63,7 +63,10 @@ catch (e) {
|
|
|
63
63
|
commander_1.program
|
|
64
64
|
.name('codesysultra') // Set the command name users will see
|
|
65
65
|
.description('Model Context Protocol (MCP) server for CODESYS automation platform')
|
|
66
|
-
.version(version)
|
|
66
|
+
.version(version)
|
|
67
|
+
.option('-p, --codesys-path <path>', 'Path to CODESYS executable (can contain spaces, use quotes if needed)', process.env.CODESYS_PATH || 'C:\\Program Files\\CODESYS 3.5.21.0\\CODESYS\\Common\\CODESYS.exe')
|
|
68
|
+
.option('-f, --codesys-profile <profile>', 'CODESYS profile name (overrides CODESYS_PROFILE env var)', process.env.CODESYS_PROFILE || 'CODESYS V3.5 SP21')
|
|
69
|
+
.option('-w, --workspace <dir>', 'Workspace directory for relative project paths', process.cwd());
|
|
67
70
|
// 添加配置生成命令
|
|
68
71
|
commander_1.program.command('config')
|
|
69
72
|
.description('Generate configuration from CODESYS version info file')
|
|
@@ -73,16 +76,7 @@ commander_1.program.command('config')
|
|
|
73
76
|
.action((options) => {
|
|
74
77
|
generateConfig(options);
|
|
75
78
|
});
|
|
76
|
-
//
|
|
77
|
-
commander_1.program.option('-p, --codesys-path <path>', 'Path to CODESYS executable (can contain spaces, use quotes if needed)', process.env.CODESYS_PATH || 'C:\\Program Files\\CODESYS 3.5.21.0\\CODESYS\\Common\\CODESYS.exe' // Default AFTER reading env var
|
|
78
|
-
)
|
|
79
|
-
.option('-f, --codesys-profile <profile>', // Changed alias to 'f' to avoid conflict if you add other '-p' options
|
|
80
|
-
'CODESYS profile name (overrides CODESYS_PROFILE env var)', process.env.CODESYS_PROFILE || 'CODESYS V3.5 SP21' // Default AFTER reading env var
|
|
81
|
-
)
|
|
82
|
-
// Add workspace option if needed, defaults to cwd
|
|
83
|
-
.option('-w, --workspace <dir>', 'Workspace directory for relative project paths', process.cwd() // Default to current working directory
|
|
84
|
-
)
|
|
85
|
-
.parse(process.argv); // Parse the arguments
|
|
79
|
+
commander_1.program.parse(process.argv); // Parse the arguments
|
|
86
80
|
const options = commander_1.program.opts();
|
|
87
81
|
// 如果执行的是config命令,不继续执行服务器启动
|
|
88
82
|
if (process.argv[2] === 'config') {
|