@magpiecloud/mags 1.6.0 → 1.6.1
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/bin/mags.js +1 -11
- package/package.json +1 -1
package/bin/mags.js
CHANGED
|
@@ -1067,16 +1067,6 @@ async function sshToJob(nameOrId) {
|
|
|
1067
1067
|
} else if (existingJob && existingJob.status === 'sleeping') {
|
|
1068
1068
|
log('yellow', `Waking sleeping VM for '${nameOrId}'...`);
|
|
1069
1069
|
jobID = existingJob.request_id;
|
|
1070
|
-
// Trigger wake by requesting SSH access
|
|
1071
|
-
await request('POST', `/api/v1/mags-jobs/${jobID}/access`, { port: 22 });
|
|
1072
|
-
// Wait for VM to wake up
|
|
1073
|
-
for (let i = 0; i < 30; i++) {
|
|
1074
|
-
const status = await request('GET', `/api/v1/mags-jobs/${jobID}/status`);
|
|
1075
|
-
if (status.status === 'running') break;
|
|
1076
|
-
process.stdout.write('.');
|
|
1077
|
-
await sleep(1000);
|
|
1078
|
-
}
|
|
1079
|
-
console.log('');
|
|
1080
1070
|
} else {
|
|
1081
1071
|
// No running/sleeping VM — start a new persistent one
|
|
1082
1072
|
log('blue', `Starting VM with workspace '${nameOrId}'...`);
|
|
@@ -1212,7 +1202,7 @@ async function main() {
|
|
|
1212
1202
|
break;
|
|
1213
1203
|
case '--version':
|
|
1214
1204
|
case '-v':
|
|
1215
|
-
console.log('mags v1.6.
|
|
1205
|
+
console.log('mags v1.6.1');
|
|
1216
1206
|
process.exit(0);
|
|
1217
1207
|
break;
|
|
1218
1208
|
case 'new':
|