@vm0/runner 2.1.6 → 2.2.0
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 +21 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -9417,13 +9417,30 @@ var startCommand = new Command("start").description("Start the runner").option("
|
|
|
9417
9417
|
|
|
9418
9418
|
// src/commands/status.ts
|
|
9419
9419
|
import { Command as Command2 } from "commander";
|
|
9420
|
-
var statusCommand = new Command2("status").description("
|
|
9421
|
-
|
|
9422
|
-
|
|
9420
|
+
var statusCommand = new Command2("status").description("Check runner connectivity to API").option("--config <path>", "Config file path", "./runner.yaml").action(async (options) => {
|
|
9421
|
+
try {
|
|
9422
|
+
const config = loadConfig(options.config);
|
|
9423
|
+
console.log(`Checking connectivity to ${config.server.url}...`);
|
|
9424
|
+
console.log(`Runner group: ${config.group}`);
|
|
9425
|
+
await pollForJob(config.server, config.group);
|
|
9426
|
+
console.log("");
|
|
9427
|
+
console.log("\u2713 Runner can connect to API");
|
|
9428
|
+
console.log(` API: ${config.server.url}`);
|
|
9429
|
+
console.log(` Group: ${config.group}`);
|
|
9430
|
+
console.log(` Auth: OK`);
|
|
9431
|
+
process.exit(0);
|
|
9432
|
+
} catch (error) {
|
|
9433
|
+
console.error("");
|
|
9434
|
+
console.error("\u2717 Runner cannot connect to API");
|
|
9435
|
+
console.error(
|
|
9436
|
+
` Error: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
9437
|
+
);
|
|
9438
|
+
process.exit(1);
|
|
9439
|
+
}
|
|
9423
9440
|
});
|
|
9424
9441
|
|
|
9425
9442
|
// src/index.ts
|
|
9426
|
-
var version = true ? "2.
|
|
9443
|
+
var version = true ? "2.2.0" : "0.1.0";
|
|
9427
9444
|
program.name("vm0-runner").version(version).description("Self-hosted runner for VM0 agents");
|
|
9428
9445
|
program.addCommand(startCommand);
|
|
9429
9446
|
program.addCommand(statusCommand);
|