singularci
Version:
SingularCI is a DSL transpiler used to generate CI/CD configuration files for existing CI platforms
33 lines • 881 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class StageSymbolTable {
constructor() {
this.stages = {};
}
static getInstance() {
if (!this.instance) {
this.instance = new StageSymbolTable();
}
return this.instance;
}
addStage(stage) {
if (this.stages[stage.getName()]) {
throw new Error(`Stage ${stage.getName()} already exists`);
}
this.stages[stage.getName()] = stage;
}
getStage(name) {
if (this.stages[name]) {
return this.stages[name];
}
throw new Error(`Stage ${name} not found`);
}
getStages() {
return this.stages;
}
reset() {
this.stages = {};
}
}
exports.default = StageSymbolTable;
//# sourceMappingURL=StageSymbolTable.js.map