push
github
5 of 5 branches covered (100.0%)
Branch coverage included in aggregate %.
112 of 183 new or added lines in 4 files covered. (61.2%)
112 of 183 relevant lines covered (61.2%)
0.61 hits per line
|
|
"use strict";
|
|
|
|
import bag from 'bagofcli'; |
1✔ |
|
|
import fs from 'fs'; |
1✔ |
|
|
import McpJenkins from './mcpJenkins.js'; |
1✔ |
|
|
import p from 'path'; |
1✔ |
|
|
|
1✔ |
|
|
const APP_DIR = process.cwd(), |
1✔ |
|
|
DIRNAME = p.dirname(import.meta.url).replace('file://', ''); |
1✔ |
|
|
|
1✔ |
|
NEW
|
function _run(args) { |
× |
|
NEW
|
|
× |
|
NEW
|
const pkgFile = p.join(DIRNAME, '..', 'package.json'); |
× |
|
NEW
|
const pkg = JSON.parse(fs.readFileSync(pkgFile)); |
× |
|
NEW
|
|
× |
|
NEW
|
const opts = {
|
× |
|
NEW
|
url: process.env.JENKINS_URL || 'http://localhost:8080' |
× |
|
NEW
|
}; |
× |
|
NEW
|
|
× |
|
NEW
|
const mcpJenkins = new McpJenkins(pkg.name, pkg.version, opts);
|
× |
|
NEW
|
mcpJenkins.run(); |
× |
|
NEW
|
|
× |
|
NEW
|
} |
× |
|
|
|
1✔ |
|
|
/**
|
1✔ |
|
|
* Execute MCP Jenkins. |
1✔ |
|
|
*/ |
1✔ |
|
|
function exec() { |
|
|
|
|
1✔ |
|
|
const actions = {
|
1✔ |
|
|
commands: {
|
1✔ |
|
|
run : { action: _run } |
1✔ |
|
|
} |
1✔ |
|
|
}; |
1✔ |
|
|
|
1✔ |
|
|
bag.command(DIRNAME, actions); |
1✔ |
|
|
} |
1✔ |
|
|
|
1✔ |
|
|
const exports = {
|
1✔ |
|
|
exec: exec
|
1✔ |
|
|
}; |
1✔ |
|
|
|
1✔ |
|
|
export {
|
1✔ |
|
|
exports as default
|
1✔ |
|
|
}; |
1✔ |