mlgym-deploy 3.0.4 → 3.0.5
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/index.js +34 -12
- package/package.json +5 -2
package/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import crypto from 'crypto';
|
|
|
17
17
|
const execAsync = promisify(exec);
|
|
18
18
|
|
|
19
19
|
// Current version of this MCP server - INCREMENT FOR WORKFLOW FIXES
|
|
20
|
-
const CURRENT_VERSION = '3.0.
|
|
20
|
+
const CURRENT_VERSION = '3.0.5'; // Better git push error visibility and status reporting
|
|
21
21
|
const PACKAGE_NAME = 'mlgym-deploy';
|
|
22
22
|
|
|
23
23
|
// Version check state
|
|
@@ -1063,6 +1063,7 @@ async function initProject(args) {
|
|
|
1063
1063
|
|
|
1064
1064
|
// Create initial commit and push (like CLI does)
|
|
1065
1065
|
const gitSteps = [];
|
|
1066
|
+
let pushSucceeded = false;
|
|
1066
1067
|
|
|
1067
1068
|
try {
|
|
1068
1069
|
// Check if there are any files to commit
|
|
@@ -1094,11 +1095,20 @@ async function initProject(args) {
|
|
|
1094
1095
|
|
|
1095
1096
|
// Push to trigger webhook and deployment
|
|
1096
1097
|
gitSteps.push('Pushing to GitLab to trigger deployment');
|
|
1098
|
+
console.error('Executing: git push -u mlgym main');
|
|
1097
1099
|
await execAsync('git push -u mlgym main', { cwd: absolutePath });
|
|
1100
|
+
gitSteps.push('✅ Successfully pushed to GitLab');
|
|
1101
|
+
pushSucceeded = true;
|
|
1102
|
+
console.error('✅ Git push completed successfully');
|
|
1098
1103
|
|
|
1099
1104
|
} catch (pushError) {
|
|
1100
|
-
console.error('Git
|
|
1101
|
-
gitSteps.push(
|
|
1105
|
+
console.error('❌ Git push failed:', pushError.message);
|
|
1106
|
+
gitSteps.push(`❌ Push failed: ${pushError.message}`);
|
|
1107
|
+
// Include stderr if available
|
|
1108
|
+
if (pushError.stderr) {
|
|
1109
|
+
console.error('Git push stderr:', pushError.stderr);
|
|
1110
|
+
gitSteps.push(`Error details: ${pushError.stderr}`);
|
|
1111
|
+
}
|
|
1102
1112
|
}
|
|
1103
1113
|
|
|
1104
1114
|
// Monitor deployment if enabled (like CLI does)
|
|
@@ -1145,8 +1155,10 @@ async function initProject(args) {
|
|
|
1145
1155
|
content: [{
|
|
1146
1156
|
type: 'text',
|
|
1147
1157
|
text: JSON.stringify({
|
|
1148
|
-
status: 'success',
|
|
1149
|
-
message:
|
|
1158
|
+
status: pushSucceeded ? 'success' : 'partial_success',
|
|
1159
|
+
message: pushSucceeded
|
|
1160
|
+
? 'Project created and pushed successfully'
|
|
1161
|
+
: 'Project created but git push failed - please push manually',
|
|
1150
1162
|
project: {
|
|
1151
1163
|
id: project.id,
|
|
1152
1164
|
name: project.name,
|
|
@@ -1157,13 +1169,23 @@ async function initProject(args) {
|
|
|
1157
1169
|
},
|
|
1158
1170
|
git_operations: gitSteps,
|
|
1159
1171
|
deployment: deploymentStatus,
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1172
|
+
push_succeeded: pushSucceeded,
|
|
1173
|
+
next_steps: pushSucceeded
|
|
1174
|
+
? (enable_deployment && deploymentStatus?.status === 'deployed' ? [
|
|
1175
|
+
`✅ Your application is live at: ${deploymentStatus.url}`,
|
|
1176
|
+
'Future updates: git push mlgym main'
|
|
1177
|
+
] : [
|
|
1178
|
+
enable_deployment ? 'Deployment triggered - check URL in a few minutes' : 'Project ready',
|
|
1179
|
+
enable_deployment ? `Expected URL: https://${hostname}.ezb.net` : null,
|
|
1180
|
+
'To update: git push mlgym main'
|
|
1181
|
+
].filter(Boolean))
|
|
1182
|
+
: [
|
|
1183
|
+
'❌ Git push failed - deployment not triggered',
|
|
1184
|
+
'Manual steps required:',
|
|
1185
|
+
`1. cd ${local_path}`,
|
|
1186
|
+
'2. git push mlgym main',
|
|
1187
|
+
'Check the git_operations array above for error details'
|
|
1188
|
+
]
|
|
1167
1189
|
}, null, 2)
|
|
1168
1190
|
}]
|
|
1169
1191
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mlgym-deploy",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "MCP server for MLGym -
|
|
3
|
+
"version": "3.0.5",
|
|
4
|
+
"description": "MCP server for MLGym - Improved git push error visibility and status reporting",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -51,3 +51,6 @@
|
|
|
51
51
|
]
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|