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

35
node_modules/node-cron/dist/cjs/task-registry.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TaskRegistry = void 0;
const tasks = new Map();
class TaskRegistry {
add(task) {
if (this.has(task.id)) {
throw Error(`task ${task.id} already registred!`);
}
tasks.set(task.id, task);
task.on('task:destroyed', () => {
this.remove(task);
});
}
get(taskId) {
return tasks.get(taskId);
}
remove(task) {
if (this.has(task.id)) {
task?.destroy();
tasks.delete(task.id);
}
}
all() {
return tasks;
}
has(taskId) {
return tasks.has(taskId);
}
killAll() {
tasks.forEach(id => this.remove(id));
}
}
exports.TaskRegistry = TaskRegistry;
//# sourceMappingURL=task-registry.js.map