singularci
Version:
SingularCI is a DSL transpiler used to generate CI/CD configuration files for existing CI platforms
42 lines • 1.55 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const typedi_1 = require("typedi");
let VariablesFactory = class VariablesFactory {
createVariables() {
return new Variables();
}
};
VariablesFactory = __decorate([
(0, typedi_1.Service)({ id: "VariablesFactory" })
], VariablesFactory);
exports.default = VariablesFactory;
let Variables = class Variables {
constructor() {
this.variables = {};
}
addVariable(key, value) {
this.variables[key] = value;
}
getVariables() {
return this.variables;
}
getVariable(key) {
if (this.variables[key]) {
return this.variables[key];
}
throw new Error(`Variable '${key}' not found`);
}
reset() {
this.variables = {};
}
};
Variables = __decorate([
(0, typedi_1.Service)({ id: "Variables" })
], Variables);
//# sourceMappingURL=Variables.js.map