n8n-nodes-allure-testops
Version:
N8N node for Allure TestOps
37 lines • 1.54 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AllureTestOps = void 0;
const n8n_workflow_1 = require("n8n-workflow");
const AllureTestOpsV25_node_1 = require("./v25/AllureTestOpsV25.node");
class AllureTestOps {
constructor() {
this.description = {
displayName: 'Allure TestOps',
name: 'allureTestOps',
icon: { light: 'file:allure_testops.svg', dark: 'file:allure_testops.svg' },
group: ['output'],
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Interact with Allure TestOps API',
};
this.currentVersion = 25;
this.nodeVersions = {
25: new AllureTestOpsV25_node_1.AllureTestOpsV25(this.description),
};
}
getLatestVersion() {
const versions = Object.keys(this.nodeVersions).map(Number);
if (versions.length === 0) {
throw new n8n_workflow_1.ApplicationError('No versions available for this node');
}
return Math.max(...versions);
}
getNodeType(version) {
const requestedVersion = version !== null && version !== void 0 ? version : this.getLatestVersion();
if (this.nodeVersions[requestedVersion]) {
return this.nodeVersions[requestedVersion];
}
throw new n8n_workflow_1.ApplicationError(`Node version ${requestedVersion} not found.`);
}
}
exports.AllureTestOps = AllureTestOps;
//# sourceMappingURL=AllureTestOps.node.js.map