Solucionados mas problemas por camiar los modulos
Pasado de paths de tsconfig a package.json por problemas que daba con yaml
This commit is contained in:
@@ -10,6 +10,40 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"packageManager": "yarn@4.12.0",
|
||||
"imports": {
|
||||
"#adapters/*.js": {
|
||||
"types": "./src/adapters/*.ts",
|
||||
"default": "./src/adapters/*.js"
|
||||
},
|
||||
"#adapters/*": {
|
||||
"types": "./src/adapters/*.ts",
|
||||
"default": "./src/adapters/*.js"
|
||||
},
|
||||
"#domain/*.js": {
|
||||
"types": "./src/domain/*.ts",
|
||||
"default": "./src/domain/*.js"
|
||||
},
|
||||
"#domain/*": {
|
||||
"types": "./src/domain/*.ts",
|
||||
"default": "./src/domain/*.js"
|
||||
},
|
||||
"#ports/*.js": {
|
||||
"types": "./src/ports/*.ts",
|
||||
"default": "./src/ports/*.js"
|
||||
},
|
||||
"#ports/*": {
|
||||
"types": "./src/ports/*.ts",
|
||||
"default": "./src/ports/*.js"
|
||||
},
|
||||
"#tests/*.js": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
},
|
||||
"#tests/*": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@tsconfig/node22": "*",
|
||||
"amqplib": "^0.10.9",
|
||||
@@ -29,4 +63,4 @@
|
||||
"tsx": "*",
|
||||
"vitest": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,24 +2,7 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/sim-gestor-eventos",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"#adapters/*": [
|
||||
"src/adapters/*"
|
||||
],
|
||||
"#domain/*": [
|
||||
"src/domain/*"
|
||||
],
|
||||
"#ports/*": [
|
||||
"src/ports/*"
|
||||
],
|
||||
"#tests/*": [
|
||||
"__tests__/*"
|
||||
],
|
||||
"#shared/*": [
|
||||
"../shared/*"
|
||||
],
|
||||
}
|
||||
"baseUrl": "."
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
@@ -31,4 +14,4 @@
|
||||
"files": [
|
||||
"index.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ConsumeMessage } from "amqplib";
|
||||
import { DomainEvent, DomainEventSubscriber } from "./DomainEvent";
|
||||
import { DomainEvent, DomainEventSubscriber } from "./DomainEvent.js";
|
||||
|
||||
export interface EventBus {
|
||||
publish(events: Array<DomainEvent>): Promise<void>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { User } from "./User"
|
||||
import { User } from "./User.js"
|
||||
|
||||
export type SimCard = {
|
||||
iccid: string,
|
||||
|
||||
@@ -30,7 +30,7 @@ export namespace SimEvents {
|
||||
},
|
||||
}
|
||||
|
||||
export type cancelation = DomainEvent & {
|
||||
export type cancel = DomainEvent & {
|
||||
key: `sim.${string}.cancel`,
|
||||
payload: {
|
||||
iccid: string
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { type ChannelModel, type ConfirmChannel, ConsumeMessage, connect as amqConnect } from "amqplib";
|
||||
import { connect, AmqpConnectionManager, ChannelWrapper, Channel } from "amqp-connection-manager"
|
||||
|
||||
import { DomainEvent, DomainEventSubscriber } from "../domain/DomainEvent";
|
||||
import { EventBus } from "../domain/EventBus.port";
|
||||
import { DomainEvent, DomainEventSubscriber } from "../domain/DomainEvent.js";
|
||||
import { EventBus } from "../domain/EventBus.port.js";
|
||||
|
||||
export type RMQConnectionParams = {
|
||||
username: string,
|
||||
|
||||
@@ -11,6 +11,56 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"packageManager": "yarn@4.12.0",
|
||||
"imports": {
|
||||
"#config/*.js": {
|
||||
"types": "./config/*.ts",
|
||||
"default": "./config/*.js"
|
||||
},
|
||||
"#config/*": {
|
||||
"types": "./config/*.ts",
|
||||
"default": "./config/*.js"
|
||||
},
|
||||
"#adapters/*.js": {
|
||||
"types": "./adapters/*.ts",
|
||||
"default": "./adapters/*.js"
|
||||
},
|
||||
"#adapters/*": {
|
||||
"types": "./adapters/*.ts",
|
||||
"default": "./adapters/*.js"
|
||||
},
|
||||
"#domain/*.js": {
|
||||
"types": "./domain/*.ts",
|
||||
"default": "./domain/*.js"
|
||||
},
|
||||
"#domain/*": {
|
||||
"types": "./domain/*.ts",
|
||||
"default": "./domain/*.js"
|
||||
},
|
||||
"#ports/*.js": {
|
||||
"types": "./ports/*.ts",
|
||||
"default": "./ports/*.js"
|
||||
},
|
||||
"#ports/*": {
|
||||
"types": "./ports/*.ts",
|
||||
"default": "./ports/*.js"
|
||||
},
|
||||
"#tests/*.js": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
},
|
||||
"#tests/*": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
},
|
||||
"#shared/*.js": {
|
||||
"types": "./*.ts",
|
||||
"default": "./*.js"
|
||||
},
|
||||
"#shared/*": {
|
||||
"types": "./*.ts",
|
||||
"default": "./*.js"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@tsconfig/node22": "*",
|
||||
"amqplib": "^0.10.9",
|
||||
@@ -31,4 +81,4 @@
|
||||
"tsx": "*",
|
||||
"vitest": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,27 +2,7 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"#config/*": [
|
||||
"config/*"
|
||||
],
|
||||
"#adapters/*": [
|
||||
"adapters/*"
|
||||
],
|
||||
"#domain/*": [
|
||||
"domain/*"
|
||||
],
|
||||
"#ports/*": [
|
||||
"ports/*"
|
||||
],
|
||||
"#tests/*": [
|
||||
"__tests__/*"
|
||||
],
|
||||
"#shared/*": [
|
||||
"./*"
|
||||
],
|
||||
}
|
||||
"baseUrl": "."
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EventBus } from "#shared/domain/EventBus.port";
|
||||
import { EventBus } from "sim-shared/domain/EventBus.port.js";
|
||||
import { ConsumeMessage } from "amqplib";
|
||||
|
||||
export class SimNosController {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RabbitMQEventBus, RMQConnectionParams } from "#shared/infrastructure/RabbitMQEventBus"
|
||||
import { RabbitMQEventBus, RMQConnectionParams } from "sim-shared/infrastructure/RabbitMQEventBus.js"
|
||||
import { env } from "./env"
|
||||
|
||||
const rmqUser = env.RABBITMQ_USER
|
||||
|
||||
@@ -11,6 +11,48 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"packageManager": "yarn@4.12.0",
|
||||
"imports": {
|
||||
"#config/*.js": {
|
||||
"types": "./config/*.ts",
|
||||
"default": "./config/*.js"
|
||||
},
|
||||
"#config/*": {
|
||||
"types": "./config/*.ts",
|
||||
"default": "./config/*.js"
|
||||
},
|
||||
"#adapters/*.js": {
|
||||
"types": "./adapters/*.ts",
|
||||
"default": "./adapters/*.js"
|
||||
},
|
||||
"#adapters/*": {
|
||||
"types": "./adapters/*.ts",
|
||||
"default": "./adapters/*.js"
|
||||
},
|
||||
"#domain/*.js": {
|
||||
"types": "./domain/*.ts",
|
||||
"default": "./domain/*.js"
|
||||
},
|
||||
"#domain/*": {
|
||||
"types": "./domain/*.ts",
|
||||
"default": "./domain/*.js"
|
||||
},
|
||||
"#ports/*.js": {
|
||||
"types": "./ports/*.ts",
|
||||
"default": "./ports/*.js"
|
||||
},
|
||||
"#ports/*": {
|
||||
"types": "./ports/*.ts",
|
||||
"default": "./ports/*.js"
|
||||
},
|
||||
"#tests/*.js": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
},
|
||||
"#tests/*": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@tsconfig/node22": "*",
|
||||
"amqplib": "^0.10.9",
|
||||
@@ -30,4 +72,4 @@
|
||||
"tsx": "*",
|
||||
"vitest": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,27 +2,7 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"#config/*": [
|
||||
"config/*"
|
||||
],
|
||||
"#adapters/*": [
|
||||
"adapters/*"
|
||||
],
|
||||
"#domain/*": [
|
||||
"domain/*"
|
||||
],
|
||||
"#ports/*": [
|
||||
"ports/*"
|
||||
],
|
||||
"#tests/*": [
|
||||
"__tests__/*"
|
||||
],
|
||||
"#shared/*": [
|
||||
"../shared/*"
|
||||
],
|
||||
}
|
||||
"baseUrl": "."
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { test, describe } from "vitest"
|
||||
import { JWTService } from "./JWT.service"
|
||||
import { JWTService } from "./JWT.service.js"
|
||||
|
||||
describe("Tokens Objenious", () => {
|
||||
const jwtService = new JWTService()
|
||||
|
||||
@@ -11,7 +11,7 @@ import fs from "fs"
|
||||
|
||||
import {
|
||||
JWTToken
|
||||
} from "#shared/domain/JWT.js"
|
||||
} from "sim-shared/domain/JWT.js"
|
||||
import axios, { AxiosError } from "axios";
|
||||
|
||||
type GrantAccessRequestBody = {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { EventBus } from "#shared/domain/EventBus.port";
|
||||
import { EventBus } from "sim-shared/domain/EventBus.port.js";
|
||||
import { ConsumeMessage } from "amqplib";
|
||||
import { SimUseCases } from "./Sim.usecases.js";
|
||||
import { SimEvents } from "#shared/domain/SimEvents.js";
|
||||
import { constants } from "node:buffer";
|
||||
import { constrainedMemory } from "node:process";
|
||||
import { Result } from "#shared/domain/Result.js";
|
||||
import { SimEvents } from "sim-shared/domain/SimEvents.js";
|
||||
import { Result } from "sim-shared/domain/Result.js";
|
||||
|
||||
/**
|
||||
* La clase usa generadores de funciones para mantener el contexto
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { ConsumeMessage } from "amqplib";
|
||||
import { SimController } from "./Sim.controller.js";
|
||||
import { EventBus } from "#shared/domain/EventBus.port.js";
|
||||
import { EventBus } from "sim-shared/domain/EventBus.port.js";
|
||||
|
||||
export class SimRouter {
|
||||
private readonly routes: Map<string, (m: ConsumeMessage) => Promise<any>>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ActionData, ActivationData } from "#domain/DTOs/objeniousapi.js"
|
||||
import { HttpClient } from "#shared/infrastructure/HTTPClient.js"
|
||||
import { HttpClient } from "sim-shared/infrastructure/HTTPClient.js"
|
||||
import { AxiosError } from "axios"
|
||||
import { Result } from "sim-shared/domain/Result.js"
|
||||
import { ObjeniousOperation, IOperationsRepository as OperationsRepositoryPort } from "#domain/operationsRepository.port.js"
|
||||
@@ -83,7 +83,7 @@ export class SimUseCases {
|
||||
if (resp.status == 200) {
|
||||
console.log("Sim preactivada con exito", resp.data)
|
||||
const operation: ObjeniousOperation = {
|
||||
operation: "activate",
|
||||
operation: "preActivate",
|
||||
iccids: preActivateData.identifier.identifiers,
|
||||
status: "noMassID",
|
||||
request_id: resp.data.requestId
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RabbitMQEventBus, RMQConnectionParams } from "#shared/infrastructure/RabbitMQEventBus"
|
||||
import { RabbitMQEventBus, RMQConnectionParams } from "sim-shared/infrastructure/RabbitMQEventBus.js"
|
||||
import { Channel } from "amqp-connection-manager"
|
||||
import { env } from "./env"
|
||||
import { env } from "./env/index.js"
|
||||
|
||||
const rmqUser = env.RABBITMQ_USER
|
||||
const rmqPass = env.RABBITMQ_PASSWORD
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { HttpClient } from "#shared/infrastructure/HTTPClient.js"
|
||||
import { HttpClient } from "sim-shared/infrastructure/HTTPClient.js"
|
||||
import { JWTService } from "../aplication/JWT.service.js"
|
||||
import { env } from "./env"
|
||||
import { env } from "./env/index.js"
|
||||
|
||||
const OBJ_BASE_URL = env.OBJ_BASE_URL
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Pool, QueryResult } from 'pg';
|
||||
import { PgClient } from '#shared/infrastructure/PgClient'
|
||||
import { env } from './env';
|
||||
import { PgClient } from 'sim-shared/infrastructure/PgClient.js'
|
||||
import { env } from './env/index.js';
|
||||
|
||||
// Configuracion de la conexion a la BDD, deberia ser la
|
||||
// Misma para todos los servicios pero hasta que se unifique todo
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Result } from "#shared/domain/Result.js";
|
||||
import { Result } from "sim-shared/domain/Result.js";
|
||||
|
||||
export type StatusEnum = 'error' | 'finished' | 'noRequestId' | 'running' | 'noMassID';
|
||||
|
||||
@@ -38,7 +38,7 @@ export type ObjeniousOperationChange = {
|
||||
}
|
||||
|
||||
export namespace Objenious {
|
||||
export type Status = "STAND_BY" | "IN_PROGRESS" | "ENDED" | "CANCELLED";
|
||||
export type Status = "En Cours" | "Terminé";
|
||||
export type Identifier = "IMSI" | "MSISDN" | "REFERENCE" | "ICCID" | "IMEI"
|
||||
export type ResponseGetRequestById = {
|
||||
created: string,
|
||||
@@ -88,7 +88,7 @@ export namespace Objenious {
|
||||
created: string,
|
||||
started?: string,
|
||||
ended?: string,
|
||||
status: Status,
|
||||
status: string,
|
||||
info?: string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { OperationsRepository } from "#adapters/OperationRepository.js"
|
||||
import { startRMQClient } from "#config/eventBus.config.js"
|
||||
import { httpInstance } from "#config/httpClient.config.js"
|
||||
import { pgPool } from "#config/postgreConfig.js"
|
||||
import { PgClient } from "#shared/infrastructure/PgClient.js"
|
||||
import { PgClient } from "sim-shared/infrastructure/PgClient.js"
|
||||
import { SimUseCases } from "aplication/Sim.usecases.js"
|
||||
import { SimController } from "./aplication/Sim.controller.js"
|
||||
import { SimRouter } from "./aplication/Sim.router.js"
|
||||
|
||||
@@ -14,6 +14,48 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"packageManager": "yarn@4.12.0",
|
||||
"imports": {
|
||||
"#config/*.js": {
|
||||
"types": "./config/*.ts",
|
||||
"default": "./config/*.js"
|
||||
},
|
||||
"#config/*": {
|
||||
"types": "./config/*.ts",
|
||||
"default": "./config/*.js"
|
||||
},
|
||||
"#adapters/*.js": {
|
||||
"types": "./infrastructure/*.ts",
|
||||
"default": "./infrastructure/*.js"
|
||||
},
|
||||
"#adapters/*": {
|
||||
"types": "./infrastructure/*.ts",
|
||||
"default": "./infrastructure/*.js"
|
||||
},
|
||||
"#domain/*.js": {
|
||||
"types": "./domain/*.ts",
|
||||
"default": "./domain/*.js"
|
||||
},
|
||||
"#domain/*": {
|
||||
"types": "./domain/*.ts",
|
||||
"default": "./domain/*.js"
|
||||
},
|
||||
"#ports/*.js": {
|
||||
"types": "./ports/*.ts",
|
||||
"default": "./ports/*.js"
|
||||
},
|
||||
"#ports/*": {
|
||||
"types": "./ports/*.ts",
|
||||
"default": "./ports/*.js"
|
||||
},
|
||||
"#tests/*.js": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
},
|
||||
"#tests/*": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@tsconfig/node22": "*",
|
||||
"amqplib": "^0.10.9",
|
||||
@@ -35,4 +77,4 @@
|
||||
"tsx": "*",
|
||||
"vitest": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,30 +2,7 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"#config/*": [
|
||||
"config/*"
|
||||
],
|
||||
"#adapters/*": [
|
||||
"infrastructure/*"
|
||||
],
|
||||
"#domain/*": [
|
||||
"domain/*"
|
||||
],
|
||||
"#ports/*": [
|
||||
"ports/*"
|
||||
],
|
||||
"#tests/*": [
|
||||
"__tests__/*"
|
||||
],
|
||||
"#shared/*": [
|
||||
"../shared/*"
|
||||
],
|
||||
"#root/*": [
|
||||
"../../*"
|
||||
]
|
||||
}
|
||||
"baseUrl": "."
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
@@ -37,4 +14,4 @@
|
||||
"files": [
|
||||
"index.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Request, Response } from "express"
|
||||
import { SimUsecases } from "aplication/Sim.usecases"
|
||||
import { SimUsecases } from "aplication/Sim.usecases.js"
|
||||
import { error } from "node:console"
|
||||
|
||||
// Partiendo del caracter 3 2 de pais + 2 de compañia
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RabbitMQEventBus, RMQConnectionParams } from "#shared/infrastructure/RabbitMQEventBus"
|
||||
import { RabbitMQEventBus, RMQConnectionParams } from "sim-shared/infrastructure/RabbitMQEventBus.js"
|
||||
import { env } from "./env"
|
||||
|
||||
const rmqUser = env.RABBITMQ_USER
|
||||
|
||||
@@ -2,7 +2,7 @@ import express from "express"
|
||||
import cors from 'cors';
|
||||
import { simRoutes } from "./infrastructure/simRoutes.http.js"
|
||||
import { rabbitmqEventBus } from '#config/eventBusConfig';
|
||||
import { env } from "#config/env"
|
||||
import { env } from "#config/env/index.js"
|
||||
|
||||
const PORT = env.API_PORT
|
||||
const HOSTNAME = "0.0.0.0"
|
||||
|
||||
@@ -12,6 +12,48 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"packageManager": "yarn@4.12.0",
|
||||
"imports": {
|
||||
"#config/*.js": {
|
||||
"types": "./config/*.ts",
|
||||
"default": "./config/*.js"
|
||||
},
|
||||
"#config/*": {
|
||||
"types": "./config/*.ts",
|
||||
"default": "./config/*.js"
|
||||
},
|
||||
"#adapters/*.js": {
|
||||
"types": "./adapters/*.ts",
|
||||
"default": "./adapters/*.js"
|
||||
},
|
||||
"#adapters/*": {
|
||||
"types": "./adapters/*.ts",
|
||||
"default": "./adapters/*.js"
|
||||
},
|
||||
"#domain/*.js": {
|
||||
"types": "./domain/*.ts",
|
||||
"default": "./domain/*.js"
|
||||
},
|
||||
"#domain/*": {
|
||||
"types": "./domain/*.ts",
|
||||
"default": "./domain/*.js"
|
||||
},
|
||||
"#ports/*.js": {
|
||||
"types": "./ports/*.ts",
|
||||
"default": "./ports/*.js"
|
||||
},
|
||||
"#ports/*": {
|
||||
"types": "./ports/*.ts",
|
||||
"default": "./ports/*.js"
|
||||
},
|
||||
"#tests/*.js": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
},
|
||||
"#tests/*": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@tsconfig/node22": "*",
|
||||
"amqplib": "^0.10.9",
|
||||
@@ -32,4 +74,4 @@
|
||||
"tsx": "*",
|
||||
"vitest": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,27 +2,7 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"#config/*": [
|
||||
"config/*"
|
||||
],
|
||||
"#adapters/*": [
|
||||
"adapters/*"
|
||||
],
|
||||
"#domain/*": [
|
||||
"domain/*"
|
||||
],
|
||||
"#ports/*": [
|
||||
"ports/*"
|
||||
],
|
||||
"#tests/*": [
|
||||
"__tests__/*"
|
||||
],
|
||||
"#shared/*": [
|
||||
"../shared/*"
|
||||
],
|
||||
}
|
||||
"baseUrl": "."
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpClient } from "#shared/infrastructure/HTTPClient.js"
|
||||
import { HttpClient } from "sim-shared/infrastructure/HTTPClient.js"
|
||||
import { JWTService } from "sim-consumidor-objenious/aplication/JWT.service.js"
|
||||
import { env } from "./env/index.js"
|
||||
|
||||
|
||||
@@ -13,6 +13,48 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"packageManager": "yarn@4.12.0",
|
||||
"imports": {
|
||||
"#config/*.js": {
|
||||
"types": "./config/*.ts",
|
||||
"default": "./config/*.js"
|
||||
},
|
||||
"#config/*": {
|
||||
"types": "./config/*.ts",
|
||||
"default": "./config/*.js"
|
||||
},
|
||||
"#adapters/*.js": {
|
||||
"types": "./adapters/*.ts",
|
||||
"default": "./adapters/*.js"
|
||||
},
|
||||
"#adapters/*": {
|
||||
"types": "./adapters/*.ts",
|
||||
"default": "./adapters/*.js"
|
||||
},
|
||||
"#domain/*.js": {
|
||||
"types": "./domain/*.ts",
|
||||
"default": "./domain/*.js"
|
||||
},
|
||||
"#domain/*": {
|
||||
"types": "./domain/*.ts",
|
||||
"default": "./domain/*.js"
|
||||
},
|
||||
"#ports/*.js": {
|
||||
"types": "./ports/*.ts",
|
||||
"default": "./ports/*.js"
|
||||
},
|
||||
"#ports/*": {
|
||||
"types": "./ports/*.ts",
|
||||
"default": "./ports/*.js"
|
||||
},
|
||||
"#tests/*.js": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
},
|
||||
"#tests/*": {
|
||||
"types": "./__tests__/*.ts",
|
||||
"default": "./__tests__/*.js"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@tsconfig/node22": "*",
|
||||
"cors": "*",
|
||||
@@ -35,4 +77,4 @@
|
||||
"tsx": "*",
|
||||
"vitest": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import { IOperationsRepository, Objenious, ObjeniousOperation, ObjeniousOperationChange, StatusEnum } from "#objenious-shared/domain/operationsRepository.port.js"
|
||||
import { HttpClient } from "#shared/infrastructure/HTTPClient.js";
|
||||
import { constants } from "node:buffer";
|
||||
import { IOperationsRepository, Objenious, ObjeniousOperation, ObjeniousOperationChange, StatusEnum } from "sim-consumidor-objenious/domain/operationsRepository.port.js"
|
||||
import { HttpClient } from "sim-shared/infrastructure/HTTPClient.js";
|
||||
|
||||
export class CheckObjeniousRequests {
|
||||
constructor(
|
||||
@@ -135,7 +134,9 @@ export class CheckObjeniousRequests {
|
||||
const sanitizedStatus = objStatus.trim().toLowerCase()
|
||||
// No tengo el resto porque no aparecen en la documentación
|
||||
// asumo que todos los demas sn running y se deben volver a comrobar
|
||||
// ! Importante las claves siempre en minuscula, los valores son cammelCase
|
||||
const equivalentMap = new Map<string, StatusEnum>([
|
||||
["en cours", "running"],
|
||||
["terminé", "finished"]
|
||||
])
|
||||
const res = equivalentMap.get(sanitizedStatus)
|
||||
@@ -197,4 +198,3 @@ export class CheckObjeniousRequests {
|
||||
return operationsList
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,31 +2,7 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"#config/*": [
|
||||
"config/*"
|
||||
],
|
||||
"#adapters/*": [
|
||||
"adapters/*"
|
||||
],
|
||||
"#domain/*": [
|
||||
"domain/*"
|
||||
],
|
||||
"#ports/*": [
|
||||
"ports/*"
|
||||
],
|
||||
"#tests/*": [
|
||||
"__tests__/*"
|
||||
],
|
||||
"#shared/*": [
|
||||
"../shared/*"
|
||||
],
|
||||
// De momento se usa el consumidor como principal
|
||||
"#objenious-shared/*": [
|
||||
"../sim-consumidor-objenious/*"
|
||||
]
|
||||
}
|
||||
"baseUrl": "."
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
@@ -39,4 +15,4 @@
|
||||
"files": [
|
||||
"index.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user