PHP 8.2.30
Preview: state-machine.js Size: 766 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/node-cron/dist/esm/tasks/state-machine.js

"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

Directory Contents

Dirs: 1 × Files: 9

Name Size Perms Modified Actions
- drwxr-xr-x 2026-02-21 00:54:18
Edit Download
1.11 KB lrw-r--r-- 2026-02-21 00:54:18
Edit Download
5.13 KB lrw-r--r-- 2026-02-21 00:53:48
Edit Download
4.69 KB lrw-r--r-- 2026-02-21 00:54:04
Edit Download
1.25 KB lrw-r--r-- 2026-02-21 00:54:22
Edit Download
119 B lrw-r--r-- 2026-02-21 00:54:00
Edit Download
132 B lrw-r--r-- 2026-02-21 00:54:08
Edit Download
209 B lrw-r--r-- 2026-02-21 00:54:22
Edit Download
766 B lrw-r--r-- 2026-02-21 00:54:00
Edit Download
735 B lrw-r--r-- 2026-02-21 00:54:08
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).