version_final_sans_test

This commit is contained in:
2025-09-23 14:51:00 +02:00
parent b4061e8aff
commit 6577083b06
184 changed files with 19853 additions and 512 deletions

25
node_modules/node-cron/dist/cjs/tasks/state-machine.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StateMachine = void 0;
const allowedTransitions = {
'stopped': ['stopped', 'idle', 'destroyed'],
'idle': ['idle', 'running', 'stopped', 'destroyed'],
'running': ['running', 'idle', 'stopped', 'destroyed'],
'destroyed': ['destroyed']
};
class StateMachine {
state;
constructor(initial = 'stopped') {
this.state = initial;
}
changeState(state) {
if (allowedTransitions[this.state].includes(state)) {
this.state = state;
}
else {
throw new Error(`invalid transition from ${this.state} to ${state}`);
}
}
}
exports.StateMachine = StateMachine;
//# sourceMappingURL=state-machine.js.map