@webiny/background-tasks 6.6.0-alpha.0 → 6.6.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/BackgroundTaskRoutes.js +16 -3
- package/admin/BackgroundTaskRoutes.js.map +1 -1
- package/admin/presentation/TaskDetail/components/TaskDetailDrawer.js +6 -0
- package/admin/presentation/TaskDetail/components/TaskDetailDrawer.js.map +1 -1
- package/admin/presentation/TaskExecutions/components/TaskExecutionsView.js +44 -24
- package/admin/presentation/TaskExecutions/components/TaskExecutionsView.js.map +1 -1
- package/api/BackgroundTasksFeature.js +44 -24
- package/api/BackgroundTasksFeature.js.map +1 -1
- package/api/crud/TaskLogPrivateModel.js +2 -1
- package/api/crud/TaskLogPrivateModel.js.map +1 -1
- package/api/crud/TaskPrivateModel.js +2 -1
- package/api/crud/TaskPrivateModel.js.map +1 -1
- package/api/decorators/{SelfCleaningTaskDecorator.d.ts → SelfCleaningTaskHandlerDecorator.d.ts} +21 -18
- package/api/decorators/SelfCleaningTaskHandlerDecorator.js +69 -0
- package/api/decorators/SelfCleaningTaskHandlerDecorator.js.map +1 -0
- package/api/decorators/TaskDefinitionDefaultsDecorator.d.ts +27 -0
- package/api/decorators/TaskDefinitionDefaultsDecorator.js +47 -0
- package/api/decorators/TaskDefinitionDefaultsDecorator.js.map +1 -0
- package/api/domain/errors.d.ts +4 -0
- package/api/domain/errors.js +10 -2
- package/api/domain/errors.js.map +1 -1
- package/api/domain/task/TaskLogModelProvider.d.ts +12 -0
- package/api/domain/task/TaskLogModelProvider.js +23 -0
- package/api/domain/task/TaskLogModelProvider.js.map +1 -0
- package/api/domain/task/TaskLogsRepository.d.ts +34 -0
- package/api/domain/task/TaskLogsRepository.js +146 -0
- package/api/domain/task/TaskLogsRepository.js.map +1 -0
- package/api/domain/task/TaskModelProvider.d.ts +12 -0
- package/api/domain/task/TaskModelProvider.js +23 -0
- package/api/domain/task/TaskModelProvider.js.map +1 -0
- package/api/domain/task/TasksRepository.d.ts +37 -0
- package/api/domain/task/TasksRepository.js +126 -0
- package/api/domain/task/TasksRepository.js.map +1 -0
- package/api/domain/task/abstractions.d.ts +50 -0
- package/api/domain/task/abstractions.js +8 -0
- package/api/domain/task/abstractions.js.map +1 -0
- package/api/domain/task/createRevisionId.d.ts +1 -0
- package/api/domain/task/createRevisionId.js +8 -0
- package/api/domain/task/createRevisionId.js.map +1 -0
- package/api/domain/task/entryToTask.d.ts +3 -0
- package/api/domain/task/entryToTask.js +20 -0
- package/api/domain/task/entryToTask.js.map +1 -0
- package/api/domain/task/entryToTaskLog.d.ts +3 -0
- package/api/domain/task/entryToTaskLog.js +12 -0
- package/api/domain/task/entryToTaskLog.js.map +1 -0
- package/api/features/CleanupTaskSubtree/CleanupTaskSubtreeUseCase.d.ts +25 -5
- package/api/features/CleanupTaskSubtree/CleanupTaskSubtreeUseCase.js +111 -5
- package/api/features/CleanupTaskSubtree/CleanupTaskSubtreeUseCase.js.map +1 -1
- package/api/features/CleanupTaskSubtree/feature.d.ts +4 -0
- package/api/features/CleanupTaskSubtree/feature.js +11 -0
- package/api/features/CleanupTaskSubtree/feature.js.map +1 -0
- package/api/features/CleanupTaskSubtree/index.d.ts +1 -1
- package/api/features/CleanupTaskSubtree/index.js +1 -1
- package/api/features/CreateTask/CreateTaskUseCase.d.ts +17 -0
- package/api/features/CreateTask/CreateTaskUseCase.js +56 -0
- package/api/features/CreateTask/CreateTaskUseCase.js.map +1 -0
- package/api/features/CreateTask/abstractions.d.ts +21 -0
- package/api/features/CreateTask/abstractions.js +5 -0
- package/api/features/CreateTask/abstractions.js.map +1 -0
- package/api/features/{GetTaskDefinition → CreateTask}/feature.d.ts +1 -1
- package/api/features/CreateTask/feature.js +11 -0
- package/api/features/CreateTask/feature.js.map +1 -0
- package/api/features/CreateTask/index.d.ts +2 -0
- package/api/features/CreateTask/index.js +2 -0
- package/api/features/CreateTaskLog/CreateTaskLogUseCase.d.ts +13 -0
- package/api/features/CreateTaskLog/CreateTaskLogUseCase.js +19 -0
- package/api/features/CreateTaskLog/CreateTaskLogUseCase.js.map +1 -0
- package/api/features/CreateTaskLog/abstractions.d.ts +16 -0
- package/api/features/CreateTaskLog/abstractions.js +5 -0
- package/api/features/CreateTaskLog/abstractions.js.map +1 -0
- package/api/features/CreateTaskLog/feature.d.ts +4 -0
- package/api/features/CreateTaskLog/feature.js +11 -0
- package/api/features/CreateTaskLog/feature.js.map +1 -0
- package/api/features/CreateTaskLog/index.d.ts +2 -0
- package/api/features/CreateTaskLog/index.js +2 -0
- package/api/features/DeleteTask/DeleteTaskUseCase.d.ts +14 -0
- package/api/features/DeleteTask/DeleteTaskUseCase.js +34 -0
- package/api/features/DeleteTask/DeleteTaskUseCase.js.map +1 -0
- package/api/features/DeleteTask/abstractions.d.ts +17 -0
- package/api/features/DeleteTask/abstractions.js +5 -0
- package/api/features/DeleteTask/abstractions.js.map +1 -0
- package/api/features/DeleteTask/feature.d.ts +4 -0
- package/api/features/DeleteTask/feature.js +11 -0
- package/api/features/DeleteTask/feature.js.map +1 -0
- package/api/features/DeleteTask/index.d.ts +2 -0
- package/api/features/DeleteTask/index.js +2 -0
- package/api/features/DeleteTaskLog/DeleteTaskLogUseCase.d.ts +11 -0
- package/api/features/DeleteTaskLog/DeleteTaskLogUseCase.js +19 -0
- package/api/features/DeleteTaskLog/DeleteTaskLogUseCase.js.map +1 -0
- package/api/features/DeleteTaskLog/abstractions.d.ts +14 -0
- package/api/features/DeleteTaskLog/abstractions.js +5 -0
- package/api/features/DeleteTaskLog/abstractions.js.map +1 -0
- package/api/features/DeleteTaskLog/feature.d.ts +4 -0
- package/api/features/DeleteTaskLog/feature.js +11 -0
- package/api/features/DeleteTaskLog/feature.js.map +1 -0
- package/api/features/DeleteTaskLog/index.d.ts +2 -0
- package/api/features/DeleteTaskLog/index.js +2 -0
- package/api/features/GetLatestTaskLog/GetLatestTaskLogUseCase.d.ts +11 -0
- package/api/features/GetLatestTaskLog/GetLatestTaskLogUseCase.js +19 -0
- package/api/features/GetLatestTaskLog/GetLatestTaskLogUseCase.js.map +1 -0
- package/api/features/GetLatestTaskLog/abstractions.d.ts +15 -0
- package/api/features/GetLatestTaskLog/abstractions.js +5 -0
- package/api/features/GetLatestTaskLog/abstractions.js.map +1 -0
- package/api/features/GetLatestTaskLog/feature.d.ts +4 -0
- package/api/features/GetLatestTaskLog/feature.js +11 -0
- package/api/features/GetLatestTaskLog/feature.js.map +1 -0
- package/api/features/GetLatestTaskLog/index.d.ts +2 -0
- package/api/features/GetLatestTaskLog/index.js +2 -0
- package/api/features/GetRunnableTaskDefinition/GetRunnableTaskDefinitionUseCase.d.ts +13 -0
- package/api/features/GetRunnableTaskDefinition/GetRunnableTaskDefinitionUseCase.js +51 -0
- package/api/features/GetRunnableTaskDefinition/GetRunnableTaskDefinitionUseCase.js.map +1 -0
- package/api/features/{GetTaskDefinition → GetRunnableTaskDefinition}/abstractions.d.ts +6 -6
- package/api/features/GetRunnableTaskDefinition/abstractions.js +5 -0
- package/api/features/GetRunnableTaskDefinition/abstractions.js.map +1 -0
- package/api/features/GetRunnableTaskDefinition/feature.d.ts +4 -0
- package/api/features/GetRunnableTaskDefinition/feature.js +11 -0
- package/api/features/GetRunnableTaskDefinition/feature.js.map +1 -0
- package/api/features/GetRunnableTaskDefinition/index.d.ts +2 -0
- package/api/features/GetRunnableTaskDefinition/index.js +2 -0
- package/api/features/GetTask/GetTaskUseCase.d.ts +9 -5
- package/api/features/GetTask/GetTaskUseCase.js +12 -4
- package/api/features/GetTask/GetTaskUseCase.js.map +1 -1
- package/api/features/GetTask/abstractions.d.ts +9 -2
- package/api/features/GetTask/abstractions.js.map +1 -1
- package/api/features/GetTask/feature.js +2 -4
- package/api/features/GetTask/feature.js.map +1 -1
- package/api/features/ListTaskLogs/ListTaskLogsUseCase.d.ts +12 -0
- package/api/features/ListTaskLogs/ListTaskLogsUseCase.js +19 -0
- package/api/features/ListTaskLogs/ListTaskLogsUseCase.js.map +1 -0
- package/api/features/ListTaskLogs/abstractions.d.ts +15 -0
- package/api/features/ListTaskLogs/abstractions.js +5 -0
- package/api/features/ListTaskLogs/abstractions.js.map +1 -0
- package/api/features/ListTaskLogs/feature.d.ts +4 -0
- package/api/features/ListTaskLogs/feature.js +11 -0
- package/api/features/ListTaskLogs/feature.js.map +1 -0
- package/api/features/ListTaskLogs/index.d.ts +2 -0
- package/api/features/ListTaskLogs/index.js +2 -0
- package/api/features/ListTasks/ListTasksUseCase.d.ts +9 -6
- package/api/features/ListTasks/ListTasksUseCase.js +12 -4
- package/api/features/ListTasks/ListTasksUseCase.js.map +1 -1
- package/api/features/ListTasks/abstractions.d.ts +9 -3
- package/api/features/ListTasks/abstractions.js.map +1 -1
- package/api/features/ListTasks/feature.js +2 -4
- package/api/features/ListTasks/feature.js.map +1 -1
- package/api/features/ListVisibleTaskDefinitions/ListVisibleTaskDefinitionsUseCase.d.ts +11 -0
- package/api/features/ListVisibleTaskDefinitions/ListVisibleTaskDefinitionsUseCase.js +19 -0
- package/api/features/ListVisibleTaskDefinitions/ListVisibleTaskDefinitionsUseCase.js.map +1 -0
- package/api/features/ListVisibleTaskDefinitions/abstractions.d.ts +9 -0
- package/api/features/ListVisibleTaskDefinitions/abstractions.js +5 -0
- package/api/features/ListVisibleTaskDefinitions/abstractions.js.map +1 -0
- package/api/features/ListVisibleTaskDefinitions/feature.d.ts +4 -0
- package/api/features/ListVisibleTaskDefinitions/feature.js +11 -0
- package/api/features/ListVisibleTaskDefinitions/feature.js.map +1 -0
- package/api/features/ListVisibleTaskDefinitions/index.d.ts +2 -0
- package/api/features/ListVisibleTaskDefinitions/index.js +2 -0
- package/api/features/TaskHandlerResolver/TaskHandlerResolver.d.ts +12 -0
- package/api/features/TaskHandlerResolver/TaskHandlerResolver.js +19 -0
- package/api/features/TaskHandlerResolver/TaskHandlerResolver.js.map +1 -0
- package/api/features/TaskHandlerResolver/abstractions.d.ts +17 -0
- package/api/features/TaskHandlerResolver/abstractions.js +5 -0
- package/api/features/TaskHandlerResolver/abstractions.js.map +1 -0
- package/api/features/TaskHandlerResolver/feature.d.ts +9 -0
- package/api/features/TaskHandlerResolver/feature.js +11 -0
- package/api/features/TaskHandlerResolver/feature.js.map +1 -0
- package/api/features/TaskHandlerResolver/index.d.ts +2 -0
- package/api/features/TaskHandlerResolver/index.js +2 -0
- package/api/features/TaskService/BackgroundTaskService.d.ts +42 -0
- package/api/features/TaskService/BackgroundTaskService.js +191 -0
- package/api/features/TaskService/BackgroundTaskService.js.map +1 -0
- package/api/features/TaskService/feature.d.ts +4 -0
- package/api/features/TaskService/feature.js +11 -0
- package/api/features/TaskService/feature.js.map +1 -0
- package/api/features/TaskService/index.d.ts +1 -0
- package/api/features/TaskService/index.js +1 -0
- package/api/features/TriggerVisibleTask/TriggerVisibleTaskUseCase.d.ts +15 -0
- package/api/features/TriggerVisibleTask/TriggerVisibleTaskUseCase.js +26 -0
- package/api/features/TriggerVisibleTask/TriggerVisibleTaskUseCase.js.map +1 -0
- package/api/features/TriggerVisibleTask/abstractions.d.ts +17 -0
- package/api/features/TriggerVisibleTask/abstractions.js +5 -0
- package/api/features/TriggerVisibleTask/abstractions.js.map +1 -0
- package/api/features/TriggerVisibleTask/feature.d.ts +4 -0
- package/api/features/TriggerVisibleTask/feature.js +11 -0
- package/api/features/TriggerVisibleTask/feature.js.map +1 -0
- package/api/features/TriggerVisibleTask/index.d.ts +2 -0
- package/api/features/TriggerVisibleTask/index.js +2 -0
- package/api/features/UpdateBackgroundTaskSettings/UpdateBackgroundTaskSettingsRepository.js +3 -1
- package/api/features/UpdateBackgroundTaskSettings/UpdateBackgroundTaskSettingsRepository.js.map +1 -1
- package/api/features/UpdateTask/UpdateTaskUseCase.d.ts +17 -0
- package/api/features/UpdateTask/UpdateTaskUseCase.js +36 -0
- package/api/features/UpdateTask/UpdateTaskUseCase.js.map +1 -0
- package/api/features/UpdateTask/abstractions.d.ts +22 -0
- package/api/features/UpdateTask/abstractions.js +5 -0
- package/api/features/UpdateTask/abstractions.js.map +1 -0
- package/api/features/UpdateTask/feature.d.ts +4 -0
- package/api/features/UpdateTask/feature.js +11 -0
- package/api/features/UpdateTask/feature.js.map +1 -0
- package/api/features/UpdateTask/index.d.ts +2 -0
- package/api/features/UpdateTask/index.js +2 -0
- package/api/features/UpdateTaskLog/UpdateTaskLogUseCase.d.ts +12 -0
- package/api/features/UpdateTaskLog/UpdateTaskLogUseCase.js +19 -0
- package/api/features/UpdateTaskLog/UpdateTaskLogUseCase.js.map +1 -0
- package/api/features/UpdateTaskLog/abstractions.d.ts +16 -0
- package/api/features/UpdateTaskLog/abstractions.js +5 -0
- package/api/features/UpdateTaskLog/abstractions.js.map +1 -0
- package/api/features/UpdateTaskLog/feature.d.ts +4 -0
- package/api/features/UpdateTaskLog/feature.js +11 -0
- package/api/features/UpdateTaskLog/feature.js.map +1 -0
- package/api/features/UpdateTaskLog/index.d.ts +2 -0
- package/api/features/UpdateTaskLog/index.js +2 -0
- package/api/graphql/BackgroundTasksGraphQLSchema.d.ts +29 -0
- package/api/graphql/BackgroundTasksGraphQLSchema.js +462 -0
- package/api/graphql/BackgroundTasksGraphQLSchema.js.map +1 -0
- package/api/index.d.ts +11 -2
- package/api/index.js +11 -2
- package/api/runner/TaskControl.d.ts +35 -1
- package/api/runner/TaskControl.js +52 -42
- package/api/runner/TaskControl.js.map +1 -1
- package/api/runner/TaskManager.d.ts +12 -1
- package/api/runner/TaskManager.js +11 -10
- package/api/runner/TaskManager.js.map +1 -1
- package/api/runner/TaskManagerStore.d.ts +16 -0
- package/api/runner/TaskManagerStore.js +23 -7
- package/api/runner/TaskManagerStore.js.map +1 -1
- package/api/runner/TaskRunner.js +35 -4
- package/api/runner/TaskRunner.js.map +1 -1
- package/api/tasks/testingRunTask.d.ts +10 -2
- package/api/tasks/testingRunTask.js +10 -3
- package/api/tasks/testingRunTask.js.map +1 -1
- package/api/types.d.ts +1 -48
- package/api/types.js.map +1 -1
- package/package.json +28 -32
- package/testing/index.d.ts +3 -0
- package/testing/index.js +2 -0
- package/testing/mockTaskTriggerTransportPlugin.d.ts +2 -0
- package/testing/mockTaskTriggerTransportPlugin.js +18 -0
- package/testing/mockTaskTriggerTransportPlugin.js.map +1 -0
- package/testing/runner.d.ts +19 -0
- package/testing/runner.js +44 -0
- package/testing/runner.js.map +1 -0
- package/api/TasksCrud.d.ts +0 -10
- package/api/TasksCrud.js +0 -5
- package/api/TasksCrud.js.map +0 -1
- package/api/crud/cleanupTaskSubtree.d.ts +0 -8
- package/api/crud/cleanupTaskSubtree.js +0 -63
- package/api/crud/cleanupTaskSubtree.js.map +0 -1
- package/api/crud/crud.tasks.d.ts +0 -3
- package/api/crud/crud.tasks.js +0 -318
- package/api/crud/crud.tasks.js.map +0 -1
- package/api/crud/definition.tasks.d.ts +0 -3
- package/api/crud/definition.tasks.js +0 -17
- package/api/crud/definition.tasks.js.map +0 -1
- package/api/crud/service.tasks.d.ts +0 -3
- package/api/crud/service.tasks.js +0 -132
- package/api/crud/service.tasks.js.map +0 -1
- package/api/decorators/RunnableTaskDecorator.d.ts +0 -32
- package/api/decorators/RunnableTaskDecorator.js +0 -69
- package/api/decorators/RunnableTaskDecorator.js.map +0 -1
- package/api/decorators/SelfCleaningTaskDecorator.js +0 -84
- package/api/decorators/SelfCleaningTaskDecorator.js.map +0 -1
- package/api/features/GetTaskDefinition/GetTaskDefinitionUseCase.d.ts +0 -12
- package/api/features/GetTaskDefinition/GetTaskDefinitionUseCase.js +0 -27
- package/api/features/GetTaskDefinition/GetTaskDefinitionUseCase.js.map +0 -1
- package/api/features/GetTaskDefinition/abstractions.js +0 -5
- package/api/features/GetTaskDefinition/abstractions.js.map +0 -1
- package/api/features/GetTaskDefinition/feature.js +0 -11
- package/api/features/GetTaskDefinition/feature.js.map +0 -1
- package/api/features/GetTaskDefinition/index.d.ts +0 -2
- package/api/features/GetTaskDefinition/index.js +0 -2
- package/api/graphql/BackgroundTasksContextualSchema.d.ts +0 -21
- package/api/graphql/BackgroundTasksContextualSchema.js +0 -369
- package/api/graphql/BackgroundTasksContextualSchema.js.map +0 -1
- package/api/service/createService.d.ts +0 -6
- package/api/service/createService.js +0 -11
- package/api/service/createService.js.map +0 -1
- package/api/service/index.d.ts +0 -1
- package/api/service/index.js +0 -1
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import camelCase from "lodash/camelCase.js";
|
|
2
|
-
import error from "@webiny/error";
|
|
3
|
-
import { TaskDefinition } from "@webiny/api-core/features/task/TaskDefinition/index.js";
|
|
4
|
-
const DEFAULT_MAX_ITERATIONS = 50;
|
|
5
|
-
class RunnableTaskDecoratorImpl {
|
|
6
|
-
constructor(decoratee){
|
|
7
|
-
this.decoratee = decoratee;
|
|
8
|
-
this.validate();
|
|
9
|
-
}
|
|
10
|
-
get id() {
|
|
11
|
-
return this.decoratee.id;
|
|
12
|
-
}
|
|
13
|
-
get title() {
|
|
14
|
-
return this.decoratee.title;
|
|
15
|
-
}
|
|
16
|
-
get description() {
|
|
17
|
-
return this.decoratee.description;
|
|
18
|
-
}
|
|
19
|
-
get isPrivate() {
|
|
20
|
-
return this.decoratee.isPrivate || false;
|
|
21
|
-
}
|
|
22
|
-
get databaseLogs() {
|
|
23
|
-
return this.decoratee.databaseLogs || false;
|
|
24
|
-
}
|
|
25
|
-
get maxIterations() {
|
|
26
|
-
return this.decoratee.maxIterations || DEFAULT_MAX_ITERATIONS;
|
|
27
|
-
}
|
|
28
|
-
get selfCleanup() {
|
|
29
|
-
return this.decoratee.selfCleanup;
|
|
30
|
-
}
|
|
31
|
-
get createInputValidation() {
|
|
32
|
-
return this.decoratee.createInputValidation;
|
|
33
|
-
}
|
|
34
|
-
get run() {
|
|
35
|
-
return this.decoratee.run.bind(this.decoratee);
|
|
36
|
-
}
|
|
37
|
-
get onBeforeTrigger() {
|
|
38
|
-
return this.decoratee.onBeforeTrigger?.bind(this.decoratee);
|
|
39
|
-
}
|
|
40
|
-
get onDone() {
|
|
41
|
-
return this.decoratee.onDone?.bind(this.decoratee);
|
|
42
|
-
}
|
|
43
|
-
get onError() {
|
|
44
|
-
return this.decoratee.onError?.bind(this.decoratee);
|
|
45
|
-
}
|
|
46
|
-
get onAbort() {
|
|
47
|
-
return this.decoratee.onAbort?.bind(this.decoratee);
|
|
48
|
-
}
|
|
49
|
-
get onMaxIterations() {
|
|
50
|
-
return this.decoratee.onMaxIterations?.bind(this.decoratee);
|
|
51
|
-
}
|
|
52
|
-
validate() {
|
|
53
|
-
if (camelCase(this.decoratee.id) !== this.decoratee.id) {
|
|
54
|
-
const message = `Task ID "${this.decoratee.id}" is invalid. It must be in camelCase format, for example: "myCustomTask".`;
|
|
55
|
-
console.log(message);
|
|
56
|
-
throw new error(message);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
getTask() {
|
|
60
|
-
return this;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
const RunnableTaskDecorator = TaskDefinition.createDecorator({
|
|
64
|
-
decorator: RunnableTaskDecoratorImpl,
|
|
65
|
-
dependencies: []
|
|
66
|
-
});
|
|
67
|
-
export { RunnableTaskDecorator };
|
|
68
|
-
|
|
69
|
-
//# sourceMappingURL=RunnableTaskDecorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api/decorators/RunnableTaskDecorator.js","sources":["../../../src/api/decorators/RunnableTaskDecorator.ts"],"sourcesContent":["import camelCase from \"lodash/camelCase.js\";\nimport WebinyError from \"@webiny/error\";\nimport { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport type { ITaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\n\nconst DEFAULT_MAX_ITERATIONS = 50;\n\n/**\n * RunnableTaskDecorator adds runtime behavior to TaskDefinition:\n * - Applies default values (maxIterations, isPrivate, databaseLogs, fields)\n * - Validates task ID (must be camelCase)\n * - Provides field management methods\n */\nclass RunnableTaskDecoratorImpl implements TaskDefinition.Interface {\n constructor(private decoratee: TaskDefinition.Interface) {\n this.validate();\n }\n\n // Delegate simple properties\n get id() {\n return this.decoratee.id;\n }\n\n get title() {\n return this.decoratee.title;\n }\n\n get description() {\n return this.decoratee.description;\n }\n\n // Apply default values\n get isPrivate() {\n return this.decoratee.isPrivate || false;\n }\n\n get databaseLogs() {\n return this.decoratee.databaseLogs || false;\n }\n\n get maxIterations() {\n return this.decoratee.maxIterations || DEFAULT_MAX_ITERATIONS;\n }\n\n get selfCleanup() {\n return this.decoratee.selfCleanup;\n }\n\n get createInputValidation() {\n return this.decoratee.createInputValidation;\n }\n\n // Delegate lifecycle methods (bind to preserve context)\n get run() {\n return this.decoratee.run.bind(this.decoratee);\n }\n\n get onBeforeTrigger() {\n return this.decoratee.onBeforeTrigger?.bind(this.decoratee);\n }\n\n get onDone() {\n return this.decoratee.onDone?.bind(this.decoratee);\n }\n\n get onError() {\n return this.decoratee.onError?.bind(this.decoratee);\n }\n\n get onAbort() {\n return this.decoratee.onAbort?.bind(this.decoratee);\n }\n\n get onMaxIterations() {\n return this.decoratee.onMaxIterations?.bind(this.decoratee);\n }\n\n // Validation logic\n private validate(): void {\n if (camelCase(this.decoratee.id) !== this.decoratee.id) {\n const message = `Task ID \"${this.decoratee.id}\" is invalid. It must be in camelCase format, for example: \"myCustomTask\".`;\n console.log(message);\n throw new WebinyError(message);\n }\n }\n\n // Method to get the underlying task (for compatibility with existing code)\n public getTask(): ITaskDefinition {\n return this;\n }\n}\n\nexport const RunnableTaskDecorator = TaskDefinition.createDecorator({\n decorator: RunnableTaskDecoratorImpl,\n dependencies: []\n});\n"],"names":["DEFAULT_MAX_ITERATIONS","RunnableTaskDecoratorImpl","decoratee","camelCase","message","console","WebinyError","RunnableTaskDecorator","TaskDefinition"],"mappings":";;;AAKA,MAAMA,yBAAyB;AAQ/B,MAAMC;IACF,YAAoBC,SAAmC,CAAE;aAArCA,SAAS,GAATA;QAChB,IAAI,CAAC,QAAQ;IACjB;IAGA,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE;IAC5B;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;IAC/B;IAEA,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW;IACrC;IAGA,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI;IACvC;IAEA,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,IAAI;IAC1C;IAEA,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,IAAIF;IAC3C;IAEA,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW;IACrC;IAEA,IAAI,wBAAwB;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC,qBAAqB;IAC/C;IAGA,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS;IACjD;IAEA,IAAI,kBAAkB;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,KAAK,IAAI,CAAC,SAAS;IAC9D;IAEA,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,SAAS;IACrD;IAEA,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC,SAAS;IACtD;IAEA,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC,SAAS;IACtD;IAEA,IAAI,kBAAkB;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,KAAK,IAAI,CAAC,SAAS;IAC9D;IAGQ,WAAiB;QACrB,IAAIG,UAAU,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE;YACpD,MAAMC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,0EAA0E,CAAC;YACzHC,QAAQ,GAAG,CAACD;YACZ,MAAM,IAAIE,MAAYF;QAC1B;IACJ;IAGO,UAA2B;QAC9B,OAAO,IAAI;IACf;AACJ;AAEO,MAAMG,wBAAwBC,eAAe,eAAe,CAAC;IAChE,WAAWP;IACX,cAAc,EAAE;AACpB"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { TaskDefinition } from "@webiny/api-core/features/task/TaskDefinition/index.js";
|
|
2
|
-
import { normalizeSelfCleanup } from "../utils/normalizeSelfCleanup.js";
|
|
3
|
-
import { CleanupTaskSubtreeUseCase } from "../features/CleanupTaskSubtree/index.js";
|
|
4
|
-
import { getErrorProperties } from "../utils/getErrorProperties.js";
|
|
5
|
-
class SelfCleaningTaskDecoratorImpl {
|
|
6
|
-
constructor(cleanupTaskSubtree, decoratee){
|
|
7
|
-
this.cleanupTaskSubtree = cleanupTaskSubtree;
|
|
8
|
-
this.decoratee = decoratee;
|
|
9
|
-
this.events = normalizeSelfCleanup(decoratee.selfCleanup);
|
|
10
|
-
}
|
|
11
|
-
get id() {
|
|
12
|
-
return this.decoratee.id;
|
|
13
|
-
}
|
|
14
|
-
get title() {
|
|
15
|
-
return this.decoratee.title;
|
|
16
|
-
}
|
|
17
|
-
get description() {
|
|
18
|
-
return this.decoratee.description;
|
|
19
|
-
}
|
|
20
|
-
get isPrivate() {
|
|
21
|
-
return this.decoratee.isPrivate;
|
|
22
|
-
}
|
|
23
|
-
get maxIterations() {
|
|
24
|
-
return this.decoratee.maxIterations;
|
|
25
|
-
}
|
|
26
|
-
get selfCleanup() {
|
|
27
|
-
return this.decoratee.selfCleanup;
|
|
28
|
-
}
|
|
29
|
-
get createInputValidation() {
|
|
30
|
-
return this.decoratee.createInputValidation;
|
|
31
|
-
}
|
|
32
|
-
get run() {
|
|
33
|
-
return this.decoratee.run.bind(this.decoratee);
|
|
34
|
-
}
|
|
35
|
-
get onBeforeTrigger() {
|
|
36
|
-
return this.decoratee.onBeforeTrigger?.bind(this.decoratee);
|
|
37
|
-
}
|
|
38
|
-
get onMaxIterations() {
|
|
39
|
-
return this.decoratee.onMaxIterations?.bind(this.decoratee);
|
|
40
|
-
}
|
|
41
|
-
get databaseLogs() {
|
|
42
|
-
if (this.events.size > 0) return false;
|
|
43
|
-
return this.decoratee.databaseLogs;
|
|
44
|
-
}
|
|
45
|
-
get onDone() {
|
|
46
|
-
return async (params)=>{
|
|
47
|
-
await this.safeCall(this.decoratee.onDone, params, "onDone");
|
|
48
|
-
if (this.events.has("onSuccess")) await this.runCleanup(params);
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
get onError() {
|
|
52
|
-
return async (params)=>{
|
|
53
|
-
await this.safeCall(this.decoratee.onError, params, "onError");
|
|
54
|
-
if (this.events.has("onError")) await this.runCleanup(params);
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
get onAbort() {
|
|
58
|
-
return async (params)=>{
|
|
59
|
-
await this.safeCall(this.decoratee.onAbort, params, "onAbort");
|
|
60
|
-
if (this.events.has("onAbort")) await this.runCleanup(params);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
async runCleanup(params) {
|
|
64
|
-
await this.cleanupTaskSubtree.execute(params.task.id);
|
|
65
|
-
}
|
|
66
|
-
async safeCall(hook, params, name) {
|
|
67
|
-
if (!hook) return;
|
|
68
|
-
try {
|
|
69
|
-
await hook.call(this.decoratee, params);
|
|
70
|
-
} catch (ex) {
|
|
71
|
-
console.error(`Error executing ${name} hook for task "${params.task.id}".`);
|
|
72
|
-
console.log(getErrorProperties(ex));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
const SelfCleaningTaskDecorator = TaskDefinition.createDecorator({
|
|
77
|
-
decorator: SelfCleaningTaskDecoratorImpl,
|
|
78
|
-
dependencies: [
|
|
79
|
-
CleanupTaskSubtreeUseCase
|
|
80
|
-
]
|
|
81
|
-
});
|
|
82
|
-
export { SelfCleaningTaskDecorator, SelfCleaningTaskDecoratorImpl };
|
|
83
|
-
|
|
84
|
-
//# sourceMappingURL=SelfCleaningTaskDecorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api/decorators/SelfCleaningTaskDecorator.js","sources":["../../../src/api/decorators/SelfCleaningTaskDecorator.ts"],"sourcesContent":["import { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport type { ISelfCleanupEvent } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport { normalizeSelfCleanup } from \"~/api/utils/normalizeSelfCleanup.js\";\nimport { CleanupTaskSubtreeUseCase } from \"~/api/features/CleanupTaskSubtree/index.js\";\nimport { getErrorProperties } from \"~/api/utils/getErrorProperties.js\";\n\ntype LifecycleHook = TaskDefinition.Interface[\"onDone\"];\ntype HookParams = Parameters<NonNullable<LifecycleHook>>[0];\n\nexport class SelfCleaningTaskDecoratorImpl implements TaskDefinition.Interface {\n private readonly events: ReadonlySet<ISelfCleanupEvent>;\n\n public constructor(\n private readonly cleanupTaskSubtree: CleanupTaskSubtreeUseCase.Interface,\n private decoratee: TaskDefinition.Interface\n ) {\n this.events = normalizeSelfCleanup(decoratee.selfCleanup);\n }\n\n // Pass-through properties.\n get id() {\n return this.decoratee.id;\n }\n get title() {\n return this.decoratee.title;\n }\n get description() {\n return this.decoratee.description;\n }\n get isPrivate() {\n return this.decoratee.isPrivate;\n }\n get maxIterations() {\n return this.decoratee.maxIterations;\n }\n get selfCleanup() {\n return this.decoratee.selfCleanup;\n }\n get createInputValidation() {\n return this.decoratee.createInputValidation;\n }\n get run() {\n return this.decoratee.run.bind(this.decoratee);\n }\n get onBeforeTrigger() {\n return this.decoratee.onBeforeTrigger?.bind(this.decoratee);\n }\n get onMaxIterations() {\n return this.decoratee.onMaxIterations?.bind(this.decoratee);\n }\n\n // databaseLogs override — any non-empty event set forces false.\n get databaseLogs() {\n if (this.events.size > 0) {\n return false;\n }\n return this.decoratee.databaseLogs;\n }\n\n // Always-defined lifecycle hooks. Each runs the user's hook first, then\n // triggers cleanup if the matching event is in the set.\n get onDone() {\n return async (params: HookParams) => {\n await this.safeCall(this.decoratee.onDone, params, \"onDone\");\n if (this.events.has(\"onSuccess\")) {\n await this.runCleanup(params);\n }\n };\n }\n\n get onError() {\n return async (params: HookParams) => {\n await this.safeCall(this.decoratee.onError, params, \"onError\");\n if (this.events.has(\"onError\")) {\n await this.runCleanup(params);\n }\n };\n }\n\n get onAbort() {\n return async (params: HookParams) => {\n await this.safeCall(this.decoratee.onAbort, params, \"onAbort\");\n if (this.events.has(\"onAbort\")) {\n await this.runCleanup(params);\n }\n };\n }\n\n private async runCleanup(params: HookParams): Promise<void> {\n await this.cleanupTaskSubtree.execute(params.task.id);\n }\n\n private async safeCall(\n hook: LifecycleHook | undefined,\n params: HookParams,\n name: string\n ): Promise<void> {\n if (!hook) {\n return;\n }\n try {\n await hook.call(this.decoratee, params);\n } catch (ex) {\n console.error(`Error executing ${name} hook for task \"${params.task.id}\".`);\n console.log(getErrorProperties(ex));\n }\n }\n}\n\nexport const SelfCleaningTaskDecorator = TaskDefinition.createDecorator({\n decorator: SelfCleaningTaskDecoratorImpl,\n dependencies: [CleanupTaskSubtreeUseCase]\n});\n"],"names":["SelfCleaningTaskDecoratorImpl","cleanupTaskSubtree","decoratee","normalizeSelfCleanup","params","hook","name","ex","console","getErrorProperties","SelfCleaningTaskDecorator","TaskDefinition","CleanupTaskSubtreeUseCase"],"mappings":";;;;AASO,MAAMA;IAGT,YACqBC,kBAAuD,EAChEC,SAAmC,CAC7C;aAFmBD,kBAAkB,GAAlBA;aACTC,SAAS,GAATA;QAER,IAAI,CAAC,MAAM,GAAGC,qBAAqBD,UAAU,WAAW;IAC5D;IAGA,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE;IAC5B;IACA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;IAC/B;IACA,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW;IACrC;IACA,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS;IACnC;IACA,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa;IACvC;IACA,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW;IACrC;IACA,IAAI,wBAAwB;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC,qBAAqB;IAC/C;IACA,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS;IACjD;IACA,IAAI,kBAAkB;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,KAAK,IAAI,CAAC,SAAS;IAC9D;IACA,IAAI,kBAAkB;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,KAAK,IAAI,CAAC,SAAS;IAC9D;IAGA,IAAI,eAAe;QACf,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,GACnB,OAAO;QAEX,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY;IACtC;IAIA,IAAI,SAAS;QACT,OAAO,OAAOE;YACV,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAEA,QAAQ;YACnD,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,cAChB,MAAM,IAAI,CAAC,UAAU,CAACA;QAE9B;IACJ;IAEA,IAAI,UAAU;QACV,OAAO,OAAOA;YACV,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAEA,QAAQ;YACpD,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAChB,MAAM,IAAI,CAAC,UAAU,CAACA;QAE9B;IACJ;IAEA,IAAI,UAAU;QACV,OAAO,OAAOA;YACV,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAEA,QAAQ;YACpD,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAChB,MAAM,IAAI,CAAC,UAAU,CAACA;QAE9B;IACJ;IAEA,MAAc,WAAWA,MAAkB,EAAiB;QACxD,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAACA,OAAO,IAAI,CAAC,EAAE;IACxD;IAEA,MAAc,SACVC,IAA+B,EAC/BD,MAAkB,EAClBE,IAAY,EACC;QACb,IAAI,CAACD,MACD;QAEJ,IAAI;YACA,MAAMA,KAAK,IAAI,CAAC,IAAI,CAAC,SAAS,EAAED;QACpC,EAAE,OAAOG,IAAI;YACTC,QAAQ,KAAK,CAAC,CAAC,gBAAgB,EAAEF,KAAK,gBAAgB,EAAEF,OAAO,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;YAC1EI,QAAQ,GAAG,CAACC,mBAAmBF;QACnC;IACJ;AACJ;AAEO,MAAMG,4BAA4BC,eAAe,eAAe,CAAC;IACpE,WAAWX;IACX,cAAc;QAACY;KAA0B;AAC7C"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Result } from "@webiny/feature/api";
|
|
2
|
-
import { GetTaskDefinitionUseCase as UseCaseAbstraction } from "./abstractions.js";
|
|
3
|
-
import { TaskDefinition } from "@webiny/api-core/features/task/TaskDefinition/index.js";
|
|
4
|
-
declare class GetTaskDefinitionUseCaseImpl implements UseCaseAbstraction.Interface {
|
|
5
|
-
private definitions;
|
|
6
|
-
constructor(definitions: TaskDefinition.Interface[]);
|
|
7
|
-
execute<I extends TaskDefinition.TaskInput = TaskDefinition.TaskInput, O extends TaskDefinition.TaskOutput = TaskDefinition.TaskOutput>(id: string): Result<TaskDefinition.Runnable<I, O>, UseCaseAbstraction.Error>;
|
|
8
|
-
}
|
|
9
|
-
export declare const GetTaskDefinitionUseCase: typeof GetTaskDefinitionUseCaseImpl & {
|
|
10
|
-
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetTaskDefinitionUseCase>;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Result } from "@webiny/feature/api";
|
|
2
|
-
import { GetTaskDefinitionUseCase } from "./abstractions.js";
|
|
3
|
-
import { TaskDefinition } from "@webiny/api-core/features/task/TaskDefinition/index.js";
|
|
4
|
-
import { TaskDefinitionNotFoundError } from "../../domain/errors.js";
|
|
5
|
-
class GetTaskDefinitionUseCaseImpl {
|
|
6
|
-
constructor(definitions){
|
|
7
|
-
this.definitions = definitions;
|
|
8
|
-
}
|
|
9
|
-
execute(id) {
|
|
10
|
-
for (const definition of this.definitions)if (definition.id === id) return Result.ok(definition);
|
|
11
|
-
return Result.fail(new TaskDefinitionNotFoundError(id));
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
const GetTaskDefinitionUseCase_GetTaskDefinitionUseCase = GetTaskDefinitionUseCase.createImplementation({
|
|
15
|
-
implementation: GetTaskDefinitionUseCaseImpl,
|
|
16
|
-
dependencies: [
|
|
17
|
-
[
|
|
18
|
-
TaskDefinition,
|
|
19
|
-
{
|
|
20
|
-
multiple: true
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
]
|
|
24
|
-
});
|
|
25
|
-
export { GetTaskDefinitionUseCase_GetTaskDefinitionUseCase as GetTaskDefinitionUseCase };
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=GetTaskDefinitionUseCase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api/features/GetTaskDefinition/GetTaskDefinitionUseCase.js","sources":["../../../../src/api/features/GetTaskDefinition/GetTaskDefinitionUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { GetTaskDefinitionUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport { TaskDefinitionNotFoundError } from \"~/api/domain/errors.js\";\n\nclass GetTaskDefinitionUseCaseImpl implements UseCaseAbstraction.Interface {\n public constructor(private definitions: TaskDefinition.Interface[]) {}\n\n public execute<\n I extends TaskDefinition.TaskInput = TaskDefinition.TaskInput,\n O extends TaskDefinition.TaskOutput = TaskDefinition.TaskOutput\n >(id: string): Result<TaskDefinition.Runnable<I, O>, UseCaseAbstraction.Error> {\n for (const definition of this.definitions) {\n if (definition.id === id) {\n return Result.ok(definition as TaskDefinition.Runnable<I, O>);\n }\n }\n\n return Result.fail(new TaskDefinitionNotFoundError(id));\n }\n}\n\nexport const GetTaskDefinitionUseCase = UseCaseAbstraction.createImplementation({\n implementation: GetTaskDefinitionUseCaseImpl,\n dependencies: [[TaskDefinition, { multiple: true }]]\n});\n"],"names":["GetTaskDefinitionUseCaseImpl","definitions","id","definition","Result","TaskDefinitionNotFoundError","GetTaskDefinitionUseCase","UseCaseAbstraction","TaskDefinition"],"mappings":";;;;AAKA,MAAMA;IACF,YAA2BC,WAAuC,CAAE;aAAzCA,WAAW,GAAXA;IAA0C;IAE9D,QAGLC,EAAU,EAAmE;QAC3E,KAAK,MAAMC,cAAc,IAAI,CAAC,WAAW,CACrC,IAAIA,WAAW,EAAE,KAAKD,IAClB,OAAOE,OAAO,EAAE,CAACD;QAIzB,OAAOC,OAAO,IAAI,CAAC,IAAIC,4BAA4BH;IACvD;AACJ;AAEO,MAAMI,oDAA2BC,yBAAAA,oBAAuC,CAAC;IAC5E,gBAAgBP;IAChB,cAAc;QAAC;YAACQ;YAAgB;gBAAE,UAAU;YAAK;SAAE;KAAC;AACxD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api/features/GetTaskDefinition/abstractions.js","sources":["../../../../src/api/features/GetTaskDefinition/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { Result } from \"@webiny/feature/api\";\nimport type { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport type { TaskDefinitionNotFoundError } from \"~/api/domain/errors.js\";\n\nexport interface IGetTaskDefinitionUseCase {\n execute<\n I extends TaskDefinition.TaskInput = TaskDefinition.TaskInput,\n O extends TaskDefinition.TaskOutput = TaskDefinition.TaskOutput\n >(\n id: string\n ): Result<TaskDefinition.Runnable<I, O>, UseCaseError>;\n}\n\nexport interface IGetTaskDefinitionUseCaseErrors {\n notFound: TaskDefinitionNotFoundError;\n}\n\ntype UseCaseError = IGetTaskDefinitionUseCaseErrors[keyof IGetTaskDefinitionUseCaseErrors];\n\nexport const GetTaskDefinitionUseCase = createAbstraction<IGetTaskDefinitionUseCase>(\n \"Tasks/GetTaskDefinitionUseCase\"\n);\n\nexport namespace GetTaskDefinitionUseCase {\n export type Interface = IGetTaskDefinitionUseCase;\n\n export type Error = UseCaseError;\n export type Return<\n I extends TaskDefinition.TaskInput = TaskDefinition.TaskInput,\n O extends TaskDefinition.TaskOutput = TaskDefinition.TaskOutput\n > = Result<TaskDefinition.Runnable<I, O>, UseCaseError>;\n}\n"],"names":["GetTaskDefinitionUseCase","createAbstraction"],"mappings":";AAoBO,MAAMA,2BAA2BC,kBACpC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createFeature } from "@webiny/feature/api";
|
|
2
|
-
import { GetTaskDefinitionUseCase } from "./GetTaskDefinitionUseCase.js";
|
|
3
|
-
const GetTaskDefinitionFeature = createFeature({
|
|
4
|
-
name: "GetTaskDefinition",
|
|
5
|
-
register (container) {
|
|
6
|
-
container.register(GetTaskDefinitionUseCase);
|
|
7
|
-
}
|
|
8
|
-
});
|
|
9
|
-
export { GetTaskDefinitionFeature };
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=feature.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api/features/GetTaskDefinition/feature.js","sources":["../../../../src/api/features/GetTaskDefinition/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { GetTaskDefinitionUseCase } from \"./GetTaskDefinitionUseCase.js\";\n\nexport const GetTaskDefinitionFeature = createFeature({\n name: \"GetTaskDefinition\",\n register(container) {\n container.register(GetTaskDefinitionUseCase);\n }\n});\n"],"names":["GetTaskDefinitionFeature","createFeature","container","GetTaskDefinitionUseCase"],"mappings":";;AAGO,MAAMA,2BAA2BC,cAAc;IAClD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;IACvB;AACJ"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { GraphQLSchema } from "graphql";
|
|
2
|
-
import type { IGraphQLContextualSchema } from "@webiny/api-graphql";
|
|
3
|
-
import { TenantContext } from "@webiny/api-core/features/tenancy/TenantContext/abstractions.js";
|
|
4
|
-
import { IdentityContext } from "@webiny/api-core/features/security/IdentityContext/abstractions.js";
|
|
5
|
-
/**
|
|
6
|
-
* Builds the background-tasks GraphQL schema after context enhancement — the schema shape depends on
|
|
7
|
-
* the per-tenant CMS task/log content models, so it can only be rendered at request time (once the
|
|
8
|
-
* tenant is known and the CMS facade is resolvable). Replaces the legacy `createBackgroundTaskGraphQL`
|
|
9
|
-
* + `createBackgroundTaskSettingsGraphQL` ContextPlugins; the settings schema is merged in here
|
|
10
|
-
* because it extends the task schema's `WebinyBackgroundTaskQuery`/`Mutation` types.
|
|
11
|
-
*/
|
|
12
|
-
declare class BackgroundTasksContextualSchemaImpl implements IGraphQLContextualSchema {
|
|
13
|
-
private tenantCtx;
|
|
14
|
-
private identityCtx;
|
|
15
|
-
constructor(tenantCtx: TenantContext.Interface, identityCtx: IdentityContext.Interface);
|
|
16
|
-
build(ctx: Record<string, any>): Promise<GraphQLSchema>;
|
|
17
|
-
}
|
|
18
|
-
export declare const BackgroundTasksContextualSchema: typeof BackgroundTasksContextualSchemaImpl & {
|
|
19
|
-
__abstraction: import("@webiny/di").Abstraction<IGraphQLContextualSchema>;
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
@@ -1,369 +0,0 @@
|
|
|
1
|
-
import { makeExecutableSchema } from "@graphql-tools/schema";
|
|
2
|
-
import { mergeResolvers } from "@graphql-tools/merge";
|
|
3
|
-
import { GraphQLContextualSchema } from "@webiny/api-graphql";
|
|
4
|
-
import { renderSortEnum } from "@webiny/api-headless-cms/utils/renderSortEnum.js";
|
|
5
|
-
import { renderListFilterFields } from "@webiny/api-headless-cms/utils/renderListFilterFields.js";
|
|
6
|
-
import { renderFields } from "@webiny/api-headless-cms/utils/renderFields.js";
|
|
7
|
-
import { createBaseContentSchema } from "@webiny/api-headless-cms/graphql/schema/baseContentSchema.js";
|
|
8
|
-
import { TenantContext } from "@webiny/api-core/features/tenancy/TenantContext/abstractions.js";
|
|
9
|
-
import { IdentityContext } from "@webiny/api-core/features/security/IdentityContext/abstractions.js";
|
|
10
|
-
import { ListModelsUseCase } from "@webiny/api-headless-cms/features/contentModel/ListModels/index.js";
|
|
11
|
-
import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
12
|
-
import { TasksCrud } from "../TasksCrud.js";
|
|
13
|
-
import { ListTaskDefinitionsUseCase } from "../features/ListTaskDefinitions/abstractions.js";
|
|
14
|
-
import { TriggerTaskUseCase } from "../features/TriggerTask/abstractions.js";
|
|
15
|
-
import { AbortTaskUseCase } from "../features/AbortTask/abstractions.js";
|
|
16
|
-
import { GetBackgroundTaskSettingsRepository } from "../features/GetBackgroundTaskSettings/abstractions.js";
|
|
17
|
-
import { UpdateBackgroundTaskSettingsUseCase } from "../features/UpdateBackgroundTaskSettings/abstractions.js";
|
|
18
|
-
import { emptyResolver, resolve, resolveList } from "./utils.js";
|
|
19
|
-
import { checkPermissions } from "./checkPermissions.js";
|
|
20
|
-
class BackgroundTasksContextualSchemaImpl {
|
|
21
|
-
constructor(tenantCtx, identityCtx){
|
|
22
|
-
this.tenantCtx = tenantCtx;
|
|
23
|
-
this.identityCtx = identityCtx;
|
|
24
|
-
}
|
|
25
|
-
async build(ctx) {
|
|
26
|
-
if (!this.tenantCtx.getTenant()) return makeExecutableSchema({
|
|
27
|
-
typeDefs: "type Query\ntype Mutation",
|
|
28
|
-
assumeValidSDL: true
|
|
29
|
-
});
|
|
30
|
-
const container = ctx.container;
|
|
31
|
-
const tasksCrud = container.resolve(TasksCrud);
|
|
32
|
-
const taskModel = await tasksCrud.getTaskModel();
|
|
33
|
-
const logModel = await tasksCrud.getLogModel();
|
|
34
|
-
const listModels = container.resolve(ListModelsUseCase);
|
|
35
|
-
const fieldRegistry = container.resolve(CmsModelFieldToGraphQLRegistry);
|
|
36
|
-
const models = await this.identityCtx.withoutAuthorization(async ()=>{
|
|
37
|
-
const modelsResult = await listModels.execute({
|
|
38
|
-
includePrivate: false
|
|
39
|
-
});
|
|
40
|
-
return modelsResult.value.filter((model)=>model.fields.length > 0);
|
|
41
|
-
});
|
|
42
|
-
const taskFields = renderFields({
|
|
43
|
-
models,
|
|
44
|
-
model: taskModel,
|
|
45
|
-
fields: taskModel.fields,
|
|
46
|
-
type: "manage",
|
|
47
|
-
fieldRegistry
|
|
48
|
-
});
|
|
49
|
-
const logFields = renderFields({
|
|
50
|
-
models,
|
|
51
|
-
model: logModel,
|
|
52
|
-
fields: logModel.fields.filter((field)=>"task" !== field.fieldId),
|
|
53
|
-
type: "manage",
|
|
54
|
-
fieldRegistry
|
|
55
|
-
});
|
|
56
|
-
const listTasksFilterFieldsRender = renderListFilterFields({
|
|
57
|
-
model: taskModel,
|
|
58
|
-
fields: taskModel.fields,
|
|
59
|
-
type: "manage",
|
|
60
|
-
fieldRegistry,
|
|
61
|
-
excludeFields: [
|
|
62
|
-
"entryId"
|
|
63
|
-
]
|
|
64
|
-
});
|
|
65
|
-
const listLogsFilterFieldsRender = renderListFilterFields({
|
|
66
|
-
model: logModel,
|
|
67
|
-
fields: logModel.fields,
|
|
68
|
-
type: "manage",
|
|
69
|
-
fieldRegistry,
|
|
70
|
-
excludeFields: [
|
|
71
|
-
"entryId"
|
|
72
|
-
]
|
|
73
|
-
});
|
|
74
|
-
const sortTasksEnumRender = renderSortEnum({
|
|
75
|
-
model: taskModel,
|
|
76
|
-
fields: taskModel.fields,
|
|
77
|
-
fieldRegistry,
|
|
78
|
-
sorters: []
|
|
79
|
-
});
|
|
80
|
-
const sortLogsEnumRender = renderSortEnum({
|
|
81
|
-
model: logModel,
|
|
82
|
-
fields: logModel.fields,
|
|
83
|
-
fieldRegistry,
|
|
84
|
-
sorters: []
|
|
85
|
-
});
|
|
86
|
-
const typeDefs = `
|
|
87
|
-
type WebinyBackgroundTaskError {
|
|
88
|
-
message: String
|
|
89
|
-
code: String
|
|
90
|
-
data: JSON
|
|
91
|
-
stack: String
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
${taskFields.map((f)=>f.typeDefs).join("\n")}
|
|
95
|
-
${logFields.map((f)=>f.typeDefs).join("\n")}
|
|
96
|
-
|
|
97
|
-
type WebinyBackgroundTask {
|
|
98
|
-
id: String!
|
|
99
|
-
createdOn: DateTime!
|
|
100
|
-
savedOn: DateTime
|
|
101
|
-
createdBy: WebinyBackgroundTaskIdentity!
|
|
102
|
-
logs(
|
|
103
|
-
where: WebinyBackgroundTaskLogListWhereInput
|
|
104
|
-
limit: Number
|
|
105
|
-
sort: [WebinyBackgroundTaskLogListSorter!]
|
|
106
|
-
): [WebinyBackgroundTaskLog!]!
|
|
107
|
-
${taskFields.map((f)=>f.fields).join("\n")}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
type WebinyBackgroundTaskResponse {
|
|
111
|
-
data: WebinyBackgroundTask
|
|
112
|
-
error: WebinyBackgroundTaskError
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
type WebinyBackgroundTaskMeta {
|
|
116
|
-
cursor: String
|
|
117
|
-
hasMoreItems: Boolean!
|
|
118
|
-
totalCount: Int!
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
type WebinyBackgroundTaskListResponse {
|
|
122
|
-
data: [WebinyBackgroundTask!]
|
|
123
|
-
meta: WebinyBackgroundTaskMeta
|
|
124
|
-
error: WebinyBackgroundTaskError
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
type WebinyBackgroundTaskLog {
|
|
128
|
-
id: String!
|
|
129
|
-
createdOn: DateTime!
|
|
130
|
-
createdBy: WebinyBackgroundTaskIdentity!
|
|
131
|
-
task: WebinyBackgroundTask!
|
|
132
|
-
${logFields.map((f)=>f.fields).join("\n")}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
type WebinyBackgroundTaskLogListResponse {
|
|
136
|
-
data: [WebinyBackgroundTaskLog!]
|
|
137
|
-
meta: WebinyBackgroundTaskMeta
|
|
138
|
-
error: WebinyBackgroundTaskError
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
type WebinyBackgroundTaskDefinition {
|
|
142
|
-
id: String!
|
|
143
|
-
title: String!
|
|
144
|
-
description: String
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
type WebinyBackgroundTaskListDefinitionsResponse {
|
|
148
|
-
data: [WebinyBackgroundTaskDefinition!]
|
|
149
|
-
error: WebinyBackgroundTaskError
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
type WebinyBackgroundTaskIdentity {
|
|
153
|
-
id: String!
|
|
154
|
-
displayName: String!
|
|
155
|
-
type: String
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
type WebinyBackgroundTaskTriggerResponse {
|
|
159
|
-
data: WebinyBackgroundTask
|
|
160
|
-
error: WebinyBackgroundTaskError
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
type WebinyBackgroundTaskDeleteResponse {
|
|
164
|
-
data: Boolean
|
|
165
|
-
error: WebinyBackgroundTaskError
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
input WebinyBackgroundTaskListWhereInput {
|
|
169
|
-
${listTasksFilterFieldsRender.allFiltersAsString() || "_empty: String"}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
input WebinyBackgroundTaskLogListWhereInput {
|
|
173
|
-
${listLogsFilterFieldsRender.allFiltersAsString() || "_empty: String"}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
enum WebinyBackgroundTaskListSorter {
|
|
177
|
-
${sortTasksEnumRender}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
enum WebinyBackgroundTaskLogListSorter {
|
|
181
|
-
${sortLogsEnumRender}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
type WebinyBackgroundTaskQuery {
|
|
185
|
-
_empty: String
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
type WebinyBackgroundTaskMutation {
|
|
189
|
-
_empty: String
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
extend type Query {
|
|
193
|
-
backgroundTasks: WebinyBackgroundTaskQuery
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
extend type Mutation {
|
|
197
|
-
backgroundTasks: WebinyBackgroundTaskMutation
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
extend type WebinyBackgroundTaskQuery {
|
|
201
|
-
getTask(id: ID!): WebinyBackgroundTaskResponse!
|
|
202
|
-
listTasks(
|
|
203
|
-
where: WebinyBackgroundTaskListWhereInput
|
|
204
|
-
sort: [WebinyBackgroundTaskListSorter!]
|
|
205
|
-
limit: Int
|
|
206
|
-
after: String
|
|
207
|
-
search: String
|
|
208
|
-
): WebinyBackgroundTaskListResponse!
|
|
209
|
-
listDefinitions: WebinyBackgroundTaskListDefinitionsResponse!
|
|
210
|
-
|
|
211
|
-
listLogs(
|
|
212
|
-
where: WebinyBackgroundTaskLogListWhereInput
|
|
213
|
-
sort: [WebinyBackgroundTaskLogListSorter!]
|
|
214
|
-
limit: Int
|
|
215
|
-
after: String
|
|
216
|
-
search: String
|
|
217
|
-
): WebinyBackgroundTaskLogListResponse!
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
extend type WebinyBackgroundTaskMutation {
|
|
221
|
-
triggerTask(definition: String!, input: JSON, name: String, delay: Number): WebinyBackgroundTaskTriggerResponse!
|
|
222
|
-
abortTask(id: ID!, message: String): WebinyBackgroundTaskResponse!
|
|
223
|
-
deleteTask(id: ID!): WebinyBackgroundTaskDeleteResponse!
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
type WebinyBackgroundTaskSettings {
|
|
227
|
-
retentionDays: Int
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
type WebinyBackgroundTaskSettingsResponse {
|
|
231
|
-
data: WebinyBackgroundTaskSettings
|
|
232
|
-
error: WebinyBackgroundTaskError
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
input UpdateBackgroundTaskSettingsInput {
|
|
236
|
-
retentionDays: Int
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
extend type WebinyBackgroundTaskQuery {
|
|
240
|
-
getSettings: WebinyBackgroundTaskSettingsResponse
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
extend type WebinyBackgroundTaskMutation {
|
|
244
|
-
updateSettings(
|
|
245
|
-
input: UpdateBackgroundTaskSettingsInput!
|
|
246
|
-
): WebinyBackgroundTaskSettingsResponse
|
|
247
|
-
}
|
|
248
|
-
`;
|
|
249
|
-
const resolvers = {
|
|
250
|
-
Query: {
|
|
251
|
-
backgroundTasks: emptyResolver
|
|
252
|
-
},
|
|
253
|
-
Mutation: {
|
|
254
|
-
backgroundTasks: emptyResolver
|
|
255
|
-
},
|
|
256
|
-
WebinyBackgroundTaskQuery: {
|
|
257
|
-
getTask: async (_, args, context)=>resolve(async ()=>{
|
|
258
|
-
await checkPermissions(context, {
|
|
259
|
-
rwd: "r"
|
|
260
|
-
});
|
|
261
|
-
return await context.container.resolve(TasksCrud).getTask(args.id);
|
|
262
|
-
}),
|
|
263
|
-
listTasks: async (_, args, context)=>resolveList(async ()=>{
|
|
264
|
-
await checkPermissions(context, {
|
|
265
|
-
rwd: "r"
|
|
266
|
-
});
|
|
267
|
-
return await context.container.resolve(TasksCrud).listTasks(args);
|
|
268
|
-
}),
|
|
269
|
-
listDefinitions: async (_, __, context)=>resolve(async ()=>{
|
|
270
|
-
await checkPermissions(context, {
|
|
271
|
-
rwd: "r"
|
|
272
|
-
});
|
|
273
|
-
const result = context.container.resolve(ListTaskDefinitionsUseCase).execute();
|
|
274
|
-
return result.filter((item)=>!item.isPrivate);
|
|
275
|
-
}),
|
|
276
|
-
listLogs: async (_, args, context)=>resolveList(async ()=>{
|
|
277
|
-
await checkPermissions(context, {
|
|
278
|
-
rwd: "r"
|
|
279
|
-
});
|
|
280
|
-
return await context.container.resolve(TasksCrud).listLogs(args);
|
|
281
|
-
}),
|
|
282
|
-
getSettings: async (_, __, context)=>resolve(async ()=>{
|
|
283
|
-
await checkPermissions(context, {
|
|
284
|
-
rwd: "r"
|
|
285
|
-
});
|
|
286
|
-
const repository = context.container.resolve(GetBackgroundTaskSettingsRepository);
|
|
287
|
-
const result = await repository.execute();
|
|
288
|
-
if (result.isFail()) throw result.error;
|
|
289
|
-
return result.value;
|
|
290
|
-
})
|
|
291
|
-
},
|
|
292
|
-
WebinyBackgroundTaskMutation: {
|
|
293
|
-
abortTask: async (_, args, context)=>{
|
|
294
|
-
await checkPermissions(context, {
|
|
295
|
-
rwd: "w"
|
|
296
|
-
});
|
|
297
|
-
return resolve(async ()=>{
|
|
298
|
-
const result = await context.container.resolve(AbortTaskUseCase).execute(args);
|
|
299
|
-
if (result.isOk()) return result.value;
|
|
300
|
-
throw result.error;
|
|
301
|
-
});
|
|
302
|
-
},
|
|
303
|
-
triggerTask: async (_, args, context)=>{
|
|
304
|
-
await checkPermissions(context, {
|
|
305
|
-
rwd: "w"
|
|
306
|
-
});
|
|
307
|
-
return resolve(async ()=>{
|
|
308
|
-
const result = await context.container.resolve(TriggerTaskUseCase).execute(args);
|
|
309
|
-
if (result.isOk()) return result.value;
|
|
310
|
-
throw result.error;
|
|
311
|
-
});
|
|
312
|
-
},
|
|
313
|
-
deleteTask: async (_, args, context)=>{
|
|
314
|
-
await checkPermissions(context, {
|
|
315
|
-
rwd: "d"
|
|
316
|
-
});
|
|
317
|
-
return resolve(async ()=>await context.container.resolve(TasksCrud).deleteTask(args.id));
|
|
318
|
-
},
|
|
319
|
-
updateSettings: async (_, args, context)=>resolve(async ()=>{
|
|
320
|
-
const useCase = context.container.resolve(UpdateBackgroundTaskSettingsUseCase);
|
|
321
|
-
const result = await useCase.execute(args.input);
|
|
322
|
-
if (result.isFail()) throw result.error;
|
|
323
|
-
return result.value;
|
|
324
|
-
})
|
|
325
|
-
},
|
|
326
|
-
WebinyBackgroundTask: {
|
|
327
|
-
logs: async (parent, args, context)=>{
|
|
328
|
-
const { items } = await context.container.resolve(TasksCrud).listLogs({
|
|
329
|
-
sort: [
|
|
330
|
-
"createdBy_ASC"
|
|
331
|
-
],
|
|
332
|
-
limit: 10000,
|
|
333
|
-
...args,
|
|
334
|
-
where: {
|
|
335
|
-
...args?.where,
|
|
336
|
-
task: parent.id
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
return items;
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
WebinyBackgroundTaskLog: {
|
|
343
|
-
task: async (parent, _, context)=>await context.container.resolve(TasksCrud).getTask(parent.task)
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
const baseContent = createBaseContentSchema();
|
|
347
|
-
return makeExecutableSchema({
|
|
348
|
-
typeDefs: [
|
|
349
|
-
baseContent.schema.typeDefs,
|
|
350
|
-
typeDefs
|
|
351
|
-
],
|
|
352
|
-
resolvers: mergeResolvers([
|
|
353
|
-
baseContent.schema.resolvers,
|
|
354
|
-
resolvers
|
|
355
|
-
]),
|
|
356
|
-
inheritResolversFromInterfaces: true
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
const BackgroundTasksContextualSchema = GraphQLContextualSchema.createImplementation({
|
|
361
|
-
implementation: BackgroundTasksContextualSchemaImpl,
|
|
362
|
-
dependencies: [
|
|
363
|
-
TenantContext,
|
|
364
|
-
IdentityContext
|
|
365
|
-
]
|
|
366
|
-
});
|
|
367
|
-
export { BackgroundTasksContextualSchema };
|
|
368
|
-
|
|
369
|
-
//# sourceMappingURL=BackgroundTasksContextualSchema.js.map
|