review
This commit is contained in:
parent
f525a76f6e
commit
5ee95d66e9
40 changed files with 59 additions and 59 deletions
|
@ -1,5 +1,5 @@
|
|||
import { validationModelMiddleware } from "../middlewares/validation_model";
|
||||
import { Result } from "../helper/result";
|
||||
import { Result } from "../helpers/result";
|
||||
import { Router, Request, Response } from "express";
|
||||
import { IRouteModel, Routes } from "../interfaces/router";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { TypedEvent } from "../helper/typed_event";
|
||||
import { TypedEvent } from "../helpers/typed_event";
|
||||
|
||||
export class SocketSubscriber<T> {
|
||||
emitter: TypedEvent<T>;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { EXEC_EVENT, EXEC_TYPE, ExecError } from "../model/exec_error_model";
|
||||
import { EXEC_EVENT, EXEC_TYPE, ExecError } from "../models/exec_error_model";
|
||||
import * as cp from "child_process";
|
||||
import { ExecutorResult } from "../model/executor_result";
|
||||
import { ExecutorResult } from "../models/executor_result";
|
||||
|
||||
export enum WorkerType {
|
||||
EXEC = "EXEC",
|
|
@ -1,10 +1,10 @@
|
|||
import cluster, { Worker } from "node:cluster";
|
||||
import { TypedEvent } from "../helper/typed_event";
|
||||
import { Result } from "../helper/result";
|
||||
import { WorkerDataExec, WorkerType } from "../helper/worker_computed";
|
||||
import { delay } from "../helper/delay";
|
||||
import { ExecutorResult } from "../model/executor_result";
|
||||
import { EXEC_TYPE, ExecError, SpawnError } from "../model/exec_error_model";
|
||||
import { TypedEvent } from "../helpers/typed_event";
|
||||
import { Result } from "../helpers/result";
|
||||
import { WorkerDataExec, WorkerType } from "../helpers/worker_computed";
|
||||
import { delay } from "../helpers/delay";
|
||||
import { ExecutorResult } from "../models/executor_result";
|
||||
import { EXEC_TYPE, ExecError, SpawnError } from "../models/exec_error_model";
|
||||
|
||||
abstract class IExecutorProgramService {
|
||||
abstract execPath: string;
|
||||
|
|
|
@ -2,9 +2,9 @@ import * as fs from "fs";
|
|||
import { resolve } from "node:path";
|
||||
import { createHash } from "node:crypto";
|
||||
import { BinaryLike } from "crypto";
|
||||
import { EventsFileChanger, MetaDataFileManagerModel } from "../model/meta_data_file_manager_model";
|
||||
import { Result } from "../helper/result";
|
||||
import { TypedEvent } from "../helper/typed_event";
|
||||
import { EventsFileChanger, MetaDataFileManagerModel } from "../models/meta_data_file_manager_model";
|
||||
import { Result } from "../helpers/result";
|
||||
import { TypedEvent } from "../helpers/typed_event";
|
||||
import { lsStat, readFileAsync, readdir, stat } from "../repository/fs";
|
||||
|
||||
function joinBuffers(buffers: Array<Buffer>, delimiter = " ") {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { TypedEvent } from "../helper/typed_event";
|
||||
import { ExecError } from "../model/exec_error_model";
|
||||
import { ExecutorResult } from "../model/executor_result";
|
||||
import { ActivePipeline } from "../model/active_pipeline_model";
|
||||
import { IPipeline } from "../model/process_model";
|
||||
import { TypedEvent } from "../helpers/typed_event";
|
||||
import { ExecError } from "../models/exec_error_model";
|
||||
import { ExecutorResult } from "../models/executor_result";
|
||||
import { ActivePipeline } from "../models/active_pipeline_model";
|
||||
import { IPipeline } from "../models/process_model";
|
||||
import { Iteration } from "./stack_service";
|
||||
|
||||
export class PipelineRealTimeService extends TypedEvent<ActivePipeline> {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { FilesChangeNotifierService, IHashesCache } from "./files_change_notifier_service";
|
||||
import { IPipeline } from "../model/process_model";
|
||||
import { IPipeline } from "../models/process_model";
|
||||
import { ExecutorProgramService } from "./executor_program_service";
|
||||
import { EXEC_EVENT, ExecError, SpawnError } from "../model/exec_error_model";
|
||||
import { TypedEvent } from "../helper/typed_event";
|
||||
import { Result } from "../helper/result";
|
||||
import { ExecutorResult } from "../model/executor_result";
|
||||
import { delay } from "../helper/delay";
|
||||
import { EXEC_EVENT, ExecError, SpawnError } from "../models/exec_error_model";
|
||||
import { TypedEvent } from "../helpers/typed_event";
|
||||
import { Result } from "../helpers/result";
|
||||
import { ExecutorResult } from "../models/executor_result";
|
||||
import { delay } from "../helpers/delay";
|
||||
import { TriggerService } from "./trigger_service";
|
||||
import { Trigger } from "../../features/triggers/models/trigger_database_model";
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as vm from "node:vm";
|
||||
import { IHashesCache } from "./files_change_notifier_service";
|
||||
import { EventsFileChanger } from "../model/meta_data_file_manager_model";
|
||||
import { Result } from "../helper/result";
|
||||
import { TypedEvent } from "../helper/typed_event";
|
||||
import { EventsFileChanger } from "../models/meta_data_file_manager_model";
|
||||
import { Result } from "../helpers/result";
|
||||
import { TypedEvent } from "../helpers/typed_event";
|
||||
import { Trigger, TriggerType } from "../../features/triggers/models/trigger_database_model";
|
||||
|
||||
export class TriggerCallResult {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Result } from "../helper/result";
|
||||
import { Result } from "../helpers/result";
|
||||
import { ICreateObjectDataBase } from "../interfaces/response";
|
||||
|
||||
export class CreateDataBaseModelUseCase<V> {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Result } from "../helper/result";
|
||||
import { Result } from "../helpers/result";
|
||||
import { writeFileAsync } from "../repository/fs";
|
||||
|
||||
export class CreateFileUseCase {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Result } from "../helper/result";
|
||||
import { Result } from "../helpers/result";
|
||||
import { dirIsExists, createDir } from "../repository/fs";
|
||||
|
||||
export class CreateFolderUseCase {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import mongoose from "mongoose";
|
||||
import { Result } from "../helper/result";
|
||||
import { Result } from "../helpers/result";
|
||||
|
||||
export class DataBaseConnectUseCase {
|
||||
call = async (): Promise<Result<Error, void>> => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Result } from "../helper/result";
|
||||
import { Result } from "../helpers/result";
|
||||
|
||||
export class DeleteDataBaseModelUseCase<D> {
|
||||
databaseModel: D | any;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Result } from "../helper/result";
|
||||
import { Result } from "../helpers/result";
|
||||
|
||||
export class PaginationDataBaseModelUseCase<D> {
|
||||
databaseModel: D;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Result } from "../helper/result";
|
||||
import { Result } from "../helpers/result";
|
||||
|
||||
export class ReadByIdDataBaseModelUseCase<D> {
|
||||
databaseModel: D;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Result } from "../helper/result";
|
||||
import { Result } from "../helpers/result";
|
||||
|
||||
export class SearchDataBaseModelUseCase<T> {
|
||||
model: any;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Result } from "../helper/result";
|
||||
import { Result } from "../helpers/result";
|
||||
|
||||
interface uuid {
|
||||
_id?: string;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Schema, model } from "mongoose";
|
||||
import { IPipeline } from "../../../core/model/process_model";
|
||||
import { IPipeline } from "../../../core/models/process_model";
|
||||
import { schemaProcess } from "../../process/models/process_database_model";
|
||||
import { triggerSchema } from "../../triggers/models/trigger_database_model";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { IsOptional, ValidateNested } from "class-validator";
|
||||
import { IPipeline, IProcess, StackGenerateType } from "../../../core/model/process_model";
|
||||
import { IPipeline, IProcess, StackGenerateType } from "../../../core/models/process_model";
|
||||
import { Type } from "class-transformer";
|
||||
import { ProcessModel } from "../../process/models/process_validation_model";
|
||||
import { TriggerModel } from "../../triggers/models/trigger_validation_model";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { IsMongoId, IsOptional } from "class-validator";
|
||||
import { IProcess, StackGenerateType } from "../../../core/model/process_model";
|
||||
import { IProcess, StackGenerateType } from "../../../core/models/process_model";
|
||||
import { TriggerModel } from "../../triggers/models/trigger_validation_model";
|
||||
|
||||
export class PipelineValidationModel {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Schema, model } from "mongoose";
|
||||
import { IProcess } from "../../../core/model/process_model";
|
||||
import { IProcess } from "../../../core/models/process_model";
|
||||
|
||||
export const ProcessSchema = new Schema({
|
||||
type: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { IsBoolean, IsEnum, IsNumber, IsOptional, IsString } from "class-validator";
|
||||
import { EXEC_TYPE } from "../../../core/model/exec_error_model";
|
||||
import { IProcess, IssueType } from "../../../core/model/process_model";
|
||||
import { EXEC_TYPE } from "../../../core/models/exec_error_model";
|
||||
import { IProcess, IssueType } from "../../../core/models/process_model";
|
||||
|
||||
export class ProcessModel implements IProcess {
|
||||
@IsEnum(EXEC_TYPE)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { App } from "../../../core/controllers/app";
|
||||
import { Result } from "../../../core/helper/result";
|
||||
import { Result } from "../../../core/helpers/result";
|
||||
import { CreateDataBaseModelUseCase } from "../../../core/usecases/create_database_model_usecase";
|
||||
import { CreateFolderUseCase } from "../../../core/usecases/crete_folder_usecase";
|
||||
import { ProjectInstanceDbModel } from "../models/project_instance_database_model";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { CallbackStrategyWithFileUpload, ResponseBase } from "../../../core/controllers/http_controller";
|
||||
import { Result } from "../../../core/helper/result";
|
||||
import { Result } from "../../../core/helpers/result";
|
||||
import { IFile } from "../../../core/interfaces/file";
|
||||
import { CreateFileUseCase } from "../../../core/usecases/create_file_usecase";
|
||||
import { PipelineStatusUseCase } from "../../realtime/domain/pipeline_status_usecase";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Result } from "../../../core/helper/result";
|
||||
import { ActivePipeline } from "../../../core/model/active_pipeline_model";
|
||||
import { Result } from "../../../core/helpers/result";
|
||||
import { ActivePipeline } from "../../../core/models/active_pipeline_model";
|
||||
import { pipelineRealTimeService } from "../realtime_presentation";
|
||||
|
||||
export class PipelineStatusUseCase {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { App } from "../../../core/controllers/app";
|
||||
import { Result } from "../../../core/helper/result";
|
||||
import { Result } from "../../../core/helpers/result";
|
||||
import { ReadByIdDataBaseModelUseCase } from "../../../core/usecases/read_by_id_database_model_usecase";
|
||||
import { UpdateDataBaseModelUseCase } from "../../../core/usecases/update_database_model_usecase";
|
||||
import {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import mongoose from "mongoose";
|
||||
import { delay } from "../../src/core/helper/delay";
|
||||
import { Result } from "../../src/core/helper/result";
|
||||
import { TypedEvent } from "../../src/core/helper/typed_event";
|
||||
import { delay } from "../../src/core/helpers/delay";
|
||||
import { Result } from "../../src/core/helpers/result";
|
||||
import { TypedEvent } from "../../src/core/helpers/typed_event";
|
||||
|
||||
export const before = async () => {
|
||||
await mongoose.connection.dropDatabase();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { EXEC_TYPE } from "../../src/core/model/exec_error_model";
|
||||
import { IPipeline, IssueType, StackGenerateType } from "../../src/core/model/process_model";
|
||||
import { EXEC_TYPE } from "../../src/core/models/exec_error_model";
|
||||
import { IPipeline, IssueType, StackGenerateType } from "../../src/core/models/process_model";
|
||||
import { TriggerType } from "../../src/features/triggers/models/trigger_database_model";
|
||||
|
||||
export const mockSimplePipeline: IPipeline[] = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { delay } from "../../src/core/helper/delay";
|
||||
import { EXEC_TYPE } from "../../src/core/model/exec_error_model";
|
||||
import { ExecutorResult } from "../../src/core/model/executor_result";
|
||||
import { delay } from "../../src/core/helpers/delay";
|
||||
import { EXEC_TYPE } from "../../src/core/models/exec_error_model";
|
||||
import { ExecutorResult } from "../../src/core/models/executor_result";
|
||||
import { ExecutorProgramService } from "../../src/core/services/executor_program_service";
|
||||
import { TestCore } from "../core/test_core";
|
||||
import { resultTest as resultTest, dirname__ } from "../test";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as fs from "fs";
|
||||
import { FilesChangeNotifierService } from "../../src/core/services/files_change_notifier_service";
|
||||
import { EventsFileChanger } from "../../src/core/model/meta_data_file_manager_model";
|
||||
import { EventsFileChanger } from "../../src/core/models/meta_data_file_manager_model";
|
||||
import { assert, dirname__ } from "../test";
|
||||
import { delay } from "../../src/core/helper/delay";
|
||||
import { delay } from "../../src/core/helpers/delay";
|
||||
|
||||
export class FilesChangerTest extends FilesChangeNotifierService {
|
||||
directory = dirname__ + "/context/";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { rmSync } from "fs";
|
||||
import { StackService } from "../../src/core/services/stack_service";
|
||||
import { delay } from "../../src/core/helper/delay";
|
||||
import { delay } from "../../src/core/helpers/delay";
|
||||
import { assert, dirname__ } from "../test";
|
||||
import { mockSimplePipeline } from "../model/mock_pipelines";
|
||||
import { readDirRecursive } from "../../src/core/repository/fs";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { EventsFileChanger, MetaDataFileManagerModel } from "../../src/core/model/meta_data_file_manager_model";
|
||||
import { EventsFileChanger, MetaDataFileManagerModel } from "../../src/core/models/meta_data_file_manager_model";
|
||||
|
||||
import { TriggerService } from "../../src/core/services/trigger_service";
|
||||
import { TriggerType } from "../../src/features/triggers/models/trigger_database_model";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue