diff --git a/.eslintrc.js b/.eslintrc.js index bd2bf135..dc90dfa3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,10 +1,5 @@ -// This configuration only applies to the package manager root. /** @type {import("eslint").Linter.Config} */ module.exports = { - ignorePatterns: ["apps/**", "packages/**", "libs/**"], - extends: ["@repo/eslint-config"], - parser: "@typescript-eslint/parser", - parserOptions: { - project: true, - }, -}; + root: true, + extends: ["@repo/eslint-config/index.js"], +}; \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8f3b4a55..d337487a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,44 +1,11 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# Dependencies -node_modules -.pnp -.pnp.js - -# Local env files -.env -.env.local -.env.development.local -.env.test.local -.env.production.local - -# Testing -coverage - -# Turbo -.turbo - -# Vercel -.vercel - -# Build Outputs -.next/ -out/ -build -dist - - -# Debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -debug-*.log -error-*.log - -# Misc .DS_Store -*.pem -*-audit.json - -#Jetbrains -.idea +node_modules +.turbo +*.log +dist +dist-ssr +*.local +.env +.cache +server/dist +public/dist \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index c9789ea3..438befe9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,48 +2,66 @@ "version": "0.2.0", "configurations": [ { - "name": "Launch firefox localhost", - "type": "firefox", - "request": "launch", - "reAttach": true, - "url": "http://localhost:5173", - "webRoot": "${workspaceFolder}/client" - }, - - { - "name": "Launch Chrome localhost", - "type": "chrome", - "request": "launch", - "url": "http://localhost:5173", - "webRoot": "${workspaceFolder}/client" - }, - - { - "type": "msedge", - "request": "launch", - "name": "CLIENT: Launch Edge against localhost", - "url": "http://localhost:5173", - "webRoot": "${workspaceFolder}/client" - }, - - { + "name": "Attach to Turbo Server API (ts-node-dev)", "type": "node", "request": "attach", - "name": "Attach to ts-node-dev", - "port": 4321, + "port": 9229, "restart": true, - "timeout": 10000, + "protocol": "inspector", + "skipFiles": ["/**"], "sourceMaps": true, - "resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"] + "outFiles": [ + "${workspaceFolder}/apps/api/src/**/*.ts", + "${workspaceFolder}/modules/*/src/**/*.ts", + "${workspaceFolder}/packages/*/src/**/*.ts" + ] }, - { - "name": "Launch via YARN", + "name": "Turbo: debug server-side + modules + packages", + "type": "node", "request": "launch", - "runtimeArgs": ["run", "server"], - "runtimeExecutable": "yarn", - "skipFiles": ["/**", "client/**", "dist/**", "doc/**"], - "type": "node" + "program": "${workspaceFolder}/apps/server/src/index.ts", + "runtimeArgs": ["-r", "ts-node/register"], + "envFile": "${workspaceFolder}/apps/server/.env", + "env": { + "NODE_ENV": "development", + "NODE_OPTIONS": "--inspect=0" + }, + "skipFiles": ["/**"], + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder}/apps/server/**/*.js", + "${workspaceFolder}/modules/**/dist/**/*.js", + "${workspaceFolder}/packages/**/dist/**/*.js" + ], + "cwd": "${workspaceFolder}" + }, + { + "name": "Debug Server", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/apps/server/src/index.ts", + "runtimeArgs": ["--require", "tsconfig-paths/register", "--inspect"], + "cwd": "${workspaceFolder}", + "outFiles": ["${workspaceFolder}/**/*.js"], + "sourceMaps": true, + "envFile": "${workspaceFolder}/apps/server/.env", + "internalConsoleOptions": "openOnSessionStart" + }, + { + "name": "Attach to Server", + "type": "node", + "request": "attach", + "port": 9229, + "restart": true, + "protocol": "inspector", + "skipFiles": ["/**"], + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder}/apps/server/dist/**/*.js", + "${workspaceFolder}/packages/*/dist/**/*.js", + "${workspaceFolder}/modules/*/dist/**/*.js" + ] } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 2817c103..036f1df1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,21 @@ { + "files.associations": { + "tsconfig.json": "jsonc", + "typescript-config/*.json": "jsonc" + }, + + // Javascript and TypeScript settings + "javascript.suggest.enabled": true, + "javascript.suggest.autoImports": true, + "javascript.preferences.importModuleSpecifier": "shortest", + + "typescript.suggest.enabled": true, + "typescript.suggest.autoImports": true, + "typescript.suggest.completeFunctionCalls": true, + "typescript.suggest.includeAutomaticOptionalChainCompletions": true, + "typescript.suggestionActions.enabled": true, + "typescript.preferences.importModuleSpecifier": "shortest", + "editor.codeActionsOnSave": { "source.organizeImports": "explicit", "source.fixAll.eslint": "explicit" @@ -11,7 +28,6 @@ "prettier.configPath": ".prettierrc", // other vscode settings - "tailwindCSS.rootFontSize": 16, "[handlebars]": { "editor.defaultFormatter": "vscode.html-language-features" } // <- your root font size here diff --git a/apps/server/package.json b/apps/server/package.json index 2769ef8a..bdef389f 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -1,11 +1,11 @@ { - "name": "node-server", + "name": "server", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "dev:nodebug": "ts-node-dev -r tsconfig-paths/register ./src/index.ts", - "dev": "ts-node-dev --transpile-only --respawn --inspect=4321 -r tsconfig-paths/register ./src/index.ts", + "dev": "ts-node-dev --rs --transpile-only --respawn --inspect=9229 -r tsconfig-paths/register ./src/index.ts", "clean": "rm -rf dist", "typecheck": "tsc --noEmit", "build": "npm run clean && npm run typecheck && esbuild src/index.ts --platform=node --format=cjs --bundle --sourcemap --minify --outdir=dist", @@ -18,8 +18,10 @@ "license": "ISC", "devDependencies": { "@repo/eslint-config": "workspace:*", - "@repo/tsconfig": "workspace:*", + "@repo/typescript-config": "workspace:*", "@types/bcrypt": "^5.0.2", + "@types/dinero.js": "^1.9.4", + "@types/dotenv": "^8.2.3", "@types/express": "^4.17.21", "@types/glob": "^8.1.0", "@types/jest": "^29.5.14", @@ -40,12 +42,11 @@ "typescript": "^5.7.3" }, "dependencies": { - "@types/dinero.js": "^1.9.4", "bcrypt": "^5.1.1", "cls-rtracer": "^2.6.3", "cors": "^2.8.5", "dinero.js": "^1.9.1", - "dotenv": "^16.4.7", + "dotenv": "^16.5.0", "esbuild": "^0.24.0", "express": "^4.18.2", "glob": "^11.0.1", diff --git a/apps/server/src/app.ts b/apps/server/src/app.ts index c7af1bbd..59477e1e 100644 --- a/apps/server/src/app.ts +++ b/apps/server/src/app.ts @@ -1,5 +1,4 @@ -import { sequelize } from "config/database"; -import { initPackages } from "core/package-loader"; +//import { initPackages } from "@/core/package-loader"; import dotenv from "dotenv"; import express, { Application } from "express"; import helmet from "helmet"; @@ -7,6 +6,7 @@ import responseTime from "response-time"; import { authProvider } from "./contexts/auth/infraestructure"; import { logger } from "./core/common/infrastructure/logger"; import { globalErrorHandler } from "./core/common/presentation"; +import { v1Routes } from "./routes"; dotenv.config(); @@ -48,8 +48,8 @@ export function createApp(): Application { }); // Registrar rutas de la API - // app.use("/api/v1", v1Routes()); - initPackages(app, sequelize); + app.use("/api/v1", v1Routes()); + // initPackages(app, sequelize); // Gestión global de errores. // Siempre al final de la cadena de middlewares diff --git a/apps/server/src/config/database.ts b/apps/server/src/config/database.ts index bd2160ce..e448ee4b 100644 --- a/apps/server/src/config/database.ts +++ b/apps/server/src/config/database.ts @@ -1,48 +1,84 @@ -import { logger } from "core/common/infrastructure/logger"; +import { logger } from "@/core/common/infrastructure/logger"; import dotenv from "dotenv"; import { Sequelize } from "sequelize"; +import { registerModels } from "./register-models"; dotenv.config(); -export const sequelize = new Sequelize( - process.env.DB_NAME as string, // database - process.env.DB_USER as string, // username - process.env.DB_PASSWORD as string, // password - { - host: process.env.DB_HOST as string, - dialect: "mysql", - port: parseInt(process.env.DB_PORT || "3306", 10), - dialectOptions: { - multipleStatements: true, - dateStrings: true, - typeCast: true, - //timezone: "Z", - }, - pool: { - max: 10, - min: 0, - acquire: 30000, - idle: 10000, - }, - logQueryParameters: true, - logging: process.env.DB_LOGGING === "true" ? logger.debug : false, - define: { - charset: "utf8mb4", - collate: "utf8mb4_unicode_ci", - //freezeTableName: true, - underscored: true, - timestamps: true, - }, - } -); +let sequelizeInstance: Sequelize | null = null; + +export function getDatabase(): Sequelize { + if (sequelizeInstance) { + return sequelizeInstance; + } + + sequelizeInstance = new Sequelize( + process.env.DB_NAME as string, + process.env.DB_USER as string, + process.env.DB_PASSWORD as string, + { + host: process.env.DB_HOST as string, + dialect: "mysql", + port: parseInt(process.env.DB_PORT || "3306", 10), + dialectOptions: { + multipleStatements: true, + dateStrings: true, + typeCast: true, + }, + pool: { + max: 10, + min: 0, + acquire: 30000, + idle: 10000, + }, + logQueryParameters: true, + logging: process.env.DB_LOGGING === "true" ? logger.debug : false, + define: { + charset: "utf8mb4", + collate: "utf8mb4_unicode_ci", + underscored: true, + timestamps: true, + }, + } + ); + + return sequelizeInstance; +} + +export async function tryConnectToDatabase() { + const database = getDatabase(); + + if (!database) { + const error = new Error("❌ Database not found."); + logger.error({ + message: error.message, + label: "tryConnectToDatabase", + }); + throw error; + } + logger.info({ message: `🔸 Connecting to database...`, label: "tryConnectToDatabase" }); -export async function connectToDatabase(): Promise { try { - await sequelize.authenticate(); - //await registerModels(); - logger.info(`✔️${" "}Database connection established successfully.`); + await database.authenticate(); + await registerModels(database); + + logger.info({ + message: `✔️${" "}Database connection established successfully.`, + label: "tryConnectToDatabase", + meta: { + host: process.env.DB_HOST, + port: process.env.DB_PORT, + database: process.env.DB_NAME, + user: process.env.DB_USER, + }, + }); + return database; } catch (error) { - logger.error("❌ Unable to connect to the database:", error); - process.exit(1); + logger.error({ + message: `❌ Unable to connect to the database: ${(error as Error).message}`, + error, + label: "tryConnectToDatabase", + }); + throw error; } } diff --git a/apps/server/src/config/register-models.ts b/apps/server/src/config/register-models.ts index cd81726a..95bd5a44 100644 --- a/apps/server/src/config/register-models.ts +++ b/apps/server/src/config/register-models.ts @@ -1,13 +1,21 @@ -import { logger } from "core/common/infrastructure/logger"; +import { logger } from "@/core/common/infrastructure/logger"; import * as glob from "glob"; import * as path from "path"; -import { DataTypes } from "sequelize"; -import { sequelize } from "./database"; +import { DataTypes, Sequelize } from "sequelize"; /** * 🔹 Registra todos los modelos en Sequelize */ -export const registerModels = async () => { +export const registerModels = async (database: Sequelize) => { + if (!database) { + const error = new Error("❌ Database not found."); + logger.error({ + message: error.message, + label: "initModels", + }); + throw error; + } + const cwd = path.resolve(`${__dirname}/../`); const models: { [key: string]: any } = {}; @@ -25,42 +33,46 @@ export const registerModels = async () => { // Buscamos los ficheros que terminen en .model.js o .model.ts glob.sync("**/*.model.{js,ts}", globOptions).forEach((file) => { //logger.info(`📄 File >> ${file}...`); - const modelDef = require(path.join(file)).default; - const model = typeof modelDef === "function" ? modelDef(sequelize, DataTypes) : false; + const modelFile = require(path.resolve(cwd, file)); + const modelDef = modelFile.default; + const model = typeof modelDef === "function" ? modelDef(database, DataTypes) : false; if (model) { models[model.name] = model; - logger.info(`🔸 Model >> ${model.name} (${file})`); + logger.info({ + message: `🔸 Model "${model.name}" registered (sequelize)`, + label: "registerModels", + }); } else { - logger.info(`🚫 No model`); + logger.info({ message: `🚫 No model`, label: "registerModels" }); } }); - - // Asociaciones y hooks de los modelos, si existen - for (const modelName in models) { - const model = models[modelName]; - if (model.associate) { - model.associate(sequelize, models); - } - if (model.hooks) { - model.hooks(sequelize); - } - } } catch (error) { logger.error("❌ Error registering models:", error); process.exit(1); } + // Configurar asociaciones + Object.values(models).forEach((model) => { + if (typeof model.associate === "function") { + model.associate(database); + } + }); + try { // Sincronizamos DB en modo desarrollo if (process.env.NODE_ENV !== "production") { - await sequelize.sync({ force: false, alter: true }); - logger.info(`✔️${" "}Database synchronized successfully.`); + await database.sync({ force: false, alter: true }); + logger.info({ message: `✔️${" "}Database synchronized successfully.`, label: "initModels" }); } else { - logger.warning("⚠️ Running in production mode - Skipping database sync."); + logger.warning({ + message: "⚠️ Running in production mode - Skipping database sync.", + label: "initModels", + }); } - } catch (error) { - logger.error("❌ Error synchronizing database:", error); - process.exit(1); + } catch (err) { + const error = err as Error; + logger.error({ message: "❌ Error synchronizing database:", error, label: "initModels" }); + throw error; } }; diff --git a/apps/server/src/contexts/accounts/application/create-account.use-case.ts b/apps/server/src/contexts/accounts/application/create-account.use-case.ts index 3e32c591..17c7df73 100644 --- a/apps/server/src/contexts/accounts/application/create-account.use-case.ts +++ b/apps/server/src/contexts/accounts/application/create-account.use-case.ts @@ -1,9 +1,15 @@ -import { EmailAddress, PhoneNumber, PostalAddress, TINNumber, UniqueID } from "core/common/domain"; +import { + EmailAddress, + PhoneNumber, + PostalAddress, + TINNumber, + UniqueID, +} from "@/core/common/domain"; -import { Account, AccountStatus, IAccountProps, IAccountService } from "@contexts/accounts/domain"; -import { Maybe, Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +import { Account, AccountStatus, IAccountProps, IAccountService } from "@/contexts/accounts/domain"; +import { Maybe, Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; import { ICreateAccountRequestDTO } from "../presentation"; export class CreateAccountUseCase { diff --git a/apps/server/src/contexts/accounts/application/get-account.use-case.ts b/apps/server/src/contexts/accounts/application/get-account.use-case.ts index 60bc26a7..2ed8c0c7 100644 --- a/apps/server/src/contexts/accounts/application/get-account.use-case.ts +++ b/apps/server/src/contexts/accounts/application/get-account.use-case.ts @@ -1,8 +1,8 @@ -import { Account, IAccountService } from "@contexts/accounts/domain"; -import { UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +import { Account, IAccountService } from "@/contexts/accounts/domain"; +import { UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; export class GetAccountUseCase { constructor( diff --git a/apps/server/src/contexts/accounts/application/list-accounts.use-case.ts b/apps/server/src/contexts/accounts/application/list-accounts.use-case.ts index 9b13e27d..61ff6abe 100644 --- a/apps/server/src/contexts/accounts/application/list-accounts.use-case.ts +++ b/apps/server/src/contexts/accounts/application/list-accounts.use-case.ts @@ -1,7 +1,7 @@ -import { Account, IAccountService } from "@contexts/accounts/domain"; -import { Collection, Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +import { Account, IAccountService } from "@/contexts/accounts/domain"; +import { Collection, Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; export class ListAccountsUseCase { constructor( diff --git a/apps/server/src/contexts/accounts/application/update-account.use-case.test.ts b/apps/server/src/contexts/accounts/application/update-account.use-case.test.ts index 28ff96ff..4c9e8f8b 100644 --- a/apps/server/src/contexts/accounts/application/update-account.use-case.test.ts +++ b/apps/server/src/contexts/accounts/application/update-account.use-case.test.ts @@ -1,6 +1,6 @@ -import { UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { TransactionManager } from "core/common/infrastructure/database"; +import { UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; +import { TransactionManager } from "@/core/common/infrastructure/database"; import { AccountService } from "../domain"; import { UpdateAccountUseCase } from "./update-account.use-case"; diff --git a/apps/server/src/contexts/accounts/application/update-account.use-case.ts b/apps/server/src/contexts/accounts/application/update-account.use-case.ts index 8e74b8fa..c81696a5 100644 --- a/apps/server/src/contexts/accounts/application/update-account.use-case.ts +++ b/apps/server/src/contexts/accounts/application/update-account.use-case.ts @@ -1,9 +1,15 @@ -import { EmailAddress, PhoneNumber, PostalAddress, TINNumber, UniqueID } from "core/common/domain"; +import { + EmailAddress, + PhoneNumber, + PostalAddress, + TINNumber, + UniqueID, +} from "@/core/common/domain"; -import { Account, IAccountProps, IAccountService } from "@contexts/accounts/domain"; -import { Maybe, Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +import { Account, IAccountProps, IAccountService } from "@/contexts/accounts/domain"; +import { Maybe, Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; import { IUpdateAccountRequestDTO } from "../presentation"; export class UpdateAccountUseCase { diff --git a/apps/server/src/contexts/accounts/domain/aggregates/account.ts b/apps/server/src/contexts/accounts/domain/aggregates/account.ts index c8793d89..f01a9324 100644 --- a/apps/server/src/contexts/accounts/domain/aggregates/account.ts +++ b/apps/server/src/contexts/accounts/domain/aggregates/account.ts @@ -5,8 +5,8 @@ import { PostalAddress, TINNumber, UniqueID, -} from "core/common/domain"; -import { Maybe, Result } from "core/common/helpers"; +} from "@/core/common/domain"; +import { Maybe, Result } from "@/core/common/helpers"; import { AccountStatus } from "../value-objects"; export interface IAccountProps { diff --git a/apps/server/src/contexts/accounts/domain/repositories/account-repository.interface.ts b/apps/server/src/contexts/accounts/domain/repositories/account-repository.interface.ts index a3a279d3..47104356 100644 --- a/apps/server/src/contexts/accounts/domain/repositories/account-repository.interface.ts +++ b/apps/server/src/contexts/accounts/domain/repositories/account-repository.interface.ts @@ -1,5 +1,5 @@ -import { EmailAddress, UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { EmailAddress, UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { Account } from "../aggregates"; export interface IAccountRepository { diff --git a/apps/server/src/contexts/accounts/domain/services/account-service.integration.test.ts b/apps/server/src/contexts/accounts/domain/services/account-service.integration.test.ts index 8e440911..3d2207bb 100644 --- a/apps/server/src/contexts/accounts/domain/services/account-service.integration.test.ts +++ b/apps/server/src/contexts/accounts/domain/services/account-service.integration.test.ts @@ -1,5 +1,11 @@ -import { EmailAddress, PhoneNumber, PostalAddress, TINNumber, UniqueID } from "core/common/domain"; -import { Maybe, Result } from "core/common/helpers"; +import { + EmailAddress, + PhoneNumber, + PostalAddress, + TINNumber, + UniqueID, +} from "@/core/common/domain"; +import { Maybe, Result } from "@/core/common/helpers"; import { Account, IAccountProps } from "../aggregates"; import { IAccountRepository } from "../repositories"; import { AccountStatus } from "../value-objects"; diff --git a/apps/server/src/contexts/accounts/domain/services/account-service.interface.ts b/apps/server/src/contexts/accounts/domain/services/account-service.interface.ts index bcc8c393..28a54762 100644 --- a/apps/server/src/contexts/accounts/domain/services/account-service.interface.ts +++ b/apps/server/src/contexts/accounts/domain/services/account-service.interface.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { Account, IAccountProps } from "../aggregates"; export interface IAccountService { diff --git a/apps/server/src/contexts/accounts/domain/services/account-service.test.ts b/apps/server/src/contexts/accounts/domain/services/account-service.test.ts index ad780f8d..8a362f39 100644 --- a/apps/server/src/contexts/accounts/domain/services/account-service.test.ts +++ b/apps/server/src/contexts/accounts/domain/services/account-service.test.ts @@ -1,4 +1,4 @@ -import { UniqueID } from "core/common/domain"; +import { UniqueID } from "@/core/common/domain"; import { Account } from "../aggregates"; import { IAccountRepository } from "../repositories"; import { AccountService } from "./account.service"; diff --git a/apps/server/src/contexts/accounts/domain/services/account.service.ts b/apps/server/src/contexts/accounts/domain/services/account.service.ts index 995fb142..d695fa49 100644 --- a/apps/server/src/contexts/accounts/domain/services/account.service.ts +++ b/apps/server/src/contexts/accounts/domain/services/account.service.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { Transaction } from "sequelize"; import { Account, IAccountProps } from "../aggregates"; import { IAccountRepository } from "../repositories"; diff --git a/apps/server/src/contexts/accounts/domain/value-objects/account-status.ts b/apps/server/src/contexts/accounts/domain/value-objects/account-status.ts index 08b4a9e1..51ec8a31 100644 --- a/apps/server/src/contexts/accounts/domain/value-objects/account-status.ts +++ b/apps/server/src/contexts/accounts/domain/value-objects/account-status.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; interface IAccountStatusProps { value: string; diff --git a/apps/server/src/contexts/accounts/infraestructure/mappers/account.mapper.ts b/apps/server/src/contexts/accounts/infraestructure/mappers/account.mapper.ts index da185f2c..2011d7f2 100644 --- a/apps/server/src/contexts/accounts/infraestructure/mappers/account.mapper.ts +++ b/apps/server/src/contexts/accounts/infraestructure/mappers/account.mapper.ts @@ -1,11 +1,17 @@ -import { Account, AccountStatus } from "@contexts/accounts/domain/"; -import { EmailAddress, PhoneNumber, PostalAddress, TINNumber, UniqueID } from "core/common/domain"; -import { Maybe, Result } from "core/common/helpers"; +import { Account, AccountStatus } from "@/contexts/accounts/domain/"; +import { + EmailAddress, + PhoneNumber, + PostalAddress, + TINNumber, + UniqueID, +} from "@/core/common/domain"; +import { Maybe, Result } from "@/core/common/helpers"; import { ISequelizeMapper, MapperParamsType, SequelizeMapper, -} from "core/common/infrastructure/sequelize/sequelize-mapper"; +} from "@/core/common/infrastructure/sequelize/sequelize-mapper"; import { AccountCreationAttributes, AccountModel } from "../sequelize/account.model"; export interface IAccountMapper diff --git a/apps/server/src/contexts/accounts/infraestructure/sequelize/account.repository.ts b/apps/server/src/contexts/accounts/infraestructure/sequelize/account.repository.ts index ae208196..d45d1020 100644 --- a/apps/server/src/contexts/accounts/infraestructure/sequelize/account.repository.ts +++ b/apps/server/src/contexts/accounts/infraestructure/sequelize/account.repository.ts @@ -1,8 +1,8 @@ -import { Account } from "@contexts/accounts/domain"; -import { IAccountRepository } from "@contexts/accounts/domain/repositories/account-repository.interface"; -import { EmailAddress, UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; -import { SequelizeRepository } from "core/common/infrastructure"; +import { Account } from "@/contexts/accounts/domain"; +import { IAccountRepository } from "@/contexts/accounts/domain/repositories/account-repository.interface"; +import { EmailAddress, UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; +import { SequelizeRepository } from "@/core/common/infrastructure"; import { Transaction } from "sequelize"; import { accountMapper, IAccountMapper } from "../mappers/account.mapper"; import { AccountModel } from "./account.model"; diff --git a/apps/server/src/contexts/accounts/infraestructure/sequelize/index.ts b/apps/server/src/contexts/accounts/infraestructure/sequelize/index.ts index 4cee2745..402ae901 100644 --- a/apps/server/src/contexts/accounts/infraestructure/sequelize/index.ts +++ b/apps/server/src/contexts/accounts/infraestructure/sequelize/index.ts @@ -1,4 +1,4 @@ -import { IAccountRepository } from "@contexts/accounts/domain/repositories/account-repository.interface"; +import { IAccountRepository } from "@/contexts/accounts/domain/repositories/account-repository.interface"; import { accountRepository } from "./account.repository"; export * from "./account.model"; diff --git a/apps/server/src/contexts/accounts/presentation/controllers/create-account/create-account.controller.ts b/apps/server/src/contexts/accounts/presentation/controllers/create-account/create-account.controller.ts index e54d51d7..6946004e 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/create-account/create-account.controller.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/create-account/create-account.controller.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { ExpressController } from "core/common/presentation"; +import { UniqueID } from "@/core/common/domain"; +import { ExpressController } from "@/core/common/presentation"; import { CreateAccountUseCase } from "../../../application"; import { ICreateAccountRequestDTO } from "../../dto"; import { ICreateAccountPresenter } from "./create-account.presenter"; diff --git a/apps/server/src/contexts/accounts/presentation/controllers/create-account/create-account.presenter.ts b/apps/server/src/contexts/accounts/presentation/controllers/create-account/create-account.presenter.ts index dd8e7a14..0244b2e8 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/create-account/create-account.presenter.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/create-account/create-account.presenter.ts @@ -1,5 +1,5 @@ -import { Account } from "@contexts/accounts/domain"; -import { ensureBoolean, ensureNumber, ensureString } from "core/common/helpers"; +import { Account } from "@/contexts/accounts/domain"; +import { ensureBoolean, ensureNumber, ensureString } from "@/core/common/helpers"; import { ICreateAccountResponseDTO } from "../../dto"; export interface ICreateAccountPresenter { diff --git a/apps/server/src/contexts/accounts/presentation/controllers/create-account/index.ts b/apps/server/src/contexts/accounts/presentation/controllers/create-account/index.ts index ebf25529..35bc7650 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/create-account/index.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/create-account/index.ts @@ -1,7 +1,7 @@ -import { CreateAccountUseCase } from "@contexts/accounts/application/create-account.use-case"; -import { AccountService } from "@contexts/accounts/domain"; -import { accountRepository } from "@contexts/accounts/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { CreateAccountUseCase } from "@/contexts/accounts/application/create-account.use-case"; +import { AccountService } from "@/contexts/accounts/domain"; +import { accountRepository } from "@/contexts/accounts/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; import { CreateAccountController } from "./create-account.controller"; import { createAccountPresenter } from "./create-account.presenter"; diff --git a/apps/server/src/contexts/accounts/presentation/controllers/get-account/get-account.controller.ts b/apps/server/src/contexts/accounts/presentation/controllers/get-account/get-account.controller.ts index b3e9d00c..0c893a10 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/get-account/get-account.controller.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/get-account/get-account.controller.ts @@ -1,6 +1,6 @@ -import { GetAccountUseCase } from "@contexts/accounts/application"; -import { UniqueID } from "core/common/domain"; -import { ExpressController } from "core/common/presentation"; +import { GetAccountUseCase } from "@/contexts/accounts/application"; +import { UniqueID } from "@/core/common/domain"; +import { ExpressController } from "@/core/common/presentation"; import { IGetAccountPresenter } from "./get-account.presenter"; export class GetAccountController extends ExpressController { diff --git a/apps/server/src/contexts/accounts/presentation/controllers/get-account/get-account.presenter.ts b/apps/server/src/contexts/accounts/presentation/controllers/get-account/get-account.presenter.ts index 7271e999..bcfe0877 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/get-account/get-account.presenter.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/get-account/get-account.presenter.ts @@ -1,5 +1,5 @@ -import { Account } from "@contexts/accounts/domain"; -import { ensureBoolean, ensureNumber, ensureString } from "core/common/helpers"; +import { Account } from "@/contexts/accounts/domain"; +import { ensureBoolean, ensureNumber, ensureString } from "@/core/common/helpers"; import { IGetAccountResponseDTO } from "../../dto"; export interface IGetAccountPresenter { diff --git a/apps/server/src/contexts/accounts/presentation/controllers/get-account/index.ts b/apps/server/src/contexts/accounts/presentation/controllers/get-account/index.ts index 2ec321e1..0a0dee47 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/get-account/index.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/get-account/index.ts @@ -1,7 +1,7 @@ -import { GetAccountUseCase } from "@contexts/accounts/application"; -import { AccountService } from "@contexts/accounts/domain"; -import { accountRepository } from "@contexts/accounts/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { GetAccountUseCase } from "@/contexts/accounts/application"; +import { AccountService } from "@/contexts/accounts/domain"; +import { accountRepository } from "@/contexts/accounts/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; import { GetAccountController } from "./get-account.controller"; import { getAccountPresenter } from "./get-account.presenter"; diff --git a/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/index.ts b/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/index.ts index 694601b5..3f520952 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/index.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/index.ts @@ -1,7 +1,7 @@ -import { ListAccountsUseCase } from "@contexts/accounts/application"; -import { AccountService } from "@contexts/accounts/domain"; -import { accountRepository } from "@contexts/accounts/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { ListAccountsUseCase } from "@/contexts/accounts/application"; +import { AccountService } from "@/contexts/accounts/domain"; +import { accountRepository } from "@/contexts/accounts/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; import { ListAccountsController } from "./list-accounts.controller"; import { listAccountsPresenter } from "./list-accounts.presenter"; diff --git a/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/list-accounts.controller.ts b/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/list-accounts.controller.ts index 94173613..0bf8bded 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/list-accounts.controller.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/list-accounts.controller.ts @@ -1,5 +1,5 @@ -import { ListAccountsUseCase } from "@contexts/accounts/application"; -import { ExpressController } from "core/common/presentation"; +import { ListAccountsUseCase } from "@/contexts/accounts/application"; +import { ExpressController } from "@/core/common/presentation"; import { IListAccountsPresenter } from "./list-accounts.presenter"; export class ListAccountsController extends ExpressController { diff --git a/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/list-accounts.presenter.ts b/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/list-accounts.presenter.ts index ca378fff..e39244dc 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/list-accounts.presenter.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/list-accounts/list-accounts.presenter.ts @@ -1,5 +1,5 @@ -import { Account } from "@contexts/accounts/domain"; -import { Collection, ensureBoolean, ensureNumber, ensureString } from "core/common/helpers"; +import { Account } from "@/contexts/accounts/domain"; +import { Collection, ensureBoolean, ensureNumber, ensureString } from "@/core/common/helpers"; import { IListAccountsResponseDTO } from "../../dto"; export interface IListAccountsPresenter { diff --git a/apps/server/src/contexts/accounts/presentation/controllers/update-account/index.ts b/apps/server/src/contexts/accounts/presentation/controllers/update-account/index.ts index 8a308e9d..df1c8e50 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/update-account/index.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/update-account/index.ts @@ -1,7 +1,7 @@ -import { UpdateAccountUseCase } from "@contexts/accounts/application"; -import { AccountService } from "@contexts/accounts/domain"; -import { accountRepository } from "@contexts/accounts/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { UpdateAccountUseCase } from "@/contexts/accounts/application"; +import { AccountService } from "@/contexts/accounts/domain"; +import { accountRepository } from "@/contexts/accounts/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; import { UpdateAccountController } from "./update-account.controller"; import { updateAccountPresenter } from "./update-account.presenter"; diff --git a/apps/server/src/contexts/accounts/presentation/controllers/update-account/update-account.controller.ts b/apps/server/src/contexts/accounts/presentation/controllers/update-account/update-account.controller.ts index 431dc663..2bc41ae6 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/update-account/update-account.controller.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/update-account/update-account.controller.ts @@ -1,6 +1,6 @@ -import { UpdateAccountUseCase } from "@contexts/accounts/application/update-account.use-case"; -import { UniqueID } from "core/common/domain"; -import { ExpressController } from "core/common/presentation"; +import { UpdateAccountUseCase } from "@/contexts/accounts/application/update-account.use-case"; +import { UniqueID } from "@/core/common/domain"; +import { ExpressController } from "@/core/common/presentation"; import { IUpdateAccountRequestDTO } from "../../dto"; import { IUpdateAccountPresenter } from "./update-account.presenter"; diff --git a/apps/server/src/contexts/accounts/presentation/controllers/update-account/update-account.presenter.ts b/apps/server/src/contexts/accounts/presentation/controllers/update-account/update-account.presenter.ts index 346e59a9..85d1c1b1 100644 --- a/apps/server/src/contexts/accounts/presentation/controllers/update-account/update-account.presenter.ts +++ b/apps/server/src/contexts/accounts/presentation/controllers/update-account/update-account.presenter.ts @@ -1,5 +1,5 @@ -import { Account } from "@contexts/accounts/domain"; -import { ensureBoolean, ensureNumber, ensureString } from "core/common/helpers"; +import { Account } from "@/contexts/accounts/domain"; +import { ensureBoolean, ensureNumber, ensureString } from "@/core/common/helpers"; import { IUpdateAccountResponseDTO } from "../../dto"; export interface IUpdateAccountPresenter { diff --git a/apps/server/src/contexts/auth/application/list-users/list-users.use-case.ts b/apps/server/src/contexts/auth/application/list-users/list-users.use-case.ts index 0fe5c936..a5dbbd7d 100644 --- a/apps/server/src/contexts/auth/application/list-users/list-users.use-case.ts +++ b/apps/server/src/contexts/auth/application/list-users/list-users.use-case.ts @@ -1,7 +1,7 @@ -import { User } from "@contexts/auth/domain"; -import { IUserService } from "@contexts/auth/domain/services"; -import { Collection, Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; +import { Collection, Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { User } from "../../domain"; +import { IUserService } from "../../domain/services"; export class ListUsersUseCase { constructor( diff --git a/apps/server/src/contexts/auth/application/login/login.use-case.ts b/apps/server/src/contexts/auth/application/login/login.use-case.ts index b820fc4c..989ba01e 100644 --- a/apps/server/src/contexts/auth/application/login/login.use-case.ts +++ b/apps/server/src/contexts/auth/application/login/login.use-case.ts @@ -1,6 +1,6 @@ -import { LoginData } from "@contexts/auth/domain"; -import { IAuthService } from "@contexts/auth/domain/services"; -import { ITransactionManager } from "core/common/infrastructure/database"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { LoginData } from "../../domain"; +import { IAuthService } from "../../domain/services"; export class LoginUseCase { constructor( diff --git a/apps/server/src/contexts/auth/application/logout/logout.use-case.ts b/apps/server/src/contexts/auth/application/logout/logout.use-case.ts index c69d6fbb..7d45e974 100644 --- a/apps/server/src/contexts/auth/application/logout/logout.use-case.ts +++ b/apps/server/src/contexts/auth/application/logout/logout.use-case.ts @@ -1,6 +1,6 @@ -import { LogoutData } from "@contexts/auth/domain"; -import { IAuthService } from "@contexts/auth/domain/services"; -import { ITransactionManager } from "core/common/infrastructure/database"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { LogoutData } from "../../domain"; +import { IAuthService } from "../../domain/services"; export class LogoutUseCase { constructor( diff --git a/apps/server/src/contexts/auth/application/refresh-token/refresh-token.use-case.ts b/apps/server/src/contexts/auth/application/refresh-token/refresh-token.use-case.ts index 2ad4b49c..3dc2c11f 100644 --- a/apps/server/src/contexts/auth/application/refresh-token/refresh-token.use-case.ts +++ b/apps/server/src/contexts/auth/application/refresh-token/refresh-token.use-case.ts @@ -1,6 +1,6 @@ -import { Token } from "@contexts/auth/domain"; -import { IAuthService } from "@contexts/auth/domain/services"; -import { ITransactionManager } from "core/common/infrastructure/database"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { Token } from "../../domain"; +import { IAuthService } from "../../domain/services"; export class RefreshTokenUseCase { constructor( diff --git a/apps/server/src/contexts/auth/application/register/register.use-case.ts b/apps/server/src/contexts/auth/application/register/register.use-case.ts index 8d92bf00..f5b941bf 100644 --- a/apps/server/src/contexts/auth/application/register/register.use-case.ts +++ b/apps/server/src/contexts/auth/application/register/register.use-case.ts @@ -1,8 +1,8 @@ -import { RegisterData } from "@contexts/auth/domain"; -import { IAuthService } from "@contexts/auth/domain/services"; -import { Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +import { Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; +import { RegisterData } from "../../domain"; +import { IAuthService } from "../../domain/services"; export class RegisterUseCase { constructor( diff --git a/apps/server/src/contexts/auth/domain/aggregates/authenticated-user.ts b/apps/server/src/contexts/auth/domain/aggregates/authenticated-user.ts index d085597c..ee1129f2 100644 --- a/apps/server/src/contexts/auth/domain/aggregates/authenticated-user.ts +++ b/apps/server/src/contexts/auth/domain/aggregates/authenticated-user.ts @@ -1,6 +1,6 @@ -import { Result } from "core/common/helpers"; +import { Result } from "@/core/common/helpers"; -import { AggregateRoot, EmailAddress, UniqueID } from "core/common/domain"; +import { AggregateRoot, EmailAddress, UniqueID } from "@/core/common/domain"; import { UserAuthenticatedEvent } from "../events"; import { HashPassword, PlainPassword, Username } from "../value-objects"; diff --git a/apps/server/src/contexts/auth/domain/aggregates/role.ts b/apps/server/src/contexts/auth/domain/aggregates/role.ts index 4aee3b34..f12ea914 100644 --- a/apps/server/src/contexts/auth/domain/aggregates/role.ts +++ b/apps/server/src/contexts/auth/domain/aggregates/role.ts @@ -1,5 +1,5 @@ -import { AggregateRoot, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { AggregateRoot, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; export interface IRoleProps {} diff --git a/apps/server/src/contexts/auth/domain/aggregates/user.ts b/apps/server/src/contexts/auth/domain/aggregates/user.ts index 93fade3d..07f4ffa5 100644 --- a/apps/server/src/contexts/auth/domain/aggregates/user.ts +++ b/apps/server/src/contexts/auth/domain/aggregates/user.ts @@ -1,5 +1,5 @@ -import { AggregateRoot, EmailAddress, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { AggregateRoot, EmailAddress, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { UserAuthenticatedEvent } from "../events"; import { Username } from "../value-objects"; diff --git a/apps/server/src/contexts/auth/domain/entities/jwt-payload.ts b/apps/server/src/contexts/auth/domain/entities/jwt-payload.ts index 6d6a7bc5..50e44c6b 100644 --- a/apps/server/src/contexts/auth/domain/entities/jwt-payload.ts +++ b/apps/server/src/contexts/auth/domain/entities/jwt-payload.ts @@ -1,5 +1,5 @@ -import { DomainEntity, EmailAddress, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { DomainEntity, EmailAddress, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; export interface IJWTPayloadProps { tabId: UniqueID; diff --git a/apps/server/src/contexts/auth/domain/entities/login-data.ts b/apps/server/src/contexts/auth/domain/entities/login-data.ts index 88a3a1da..3769786a 100644 --- a/apps/server/src/contexts/auth/domain/entities/login-data.ts +++ b/apps/server/src/contexts/auth/domain/entities/login-data.ts @@ -1,5 +1,5 @@ -import { DomainEntity, EmailAddress, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { DomainEntity, EmailAddress, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { PlainPassword } from "../value-objects"; export interface ILoginDataProps { diff --git a/apps/server/src/contexts/auth/domain/entities/logout-data.ts b/apps/server/src/contexts/auth/domain/entities/logout-data.ts index 9c4b4c0b..7fa19f28 100644 --- a/apps/server/src/contexts/auth/domain/entities/logout-data.ts +++ b/apps/server/src/contexts/auth/domain/entities/logout-data.ts @@ -1,5 +1,5 @@ -import { DomainEntity, EmailAddress, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { DomainEntity, EmailAddress, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; export interface ILogoutDataProps { email: EmailAddress; diff --git a/apps/server/src/contexts/auth/domain/entities/register-data.ts b/apps/server/src/contexts/auth/domain/entities/register-data.ts index 3366e1c6..132238a5 100644 --- a/apps/server/src/contexts/auth/domain/entities/register-data.ts +++ b/apps/server/src/contexts/auth/domain/entities/register-data.ts @@ -1,5 +1,5 @@ -import { DomainEntity, EmailAddress } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { DomainEntity, EmailAddress } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { HashPassword, Username } from "../value-objects"; export interface IRegisterDataProps { diff --git a/apps/server/src/contexts/auth/domain/entities/tab-context.ts b/apps/server/src/contexts/auth/domain/entities/tab-context.ts index fbbfe8e6..57aa50d5 100644 --- a/apps/server/src/contexts/auth/domain/entities/tab-context.ts +++ b/apps/server/src/contexts/auth/domain/entities/tab-context.ts @@ -1,5 +1,5 @@ -import { DomainEntity, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { DomainEntity, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; export interface ITabContextProps { tabId: UniqueID; diff --git a/apps/server/src/contexts/auth/domain/events/user-authenticated.event.ts b/apps/server/src/contexts/auth/domain/events/user-authenticated.event.ts index bf70fe0b..84e80692 100644 --- a/apps/server/src/contexts/auth/domain/events/user-authenticated.event.ts +++ b/apps/server/src/contexts/auth/domain/events/user-authenticated.event.ts @@ -1,4 +1,4 @@ -import { IDomainEvent, UniqueID } from "core/common/domain"; +import { IDomainEvent, UniqueID } from "@/core/common/domain"; export class UserAuthenticatedEvent implements IDomainEvent { public readonly eventName = "UserAuthenticated"; diff --git a/apps/server/src/contexts/auth/domain/repositories/authenticated-user-repository.interface.ts b/apps/server/src/contexts/auth/domain/repositories/authenticated-user-repository.interface.ts index d405b71d..bb9601ab 100644 --- a/apps/server/src/contexts/auth/domain/repositories/authenticated-user-repository.interface.ts +++ b/apps/server/src/contexts/auth/domain/repositories/authenticated-user-repository.interface.ts @@ -1,6 +1,6 @@ -import { Result } from "core/common/helpers"; +import { Result } from "@/core/common/helpers"; -import { EmailAddress } from "core/common/domain"; +import { EmailAddress } from "@/core/common/domain"; import { AuthenticatedUser } from "../aggregates"; import { Username } from "../value-objects"; diff --git a/apps/server/src/contexts/auth/domain/repositories/tab-context-repository.interface.ts b/apps/server/src/contexts/auth/domain/repositories/tab-context-repository.interface.ts index 558203e9..cf4ef40e 100644 --- a/apps/server/src/contexts/auth/domain/repositories/tab-context-repository.interface.ts +++ b/apps/server/src/contexts/auth/domain/repositories/tab-context-repository.interface.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { Transaction } from "sequelize"; import { TabContext } from "../entities"; diff --git a/apps/server/src/contexts/auth/domain/repositories/user-repository.interface.ts b/apps/server/src/contexts/auth/domain/repositories/user-repository.interface.ts index 907226bd..b25df65c 100644 --- a/apps/server/src/contexts/auth/domain/repositories/user-repository.interface.ts +++ b/apps/server/src/contexts/auth/domain/repositories/user-repository.interface.ts @@ -1,5 +1,5 @@ -import { EmailAddress, UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { EmailAddress, UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { User } from "../aggregates"; export interface IUserRepository { diff --git a/apps/server/src/contexts/auth/domain/services/auth-service.interface.ts b/apps/server/src/contexts/auth/domain/services/auth-service.interface.ts index ee12e043..8c8e668d 100644 --- a/apps/server/src/contexts/auth/domain/services/auth-service.interface.ts +++ b/apps/server/src/contexts/auth/domain/services/auth-service.interface.ts @@ -1,5 +1,5 @@ -import { EmailAddress } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { EmailAddress } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { AuthenticatedUser, IJWTPayload, diff --git a/apps/server/src/contexts/auth/domain/services/auth.service.ts b/apps/server/src/contexts/auth/domain/services/auth.service.ts index 8bb1baec..75db06fc 100644 --- a/apps/server/src/contexts/auth/domain/services/auth.service.ts +++ b/apps/server/src/contexts/auth/domain/services/auth.service.ts @@ -1,8 +1,8 @@ -import { EmailAddress } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { EmailAddress } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { AuthenticatedUser, IJWTPayload, LoginData, RegisterData, TabContext, Token } from ".."; -import { UniqueID } from "core/common/domain"; +import { UniqueID } from "@/core/common/domain"; import { IAuthenticatedUserRepository, JWTPayload } from ".."; import { JwtHelper } from "../../infraestructure/passport/jwt.helper"; import { ITabContextRepository } from "../repositories/tab-context-repository.interface"; diff --git a/apps/server/src/contexts/auth/domain/services/tab-context-service.interface.ts b/apps/server/src/contexts/auth/domain/services/tab-context-service.interface.ts index 82d69b41..a17b7b99 100644 --- a/apps/server/src/contexts/auth/domain/services/tab-context-service.interface.ts +++ b/apps/server/src/contexts/auth/domain/services/tab-context-service.interface.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { TabContext } from "../entities"; export interface ITabContextService { diff --git a/apps/server/src/contexts/auth/domain/services/tab-context.service.ts b/apps/server/src/contexts/auth/domain/services/tab-context.service.ts index b46aecfb..d6603f80 100644 --- a/apps/server/src/contexts/auth/domain/services/tab-context.service.ts +++ b/apps/server/src/contexts/auth/domain/services/tab-context.service.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { TabContext } from "../entities"; import { ITabContextRepository } from "../repositories"; import { ITabContextService } from "./tab-context-service.interface"; diff --git a/apps/server/src/contexts/auth/domain/services/user-service.interface.ts b/apps/server/src/contexts/auth/domain/services/user-service.interface.ts index 6ca6844d..cc49e4ac 100644 --- a/apps/server/src/contexts/auth/domain/services/user-service.interface.ts +++ b/apps/server/src/contexts/auth/domain/services/user-service.interface.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { User } from "../aggregates"; export interface IUserService { diff --git a/apps/server/src/contexts/auth/domain/services/user.service.ts b/apps/server/src/contexts/auth/domain/services/user.service.ts index cea8413d..ba8a6df2 100644 --- a/apps/server/src/contexts/auth/domain/services/user.service.ts +++ b/apps/server/src/contexts/auth/domain/services/user.service.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { IUserRepository, User } from ".."; import { IUserService } from "./user-service.interface"; diff --git a/apps/server/src/contexts/auth/domain/value-objects/auth-user-roles.ts b/apps/server/src/contexts/auth/domain/value-objects/auth-user-roles.ts index d8ed5998..8a3efe19 100644 --- a/apps/server/src/contexts/auth/domain/value-objects/auth-user-roles.ts +++ b/apps/server/src/contexts/auth/domain/value-objects/auth-user-roles.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { z } from "zod"; const RoleSchema = z.enum(["Admin", "User", "Manager", "Editor"]); diff --git a/apps/server/src/contexts/auth/domain/value-objects/hash-password.ts b/apps/server/src/contexts/auth/domain/value-objects/hash-password.ts index 36ea248c..0a1201cc 100644 --- a/apps/server/src/contexts/auth/domain/value-objects/hash-password.ts +++ b/apps/server/src/contexts/auth/domain/value-objects/hash-password.ts @@ -1,6 +1,5 @@ -import bcrypt from "bcrypt"; -import { ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { z } from "zod"; interface HashPasswordProps { @@ -41,4 +40,8 @@ export class HashPassword extends ValueObject { toString() { return this.props.value; } + + toPrimitive() { + return this.props.value; + } } diff --git a/apps/server/src/contexts/auth/domain/value-objects/plain-password.ts b/apps/server/src/contexts/auth/domain/value-objects/plain-password.ts index b252e424..7b51b2cd 100644 --- a/apps/server/src/contexts/auth/domain/value-objects/plain-password.ts +++ b/apps/server/src/contexts/auth/domain/value-objects/plain-password.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { z } from "zod"; interface PlainPasswordProps { diff --git a/apps/server/src/contexts/auth/domain/value-objects/token.ts b/apps/server/src/contexts/auth/domain/value-objects/token.ts index 6a005c50..fe66ec76 100644 --- a/apps/server/src/contexts/auth/domain/value-objects/token.ts +++ b/apps/server/src/contexts/auth/domain/value-objects/token.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { z } from "zod"; interface TokenProps { diff --git a/apps/server/src/contexts/auth/domain/value-objects/username.ts b/apps/server/src/contexts/auth/domain/value-objects/username.ts index aa495ccf..33a1cfe9 100644 --- a/apps/server/src/contexts/auth/domain/value-objects/username.ts +++ b/apps/server/src/contexts/auth/domain/value-objects/username.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { z } from "zod"; interface UsernameProps { @@ -34,4 +34,8 @@ export class Username extends ValueObject { toString() { return this.props.value; } + + toPrimitive() { + return this.props.value; + } } diff --git a/apps/server/src/contexts/auth/infraestructure/express/types.ts b/apps/server/src/contexts/auth/infraestructure/express/types.ts index a611c231..eba23dea 100644 --- a/apps/server/src/contexts/auth/infraestructure/express/types.ts +++ b/apps/server/src/contexts/auth/infraestructure/express/types.ts @@ -1,5 +1,5 @@ -import { AuthenticatedUser, TabContext } from "@contexts/auth/domain"; import { Request } from "express"; +import { AuthenticatedUser, TabContext } from "../../domain"; export interface TabContextRequest extends Request { tabContext?: TabContext; diff --git a/apps/server/src/contexts/auth/infraestructure/mappers/authenticated-user.mapper.ts b/apps/server/src/contexts/auth/infraestructure/mappers/authenticated-user.mapper.ts index ccd3d7c4..38c80d70 100644 --- a/apps/server/src/contexts/auth/infraestructure/mappers/authenticated-user.mapper.ts +++ b/apps/server/src/contexts/auth/infraestructure/mappers/authenticated-user.mapper.ts @@ -1,7 +1,12 @@ -import { AuthenticatedUser, HashPassword, Username } from "@contexts/auth/domain"; -import { EmailAddress, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { ISequelizeMapper, MapperParamsType, SequelizeMapper } from "core/common/infrastructure"; +import { + EmailAddress, + ISequelizeMapper, + MapperParamsType, + Result, + SequelizeMapper, + UniqueID, +} from "@/core"; +import { AuthenticatedUser, HashPassword, Username } from "../../domain"; import { AuthUserCreationAttributes, AuthUserModel } from "../sequelize"; export interface IAuthenticatedUserMapper diff --git a/apps/server/src/contexts/auth/infraestructure/mappers/tab-context.mapper.ts b/apps/server/src/contexts/auth/infraestructure/mappers/tab-context.mapper.ts index 74c3d649..fef38413 100644 --- a/apps/server/src/contexts/auth/infraestructure/mappers/tab-context.mapper.ts +++ b/apps/server/src/contexts/auth/infraestructure/mappers/tab-context.mapper.ts @@ -1,7 +1,7 @@ -import { TabContext } from "@contexts/auth/domain"; -import { UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { ISequelizeMapper, MapperParamsType, SequelizeMapper } from "core/common/infrastructure"; +import { UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; +import { ISequelizeMapper, MapperParamsType, SequelizeMapper } from "@/core/common/infrastructure"; +import { TabContext } from "../../domain"; import { TabContextCreationAttributes, TabContextModel } from "../sequelize"; export interface ITabContextMapper diff --git a/apps/server/src/contexts/auth/infraestructure/mappers/user.mapper.ts b/apps/server/src/contexts/auth/infraestructure/mappers/user.mapper.ts index b0bb3897..39060fa8 100644 --- a/apps/server/src/contexts/auth/infraestructure/mappers/user.mapper.ts +++ b/apps/server/src/contexts/auth/infraestructure/mappers/user.mapper.ts @@ -1,11 +1,11 @@ -import { User, Username } from "@contexts/auth/domain"; -import { EmailAddress, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { EmailAddress, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { ISequelizeMapper, MapperParamsType, SequelizeMapper, -} from "core/common/infrastructure/sequelize/sequelize-mapper"; +} from "@/core/common/infrastructure/sequelize/sequelize-mapper"; +import { User, Username } from "../../domain"; import { UserCreationAttributes, UserModel } from "../sequelize"; export interface IUserMapper extends ISequelizeMapper {} diff --git a/apps/server/src/contexts/auth/infraestructure/middleware/passport-auth.middleware.ts b/apps/server/src/contexts/auth/infraestructure/middleware/passport-auth.middleware.ts index 09d75350..e871ecd4 100644 --- a/apps/server/src/contexts/auth/infraestructure/middleware/passport-auth.middleware.ts +++ b/apps/server/src/contexts/auth/infraestructure/middleware/passport-auth.middleware.ts @@ -1,7 +1,7 @@ -import { AuthenticatedUser } from "@contexts/auth/domain"; -import { UniqueID } from "core/common/domain"; -import { ApiError, ExpressController } from "core/common/presentation"; -//import { authProvider } from "@contexts/auth/infraestructure"; +import { UniqueID } from "@/core/common/domain"; +import { ApiError, ExpressController } from "@/core/common/presentation"; +import { AuthenticatedUser } from "../../domain"; +//import { authProvider } from "@/contexts/auth/infraestructure"; import { NextFunction, Response } from "express"; import { AuthenticatedRequest } from "../express/types"; import { authProvider } from "../passport"; diff --git a/apps/server/src/contexts/auth/infraestructure/passport/index.ts b/apps/server/src/contexts/auth/infraestructure/passport/index.ts index d6dabc9d..28cfdedd 100644 --- a/apps/server/src/contexts/auth/infraestructure/passport/index.ts +++ b/apps/server/src/contexts/auth/infraestructure/passport/index.ts @@ -1,9 +1,12 @@ -import { AuthService, TabContextService } from "@contexts/auth/domain/services"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { getDatabase } from "@/config"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; +import { AuthService, TabContextService } from "../../domain/services"; import { authenticatedUserRepository, tabContextRepository } from "../sequelize"; import { PassportAuthProvider } from "./passport-auth-provider"; -const transactionManager = new SequelizeTransactionManager(); +const database = getDatabase(); + +const transactionManager = new SequelizeTransactionManager(database); const authService = new AuthService(authenticatedUserRepository, tabContextRepository); const tabContextService = new TabContextService(tabContextRepository); diff --git a/apps/server/src/contexts/auth/infraestructure/passport/passport-auth-provider.ts b/apps/server/src/contexts/auth/infraestructure/passport/passport-auth-provider.ts index 6d7493a3..97a9b770 100644 --- a/apps/server/src/contexts/auth/infraestructure/passport/passport-auth-provider.ts +++ b/apps/server/src/contexts/auth/infraestructure/passport/passport-auth-provider.ts @@ -1,13 +1,13 @@ import { NextFunction, Response } from "express"; -import { TabContext } from "@contexts/auth/domain"; -import { IAuthService, ITabContextService } from "@contexts/auth/domain/services"; -import { EmailAddress, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +import { EmailAddress, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; import passport from "passport"; import { ExtractJwt, Strategy as JwtStrategy } from "passport-jwt"; +import { TabContext } from "../../domain"; +import { IAuthService, ITabContextService } from "../../domain/services"; import { TabContextRequest } from "../express/types"; const SECRET_KEY = process.env.JWT_SECRET || "supersecretkey"; diff --git a/apps/server/src/contexts/auth/infraestructure/sequelize/authenticated-user.repository.ts b/apps/server/src/contexts/auth/infraestructure/sequelize/authenticated-user.repository.ts index 809d1755..19444e56 100644 --- a/apps/server/src/contexts/auth/infraestructure/sequelize/authenticated-user.repository.ts +++ b/apps/server/src/contexts/auth/infraestructure/sequelize/authenticated-user.repository.ts @@ -1,8 +1,8 @@ -import { AuthenticatedUser, IAuthenticatedUserRepository, Username } from "@contexts/auth/domain"; -import { EmailAddress } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { SequelizeRepository } from "core/common/infrastructure"; +import { EmailAddress } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; +import { SequelizeRepository } from "@/core/common/infrastructure"; import { Transaction } from "sequelize"; +import { AuthenticatedUser, IAuthenticatedUserRepository, Username } from "../../domain"; import { authenticatedUserMapper, IAuthenticatedUserMapper } from "../mappers"; import { AuthUserModel } from "./auth-user.model"; diff --git a/apps/server/src/contexts/auth/infraestructure/sequelize/tab-context.repository.ts b/apps/server/src/contexts/auth/infraestructure/sequelize/tab-context.repository.ts index 722102ce..9df72afc 100644 --- a/apps/server/src/contexts/auth/infraestructure/sequelize/tab-context.repository.ts +++ b/apps/server/src/contexts/auth/infraestructure/sequelize/tab-context.repository.ts @@ -1,8 +1,8 @@ -import { ITabContextRepository, TabContext } from "@contexts/auth/domain/"; -import { UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { SequelizeRepository } from "core/common/infrastructure"; +import { UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; +import { SequelizeRepository } from "@/core/common/infrastructure"; import { Op, Transaction } from "sequelize"; +import { ITabContextRepository, TabContext } from "../../domain/"; import { ITabContextMapper, tabContextMapper } from "../mappers"; import { TabContextModel } from "./tab-context.model"; diff --git a/apps/server/src/contexts/auth/infraestructure/sequelize/user.repository.ts b/apps/server/src/contexts/auth/infraestructure/sequelize/user.repository.ts index 86336ee4..33f3d64b 100644 --- a/apps/server/src/contexts/auth/infraestructure/sequelize/user.repository.ts +++ b/apps/server/src/contexts/auth/infraestructure/sequelize/user.repository.ts @@ -1,8 +1,8 @@ -import { IUserRepository, User } from "@contexts/auth/domain"; -import { EmailAddress, UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; -import { SequelizeRepository } from "core/common/infrastructure"; +import { EmailAddress, UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; +import { SequelizeRepository } from "@/core/common/infrastructure"; import { Transaction } from "sequelize"; +import { IUserRepository, User } from "../../domain"; import { IUserMapper, userMapper } from "../mappers"; import { UserModel } from "./user.model"; diff --git a/apps/server/src/contexts/auth/presentation/controllers/listUsers/index.ts b/apps/server/src/contexts/auth/presentation/controllers/listUsers/index.ts index 2346bd43..12eccffb 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/listUsers/index.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/listUsers/index.ts @@ -1,7 +1,7 @@ -import { ListUsersUseCase } from "@contexts/auth/application/list-users/list-users.use-case"; -import { UserService } from "@contexts/auth/domain/services/user.service"; -import { userRepository } from "@contexts/auth/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { ListUsersUseCase } from "@/contexts/auth/application/list-users/list-users.use-case"; +import { userRepository } from "@/contexts/auth/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; +import { UserService } from "../../domain/services/user.service"; import { ListUsersController } from "./list-users.controller"; import { listUsersPresenter } from "./list-users.presenter"; diff --git a/apps/server/src/contexts/auth/presentation/controllers/listUsers/list-users.controller.ts b/apps/server/src/contexts/auth/presentation/controllers/listUsers/list-users.controller.ts index 232cccd9..d6e727f3 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/listUsers/list-users.controller.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/listUsers/list-users.controller.ts @@ -1,5 +1,5 @@ -import { ListUsersUseCase } from "@contexts/auth/application"; -import { ExpressController } from "core/common/presentation"; +import { ListUsersUseCase } from "@/contexts/auth/application"; +import { ExpressController } from "@/core/common/presentation"; import { IListUsersPresenter } from "./list-users.presenter"; export class ListUsersController extends ExpressController { diff --git a/apps/server/src/contexts/auth/presentation/controllers/listUsers/list-users.presenter.ts b/apps/server/src/contexts/auth/presentation/controllers/listUsers/list-users.presenter.ts index fbf32897..ebf88c12 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/listUsers/list-users.presenter.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/listUsers/list-users.presenter.ts @@ -1,5 +1,5 @@ -import { User } from "@contexts/auth/domain"; -import { Collection, ensureString } from "core/common/helpers"; +import { Collection, ensureString } from "@/core/common/helpers"; +import { User } from "../../domain"; import { IListUsersResponseDTO } from "../../dto"; export interface IListUsersPresenter { diff --git a/apps/server/src/contexts/auth/presentation/controllers/login/index.ts b/apps/server/src/contexts/auth/presentation/controllers/login/index.ts index 9667fa02..9682039d 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/login/index.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/login/index.ts @@ -1,7 +1,7 @@ -import { LoginUseCase } from "@contexts/auth/application"; -import { AuthService } from "@contexts/auth/domain/services"; -import { authenticatedUserRepository, tabContextRepository } from "@contexts/auth/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { LoginUseCase } from "@/contexts/auth/application"; +import { authenticatedUserRepository, tabContextRepository } from "@/contexts/auth/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; +import { AuthService } from "../../domain/services"; import { LoginController } from "./login.controller"; import { loginPresenter } from "./login.presenter"; diff --git a/apps/server/src/contexts/auth/presentation/controllers/login/login.controller.ts b/apps/server/src/contexts/auth/presentation/controllers/login/login.controller.ts index 30651058..d910b4e6 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/login/login.controller.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/login/login.controller.ts @@ -1,6 +1,6 @@ -import { LoginUseCase } from "@contexts/auth/application"; -import { LoginData } from "@contexts/auth/domain"; -import { ExpressController } from "core/common/presentation"; +import { LoginUseCase } from "@/contexts/auth/application"; +import { ExpressController } from "@/core/common/presentation"; +import { LoginData } from "../../domain"; import { ILoginPresenter } from "./login.presenter"; export class LoginController extends ExpressController { diff --git a/apps/server/src/contexts/auth/presentation/controllers/login/login.presenter.ts b/apps/server/src/contexts/auth/presentation/controllers/login/login.presenter.ts index fa1e3aad..51be28df 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/login/login.presenter.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/login/login.presenter.ts @@ -1,4 +1,4 @@ -import { AuthenticatedUser, TabContext, Token } from "@contexts/auth/domain"; +import { AuthenticatedUser, TabContext, Token } from "../../domain"; import { ILoginUserResponseDTO } from "../../dto"; export interface ILoginPresenter { diff --git a/apps/server/src/contexts/auth/presentation/controllers/logout/index.ts b/apps/server/src/contexts/auth/presentation/controllers/logout/index.ts index bb353e02..6c91a987 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/logout/index.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/logout/index.ts @@ -1,7 +1,7 @@ -import { LogoutUseCase } from "@contexts/auth/application"; -import { AuthService } from "@contexts/auth/domain/services"; -import { authenticatedUserRepository, tabContextRepository } from "@contexts/auth/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { LogoutUseCase } from "@/contexts/auth/application"; +import { authenticatedUserRepository, tabContextRepository } from "@/contexts/auth/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; +import { AuthService } from "../../domain/services"; import { LogoutController } from "./logout.controller"; export const buildLogoutController = () => { diff --git a/apps/server/src/contexts/auth/presentation/controllers/logout/logout.controller.ts b/apps/server/src/contexts/auth/presentation/controllers/logout/logout.controller.ts index b43914d2..457bd327 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/logout/logout.controller.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/logout/logout.controller.ts @@ -1,7 +1,7 @@ -import { LogoutUseCase } from "@contexts/auth/application/logout"; -import { AuthenticatedUser, LogoutData, TabContext } from "@contexts/auth/domain"; -import { TabContextRequest } from "@contexts/auth/infraestructure/express/types"; -import { ExpressController } from "core/common/presentation"; +import { LogoutUseCase } from "@/contexts/auth/application/logout"; +import { TabContextRequest } from "@/contexts/auth/infraestructure/express/types"; +import { ExpressController } from "@/core/common/presentation"; +import { AuthenticatedUser, LogoutData, TabContext } from "../../domain"; export class LogoutController extends ExpressController { public constructor(private readonly logout: LogoutUseCase) { diff --git a/apps/server/src/contexts/auth/presentation/controllers/refreshToken/index.ts b/apps/server/src/contexts/auth/presentation/controllers/refreshToken/index.ts index a0ca0821..8e82b291 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/refreshToken/index.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/refreshToken/index.ts @@ -1,7 +1,7 @@ -import { RefreshTokenUseCase } from "@contexts/auth/application"; -import { AuthService } from "@contexts/auth/domain/services"; -import { authenticatedUserRepository, tabContextRepository } from "@contexts/auth/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { RefreshTokenUseCase } from "@/contexts/auth/application"; +import { authenticatedUserRepository, tabContextRepository } from "@/contexts/auth/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; +import { AuthService } from "../../domain/services"; import { RefreshTokenController } from "./refresh-token.controller"; import { refreshTokenPresenter } from "./refresh-token.presenter"; diff --git a/apps/server/src/contexts/auth/presentation/controllers/refreshToken/refresh-token.controller.ts b/apps/server/src/contexts/auth/presentation/controllers/refreshToken/refresh-token.controller.ts index b45e7dd4..8c3357a4 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/refreshToken/refresh-token.controller.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/refreshToken/refresh-token.controller.ts @@ -1,6 +1,6 @@ -import { RefreshTokenUseCase } from "@contexts/auth/application"; -import { Token } from "@contexts/auth/domain"; -import { ExpressController } from "core/common/presentation"; +import { RefreshTokenUseCase } from "@/contexts/auth/application"; +import { ExpressController } from "@/core/common/presentation"; +import { Token } from "../../domain"; import { IRefreshTokenPresenter } from "./refresh-token.presenter"; export class RefreshTokenController extends ExpressController { diff --git a/apps/server/src/contexts/auth/presentation/controllers/refreshToken/refresh-token.presenter.ts b/apps/server/src/contexts/auth/presentation/controllers/refreshToken/refresh-token.presenter.ts index bd14222b..59c2f9ef 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/refreshToken/refresh-token.presenter.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/refreshToken/refresh-token.presenter.ts @@ -1,4 +1,4 @@ -import { Token } from "@contexts/auth/domain"; +import { Token } from "../../domain"; import { IRefreshTokenResponseDTO } from "../../dto"; export interface IRefreshTokenPresenter { diff --git a/apps/server/src/contexts/auth/presentation/controllers/register/index.ts b/apps/server/src/contexts/auth/presentation/controllers/register/index.ts index 61a3d7fb..472e54f0 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/register/index.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/register/index.ts @@ -1,7 +1,7 @@ -import { RegisterUseCase } from "@contexts/auth/application/register"; -import { AuthService } from "@contexts/auth/domain/services"; -import { authenticatedUserRepository, tabContextRepository } from "@contexts/auth/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { RegisterUseCase } from "@/contexts/auth/application/register"; +import { authenticatedUserRepository, tabContextRepository } from "@/contexts/auth/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; +import { AuthService } from "../../domain/services"; import { RegisterController } from "./register.controller"; import { registerPresenter } from "./register.presenter"; diff --git a/apps/server/src/contexts/auth/presentation/controllers/register/register.controller.ts b/apps/server/src/contexts/auth/presentation/controllers/register/register.controller.ts index 16e0dd23..c3c1ea6f 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/register/register.controller.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/register/register.controller.ts @@ -1,6 +1,6 @@ -import { RegisterUseCase } from "@contexts/auth/application"; -import { RegisterData } from "@contexts/auth/domain"; -import { ExpressController } from "core/common/presentation"; +import { RegisterUseCase } from "@/contexts/auth/application"; +import { ExpressController } from "@/core/common/presentation"; +import { RegisterData } from "../../domain"; import { IRegisterPresenter } from "./register.presenter"; export class RegisterController extends ExpressController { diff --git a/apps/server/src/contexts/auth/presentation/controllers/register/register.presenter.ts b/apps/server/src/contexts/auth/presentation/controllers/register/register.presenter.ts index b391993f..d5fa5adc 100644 --- a/apps/server/src/contexts/auth/presentation/controllers/register/register.presenter.ts +++ b/apps/server/src/contexts/auth/presentation/controllers/register/register.presenter.ts @@ -1,4 +1,4 @@ -import { AuthenticatedUser } from "@contexts/auth/domain"; +import { AuthenticatedUser } from "../../domain"; import { IRegisterUserResponseDTO } from "../../dto"; export interface IRegisterPresenter { diff --git a/apps/server/src/contexts/contacts/application/list-contacts.use-case.ts b/apps/server/src/contexts/contacts/application/list-contacts.use-case.ts index babd8993..76417421 100644 --- a/apps/server/src/contexts/contacts/application/list-contacts.use-case.ts +++ b/apps/server/src/contexts/contacts/application/list-contacts.use-case.ts @@ -1,5 +1,5 @@ -import { Collection, Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; +import { Collection, Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; import { Contact, IContactService } from "../domain"; export class ListContactsUseCase { diff --git a/apps/server/src/contexts/contacts/domain/aggregates/contact.ts b/apps/server/src/contexts/contacts/domain/aggregates/contact.ts index 93c30c60..824ab26b 100644 --- a/apps/server/src/contexts/contacts/domain/aggregates/contact.ts +++ b/apps/server/src/contexts/contacts/domain/aggregates/contact.ts @@ -5,8 +5,8 @@ import { PostalAddress, TINNumber, UniqueID, -} from "core/common/domain"; -import { Maybe, Result } from "core/common/helpers"; +} from "@/core/common/domain"; +import { Maybe, Result } from "@/core/common/helpers"; export interface IContactProps { reference: string; diff --git a/apps/server/src/contexts/contacts/domain/repositories/contact-repository.interface.ts b/apps/server/src/contexts/contacts/domain/repositories/contact-repository.interface.ts index a03da40c..b19785a9 100644 --- a/apps/server/src/contexts/contacts/domain/repositories/contact-repository.interface.ts +++ b/apps/server/src/contexts/contacts/domain/repositories/contact-repository.interface.ts @@ -1,5 +1,5 @@ -import { EmailAddress, UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { EmailAddress, UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { Contact } from "../aggregates"; export interface IContactRepository { diff --git a/apps/server/src/contexts/contacts/domain/services/contact-service.interface.ts b/apps/server/src/contexts/contacts/domain/services/contact-service.interface.ts index 77975e17..6ca737c6 100644 --- a/apps/server/src/contexts/contacts/domain/services/contact-service.interface.ts +++ b/apps/server/src/contexts/contacts/domain/services/contact-service.interface.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { Contact } from "../aggregates"; export interface IContactService { diff --git a/apps/server/src/contexts/contacts/domain/services/contact.service.ts b/apps/server/src/contexts/contacts/domain/services/contact.service.ts index 352afde4..25faf994 100644 --- a/apps/server/src/contexts/contacts/domain/services/contact.service.ts +++ b/apps/server/src/contexts/contacts/domain/services/contact.service.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { Contact } from "../aggregates"; import { IContactRepository } from "../repositories"; import { IContactService } from "./contact-service.interface"; diff --git a/apps/server/src/contexts/contacts/infraestructure/mappers/contact.mapper.ts b/apps/server/src/contexts/contacts/infraestructure/mappers/contact.mapper.ts index 036e3f3a..2fc9a5ec 100644 --- a/apps/server/src/contexts/contacts/infraestructure/mappers/contact.mapper.ts +++ b/apps/server/src/contexts/contacts/infraestructure/mappers/contact.mapper.ts @@ -1,10 +1,16 @@ -import { EmailAddress, PhoneNumber, PostalAddress, TINNumber, UniqueID } from "core/common/domain"; -import { Maybe, Result } from "core/common/helpers"; +import { + EmailAddress, + PhoneNumber, + PostalAddress, + TINNumber, + UniqueID, +} from "@/core/common/domain"; +import { Maybe, Result } from "@/core/common/helpers"; import { ISequelizeMapper, MapperParamsType, SequelizeMapper, -} from "core/common/infrastructure/sequelize/sequelize-mapper"; +} from "@/core/common/infrastructure/sequelize/sequelize-mapper"; import { Contact } from "../../domain"; import { ContactCreationAttributes, ContactModel } from "../sequelize/contact.model"; diff --git a/apps/server/src/contexts/contacts/infraestructure/sequelize/contact.repository.ts b/apps/server/src/contexts/contacts/infraestructure/sequelize/contact.repository.ts index 643cbf3b..8c03fb51 100644 --- a/apps/server/src/contexts/contacts/infraestructure/sequelize/contact.repository.ts +++ b/apps/server/src/contexts/contacts/infraestructure/sequelize/contact.repository.ts @@ -1,6 +1,6 @@ -import { EmailAddress, UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; -import { SequelizeRepository } from "core/common/infrastructure"; +import { EmailAddress, UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; +import { SequelizeRepository } from "@/core/common/infrastructure"; import { Transaction } from "sequelize"; import { Contact, IContactRepository } from "../../domain"; import { contactMapper, IContactMapper } from "../mappers"; diff --git a/apps/server/src/contexts/contacts/presentation/controllers/list/index.ts b/apps/server/src/contexts/contacts/presentation/controllers/list/index.ts index 3eac4078..070a5ea3 100644 --- a/apps/server/src/contexts/contacts/presentation/controllers/list/index.ts +++ b/apps/server/src/contexts/contacts/presentation/controllers/list/index.ts @@ -1,4 +1,4 @@ -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; import { ListContactsUseCase } from "../../../application"; import { ContactService } from "../../../domain"; import { contactRepository } from "../../../infraestructure"; diff --git a/apps/server/src/contexts/contacts/presentation/controllers/list/list-contacts.controller.ts b/apps/server/src/contexts/contacts/presentation/controllers/list/list-contacts.controller.ts index a5ea1975..a5f2dcf7 100644 --- a/apps/server/src/contexts/contacts/presentation/controllers/list/list-contacts.controller.ts +++ b/apps/server/src/contexts/contacts/presentation/controllers/list/list-contacts.controller.ts @@ -1,4 +1,4 @@ -import { ExpressController } from "core/common/presentation"; +import { ExpressController } from "@/core/common/presentation"; import { ListContactsUseCase } from "../../../application"; import { IListContactsPresenter } from "./list-contacts.presenter"; diff --git a/apps/server/src/contexts/contacts/presentation/controllers/list/list-contacts.presenter.ts b/apps/server/src/contexts/contacts/presentation/controllers/list/list-contacts.presenter.ts index 74c14d72..68c56d01 100644 --- a/apps/server/src/contexts/contacts/presentation/controllers/list/list-contacts.presenter.ts +++ b/apps/server/src/contexts/contacts/presentation/controllers/list/list-contacts.presenter.ts @@ -1,4 +1,4 @@ -import { Collection, ensureBoolean, ensureNumber, ensureString } from "core/common/helpers"; +import { Collection, ensureBoolean, ensureNumber, ensureString } from "@/core/common/helpers"; import { Contact } from "../../../domain"; import { IListContactsResponseDTO } from "../../dto"; diff --git a/apps/server/src/contexts/customer-billing/application/get-customer-invoice.use-case.ts b/apps/server/src/contexts/customer-billing/application/get-customer-invoice.use-case.ts index 5c2546cc..62d3c4f7 100644 --- a/apps/server/src/contexts/customer-billing/application/get-customer-invoice.use-case.ts +++ b/apps/server/src/contexts/customer-billing/application/get-customer-invoice.use-case.ts @@ -1,8 +1,8 @@ -import { ICustomerInvoiceService } from "@contexts/customer-billing/domain"; -import { CustomerInvoice } from "@contexts/customer-billing/domain/aggregates"; -import { UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; +import { ICustomerInvoiceService } from "@/contexts/customer-billing/domain"; +import { CustomerInvoice } from "@/contexts/customer-billing/domain/aggregates"; +import { UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; export class GetCustomerInvoiceUseCase { constructor( diff --git a/apps/server/src/contexts/customer-billing/application/list-customer-invoices-use-case.ts b/apps/server/src/contexts/customer-billing/application/list-customer-invoices-use-case.ts index 5e0cf702..0d067615 100644 --- a/apps/server/src/contexts/customer-billing/application/list-customer-invoices-use-case.ts +++ b/apps/server/src/contexts/customer-billing/application/list-customer-invoices-use-case.ts @@ -1,5 +1,5 @@ -import { Collection, Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; +import { Collection, Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; import { CustomerInvoice, ICustomerInvoiceService } from "../domain"; export class ListCustomerInvoicesUseCase { diff --git a/apps/server/src/contexts/customer-billing/domain/aggregates/customer-invoice.ts b/apps/server/src/contexts/customer-billing/domain/aggregates/customer-invoice.ts index 2385df3d..fdbf15db 100644 --- a/apps/server/src/contexts/customer-billing/domain/aggregates/customer-invoice.ts +++ b/apps/server/src/contexts/customer-billing/domain/aggregates/customer-invoice.ts @@ -1,5 +1,5 @@ -import { AggregateRoot, UniqueID, UtcDate } from "core/common/domain"; -import { Maybe, Result } from "core/common/helpers"; +import { AggregateRoot, UniqueID, UtcDate } from "@/core/common/domain"; +import { Maybe, Result } from "@/core/common/helpers"; import { Customer, CustomerInvoiceItem } from "../entities"; import { InvoiceStatus } from "../value-objetcs"; diff --git a/apps/server/src/contexts/customer-billing/domain/entities/customer-invoice-item.ts b/apps/server/src/contexts/customer-billing/domain/entities/customer-invoice-item.ts index a5a50ca1..38ebfaf8 100644 --- a/apps/server/src/contexts/customer-billing/domain/entities/customer-invoice-item.ts +++ b/apps/server/src/contexts/customer-billing/domain/entities/customer-invoice-item.ts @@ -1,6 +1,6 @@ -import { DomainEntity, MoneyValue, Percentage, UniqueID } from "core/common/domain"; -import { Quantity } from "core/common/domain/value-objects/quantity"; -import { Maybe, Result } from "core/common/helpers"; +import { DomainEntity, MoneyValue, Percentage, UniqueID } from "@/core/common/domain"; +import { Quantity } from "@/core/common/domain/value-objects/quantity"; +import { Maybe, Result } from "@/core/common/helpers"; export interface ICustomerInvoiceItemProps { description: Maybe; // Descripción del artículo o servicio diff --git a/apps/server/src/contexts/customer-billing/domain/entities/customer.ts b/apps/server/src/contexts/customer-billing/domain/entities/customer.ts index 3bb39c81..50a41423 100644 --- a/apps/server/src/contexts/customer-billing/domain/entities/customer.ts +++ b/apps/server/src/contexts/customer-billing/domain/entities/customer.ts @@ -1,5 +1,5 @@ -import { AggregateRoot, PostalAddress, TINNumber, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { AggregateRoot, PostalAddress, TINNumber, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; export interface ICustomerProps { name: string; diff --git a/apps/server/src/contexts/customer-billing/domain/entities/tax-collection.ts b/apps/server/src/contexts/customer-billing/domain/entities/tax-collection.ts index 286c3ca2..73d83ad7 100644 --- a/apps/server/src/contexts/customer-billing/domain/entities/tax-collection.ts +++ b/apps/server/src/contexts/customer-billing/domain/entities/tax-collection.ts @@ -1,5 +1,5 @@ -import { Slug } from "core/common/domain"; -import { Collection } from "core/common/helpers"; +import { Slug } from "@/core/common/domain"; +import { Collection } from "@/core/common/helpers"; import { Tax } from "./tax"; export class TaxCollection extends Collection { diff --git a/apps/server/src/contexts/customer-billing/domain/entities/tax.ts b/apps/server/src/contexts/customer-billing/domain/entities/tax.ts index 5c1063d9..9b218162 100644 --- a/apps/server/src/contexts/customer-billing/domain/entities/tax.ts +++ b/apps/server/src/contexts/customer-billing/domain/entities/tax.ts @@ -1,5 +1,5 @@ -import { DomainEntity, Percentage, Slug, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { DomainEntity, Percentage, Slug, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; interface ITaxProps { slug: Slug; diff --git a/apps/server/src/contexts/customer-billing/domain/repositories/customer-invoice-repository.interface.ts b/apps/server/src/contexts/customer-billing/domain/repositories/customer-invoice-repository.interface.ts index 1e4a7fd9..9f6c7edf 100644 --- a/apps/server/src/contexts/customer-billing/domain/repositories/customer-invoice-repository.interface.ts +++ b/apps/server/src/contexts/customer-billing/domain/repositories/customer-invoice-repository.interface.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { CustomerInvoice } from "../aggregates"; export interface ICustomerInvoiceRepository { diff --git a/apps/server/src/contexts/customer-billing/domain/services/customer-invoice-service.interface.ts b/apps/server/src/contexts/customer-billing/domain/services/customer-invoice-service.interface.ts index 82456f86..8462580e 100644 --- a/apps/server/src/contexts/customer-billing/domain/services/customer-invoice-service.interface.ts +++ b/apps/server/src/contexts/customer-billing/domain/services/customer-invoice-service.interface.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { CustomerInvoice } from "../aggregates"; export interface ICustomerInvoiceService { diff --git a/apps/server/src/contexts/customer-billing/domain/services/customer-invoice.service.ts b/apps/server/src/contexts/customer-billing/domain/services/customer-invoice.service.ts index 234f3adb..466ad953 100644 --- a/apps/server/src/contexts/customer-billing/domain/services/customer-invoice.service.ts +++ b/apps/server/src/contexts/customer-billing/domain/services/customer-invoice.service.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { CustomerInvoice } from "../aggregates"; import { ICustomerInvoiceRepository } from "../repositories"; import { ICustomerInvoiceService } from "./customer-invoice-service.interface"; diff --git a/apps/server/src/contexts/customer-billing/domain/value-objetcs/invoice-status.ts b/apps/server/src/contexts/customer-billing/domain/value-objetcs/invoice-status.ts index 4a16ecdc..eee46309 100644 --- a/apps/server/src/contexts/customer-billing/domain/value-objetcs/invoice-status.ts +++ b/apps/server/src/contexts/customer-billing/domain/value-objetcs/invoice-status.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; interface IInvoiceStatusProps { value: string; diff --git a/apps/server/src/contexts/customer-billing/infraestructure/mappers/customer-invoice.mapper.ts b/apps/server/src/contexts/customer-billing/infraestructure/mappers/customer-invoice.mapper.ts index cc93591e..ae247959 100644 --- a/apps/server/src/contexts/customer-billing/infraestructure/mappers/customer-invoice.mapper.ts +++ b/apps/server/src/contexts/customer-billing/infraestructure/mappers/customer-invoice.mapper.ts @@ -1,12 +1,12 @@ -import { Customer, CustomerInvoice } from "@contexts/customer-billing/domain"; -import { InvoiceStatus } from "@contexts/customer-billing/domain/value-objetcs"; -import { PostalAddress, TINNumber, UniqueID, UtcDate } from "core/common/domain"; -import { Maybe, Result } from "core/common/helpers"; +import { Customer, CustomerInvoice } from "@/contexts/customer-billing/domain"; +import { InvoiceStatus } from "@/contexts/customer-billing/domain/value-objetcs"; +import { PostalAddress, TINNumber, UniqueID, UtcDate } from "@/core/common/domain"; +import { Maybe, Result } from "@/core/common/helpers"; import { ISequelizeMapper, MapperParamsType, SequelizeMapper, -} from "core/common/infrastructure/sequelize/sequelize-mapper"; +} from "@/core/common/infrastructure/sequelize/sequelize-mapper"; import { CustomerInvoiceCreationAttributes, CustomerInvoiceModel, diff --git a/apps/server/src/contexts/customer-billing/infraestructure/sequelize/customer-invoice.repository.ts b/apps/server/src/contexts/customer-billing/infraestructure/sequelize/customer-invoice.repository.ts index c381658d..783f6dca 100644 --- a/apps/server/src/contexts/customer-billing/infraestructure/sequelize/customer-invoice.repository.ts +++ b/apps/server/src/contexts/customer-billing/infraestructure/sequelize/customer-invoice.repository.ts @@ -1,7 +1,7 @@ -import { CustomerInvoice, ICustomerInvoiceRepository } from "@contexts/customer-billing/domain"; -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; -import { SequelizeRepository } from "core/common/infrastructure"; +import { CustomerInvoice, ICustomerInvoiceRepository } from "@/contexts/customer-billing/domain"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; +import { SequelizeRepository } from "@/core/common/infrastructure"; import { Transaction } from "sequelize"; import { customerInvoiceMapper, ICustomerInvoiceMapper } from "../mappers/customer-invoice.mapper"; import { CustomerInvoiceModel } from "./customer-invoice.model"; diff --git a/apps/server/src/contexts/customer-billing/infraestructure/sequelize/index.ts b/apps/server/src/contexts/customer-billing/infraestructure/sequelize/index.ts index 81d27fd3..11abc175 100644 --- a/apps/server/src/contexts/customer-billing/infraestructure/sequelize/index.ts +++ b/apps/server/src/contexts/customer-billing/infraestructure/sequelize/index.ts @@ -1,4 +1,4 @@ -import { ICustomerInvoiceRepository } from "@contexts/customer-billing/domain/"; +import { ICustomerInvoiceRepository } from "@/contexts/customer-billing/domain/"; import { customerInvoiceRepository } from "./customer-invoice.repository"; export * from "./customer-invoice.model"; diff --git a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/get-customer-invoice.controller.ts b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/get-customer-invoice.controller.ts index 21790169..9180d269 100644 --- a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/get-customer-invoice.controller.ts +++ b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/get-customer-invoice.controller.ts @@ -1,6 +1,6 @@ -import { GetCustomerInvoiceUseCase } from "@contexts/customer-billing/application"; -import { UniqueID } from "core/common/domain"; -import { ExpressController } from "core/common/presentation"; +import { GetCustomerInvoiceUseCase } from "@/contexts/customer-billing/application"; +import { UniqueID } from "@/core/common/domain"; +import { ExpressController } from "@/core/common/presentation"; import { IGetCustomerInvoicePresenter } from "./get-customer-invoice.presenter"; export class GetCustomerInvoiceController extends ExpressController { diff --git a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/get-customer-invoice.presenter.ts b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/get-customer-invoice.presenter.ts index 27438f5f..e87f06e2 100644 --- a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/get-customer-invoice.presenter.ts +++ b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/get-customer-invoice.presenter.ts @@ -1,5 +1,5 @@ -import { CustomerInvoice } from "@contexts/customer-billing/domain"; -import { IGetCustomerInvoiceResponseDTO } from "@contexts/customer-billing/presentation/dto"; +import { CustomerInvoice } from "@/contexts/customer-billing/domain"; +import { IGetCustomerInvoiceResponseDTO } from "@/contexts/customer-billing/presentation/dto"; export interface IGetCustomerInvoicePresenter { toDTO: (invoice: CustomerInvoice) => IGetCustomerInvoiceResponseDTO; diff --git a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/index.ts b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/index.ts index bf724401..8df4ce18 100644 --- a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/index.ts +++ b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/get/index.ts @@ -1,7 +1,7 @@ -import { GetCustomerInvoiceUseCase } from "@contexts/customer-billing/application/"; -import { CustomerInvoiceService } from "@contexts/customer-billing/domain"; -import { customerInvoiceRepository } from "@contexts/customer-billing/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { GetCustomerInvoiceUseCase } from "@/contexts/customer-billing/application/"; +import { CustomerInvoiceService } from "@/contexts/customer-billing/domain"; +import { customerInvoiceRepository } from "@/contexts/customer-billing/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; import { GetCustomerInvoiceController } from "./get-customer-invoice.controller"; import { getCustomerInvoicesPresenter } from "./get-customer-invoice.presenter"; diff --git a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/index.ts b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/index.ts index 4c0e0d34..71a5ef2a 100644 --- a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/index.ts +++ b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/index.ts @@ -1,6 +1,6 @@ -import { CustomerInvoiceService } from "@contexts/customer-billing/domain"; -import { customerInvoiceRepository } from "@contexts/customer-billing/infraestructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { CustomerInvoiceService } from "@/contexts/customer-billing/domain"; +import { customerInvoiceRepository } from "@/contexts/customer-billing/infraestructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; import { ListCustomerInvoicesUseCase } from "../../../../application"; import { ListCustomerInvoicesController } from "./list-customer-invoices.controller"; import { listCustomerInvoicesPresenter } from "./list-customer-invoices.presenter"; diff --git a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/list-customer-invoices.controller.ts b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/list-customer-invoices.controller.ts index d650c7a6..fcb7d852 100644 --- a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/list-customer-invoices.controller.ts +++ b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/list-customer-invoices.controller.ts @@ -1,5 +1,5 @@ -import { ListCustomerInvoicesUseCase } from "@contexts/customer-billing/application"; -import { ExpressController } from "core/common/presentation"; +import { ListCustomerInvoicesUseCase } from "@/contexts/customer-billing/application"; +import { ExpressController } from "@/core/common/presentation"; import { IListCustomerInvoicesPresenter } from "./list-customer-invoices.presenter"; export class ListCustomerInvoicesController extends ExpressController { diff --git a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/list-customer-invoices.presenter.ts b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/list-customer-invoices.presenter.ts index 5a81e72e..2099f21c 100644 --- a/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/list-customer-invoices.presenter.ts +++ b/apps/server/src/contexts/customer-billing/presentation/controllers/customer-invoices/list/list-customer-invoices.presenter.ts @@ -1,6 +1,6 @@ -import { Collection, ensureString } from "core/common/helpers"; +import { Collection, ensureString } from "@/core/common/helpers"; -import { CustomerInvoice } from "@contexts/customer-billing/domain"; +import { CustomerInvoice } from "@/contexts/customer-billing/domain"; import { IListCustomerInvoicesResponseDTO } from "../../../dto"; export interface IListCustomerInvoicesPresenter { diff --git a/apps/server/src/contexts/invoices/application/create-invoice.use-case.ts b/apps/server/src/contexts/invoices/application/create-invoice.use-case.ts index 2912a099..d4cd8310 100644 --- a/apps/server/src/contexts/invoices/application/create-invoice.use-case.ts +++ b/apps/server/src/contexts/invoices/application/create-invoice.use-case.ts @@ -1,4 +1,4 @@ -import { UniqueID, UtcDate } from "core/common/domain"; +import { UniqueID, UtcDate } from "@/core/common/domain"; import { IInvoiceProps, @@ -7,10 +7,10 @@ import { InvoiceNumber, InvoiceSerie, InvoiceStatus, -} from "@contexts/invoices/domain"; -import { Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +} from "@/contexts/invoices/domain"; +import { Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; import { ICreateInvoiceRequestDTO } from "../presentation/dto"; export class CreateInvoiceUseCase { diff --git a/apps/server/src/contexts/invoices/application/delete-invoice.use-case.ts b/apps/server/src/contexts/invoices/application/delete-invoice.use-case.ts index 40988859..22ea2bc9 100644 --- a/apps/server/src/contexts/invoices/application/delete-invoice.use-case.ts +++ b/apps/server/src/contexts/invoices/application/delete-invoice.use-case.ts @@ -1,7 +1,7 @@ -import { UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +import { UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; import { IInvoiceService, Invoice } from "../domain"; export class DeleteInvoiceUseCase { diff --git a/apps/server/src/contexts/invoices/application/get-invoice.use-case.ts b/apps/server/src/contexts/invoices/application/get-invoice.use-case.ts index a396d4e2..f09b8f1f 100644 --- a/apps/server/src/contexts/invoices/application/get-invoice.use-case.ts +++ b/apps/server/src/contexts/invoices/application/get-invoice.use-case.ts @@ -1,7 +1,7 @@ -import { UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +import { UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; import { IInvoiceService, Invoice } from "../domain"; export class GetInvoiceUseCase { diff --git a/apps/server/src/contexts/invoices/application/list-invoices.use-case.ts b/apps/server/src/contexts/invoices/application/list-invoices.use-case.ts index 66a16dfa..ab1c3e07 100644 --- a/apps/server/src/contexts/invoices/application/list-invoices.use-case.ts +++ b/apps/server/src/contexts/invoices/application/list-invoices.use-case.ts @@ -1,6 +1,6 @@ -import { Collection, Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +import { Collection, Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; import { IInvoiceService, Invoice } from "../domain"; export class ListInvoicesUseCase { diff --git a/apps/server/src/contexts/invoices/application/update-invoice.use-case.ts b/apps/server/src/contexts/invoices/application/update-invoice.use-case.ts index 87ac3306..72a6ccb7 100644 --- a/apps/server/src/contexts/invoices/application/update-invoice.use-case.ts +++ b/apps/server/src/contexts/invoices/application/update-invoice.use-case.ts @@ -1,8 +1,8 @@ -import { UniqueID } from "core/common/domain"; +import { UniqueID } from "@/core/common/domain"; -import { Result } from "core/common/helpers"; -import { ITransactionManager } from "core/common/infrastructure/database"; -import { logger } from "core/common/infrastructure/logger"; +import { Result } from "@/core/common/helpers"; +import { ITransactionManager } from "@/core/common/infrastructure/database"; +import { logger } from "@/core/common/infrastructure/logger"; import { IUpdateInvoiceRequestDTO } from "../presentation/dto"; export class CreateInvoiceUseCase { diff --git a/apps/server/src/contexts/invoices/domain/aggregates/invoice.ts b/apps/server/src/contexts/invoices/domain/aggregates/invoice.ts index e5be6b14..6ead0cf3 100644 --- a/apps/server/src/contexts/invoices/domain/aggregates/invoice.ts +++ b/apps/server/src/contexts/invoices/domain/aggregates/invoice.ts @@ -1,5 +1,5 @@ -import { AggregateRoot, MoneyValue, UniqueID, UtcDate } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { AggregateRoot, MoneyValue, UniqueID, UtcDate } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { InvoiceCustomer, InvoiceItem, InvoiceItems } from "../entities"; import { InvoiceNumber, InvoiceSerie, InvoiceStatus } from "../value-objects"; diff --git a/apps/server/src/contexts/invoices/domain/entities/invoice-customer/invoice-address.ts b/apps/server/src/contexts/invoices/domain/entities/invoice-customer/invoice-address.ts index 2d3ebbae..c3766d24 100644 --- a/apps/server/src/contexts/invoices/domain/entities/invoice-customer/invoice-address.ts +++ b/apps/server/src/contexts/invoices/domain/entities/invoice-customer/invoice-address.ts @@ -1,5 +1,5 @@ -import { EmailAddress, Name, PostalAddress, ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { EmailAddress, Name, PostalAddress, ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { PhoneNumber } from "libphonenumber-js"; import { InvoiceAddressType } from "../../value-objects"; diff --git a/apps/server/src/contexts/invoices/domain/entities/invoice-customer/invoice-customer.ts b/apps/server/src/contexts/invoices/domain/entities/invoice-customer/invoice-customer.ts index a9eb085c..4cd49279 100644 --- a/apps/server/src/contexts/invoices/domain/entities/invoice-customer/invoice-customer.ts +++ b/apps/server/src/contexts/invoices/domain/entities/invoice-customer/invoice-customer.ts @@ -1,5 +1,5 @@ -import { DomainEntity, Name, TINNumber, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { DomainEntity, Name, TINNumber, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { InvoiceAddress } from "./invoice-address"; export interface IInvoiceCustomerProps { diff --git a/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-item.test.ts b/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-item.test.ts index 965426ec..1ffd18d5 100644 --- a/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-item.test.ts +++ b/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-item.test.ts @@ -1,4 +1,4 @@ -import { MoneyValue, Percentage, Quantity } from "core/common/domain"; +import { MoneyValue, Percentage, Quantity } from "@/core/common/domain"; import { InvoiceItemDescription } from "../../value-objects"; import { InvoiceItem } from "./invoice-item"; diff --git a/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-item.ts b/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-item.ts index 268a3c3c..6d05b562 100644 --- a/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-item.ts +++ b/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-item.ts @@ -1,5 +1,5 @@ -import { DomainEntity, MoneyValue, Percentage, Quantity, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { DomainEntity, MoneyValue, Percentage, Quantity, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { InvoiceItemDescription } from "../../value-objects"; export interface IInvoiceItemProps { diff --git a/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-items.ts b/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-items.ts index 5a0c749b..139d15b1 100644 --- a/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-items.ts +++ b/apps/server/src/contexts/invoices/domain/entities/invoice-items/invoice-items.ts @@ -1,4 +1,4 @@ -import { Collection } from "core/common/helpers"; +import { Collection } from "@/core/common/helpers"; import { InvoiceItem } from "./invoice-item"; export class InvoiceItems extends Collection { diff --git a/apps/server/src/contexts/invoices/domain/repositories/invoice-repository.interface.ts b/apps/server/src/contexts/invoices/domain/repositories/invoice-repository.interface.ts index 3a4732e0..a6eb7371 100644 --- a/apps/server/src/contexts/invoices/domain/repositories/invoice-repository.interface.ts +++ b/apps/server/src/contexts/invoices/domain/repositories/invoice-repository.interface.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { Invoice } from "../aggregates"; export interface IInvoiceRepository { diff --git a/apps/server/src/contexts/invoices/domain/services/invoice-service.interface.ts b/apps/server/src/contexts/invoices/domain/services/invoice-service.interface.ts index 4c42d8dd..023c82fb 100644 --- a/apps/server/src/contexts/invoices/domain/services/invoice-service.interface.ts +++ b/apps/server/src/contexts/invoices/domain/services/invoice-service.interface.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { IInvoiceProps, Invoice } from "../aggregates"; export interface IInvoiceService { diff --git a/apps/server/src/contexts/invoices/domain/services/invoice.service.ts b/apps/server/src/contexts/invoices/domain/services/invoice.service.ts index a9598f15..1741e3dd 100644 --- a/apps/server/src/contexts/invoices/domain/services/invoice.service.ts +++ b/apps/server/src/contexts/invoices/domain/services/invoice.service.ts @@ -1,5 +1,5 @@ -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { UniqueID } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { Transaction } from "sequelize"; import { IInvoiceProps, Invoice } from "../aggregates"; import { IInvoiceRepository } from "../repositories"; @@ -36,7 +36,9 @@ export class InvoiceService implements IInvoiceService { return Result.fail(new Error("Invoice not found")); } - const updatedInvoiceOrError = Invoice.update(invoiceOrError.data, data); + return Result.fail(new Error("No implementado")); + + /*const updatedInvoiceOrError = Invoice.update(invoiceOrError.data, data); if (updatedInvoiceOrError.isFailure) { return Result.fail( new Error(`Error updating invoice: ${updatedInvoiceOrError.error.message}`) @@ -46,7 +48,7 @@ export class InvoiceService implements IInvoiceService { const updateInvoice = updatedInvoiceOrError.data; await this.repo.update(updateInvoice, transaction); - return Result.ok(updateInvoice); + return Result.ok(updateInvoice);*/ } async createInvoice( diff --git a/apps/server/src/contexts/invoices/domain/value-objects/invoice-address-type.ts b/apps/server/src/contexts/invoices/domain/value-objects/invoice-address-type.ts index 04a0f97b..90f022af 100644 --- a/apps/server/src/contexts/invoices/domain/value-objects/invoice-address-type.ts +++ b/apps/server/src/contexts/invoices/domain/value-objects/invoice-address-type.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; interface IInvoiceAddressTypeProps { value: string; diff --git a/apps/server/src/contexts/invoices/domain/value-objects/invoice-item-description.ts b/apps/server/src/contexts/invoices/domain/value-objects/invoice-item-description.ts index 64f825f7..ebfbe0b5 100644 --- a/apps/server/src/contexts/invoices/domain/value-objects/invoice-item-description.ts +++ b/apps/server/src/contexts/invoices/domain/value-objects/invoice-item-description.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Maybe, Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Maybe, Result } from "@/core/common/helpers"; import { z } from "zod"; interface IInvoiceItemDescriptionProps { diff --git a/apps/server/src/contexts/invoices/domain/value-objects/invoice-number.ts b/apps/server/src/contexts/invoices/domain/value-objects/invoice-number.ts index 92341077..dbf72478 100644 --- a/apps/server/src/contexts/invoices/domain/value-objects/invoice-number.ts +++ b/apps/server/src/contexts/invoices/domain/value-objects/invoice-number.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; import { z } from "zod"; interface IInvoiceNumberProps { diff --git a/apps/server/src/contexts/invoices/domain/value-objects/invoice-serie.ts b/apps/server/src/contexts/invoices/domain/value-objects/invoice-serie.ts index 7fc0e0e0..282f6e9e 100644 --- a/apps/server/src/contexts/invoices/domain/value-objects/invoice-serie.ts +++ b/apps/server/src/contexts/invoices/domain/value-objects/invoice-serie.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Maybe, Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Maybe, Result } from "@/core/common/helpers"; import { z } from "zod"; interface IInvoiceSerieProps { diff --git a/apps/server/src/contexts/invoices/domain/value-objects/invoice-status.ts b/apps/server/src/contexts/invoices/domain/value-objects/invoice-status.ts index 15ad5d43..30304360 100644 --- a/apps/server/src/contexts/invoices/domain/value-objects/invoice-status.ts +++ b/apps/server/src/contexts/invoices/domain/value-objects/invoice-status.ts @@ -1,5 +1,5 @@ -import { ValueObject } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { ValueObject } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; interface IInvoiceStatusProps { value: string; diff --git a/apps/server/src/contexts/invoices/intrastructure/mappers/contact.mapper.ts b/apps/server/src/contexts/invoices/intrastructure/mappers/contact.mapper.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/mappers/contact.mapper.ts rename to apps/server/src/contexts/invoices/intrastructure/mappers/contact.mapper.ts.bak diff --git a/apps/server/src/contexts/invoices/intrastructure/mappers/contactAddress.mapper.ts b/apps/server/src/contexts/invoices/intrastructure/mappers/contactAddress.mapper.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/mappers/contactAddress.mapper.ts rename to apps/server/src/contexts/invoices/intrastructure/mappers/contactAddress.mapper.ts.bak diff --git a/apps/server/src/contexts/invoices/intrastructure/mappers/invoice-item.mapper.ts b/apps/server/src/contexts/invoices/intrastructure/mappers/invoice-item.mapper.ts index e645976e..c3f6ceca 100644 --- a/apps/server/src/contexts/invoices/intrastructure/mappers/invoice-item.mapper.ts +++ b/apps/server/src/contexts/invoices/intrastructure/mappers/invoice-item.mapper.ts @@ -1,13 +1,18 @@ -import { Invoice, InvoiceItem, InvoiceItemDescription } from "@contexts/invoices/domain/"; -import { MoneyValue, Percentage, Quantity, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { Invoice, InvoiceItem, InvoiceItemDescription } from "@/contexts/invoices/domain"; import { ISequelizeMapper, MapperParamsType, + MoneyValue, + Percentage, + Quantity, + Result, SequelizeMapper, -} from "core/common/infrastructure/sequelize/sequelize-mapper"; + UniqueID, +} from "@/core"; +import { InvoiceModel } from "../sequelize"; + import { InferCreationAttributes } from "sequelize"; -import { InvoiceItemCreationAttributes, InvoiceItemModel, InvoiceModel } from "../sequelize"; +import { InvoiceItemCreationAttributes, InvoiceItemModel } from "../sequelize"; export interface IInvoiceItemMapper extends ISequelizeMapper {} diff --git a/apps/server/src/contexts/invoices/intrastructure/mappers/invoice.mapper.ts b/apps/server/src/contexts/invoices/intrastructure/mappers/invoice.mapper.ts index 25377f40..4d475006 100644 --- a/apps/server/src/contexts/invoices/intrastructure/mappers/invoice.mapper.ts +++ b/apps/server/src/contexts/invoices/intrastructure/mappers/invoice.mapper.ts @@ -1,13 +1,14 @@ -import { Invoice, InvoiceNumber, InvoiceSerie, InvoiceStatus } from "@contexts/invoices/domain/"; -import { UniqueID, UtcDate } from "core/common/domain"; -import { Result } from "core/common/helpers"; +import { Invoice, InvoiceNumber, InvoiceSerie, InvoiceStatus } from "@/contexts/invoices/domain"; import { ISequelizeMapper, MapperParamsType, + Result, SequelizeMapper, -} from "core/common/infrastructure/sequelize/sequelize-mapper"; + UniqueID, + UtcDate, +} from "@/core"; import { InvoiceCreationAttributes, InvoiceModel } from "../sequelize"; -import { InvoiceItemMapper } from "./invoice-item.mapper"; // Importar el mapper de items +import { InvoiceItemMapper } from "./invoice-item.mapper"; export interface IInvoiceMapper extends ISequelizeMapper {} diff --git a/apps/server/src/contexts/invoices/intrastructure/mappers/invoiceParticipant.mapper.ts b/apps/server/src/contexts/invoices/intrastructure/mappers/invoiceParticipant.mapper.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/mappers/invoiceParticipant.mapper.ts rename to apps/server/src/contexts/invoices/intrastructure/mappers/invoiceParticipant.mapper.ts.bak diff --git a/apps/server/src/contexts/invoices/intrastructure/mappers/invoiceParticipantAddress.mapper.ts b/apps/server/src/contexts/invoices/intrastructure/mappers/invoiceParticipantAddress.mapper.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/mappers/invoiceParticipantAddress.mapper.ts rename to apps/server/src/contexts/invoices/intrastructure/mappers/invoiceParticipantAddress.mapper.ts.bak diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/contact.mo.del.ts b/apps/server/src/contexts/invoices/intrastructure/sequelize/contact.mo.del.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/sequelize/contact.mo.del.ts rename to apps/server/src/contexts/invoices/intrastructure/sequelize/contact.mo.del.ts.bak diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/contactAddress.mo.del.ts.bak b/apps/server/src/contexts/invoices/intrastructure/sequelize/contactAddress.mo.del.ts.bak new file mode 100644 index 00000000..7260bbcc --- /dev/null +++ b/apps/server/src/contexts/invoices/intrastructure/sequelize/contactAddress.mo.del.ts.bak @@ -0,0 +1,75 @@ +import { + CreationOptional, + DataTypes, + ForeignKey, + InferAttributes, + InferCreationAttributes, + Model, + NonAttribute, + Sequelize, +} from "sequelize"; +import { Contact_Model } from "./contact.mo.del.ts.bak"; + +export type TCreationContactAddress_Attributes = InferCreationAttributes< + ContactAddress_Model, + { omit: "customer" } +>; + +export class ContactAddress_Model extends Model< + InferAttributes, + TCreationContactAddress_Attributes +> { + // To avoid table creation + static async sync(): Promise { + return Promise.resolve(); + } + + static associate(connection: Sequelize) { + const { Contact_Model, ContactAddress_Model } = connection.models; + + ContactAddress_Model.belongsTo(Contact_Model, { + as: "customer", + foreignKey: "customer_id", + }); + } + + declare id: string; + declare customer_id: ForeignKey; + declare type: string; + declare street: CreationOptional; + declare postal_code: CreationOptional; + declare city: CreationOptional; + declare province: CreationOptional; + declare country: CreationOptional; + declare phone: CreationOptional; + declare email: CreationOptional; + + declare customer?: NonAttribute; +} + +export default (sequelize: Sequelize) => { + ContactAddress_Model.init( + { + id: { + type: DataTypes.UUID, + primaryKey: true, + }, + customer_id: new DataTypes.UUID(), + type: DataTypes.STRING(), + street: DataTypes.STRING(), + postal_code: DataTypes.STRING(), + city: DataTypes.STRING, + province: DataTypes.STRING, + country: DataTypes.STRING, + email: DataTypes.STRING, + phone: DataTypes.STRING, + }, + { + sequelize, + tableName: "customer_addresses", + timestamps: false, + } + ); + + return ContactAddress_Model; +}; diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/index.ts b/apps/server/src/contexts/invoices/intrastructure/sequelize/index.ts index d063103a..6c291d98 100644 --- a/apps/server/src/contexts/invoices/intrastructure/sequelize/index.ts +++ b/apps/server/src/contexts/invoices/intrastructure/sequelize/index.ts @@ -1,11 +1,3 @@ -import { IInvoiceRepository } from "@contexts/invoices/domain"; -import { invoiceRepository } from "./invoice.repository"; - -export * from "./invoice-item.model"; +export * from "./invoice-item.model"; // exporta las clases, tipos export * from "./invoice.model"; - export * from "./invoice.repository"; - -export const createInvoiceRepository = (): IInvoiceRepository => { - return invoiceRepository; -}; diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice-item.model.ts b/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice-item.model.ts index 198dc274..ae856aab 100644 --- a/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice-item.model.ts +++ b/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice-item.model.ts @@ -4,25 +4,20 @@ import { InferAttributes, InferCreationAttributes, Model, + NonAttribute, Sequelize, } from "sequelize"; +import { InvoiceModel } from "./invoice.model"; -export type InvoiceItemCreationAttributes = InferCreationAttributes & {}; +export type InvoiceItemCreationAttributes = InferCreationAttributes< + InvoiceItemModel, + { omit: "invoice" } +>; export class InvoiceItemModel extends Model< InferAttributes, - InvoiceItemCreationAttributes + InferCreationAttributes > { - static associate(connection: Sequelize) { - /*const { Invoice_Model, InvoiceItem_Model } = connection.models; - - InvoiceItem_Model.belongsTo(Invoice_Model, { - as: "invoice", - foreignKey: "invoice_id", - onDelete: "CASCADE", - });*/ - } - declare item_id: string; declare invoice_id: string; @@ -47,10 +42,20 @@ export class InvoiceItemModel extends Model< declare total_amount: CreationOptional; declare total_scale: CreationOptional; - //declare invoice?: NonAttribute; + declare invoice: NonAttribute; + + static associate(database: Sequelize) { + /*const { Invoice_Model, InvoiceItem_Model } = connection.models; + + InvoiceItem_Model.belongsTo(Invoice_Model, { + as: "invoice", + foreignKey: "invoice_id", + onDelete: "CASCADE", + });*/ + } } -export default (sequelize: Sequelize) => { +export default (database: Sequelize) => { InvoiceItemModel.init( { item_id: { @@ -153,7 +158,7 @@ export default (sequelize: Sequelize) => { }, }, { - sequelize, + sequelize: database, tableName: "invoice_items", defaultScope: {}, diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice.model.ts b/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice.model.ts index a439bf22..1d4bb7ca 100644 --- a/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice.model.ts +++ b/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice.model.ts @@ -13,17 +13,10 @@ export type InvoiceCreationAttributes = InferCreationAttributes, InvoiceCreationAttributes> { - static associate(connection: Sequelize) { - const { InvoiceModel, InvoiceItemModel } = connection.models; - - InvoiceModel.hasMany(InvoiceItemModel, { - as: "items", - foreignKey: "invoice_id", - onDelete: "CASCADE", - }); - } - +export class InvoiceModel extends Model< + InferAttributes, + InferCreationAttributes +> { declare id: string; declare invoice_status: string; @@ -42,12 +35,22 @@ export class InvoiceModel extends Model, InvoiceCr declare total_amount: CreationOptional; declare total_scale: CreationOptional; - // Relationships + // Relaciones declare items: NonAttribute; //declare customer: NonAttribute; + + static associate(database: Sequelize) { + const { InvoiceModel, InvoiceItemModel } = database.models; + + InvoiceModel.hasMany(InvoiceItemModel, { + as: "items", + foreignKey: "invoice_id", + onDelete: "CASCADE", + }); + } } -export default (sequelize: Sequelize) => { +export default (database: Sequelize) => { InvoiceModel.init( { id: { @@ -117,7 +120,7 @@ export default (sequelize: Sequelize) => { }, }, { - sequelize, + sequelize: database, tableName: "invoices", paranoid: true, // softs deletes diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice.repository.ts b/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice.repository.ts index 49e2a00a..d275402c 100644 --- a/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice.repository.ts +++ b/apps/server/src/contexts/invoices/intrastructure/sequelize/invoice.repository.ts @@ -1,14 +1,12 @@ -import { Invoice } from "@contexts/invoices/domain"; -import { IInvoiceRepository } from "@contexts/invoices/domain/repositories/invoice-repository.interface"; -import { UniqueID } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; -import { SequelizeRepository } from "core/common/infrastructure"; -import { Transaction } from "sequelize"; -import { IInvoiceMapper, invoiceMapper } from "../mappers/invoice.mapper"; +import { Collection, Result, SequelizeRepository, UniqueID } from "@/core"; +import { logger } from "@/core/common/infrastructure/logger"; +import { Sequelize, Transaction } from "sequelize"; +import { IInvoiceRepository, Invoice } from "../../domain"; +import { IInvoiceMapper } from "../mappers/invoice.mapper"; import { InvoiceItemModel } from "./invoice-item.model"; import { InvoiceModel } from "./invoice.model"; -class InvoiceRepository extends SequelizeRepository implements IInvoiceRepository { +export class InvoiceRepository extends SequelizeRepository implements IInvoiceRepository { private readonly _mapper!: IInvoiceMapper; /** @@ -22,8 +20,8 @@ class InvoiceRepository extends SequelizeRepository implements IInvoice return null; } - constructor(mapper: IInvoiceMapper) { - super(); + constructor(database: Sequelize, mapper: IInvoiceMapper) { + super(database); this._mapper = mapper; } @@ -39,25 +37,28 @@ class InvoiceRepository extends SequelizeRepository implements IInvoice async findAll(transaction?: Transaction): Promise, Error>> { try { - const rawInvoices: any = await this._findAll( - InvoiceModel, - { - include: [ - { - model: InvoiceItemModel, - as: "items", - }, - ], - }, - transaction - ); + const rawInvoices = await InvoiceModel.findAll({ + include: [ + { + model: InvoiceItemModel, + as: "items", + }, + ], + transaction, + }); - if (!rawInvoices === true) { - return Result.fail(new Error("Invoice with email not exists")); - } + /*if (!rawInvoices === true) { + return Result.fail(new Error("Invoice not exists")); + }*/ + + logger.debug({ + message: "rawInvoices", + label: "InvoiceRepository", + meta: { data: rawInvoices }, + }); return this._mapper.mapArrayToDomain(rawInvoices); - } catch (error: any) { + } catch (error: unknown) { return this._handleDatabaseError(error, this._customErrorMapper); } } @@ -107,6 +108,3 @@ class InvoiceRepository extends SequelizeRepository implements IInvoice await this._save(InvoiceModel, invoice.id, invoiceData, {}, transaction); } } - -const invoiceRepository = new InvoiceRepository(invoiceMapper); -export { invoiceRepository }; diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/invoiceParticipant.mo.del.ts.bak b/apps/server/src/contexts/invoices/intrastructure/sequelize/invoiceParticipant.mo.del.ts.bak new file mode 100644 index 00000000..a893280b --- /dev/null +++ b/apps/server/src/contexts/invoices/intrastructure/sequelize/invoiceParticipant.mo.del.ts.bak @@ -0,0 +1,106 @@ +import { + CreationOptional, + DataTypes, + InferAttributes, + InferCreationAttributes, + Model, + NonAttribute, + Sequelize, +} from "sequelize"; +import { InvoiceModel } from "./invoice.model"; +import { + InvoiceParticipantAddress_Model, + TCreationInvoiceParticipantAddress_Model, +} from "./invoiceParticipantAddress.mo.del.ts.bak"; + +export type TCreationInvoiceParticipant_Model = InferCreationAttributes< + InvoiceParticipant_Model, + { omit: "shippingAddress" | "billingAddress" | "invoice" } +> & { + billingAddress: TCreationInvoiceParticipantAddress_Model; + shippingAddress: TCreationInvoiceParticipantAddress_Model; +}; + +export class InvoiceParticipant_Model extends Model< + InferAttributes< + InvoiceParticipant_Model, + { omit: "shippingAddress" | "billingAddress" | "invoice" } + >, + InferCreationAttributes< + InvoiceParticipant_Model, + { omit: "shippingAddress" | "billingAddress" | "invoice" } + > +> { + static associate(connection: Sequelize) { + const { Invoice_Model, InvoiceParticipantAddress_Model, InvoiceParticipant_Model } = + connection.models; + + InvoiceParticipant_Model.belongsTo(Invoice_Model, { + as: "invoice", + foreignKey: "invoice_id", + onDelete: "CASCADE", + }); + + InvoiceParticipant_Model.hasOne(InvoiceParticipantAddress_Model, { + as: "shippingAddress", + foreignKey: "participant_id", + onDelete: "CASCADE", + }); + + InvoiceParticipant_Model.hasOne(InvoiceParticipantAddress_Model, { + as: "billingAddress", + foreignKey: "participant_id", + onDelete: "CASCADE", + }); + } + + declare participant_id: string; + declare invoice_id: string; + declare tin: CreationOptional; + declare company_name: CreationOptional; + declare first_name: CreationOptional; + declare last_name: CreationOptional; + + declare shippingAddress?: NonAttribute; + declare billingAddress?: NonAttribute; + + declare invoice?: NonAttribute; +} + +export default (sequelize: Sequelize) => { + InvoiceParticipant_Model.init( + { + participant_id: { + type: new DataTypes.UUID(), + primaryKey: true, + }, + invoice_id: { + type: new DataTypes.UUID(), + primaryKey: true, + }, + tin: { + type: new DataTypes.STRING(), + allowNull: true, + }, + company_name: { + type: new DataTypes.STRING(), + allowNull: true, + }, + first_name: { + type: new DataTypes.STRING(), + allowNull: true, + }, + last_name: { + type: new DataTypes.STRING(), + allowNull: true, + }, + }, + { + sequelize, + tableName: "invoice_participants", + timestamps: false, + } + ); + + return InvoiceParticipant_Model; +}; diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/invoiceParticipantAddress.mo.del.ts.bak b/apps/server/src/contexts/invoices/intrastructure/sequelize/invoiceParticipantAddress.mo.del.ts.bak new file mode 100644 index 00000000..e7e14d9e --- /dev/null +++ b/apps/server/src/contexts/invoices/intrastructure/sequelize/invoiceParticipantAddress.mo.del.ts.bak @@ -0,0 +1,94 @@ +import { + CreationOptional, + DataTypes, + InferAttributes, + InferCreationAttributes, + Model, + NonAttribute, + Sequelize, +} from "sequelize"; +import { InvoiceParticipant_Model } from "./invoiceParticipant.mo.del.ts.bak"; + +export type TCreationInvoiceParticipantAddress_Model = InferCreationAttributes< + InvoiceParticipantAddress_Model, + { omit: "participant" } +>; + +export class InvoiceParticipantAddress_Model extends Model< + InferAttributes, + InferCreationAttributes +> { + static associate(connection: Sequelize) { + const { InvoiceParticipantAddress_Model, InvoiceParticipant_Model } = connection.models; + InvoiceParticipantAddress_Model.belongsTo(InvoiceParticipant_Model, { + as: "participant", + foreignKey: "participant_id", + }); + } + + declare address_id: string; + declare participant_id: string; + declare type: string; + declare street: CreationOptional; + declare postal_code: CreationOptional; + declare city: CreationOptional; + declare province: CreationOptional; + declare country: CreationOptional; + declare phone: CreationOptional; + declare email: CreationOptional; + + declare participant?: NonAttribute; +} + +export default (sequelize: Sequelize) => { + InvoiceParticipantAddress_Model.init( + { + address_id: { + type: new DataTypes.UUID(), + primaryKey: true, + }, + participant_id: { + type: new DataTypes.UUID(), + primaryKey: true, + }, + type: { + type: new DataTypes.STRING(), + allowNull: false, + }, + street: { + type: new DataTypes.STRING(), + allowNull: true, + }, + postal_code: { + type: new DataTypes.STRING(), + allowNull: true, + }, + city: { + type: new DataTypes.STRING(), + allowNull: true, + }, + province: { + type: new DataTypes.STRING(), + allowNull: true, + }, + country: { + type: new DataTypes.STRING(), + allowNull: true, + }, + email: { + type: new DataTypes.STRING(), + allowNull: true, + }, + phone: { + type: new DataTypes.STRING(), + allowNull: true, + }, + }, + { + sequelize, + tableName: "invoice_participant_addresses", + } + ); + + return InvoiceParticipantAddress_Model; +}; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/create-invoice.controller.ts b/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/create-invoice.controller.ts index f848fd28..b84a1461 100644 --- a/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/create-invoice.controller.ts +++ b/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/create-invoice.controller.ts @@ -1,5 +1,4 @@ -import { UniqueID } from "core/common/domain"; -import { ExpressController } from "core/common/presentation"; +import { ExpressController, UniqueID } from "@/core"; import { CreateInvoiceUseCase } from "../../../application"; import { ICreateInvoiceRequestDTO } from "../../dto"; import { ICreateInvoicePresenter } from "./presenter"; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/index.ts b/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/index.ts index 3f3ac725..fa19c3a4 100644 --- a/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/index.ts +++ b/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/index.ts @@ -1,12 +1,14 @@ -import { CreateInvoiceUseCase } from "@contexts/invoices/application/create-invoice.use-case"; -import { InvoiceService } from "@contexts/invoices/domain"; -import { invoiceRepository } from "@contexts/invoices/intrastructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { InvoiceService } from "@/contexts/invoices/domain"; +import { invoiceMapper, InvoiceRepository } from "@/contexts/invoices/intrastructure"; +import { SequelizeTransactionManager } from "@/core"; +import { Sequelize } from "sequelize"; +import { CreateInvoiceUseCase } from "../../../application"; import { CreateInvoiceController } from "./create-invoice.controller"; import { createInvoicePresenter } from "./presenter"; -export const buildCreateInvoiceController = () => { - const transactionManager = new SequelizeTransactionManager(); +export const buildCreateInvoiceController = (database: Sequelize) => { + const transactionManager = new SequelizeTransactionManager(database); + const invoiceRepository = new InvoiceRepository(database, invoiceMapper); const invoiceService = new InvoiceService(invoiceRepository); const useCase = new CreateInvoiceUseCase(invoiceService, transactionManager); diff --git a/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceItem.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceItem.presenter.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceItem.presenter.ts rename to apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceItem.presenter.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceParticipant.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceParticipant.presenter.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceParticipant.presenter.ts rename to apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceParticipant.presenter.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceParticipantAddress.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceParticipantAddress.presenter.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceParticipantAddress.presenter.ts rename to apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/InvoiceParticipantAddress.presenter.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/create-invoice.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/create-invoice.presenter.ts index 811e676a..1ba9b0ab 100644 --- a/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/create-invoice.presenter.ts +++ b/apps/server/src/contexts/invoices/presentation/controllers/create-invoice/presenter/create-invoice.presenter.ts @@ -1,5 +1,5 @@ -import { Invoice } from "@contexts/invoices/domain"; -import { ICreateInvoiceResponseDTO } from "../../../dto"; +import { Invoice } from "#/server/domain"; +import { ICreateInvoiceResponseDTO } from "#/server/presentation/dto"; export interface ICreateInvoicePresenter { toDTO: (invoice: Invoice) => ICreateInvoiceResponseDTO; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/delete-invoice/delete-invoice.controller.ts.bak b/apps/server/src/contexts/invoices/presentation/controllers/delete-invoice/delete-invoice.controller.ts.bak new file mode 100644 index 00000000..792f28aa --- /dev/null +++ b/apps/server/src/contexts/invoices/presentation/controllers/delete-invoice/delete-invoice.controller.ts.bak @@ -0,0 +1,12 @@ +import { DeleteInvoiceUseCase } from "@/contexts/invoices/application"; +import { ExpressController } from "@/core/common/presentation"; + +export class DeleteInvoiceController extends ExpressController { + public constructor(private readonly deleteInvoice: DeleteInvoiceUseCase) { + super(); + } + + async executeImpl(): Promise { + return this.noContent(); + } +} diff --git a/apps/server/src/contexts/invoices/presentation/controllers/delete-invoice/index.ts.bak b/apps/server/src/contexts/invoices/presentation/controllers/delete-invoice/index.ts.bak new file mode 100644 index 00000000..c3f97ee5 --- /dev/null +++ b/apps/server/src/contexts/invoices/presentation/controllers/delete-invoice/index.ts.bak @@ -0,0 +1,14 @@ +import { DeleteInvoiceUseCase } from "@/contexts/invoices/application"; +import { InvoiceService } from "@/contexts/invoices/domain"; +import { invoiceRepository } from "@/contexts/invoices/intrastructure"; +import { SequelizeTransactionManager } from "@/core/common/infrastructure"; +import { DeleteInvoiceController } from "./delete-invoice.controller"; + +export const buildDeleteInvoiceController = () => { + const transactionManager = new SequelizeTransactionManager(); + const invoiceService = new InvoiceService(invoiceRepository); + + const useCase = new DeleteInvoiceUseCase(invoiceService, transactionManager); + + return new DeleteInvoiceController(useCase); +}; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/get-invoice.controller.ts b/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/get-invoice.controller.ts index 67e1964d..e810b3ef 100644 --- a/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/get-invoice.controller.ts +++ b/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/get-invoice.controller.ts @@ -1,6 +1,5 @@ -import { GetInvoiceUseCase } from "@contexts/invoices/application"; -import { UniqueID } from "core/common/domain"; -import { ExpressController } from "core/common/presentation"; +import { GetInvoiceUseCase } from "@/contexts/invoices/application"; +import { ExpressController, UniqueID } from "@/core"; import { IGetInvoicePresenter } from "./presenter"; export class GetInvoiceController extends ExpressController { diff --git a/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/index.ts b/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/index.ts index 53c8898f..0e7a69ac 100644 --- a/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/index.ts +++ b/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/index.ts @@ -1,12 +1,14 @@ -import { GetInvoiceUseCase } from "@contexts/invoices/application"; -import { InvoiceService } from "@contexts/invoices/domain"; -import { invoiceRepository } from "@contexts/invoices/intrastructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { GetInvoiceUseCase } from "@/contexts/invoices/application"; +import { InvoiceService } from "@/contexts/invoices/domain"; +import { invoiceMapper, InvoiceRepository } from "@/contexts/invoices/intrastructure"; +import { SequelizeTransactionManager } from "@/core"; +import { Sequelize } from "sequelize"; import { GetInvoiceController } from "./get-invoice.controller"; import { getInvoicePresenter } from "./presenter"; -export const buildGetInvoiceController = () => { - const transactionManager = new SequelizeTransactionManager(); +export const buildGetInvoiceController = (database: Sequelize) => { + const transactionManager = new SequelizeTransactionManager(database); + const invoiceRepository = new InvoiceRepository(database, invoiceMapper); const invoiceService = new InvoiceService(invoiceRepository); const useCase = new GetInvoiceUseCase(invoiceService, transactionManager); diff --git a/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceItem.presenter.ts.bak b/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceItem.presenter.ts.bak new file mode 100644 index 00000000..72d37f0b --- /dev/null +++ b/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceItem.presenter.ts.bak @@ -0,0 +1,16 @@ +import { InvoiceItem } from "#/server/domain"; +import { IInvoicingContext } from "#/server/intrastructure"; +import { Collection } from "@rdx/core"; + +export const invoiceItemPresenter = (items: Collection, context: IInvoicingContext) => + items.totalCount > 0 + ? items.items.map((item: InvoiceItem) => ({ + description: item.description.toString(), + quantity: item.quantity.toString(), + unit_measure: "", + unit_price: item.unitPrice.toPrimitive() as IMoney_Response_DTO, + subtotal: item.calculateSubtotal().toPrimitive() as IMoney_Response_DTO, + tax_amount: item.calculateTaxAmount().toPrimitive() as IMoney_Response_DTO, + total: item.calculateTotal().toPrimitive() as IMoney_Response_DTO, + })) + : []; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceParticipant.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceParticipant.presenter.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceParticipant.presenter.ts rename to apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceParticipant.presenter.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceParticipantAddress.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceParticipantAddress.presenter.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceParticipantAddress.presenter.ts rename to apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceParticipantAddress.presenter.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/get-invoice.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/get-invoice.presenter.ts index 1598ac79..1496f6cd 100644 --- a/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/get-invoice.presenter.ts +++ b/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/get-invoice.presenter.ts @@ -1,4 +1,4 @@ -import { Invoice, InvoiceItem } from "@contexts/invoices/domain"; +import { Invoice, InvoiceItem } from "#/server/domain"; import { IGetInvoiceResponseDTO } from "../../../dto"; export interface IGetInvoicePresenter { diff --git a/apps/server/src/contexts/invoices/presentation/controllers/index.ts b/apps/server/src/contexts/invoices/presentation/controllers/index.ts index 70c32af4..52d26ae9 100644 --- a/apps/server/src/contexts/invoices/presentation/controllers/index.ts +++ b/apps/server/src/contexts/invoices/presentation/controllers/index.ts @@ -1,5 +1,5 @@ -export * from "./create-invoice"; +//export * from "./create-invoice"; //export * from "./delete-invoice"; export * from "./get-invoice"; export * from "./list-invoices"; -//export * from "./update-invoice"; +///export * from "./update-invoice"; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/index.ts b/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/index.ts index 775666b7..116e394c 100644 --- a/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/index.ts +++ b/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/index.ts @@ -1,12 +1,14 @@ -import { invoiceRepository } from "@contexts/invoices/intrastructure"; -import { SequelizeTransactionManager } from "core/common/infrastructure"; -import { ListInvoicesUseCase } from "../../../application"; -import { InvoiceService } from "../../../domain"; +import { ListInvoicesUseCase } from "@/contexts/invoices/application"; +import { InvoiceService } from "@/contexts/invoices/domain"; +import { invoiceMapper, InvoiceRepository } from "@/contexts/invoices/intrastructure"; +import { SequelizeTransactionManager } from "@/core"; +import { Sequelize } from "sequelize"; import { ListInvoicesController } from "./list-invoices.controller"; import { listInvoicesPresenter } from "./presenter"; -export const buildListInvoicesController = () => { - const transactionManager = new SequelizeTransactionManager(); +export const buildListInvoicesController = (database: Sequelize) => { + const transactionManager = new SequelizeTransactionManager(database); + const invoiceRepository = new InvoiceRepository(database, invoiceMapper); const invoiceService = new InvoiceService(invoiceRepository); const useCase = new ListInvoicesUseCase(invoiceService, transactionManager); diff --git a/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/list-invoices.controller.ts b/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/list-invoices.controller.ts index 64a69032..fa7728ff 100644 --- a/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/list-invoices.controller.ts +++ b/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/list-invoices.controller.ts @@ -1,6 +1,6 @@ -import { ListInvoicesUseCase } from "@contexts/invoices/application"; -import { ExpressController } from "core/common/presentation"; -import { IListInvoicesPresenter } from "./list-invoices.presenter"; +import { ListInvoicesUseCase } from "@/contexts/invoices/application"; +import { ExpressController } from "@/core"; +import { IListInvoicesPresenter } from "./presenter"; export class ListInvoicesController extends ExpressController { public constructor( diff --git a/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/InvoiceParticipant.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/InvoiceParticipant.presenter.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/InvoiceParticipant.presenter.ts rename to apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/InvoiceParticipant.presenter.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/InvoiceParticipantAddress.presenter.ts.bak b/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/InvoiceParticipantAddress.presenter.ts.bak new file mode 100644 index 00000000..a30b9007 --- /dev/null +++ b/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/InvoiceParticipantAddress.presenter.ts.bak @@ -0,0 +1,14 @@ +export const InvoiceParticipantAddressPresenter = ( + address: InvoiceParticipantAddress +): IListInvoice_AddressParticipant_Response_DTO => { + return { + address_id: address?.id.toString(), + street: address?.street.toString(), + city: address?.city.toString(), + postal_code: address?.postalCode.toString(), + province: address?.province.toString(), + country: address?.country.toString(), + email: address?.email.toString(), + phone: address?.phone.toString(), + }; +}; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/list-invoices.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/list-invoices.presenter.ts index 40f58c3f..d61c3274 100644 --- a/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/list-invoices.presenter.ts +++ b/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/list-invoices.presenter.ts @@ -1,6 +1,6 @@ -import { Invoice } from "@contexts/invoices/domain"; -import { IListInvoicesResponseDTO } from "@contexts/invoices/presentation/dto"; -import { Collection } from "core/common/helpers"; +import { Invoice } from "#/server/domain"; +import { IListInvoicesResponseDTO } from "#/server/presentation/dto"; +import { Collection } from "@rdx/core"; export interface IListInvoicesPresenter { toDTO: (invoices: Collection) => IListInvoicesResponseDTO[]; @@ -18,7 +18,7 @@ export const listInvoicesPresenter: IListInvoicesPresenter = { issue_date: invoice.issueDate.toISOString(), operation_date: invoice.operationDate.toISOString(), language_code: "ES", - currency: invoice.currency, + currency: invoice.invoiceCurrency.toString(), subtotal: invoice.calculateSubtotal().toPrimitive(), total: invoice.calculateTotal().toPrimitive(), diff --git a/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/index.ts.bak b/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/index.ts.bak new file mode 100644 index 00000000..7dadbd9b --- /dev/null +++ b/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/index.ts.bak @@ -0,0 +1,57 @@ +import { IInvoicingContext } from "#/server/intrastructure"; +import { InvoiceRepository } from "#/server/intrastructure/Invoice.repository"; + +export const updateInvoiceController = (context: IInvoicingContext) => { + const adapter = context.adapter; + const repoManager = context.repositoryManager; + + repoManager.registerRepository("Invoice", (params = { transaction: null }) => { + const { transaction } = params; + + return new InvoiceRepository({ + transaction, + adapter, + mapper: createInvoiceMapper(context), + }); + }); + + repoManager.registerRepository("Participant", (params = { transaction: null }) => { + const { transaction } = params; + + return new InvoiceParticipantRepository({ + transaction, + adapter, + mapper: createInvoiceParticipantMapper(context), + }); + }); + + repoManager.registerRepository("ParticipantAddress", (params = { transaction: null }) => { + const { transaction } = params; + + return new InvoiceParticipantAddressRepository({ + transaction, + adapter, + mapper: createInvoiceParticipantAddressMapper(context), + }); + }); + + repoManager.registerRepository("Contact", (params = { transaction: null }) => { + const { transaction } = params; + + return new ContactRepository({ + transaction, + adapter, + mapper: createContactMapper(context), + }); + }); + + const updateInvoiceUseCase = new UpdateInvoiceUseCase(context); + + return new UpdateInvoiceController( + { + useCase: updateInvoiceUseCase, + presenter: updateInvoicePresenter, + }, + context + ); +}; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceItem.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceItem.presenter.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/get-invoice/presenter/InvoiceItem.presenter.ts rename to apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceItem.presenter.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceParticipant.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceParticipant.presenter.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceParticipant.presenter.ts rename to apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceParticipant.presenter.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceParticipantAddress.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceParticipantAddress.presenter.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceParticipantAddress.presenter.ts rename to apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceParticipantAddress.presenter.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/UpdateInvoice.presenter.ts b/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/UpdateInvoice.presenter.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/UpdateInvoice.presenter.ts rename to apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/UpdateInvoice.presenter.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/index.ts b/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/index.ts.bak similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/index.ts rename to apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/index.ts.bak diff --git a/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/update-invoice.controller.ts.bak b/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/update-invoice.controller.ts.bak new file mode 100644 index 00000000..26005e3b --- /dev/null +++ b/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/update-invoice.controller.ts.bak @@ -0,0 +1,72 @@ +import { IInvoicingContext } from "#/server/intrastructure"; +import { ExpressController } from "@rdx/core"; +import { IUpdateInvoicePresenter } from "./presenter"; + +export class UpdateInvoiceController extends ExpressController { + private useCase: UpdateInvoiceUseCase2; + private presenter: IUpdateInvoicePresenter; + private context: IInvoicingContext; + + constructor( + props: { + useCase: UpdateInvoiceUseCase; + presenter: IUpdateInvoicePresenter; + }, + context: IInvoicingContext + ) { + super(); + + const { useCase, presenter } = props; + this.useCase = useCase; + this.presenter = presenter; + this.context = context; + } + + async executeImpl(): Promise { + const { invoiceId } = this.req.params; + const request: IUpdateInvoice_DTO = this.req.body; + + if (RuleValidator.validate(RuleValidator.RULE_NOT_NULL_OR_UNDEFINED, invoiceId).isFailure) { + return this.invalidInputError("Invoice Id param is required!"); + } + + const idOrError = UniqueID.create(invoiceId); + if (idOrError.isFailure) { + return this.invalidInputError("Invalid invoice Id param!"); + } + + try { + const result = await this.useCase.execute({ + id: idOrError.object, + data: request, + }); + + if (result.isFailure) { + const { error } = result; + + switch (error.code) { + case UseCaseError.NOT_FOUND_ERROR: + return this.notFoundError("Invoice not found", error); + + case UseCaseError.INVALID_INPUT_DATA: + return this.invalidInputError(error.message); + + case UseCaseError.UNEXCEPTED_ERROR: + return this.internalServerError(result.error.message, result.error); + + case UseCaseError.REPOSITORY_ERROR: + return this.conflictError(result.error, result.error.details); + + default: + return this.clientError(result.error.message); + } + } + + const invoice = result.object; + + return this.ok(this.presenter.map(invoice, this.context)); + } catch (e: unknown) { + return this.fail(e as IServerError); + } + } +} diff --git a/apps/server/src/contexts/invoices/presentation/dto/invoices.response.dto.ts b/apps/server/src/contexts/invoices/presentation/dto/invoices.response.dto.ts index d1dddcea..821fc882 100644 --- a/apps/server/src/contexts/invoices/presentation/dto/invoices.response.dto.ts +++ b/apps/server/src/contexts/invoices/presentation/dto/invoices.response.dto.ts @@ -1,4 +1,4 @@ -import { IMoneyDTO, IQuantityDTO } from "core/common/presentation"; +import { IMoneyDTO, IQuantityDTO } from "@/core/common/presentation"; export interface IListInvoicesResponseDTO { id: string; diff --git a/apps/server/src/core/common/domain/aggregate-root.ts b/apps/server/src/core/common/domain/aggregate-root.ts index 55e20666..3255fcd1 100644 --- a/apps/server/src/core/common/domain/aggregate-root.ts +++ b/apps/server/src/core/common/domain/aggregate-root.ts @@ -1,4 +1,3 @@ -import { logger } from "core/common/infrastructure/logger"; import { DomainEntity } from "./domain-entity"; import { IDomainEvent } from "./events"; diff --git a/apps/server/src/core/common/domain/value-objects/email-address.ts b/apps/server/src/core/common/domain/value-objects/email-address.ts index 9855d0e3..d140a5e7 100644 --- a/apps/server/src/core/common/domain/value-objects/email-address.ts +++ b/apps/server/src/core/common/domain/value-objects/email-address.ts @@ -1,4 +1,4 @@ -import { Maybe, Result } from "core/common/helpers"; +import { Maybe, Result } from "@/core/common/helpers"; import { z } from "zod"; import { ValueObject } from "./value-object"; diff --git a/apps/server/src/core/common/domain/value-objects/money-value.ts b/apps/server/src/core/common/domain/value-objects/money-value.ts index ecf67dec..476471e5 100644 --- a/apps/server/src/core/common/domain/value-objects/money-value.ts +++ b/apps/server/src/core/common/domain/value-objects/money-value.ts @@ -1,4 +1,4 @@ -import { Result } from "core/common/helpers"; +import { Result } from "@/core/common/helpers"; import DineroFactory, { Currency, Dinero } from "dinero.js"; import { Percentage } from "./percentage"; import { Quantity } from "./quantity"; diff --git a/apps/server/src/core/common/domain/value-objects/name.ts b/apps/server/src/core/common/domain/value-objects/name.ts index 847fdcd0..b362713c 100644 --- a/apps/server/src/core/common/domain/value-objects/name.ts +++ b/apps/server/src/core/common/domain/value-objects/name.ts @@ -1,4 +1,4 @@ -import { Maybe, Result } from "core/common/helpers"; +import { Maybe, Result } from "@/core/common/helpers"; import { z } from "zod"; import { ValueObject } from "./value-object"; diff --git a/apps/server/src/core/common/domain/value-objects/percentage.ts b/apps/server/src/core/common/domain/value-objects/percentage.ts index fb628699..72a3d82c 100644 --- a/apps/server/src/core/common/domain/value-objects/percentage.ts +++ b/apps/server/src/core/common/domain/value-objects/percentage.ts @@ -1,4 +1,4 @@ -import { Result } from "core/common/helpers"; +import { Result } from "@/core/common/helpers"; import { z } from "zod"; import { ValueObject } from "./value-object"; diff --git a/apps/server/src/core/common/domain/value-objects/quantity.ts b/apps/server/src/core/common/domain/value-objects/quantity.ts index ccd3b244..37aaf4c5 100644 --- a/apps/server/src/core/common/domain/value-objects/quantity.ts +++ b/apps/server/src/core/common/domain/value-objects/quantity.ts @@ -1,4 +1,4 @@ -import { Result } from "core/common/helpers"; +import { Result } from "@/core/common/helpers"; import { z } from "zod"; import { ValueObject } from "./value-object"; diff --git a/apps/server/src/core/common/domain/value-objects/slug.ts b/apps/server/src/core/common/domain/value-objects/slug.ts index 5ca9c02a..b7bb4881 100644 --- a/apps/server/src/core/common/domain/value-objects/slug.ts +++ b/apps/server/src/core/common/domain/value-objects/slug.ts @@ -1,4 +1,4 @@ -import { Maybe, Result } from "core/common/helpers"; +import { Maybe, Result } from "@/core/common/helpers"; import { z } from "zod"; import { ValueObject } from "./value-object"; diff --git a/apps/server/src/core/common/domain/value-objects/utc-date.ts b/apps/server/src/core/common/domain/value-objects/utc-date.ts index fec144af..1fae725b 100644 --- a/apps/server/src/core/common/domain/value-objects/utc-date.ts +++ b/apps/server/src/core/common/domain/value-objects/utc-date.ts @@ -1,4 +1,4 @@ -import { Result } from "core/common/helpers"; +import { Result } from "@/core/common/helpers"; import { z } from "zod"; import { ValueObject } from "./value-object"; diff --git a/apps/server/src/core/common/infrastructure/logger/index.ts b/apps/server/src/core/common/infrastructure/logger/index.ts index d20b8244..84ddf947 100644 --- a/apps/server/src/core/common/infrastructure/logger/index.ts +++ b/apps/server/src/core/common/infrastructure/logger/index.ts @@ -6,36 +6,45 @@ import DailyRotateFile from "winston-daily-rotate-file"; dotenv.config(); -const splatSymbol = Symbol.for("splat"); +//const splatSymbol = Symbol.for("splat"); const initLogger = () => { const isProduction = process.env.NODE_ENV === "production"; const consoleFormat = format.combine( + format.errors({ stack: !isProduction }), format.colorize(), format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }), format.align(), format.splat(), - format.errors({ stack: !isProduction }), format.printf((info) => { + const { level, timestamp, stack, label, meta, error } = info; const rid = rTracer.id(); + let message = info.message; - if (typeof info.message === "object") { - info.message = JSON.stringify(info.message, null, 3); + if (typeof message === "object") { + message = JSON.stringify(message, null, 3); } - let out = - isProduction && rid - ? `${info.timestamp} [request-id:${rid}] - ${info.level}: [${info.label}]: ${info.message}` - : `${info.timestamp} - ${info.level}: [${info.label}]: ${info.message}`; + let out = `${timestamp}`; - /*if (info.metadata["error"]) { - out = `${out} ${info.metadata.error}`; - if (info.metadata?.error?.stack) { - out = `${out} ${info.metadata.error.stack}`; - } - }*/ + if (rid) { + out = `${out} [request-id:${rid}]`; + } + + out = `${out} - ${level}: [${label}]: ${message}`; + if (stack) { + out = `${out} - ${stack}`; + } + + if (meta) { + out = `${out} - ${JSON.stringify(meta, null, 3)}`; + } + + if (error) { + out = `${out} - ${JSON.stringify(error, null, 3)}`; + } return out; }) @@ -51,32 +60,36 @@ const initLogger = () => { format.json() ); - const logger = createLogger({ - level: isProduction ? "error" : "debug", + const logger = createLogger( + isProduction + ? { + level: isProduction ? "error" : "debug", - format: fileFormat, + format: fileFormat, - transports: [ - new DailyRotateFile({ - dirname: isProduction ? "/logs" : ".", - filename: "error-%DATE%.log", - datePattern: "YYYY-MM-DD", - utc: true, - level: "error", - maxSize: "5m", - maxFiles: "1d", - }), - new DailyRotateFile({ - dirname: isProduction ? "/logs" : ".", - filename: "debug-%DATE%.log", - datePattern: "YYYY-MM-DD", - utc: true, - level: "debug", - maxSize: "5m", - maxFiles: "1d", - }), - ], - }); + transports: [ + new DailyRotateFile({ + dirname: isProduction ? "/logs" : ".", + filename: "error-%DATE%.log", + datePattern: "YYYY-MM-DD", + utc: true, + level: "error", + maxSize: "5m", + maxFiles: "1d", + }), + new DailyRotateFile({ + dirname: isProduction ? "/logs" : ".", + filename: "debug-%DATE%.log", + datePattern: "YYYY-MM-DD", + utc: true, + level: "debug", + maxSize: "5m", + maxFiles: "1d", + }), + ], + } + : {} + ); // // If we're not in production then log to the `console` with the format: diff --git a/apps/server/src/core/common/infrastructure/passport/passport.ts b/apps/server/src/core/common/infrastructure/passport/passport.ts index 4257903e..b3f85c1d 100644 --- a/apps/server/src/core/common/infrastructure/passport/passport.ts +++ b/apps/server/src/core/common/infrastructure/passport/passport.ts @@ -1,4 +1,4 @@ -import { authenticatedUserRepository } from "@contexts/auth/infraestructure"; +import { authenticatedUserRepository } from "@/contexts/auth/infraestructure"; import passport from "passport"; import { ExtractJwt, Strategy as JwtStrategy } from "passport-jwt"; diff --git a/apps/server/src/core/common/infrastructure/sequelize/sequelize-mapper.ts b/apps/server/src/core/common/infrastructure/sequelize/sequelize-mapper.ts index afc292af..6f7ec448 100644 --- a/apps/server/src/core/common/infrastructure/sequelize/sequelize-mapper.ts +++ b/apps/server/src/core/common/infrastructure/sequelize/sequelize-mapper.ts @@ -1,5 +1,5 @@ -import { DomainEntity } from "core/common/domain"; -import { Collection, Result } from "core/common/helpers"; +import { DomainEntity } from "@/core/common/domain"; +import { Collection, Result } from "@/core/common/helpers"; import { Model } from "sequelize"; export type MapperParamsType = Record; diff --git a/apps/server/src/core/common/infrastructure/sequelize/sequelize-repository.ts b/apps/server/src/core/common/infrastructure/sequelize/sequelize-repository.ts index 934864fb..b680f19f 100644 --- a/apps/server/src/core/common/infrastructure/sequelize/sequelize-repository.ts +++ b/apps/server/src/core/common/infrastructure/sequelize/sequelize-repository.ts @@ -1,9 +1,15 @@ -import { IAggregateRootRepository, UniqueID } from "core/common/domain"; -import { Result } from "core/common/helpers"; -import { ModelDefined, Transaction } from "sequelize"; +import { IAggregateRootRepository, UniqueID } from "@/core/common/domain"; +import { Result } from "@/core/common/helpers"; +import { ModelDefined, Sequelize, Transaction } from "sequelize"; import { logger } from "../logger"; export abstract class SequelizeRepository implements IAggregateRootRepository { + protected readonly _database!: Sequelize; + + constructor(database: Sequelize) { + this._database = database; + } + protected async _findAll( model: ModelDefined, //queryCriteria?: IQueryCriteria, @@ -135,7 +141,7 @@ export abstract class SequelizeRepository implements IAggregateRootRepository ): Result { const _error = error as Error; - logger.error(`Database error: ${_error.message}`); + logger.error({ message: `Database error: ${_error.message}`, label: "SequelizeRepository" }); // Si la clase hija proporciona un mapeo personalizado, lo usa if (errorMapper) { diff --git a/apps/server/src/core/common/infrastructure/sequelize/sequelize-transaction-manager.ts b/apps/server/src/core/common/infrastructure/sequelize/sequelize-transaction-manager.ts index ed7ea392..a081054a 100644 --- a/apps/server/src/core/common/infrastructure/sequelize/sequelize-transaction-manager.ts +++ b/apps/server/src/core/common/infrastructure/sequelize/sequelize-transaction-manager.ts @@ -1,10 +1,11 @@ -import { Transaction } from "sequelize"; -import { sequelize } from "../../../../config/database"; +import { Sequelize, Transaction } from "sequelize"; import { TransactionManager } from "../database"; export class SequelizeTransactionManager extends TransactionManager { + protected _database: any | null = null; + protected async _startTransaction(): Promise { - return await sequelize.transaction(); + return await this._database.transaction(); } protected async _commitTransaction(): Promise { @@ -18,4 +19,9 @@ export class SequelizeTransactionManager extends TransactionManager { await this._transaction.rollback(); } } + + constructor(database: Sequelize) { + super(); + this._database = database; + } } diff --git a/apps/server/src/core/common/presentation/express/express-controller.ts b/apps/server/src/core/common/presentation/express/express-controller.ts index d265253c..3d1e536f 100644 --- a/apps/server/src/core/common/presentation/express/express-controller.ts +++ b/apps/server/src/core/common/presentation/express/express-controller.ts @@ -1,8 +1,8 @@ import { AuthenticatedRequest, TabContextRequest, -} from "@contexts/auth/infraestructure/express/types"; -import { logger } from "core/common/infrastructure/logger"; +} from "@/contexts/auth/infraestructure/express/types"; +import { logger } from "@/core/common/infrastructure/logger"; import { NextFunction, Request, Response } from "express"; import httpStatus from "http-status"; import { ApiError } from "./api-error"; diff --git a/apps/server/src/core/common/presentation/express/middlewares/global-error-handler.ts b/apps/server/src/core/common/presentation/express/middlewares/global-error-handler.ts index a9b8e7a5..cd3101fd 100644 --- a/apps/server/src/core/common/presentation/express/middlewares/global-error-handler.ts +++ b/apps/server/src/core/common/presentation/express/middlewares/global-error-handler.ts @@ -1,4 +1,4 @@ -import { logger } from "core/common/infrastructure/logger"; +import { logger } from "@/core/common/infrastructure/logger"; import { NextFunction, Request, Response } from "express"; import { ApiError } from "../api-error"; diff --git a/apps/server/src/core/package-loader.ts b/apps/server/src/core/package-loader.ts.bak similarity index 96% rename from apps/server/src/core/package-loader.ts rename to apps/server/src/core/package-loader.ts.bak index a4fe4050..ebafbb22 100644 --- a/apps/server/src/core/package-loader.ts +++ b/apps/server/src/core/package-loader.ts.bak @@ -1,7 +1,7 @@ import { IPackageServer } from "@libs/package"; import { Express } from "express"; import { Sequelize } from "sequelize"; -import { registerService } from "./service-registry"; +import { registerService } from "./service-registry.ts.bak"; const registeredPackages: Map = new Map(); const initializedPackages = new Set(); diff --git a/apps/server/src/core/service-registry.ts b/apps/server/src/core/service-registry.ts.bak similarity index 100% rename from apps/server/src/core/service-registry.ts rename to apps/server/src/core/service-registry.ts.bak diff --git a/apps/server/src/index.ts b/apps/server/src/index.ts index 9206a4ec..e26299cc 100644 --- a/apps/server/src/index.ts +++ b/apps/server/src/index.ts @@ -1,9 +1,9 @@ import http from "http"; import { DateTime } from "luxon"; -import { registerPackages } from "packages"; +import os from "os"; import { createApp } from "./app"; import { ENV } from "./config"; -import { connectToDatabase } from "./config/database"; +import { tryConnectToDatabase } from "./config/database"; import { logger } from "./core/common/infrastructure/logger"; // Guardamos información del estado del servidor @@ -41,13 +41,17 @@ const serverStop = (server: http.Server) => { // Manejo de errores al iniciar el servidor const serverError = (error: NodeJS.ErrnoException) => { - logger.info(`⛔️ Server wasn't able to start properly.`); + logger.error({ + message: `⛔️ Server wasn't able to start properly.`, + label: "serverError0", + error, + }); if (error.code === "EADDRINUSE") { - logger.error(error.message); + logger.error({ message: error.message, error, label: "serverError1" }); //logger.error(`The port ${error.port} is already used by another application.`); } else { - logger.error(error); + logger.error({ message: error.message, error, label: "serverError2" }); } // Dependiendo de la criticidad, podrías forzar el proceso a salir @@ -68,7 +72,7 @@ const serverConnection = (conn: any) => { //const firebirdConn = createFirebirdAdapter(); // Cargar paquetes de la aplicación -registerPackages(); +// registerPackages(); // Crea el servidor HTTP const server = http @@ -117,14 +121,42 @@ process.on("uncaughtException", (error: Error) => { logger.info(`Environment: ${currentState.environment}`); logger.info(`Process PID: ${process.pid}`); - await connectToDatabase(); + const database = await tryConnectToDatabase(); // Lógica de inicialización de DB, si procede: // initStructure(sequelizeConn.connection); // insertUsers(); + //await initModules({ app, database, baseRoutePath: "/api/v1" }); + server.listen(currentState.port, () => { + server.emit("listening"); + + const networkInterfaces = os.networkInterfaces(); + const addresses: string[] = []; + + // Obtiene todas las direcciones IPv4 + for (const interfaceName in networkInterfaces) { + const networkInterface = networkInterfaces[interfaceName]; + if (networkInterface) { + for (const iface of networkInterface) { + if (iface.family === "IPv4" && !iface.internal) { + addresses.push(iface.address); + } + } + } + } + + addresses.forEach((address) => { + logger.info(`⚡️ Server accessible at: http://${address}:${currentState.port}`); + }); + logger.info(`Server started at: ${DateTime.now().toLocaleString(DateTime.DATETIME_FULL)}`); + logger.info(`Server PID: ${process.pid}`); + logger.info( + `Server launched in: ${DateTime.now().diff(currentState.launchedAt).toMillis()} ms` + ); + logger.info(`Server path: ${currentState.appPath}`); + logger.info(`Server environment: ${currentState.environment}`); logger.info("To shut down your server, press + C at any time"); - logger.info(`⚡️ Server: http://${currentState.host}:${currentState.port}`); }); } catch (error) { serverError(error as NodeJS.ErrnoException); diff --git a/apps/server/src/packages.ts b/apps/server/src/packages.ts deleted file mode 100644 index 4c50395d..00000000 --- a/apps/server/src/packages.ts +++ /dev/null @@ -1,8 +0,0 @@ -// apps/server/src/plugins.ts -//import { ContactsPackage } from '@packages/contacts/server'; -//import { InvoicesPackage } from '@packages/invoices/server'; - -export const registerPackages = () => { - //registerPackage(ContactsPackage); - //registerPackage(InvoicesPackage); -}; diff --git a/apps/server/src/packages.ts.bak b/apps/server/src/packages.ts.bak new file mode 100644 index 00000000..0695c41b --- /dev/null +++ b/apps/server/src/packages.ts.bak @@ -0,0 +1,8 @@ +//import { ContactsPackage } from '@modules/contacts/server'; +//import { InvoicesPackage } from "@modules/invoices/server"; +//import { registerPackage } from "@/core/module-loader"; + +export const registerPackages = () => { + //registerPackage(ContactsPackage); + //registerPackage(InvoicesPackage); +}; diff --git a/apps/server/src/routes/accounts.routes.ts b/apps/server/src/routes/accounts.routes.ts index b2de062b..7f35f289 100644 --- a/apps/server/src/routes/accounts.routes.ts +++ b/apps/server/src/routes/accounts.routes.ts @@ -3,15 +3,15 @@ import { IGetAccountRequestSchema, IUpdateAccountRequestSchema, ListAccountsRequestSchema, -} from "@contexts/accounts/presentation"; +} from "@/contexts/accounts/presentation"; import { buildCreateAccountController, buildGetAccountController, buildListAccountsController, buildUpdateAccountController, -} from "@contexts/accounts/presentation/controllers"; -import { checkTabContext } from "@contexts/auth/infraestructure"; -import { validateAndParseBody } from "core/common/presentation"; +} from "@/contexts/accounts/presentation/controllers"; +import { checkTabContext } from "@/contexts/auth/infraestructure"; +import { validateAndParseBody } from "@/core/common/presentation"; import { NextFunction, Request, Response, Router } from "express"; export const accountsRouter = (appRouter: Router) => { diff --git a/apps/server/src/routes/auth.routes.ts b/apps/server/src/routes/auth.routes.ts index 563ed2f2..9aaf7dc9 100644 --- a/apps/server/src/routes/auth.routes.ts +++ b/apps/server/src/routes/auth.routes.ts @@ -1,16 +1,16 @@ -import { checkTabContext, checkUser } from "@contexts/auth/infraestructure"; +import { checkTabContext, checkUser } from "@/contexts/auth/infraestructure"; import { buildLoginController, buildLogoutController, buildRefreshTokenController, buildRegisterController, -} from "@contexts/auth/presentation/controllers"; +} from "@/contexts/auth/presentation/controllers"; import { LoginUserSchema, RefreshTokenSchema, RegisterUserSchema, -} from "@contexts/auth/presentation/dto"; -import { validateAndParseBody } from "core/common/presentation"; +} from "@/contexts/auth/presentation/dto"; +import { validateAndParseBody } from "@/core/common/presentation"; import { NextFunction, Request, Response, Router } from "express"; export const authRouter = (appRouter: Router) => { diff --git a/apps/server/src/routes/invoices.routes.ts b/apps/server/src/routes/invoices.routes.ts index 386eefed..dedc8e3b 100644 --- a/apps/server/src/routes/invoices.routes.ts +++ b/apps/server/src/routes/invoices.routes.ts @@ -1,22 +1,24 @@ +import { getDatabase } from "@/config"; +import { validateAndParseBody } from "@/core/common/presentation"; + import { - buildCreateInvoiceController, + ICreateInvoiceRequestSchema, buildGetInvoiceController, buildListInvoicesController, - ICreateInvoiceRequestSchema, -} from "@contexts/invoices/presentation"; -import { validateAndParseBody } from "core/common/presentation"; - +} from "@/contexts/invoices/presentation"; +import { buildCreateInvoiceController } from "@/contexts/invoices/presentation/controllers/create-invoice"; import { NextFunction, Request, Response, Router } from "express"; export const invoicesRouter = (appRouter: Router) => { const routes: Router = Router({ mergeParams: true }); + const database = getDatabase(); routes.get( "/", //checkTabContext, //checkUser, (req: Request, res: Response, next: NextFunction) => { - buildListInvoicesController().execute(req, res, next); + buildListInvoicesController(database).execute(req, res, next); } ); @@ -25,7 +27,7 @@ export const invoicesRouter = (appRouter: Router) => { //checkTabContext, //checkUser, (req: Request, res: Response, next: NextFunction) => { - buildGetInvoiceController().execute(req, res, next); + buildGetInvoiceController(database).execute(req, res, next); } ); diff --git a/apps/server/src/routes/users.routes.ts b/apps/server/src/routes/users.routes.ts index 7eb4dd81..673e905e 100644 --- a/apps/server/src/routes/users.routes.ts +++ b/apps/server/src/routes/users.routes.ts @@ -1,6 +1,6 @@ -import { checkTabContext, checkUserIsAdmin } from "@contexts/auth/infraestructure"; -import { buildListUsersController, ListUsersSchema } from "@contexts/auth/presentation"; -import { validateAndParseBody } from "core/common/presentation"; +import { checkTabContext, checkUserIsAdmin } from "@/contexts/auth/infraestructure"; +import { buildListUsersController, ListUsersSchema } from "@/contexts/auth/presentation"; +import { validateAndParseBody } from "@/core/common/presentation"; import { NextFunction, Request, Response, Router } from "express"; export const usersRouter = (appRouter: Router) => { diff --git a/apps/server/src/routes/v1.routes.ts b/apps/server/src/routes/v1.routes.ts index 2fbec422..319079a1 100644 --- a/apps/server/src/routes/v1.routes.ts +++ b/apps/server/src/routes/v1.routes.ts @@ -1,7 +1,7 @@ import { Router } from "express"; import { invoicesRouter } from "./invoices.routes"; -export const v1Routes = () => { +export const v1Routes = (): Router => { const routes = Router({ mergeParams: true }); routes.get("/hello", (req, res) => { diff --git a/apps/server/tsconfig.json b/apps/server/tsconfig.json index 4c269135..557d7d6a 100644 --- a/apps/server/tsconfig.json +++ b/apps/server/tsconfig.json @@ -1,21 +1,26 @@ { - "extends": "@repo/tsconfig/node", + "extends": "@repo/typescript-config/express.json", + "compilerOptions": { - "resolveJsonModule": true, - "esModuleInterop": true, + //"rootDir": "./src", // Define que el código fuente vive en "src/" + "module": "CommonJS", "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "baseUrl": "src", + + "composite": true, // Para builds encadenados (si se usa references) + "declaration": true, // Genera archivos .d.ts + "emitDeclarationOnly": false, // También genera .js + "noEmitOnError": false, // Falla si hay errores de tipos + "preserveSymlinks": true, // Opcional: útil si usas symlinks entre workspaces + + //"baseUrl": "./src", "paths": { - "@contexts/*": ["contexts/*"], - "@libs/*": ["../../../libs/*"], - "@packages/*": ["../../../packages/*"] - /*"@common/*": ["common/*"],*/ - /*"@config/*": ["config/*"]*/ - } + /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + "@/*": ["./src/*"] + }, + "resolveJsonModule": true }, - "include": ["src", "test"], - "exclude": ["node_modules", "coverage"] + "include": ["src/**/*.ts"], + "exclude": ["src/**/__tests__/*", "src/**/*.mock.*", "src/**/*.test.*", "node_modules", "dist"] } diff --git a/apps/web/.eslintrc.cjs b/apps/web/.eslintrc.cjs new file mode 100644 index 00000000..4353e517 --- /dev/null +++ b/apps/web/.eslintrc.cjs @@ -0,0 +1,4 @@ +import { viteConfig } from "@repo/eslint-config/vite"; + +/** @type {import("eslint").Linter.Config} */ +export default viteConfig; diff --git a/apps/web/index.html b/apps/web/index.html new file mode 100644 index 00000000..6eed4cfd --- /dev/null +++ b/apps/web/index.html @@ -0,0 +1,19 @@ + + + + + + + + + + FactuGES 2025 + + + + +
+ + + + \ No newline at end of file diff --git a/apps/web/package.json b/apps/web/package.json new file mode 100644 index 00000000..e424adff --- /dev/null +++ b/apps/web/package.json @@ -0,0 +1,29 @@ +{ + "name": "web", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite --clearScreen false", + "build": "tsc && vite build", + "preview": "vite preview", + "lint": "eslint \"src/**/*.ts\"", + "clean": "rm -rf dist && rm -rf node_modules" + }, + "dependencies": { + "@repo/ui": "workspace:*", + "react": "^19.1.0", + "react-dom": "^19.1.0" + }, + "devDependencies": { + "@repo/eslint-config": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@types/react": "^19.1.2", + "@types/react-dom": "^19.1.3", + "@vitejs/plugin-react": "^4.4.1", + "globals": "^16.0.0", + "typescript": "^5.8.3", + "typescript-eslint": "^8.31.1", + "vite": "^6.3.4" + } +} diff --git a/apps/web/postcss.config.mjs b/apps/web/postcss.config.mjs new file mode 100644 index 00000000..039248f7 --- /dev/null +++ b/apps/web/postcss.config.mjs @@ -0,0 +1 @@ +export { default } from "@repo/ui/postcss.config"; diff --git a/apps/web/public/typescript.svg b/apps/web/public/typescript.svg new file mode 100644 index 00000000..d91c910c --- /dev/null +++ b/apps/web/public/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/client/public/vite.svg b/apps/web/public/vite.svg similarity index 100% rename from apps/client/public/vite.svg rename to apps/web/public/vite.svg diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx new file mode 100644 index 00000000..05ca4af0 --- /dev/null +++ b/apps/web/src/App.tsx @@ -0,0 +1,20 @@ +import { Button } from "@repo/ui/components/button"; +import { useState } from "react"; + +import "@repo/ui/globals.css"; + +function App() { + const [count, setCount] = useState(0); + + return ( +
+

This is a Vite application

+

+ This shadcn/ui button is shared between Vite, NextJS and any other application. +

+ +
+ ); +} + +export default App; diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx new file mode 100644 index 00000000..0b872751 --- /dev/null +++ b/apps/web/src/main.tsx @@ -0,0 +1,9 @@ +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import App from "./App.tsx"; + +createRoot(document.getElementById("factuges")!).render( + + + +); diff --git a/apps/client/src/vite-env.d.ts b/apps/web/src/vite-env.d.ts similarity index 100% rename from apps/client/src/vite-env.d.ts rename to apps/web/src/vite-env.d.ts diff --git a/apps/web/tailwind.config.js b/apps/web/tailwind.config.js new file mode 100644 index 00000000..dfc34a97 --- /dev/null +++ b/apps/web/tailwind.config.js @@ -0,0 +1,93 @@ +/** @type {import('tailwindcss').Config} */ + +import defaultTheme from "tailwindcss/defaultTheme"; +import plugin from "tailwindcss/plugin"; + +export default { + darkMode: ["class"], + content: ["./src/**/*.{js,ts,jsx,tsx,html}"], + + theme: { + container: { + center: true, + padding: "2rem", + screens: { + "2xl": "1400px", + }, + }, + extend: { + // https://tailwindcss.com/docs/font-family#font-families + fontFamily: { + sans: ['"Poppins"', ...defaultTheme.fontFamily.sans], + }, + + /*fontFamily: { + display: "Public Sans, ui-sans-serif", + heading: "Noto Serif, ui-serif", + },*/ + + colors: { + border: "hsl(240, 5.9%, 90%)", + input: "hsl(240, 5.9%, 90%)", + ring: "hsl(346.8, 77.2%, 49.8%)", + background: "hsl(0, 0%, 100%)", + foreground: "hsl(240, 10%, 3.9%)", + primary: { + DEFAULT: "hsl(346.8, 77.2%, 49.8%)", + foreground: "hsl(355.7, 100%, 97.3%)", + }, + secondary: { + DEFAULT: "hsl(240, 4.8%, 95.9%)", + foreground: "hsl(240, 5.9%, 10%)", + }, + destructive: { + DEFAULT: "hsl(0, 84.2%, 60.2%)", + foreground: "hsl(0, 0%, 98%)", + }, + muted: { + DEFAULT: "hsl(240, 4.8%, 95.9%)", + foreground: "hsl(240, 3.8%, 46.1%)", + }, + accent: { + DEFAULT: "hsl(240, 4.8%, 95.9%)", + foreground: "hsl(240, 5.9%, 10%)", + }, + popover: { + DEFAULT: "hsl(0, 0%, 100%)", + foreground: "hsl(240, 10%, 3.9%)", + }, + card: { + DEFAULT: "hsl(0, 0%, 100%)", + foreground: "hsl(240, 10%, 3.9%)", + }, + }, + borderRadius: { + lg: "0.3rem", + md: "calc(0.3rem - 2px)", + sm: "calc(0.3rem - 4px)", + }, + keyframes: { + "accordion-down": { + from: { height: "0" }, + to: { height: "var(--radix-accordion-content-height)" }, + }, + "accordion-up": { + from: { height: "var(--radix-accordion-content-height)" }, + to: { height: "0" }, + }, + }, + animation: { + "accordion-down": "accordion-down 0.2s ease-out", + "accordion-up": "accordion-up 0.2s ease-out", + }, + }, + }, + plugins: [ + require("tailwindcss-animate"), + plugin(function ({ addBase }) { + addBase({ + html: { fontSize: "16px" }, // 16px es el valor por defecto + }); + }), + ], +}; diff --git a/apps/web/tsconfig.app.json b/apps/web/tsconfig.app.json new file mode 100644 index 00000000..358ca9ba --- /dev/null +++ b/apps/web/tsconfig.app.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["src"] +} diff --git a/apps/client/tsconfig.json b/apps/web/tsconfig.json similarity index 100% rename from apps/client/tsconfig.json rename to apps/web/tsconfig.json diff --git a/apps/web/tsconfig.node.json b/apps/web/tsconfig.node.json new file mode 100644 index 00000000..db0becc8 --- /dev/null +++ b/apps/web/tsconfig.node.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "ES2022", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts new file mode 100644 index 00000000..081c8d9f --- /dev/null +++ b/apps/web/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; + +export default defineConfig({ + plugins: [react()], +}); diff --git a/libs/eslint-config/index.js b/libs/eslint-config/index.js deleted file mode 100644 index 9919db9c..00000000 --- a/libs/eslint-config/index.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = { - root: true, - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 2021, - sourceType: "module", - ecmaFeatures: { - jsx: true, - }, - }, - plugins: ["@typescript-eslint", "react"], - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:react/recommended", - ], - rules: { - "@typescript-eslint/explicit-module-boundary-types": "off", - "react/react-in-jsx-scope": "off", - }, - settings: { - react: { - version: "detect", - }, - }, -}; diff --git a/libs/eslint-config/package.json b/libs/eslint-config/package.json deleted file mode 100644 index 9e2e008c..00000000 --- a/libs/eslint-config/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@repo/eslint-config", - "version": "1.0.0", - "main": "index.js", - "private": true, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^8.31.0", - "@typescript-eslint/parser": "^8.31.0", - "eslint": "^9.19.0", - "eslint-plugin-react": "^7.0.0", - "typescript": "*" - } -} diff --git a/libs/package/index.ts b/libs/package/index.ts deleted file mode 100644 index 605ea6b9..00000000 --- a/libs/package/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./package-client.interface"; -export * from "./package-server.interface"; -export * from "./types"; diff --git a/libs/package/package.json b/libs/package/package.json deleted file mode 100644 index a1d24799..00000000 --- a/libs/package/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@libs/package", - "version": "1.0.0", - "main": "index.ts", - "private": true, - "peerDependencies": { - "@types/express": "^4.17.21", - "@types/react": "^19.1.2", - "express": "^4.18.2", - "react": "^18.3.1", - "sequelize": "^6.37.5", - "typescript": "*" - } -} diff --git a/libs/rdx-criteria/package.json b/libs/rdx-criteria/package.json deleted file mode 100644 index fe7e0aed..00000000 --- a/libs/rdx-criteria/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@codelytv/criteria-monorepo", - "private": true, - "author": "", - "license": "MIT", - "engines": { - "node": ">=22" - }, - "packageManager": "pnpm@9.3.0", - "workspaces": [ - "packages/*" - ], - "scripts": { - "test": "pnpm -r run test", - "build": "pnpm -r run build", - "release": "pnpm run build & pnpm changeset publish" - }, - "devDependencies": { - "@changesets/cli": "^2.27.5", - "@types/node": "^22.10.7", - "eslint-config-codely": "^3.1.4", - "tsx": "^4.13.2", - "typescript": "^5.7.3" - } -} diff --git a/libs/rdx-criteria/packages/criteria/package.json b/libs/rdx-criteria/packages/criteria/package.json deleted file mode 100644 index 069d8ddb..00000000 --- a/libs/rdx-criteria/packages/criteria/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@rodax-software/criteria", - "version": "1.0.0", - "description": "", - "keywords": [], - "author": "Rodax Software", - "license": "", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "scripts": { - "test": "node --import tsx --test test/*.test.ts", - "build": "tsc --build --verbose tsconfig.json" - }, - "devDependencies": { - "@faker-js/faker": "^8.3.1" - } -} diff --git a/libs/rdx-criteria/packages/tsconfig.json b/libs/rdx-criteria/packages/tsconfig.json deleted file mode 100644 index e0d66374..00000000 --- a/libs/rdx-criteria/packages/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": ["src/**/*"] -} diff --git a/libs/rdx-ddd/package.json b/libs/rdx-ddd/package.json deleted file mode 100644 index 83f346c1..00000000 --- a/libs/rdx-ddd/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "rdx-ddd", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC" -} diff --git a/libs/rdx-verifactu/.eslintrc.json b/libs/rdx-verifactu/.eslintrc.json deleted file mode 100644 index f4e1b0c2..00000000 --- a/libs/rdx-verifactu/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["eslint-config-codely/typescript"], - "overrides": [ - { - "files": ["*.ts"], - "parserOptions": { - "project": [ - "./tsconfig.json", - "./packages/criteria/tsconfig.json", - "./packages/criteria-mysql/tsconfig.json" - ] - }, - "rules": { - "@typescript-eslint/no-floating-promises": ["off"] - } - } - ] -} diff --git a/libs/rdx-verifactu/.gitignore b/libs/rdx-verifactu/.gitignore deleted file mode 100644 index 76add878..00000000 --- a/libs/rdx-verifactu/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -dist \ No newline at end of file diff --git a/libs/rdx-verifactu/tsconfig.json b/libs/rdx-verifactu/tsconfig.json deleted file mode 100644 index 5f65a300..00000000 --- a/libs/rdx-verifactu/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "allowJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "noEmit": false, - "skipLibCheck": true, - "strict": true, - "incremental": false, - "declaration": true, - "exactOptionalPropertyTypes": true, - "target": "es2020" - } -} diff --git a/libs/shared/package.json b/libs/shared/package.json deleted file mode 100644 index 25776c85..00000000 --- a/libs/shared/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "shared", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC" -} diff --git a/libs/shared/tsconfig.json b/libs/shared/tsconfig.json deleted file mode 100644 index e69de29b..00000000 diff --git a/libs/tsconfig/base.json b/libs/tsconfig/base.json deleted file mode 100644 index e7377ac3..00000000 --- a/libs/tsconfig/base.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2021", - "module": "ESNext", - "moduleResolution": "Node", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "skipLibCheck": true, - "resolveJsonModule": true, - "allowSyntheticDefaultImports": true, - "baseUrl": ".", - "paths": { - "@apps/*": ["apps/*"], - "@packages/*": ["packages/*"], - "@libs/*": ["libs/*"] - } - } -} diff --git a/libs/tsconfig/package.json b/libs/tsconfig/package.json deleted file mode 100644 index acb6b0a0..00000000 --- a/libs/tsconfig/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "@repo/tsconfig", - "version": "1.0.0", - "private": true -} diff --git a/libs/tsconfig/react.json b/libs/tsconfig/react.json deleted file mode 100644 index 88efdddf..00000000 --- a/libs/tsconfig/react.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./base.json", - "compilerOptions": { - "jsx": "react-jsx", - "lib": ["DOM", "ESNext"] - }, - "include": ["src"] -} diff --git a/libs/ui/.eslintrc.js b/libs/ui/.eslintrc.js deleted file mode 100644 index be7ef60e..00000000 --- a/libs/ui/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -/** @type {import("eslint").Linter.Config} */ -module.exports = { - root: true, - extends: ['@repo/eslint-config/react-internal.js'], - parser: '@typescript-eslint/parser', - rules: { - 'no-redeclare': 'off', - }, -}; diff --git a/libs/ui/README.md b/libs/ui/README.md deleted file mode 100644 index 61eba23c..00000000 --- a/libs/ui/README.md +++ /dev/null @@ -1 +0,0 @@ -# `@repo/ui` diff --git a/libs/ui/components.json b/libs/ui/components.json deleted file mode 100644 index 46a7d7e7..00000000 --- a/libs/ui/components.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://ui.shadcn.com/schema.json", - "style": "default", - "rsc": true, - "tsx": true, - "tailwind": { - "config": "tailwind.config.ts", - "css": "src/globals.css", - "baseColor": "slate", - "cssVariables": true, - "prefix": "" - }, - "aliases": { - "components": "@ui/components", - "utils": "@ui/lib/utils" - } -} diff --git a/libs/ui/package.json b/libs/ui/package.json deleted file mode 100644 index d33b8a73..00000000 --- a/libs/ui/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@repo/ui", - "version": "0.0.0", - "private": true, - "scripts": { - "ui:add": "pnpm dlx shadcn-ui@latest add", - "lint": "eslint ." - }, - "devDependencies": { - "@repo/eslint-config": "workspace:*", - "@repo/tsconfig": "workspace:*", - "@types/node": "^22.10.7", - "@types/react": "^19.0.7", - "autoprefixer": "^10.4.20", - "postcss": "^8.5.1", - "tailwindcss": "^3.4.17", - "typescript": "^5.7.3" - }, - "dependencies": { - "@radix-ui/react-slot": "^1.1.1", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "lucide-react": "^0.473.0", - "tailwind-merge": "^2.6.0", - "tailwindcss-animate": "^1.0.7" - }, - "exports": { - "./globals.css": "./src/globals.css", - "./postcss.config": "./postcss.config.js", - "./tailwind.config": "./tailwind.config.ts", - "./lib/*": "./src/lib/*.ts", - "./components/*": "./src/components/*.tsx" - } -} diff --git a/libs/ui/postcss.config.js b/libs/ui/postcss.config.js deleted file mode 100644 index 9f239969..00000000 --- a/libs/ui/postcss.config.js +++ /dev/null @@ -1,7 +0,0 @@ -// eslint-disable-next-line no-undef -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; diff --git a/libs/ui/src/components/ui/button.tsx b/libs/ui/src/components/ui/button.tsx deleted file mode 100644 index c042866f..00000000 --- a/libs/ui/src/components/ui/button.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import * as React from "react"; -import { Slot } from "@radix-ui/react-slot"; -import { cva, type VariantProps } from "class-variance-authority"; - -import { cn } from "@ui/lib/utils"; - -const buttonVariants = cva( - "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", - { - variants: { - variant: { - default: "bg-primary text-primary-foreground hover:bg-primary/90", - destructive: - "bg-destructive text-destructive-foreground hover:bg-destructive/90", - outline: - "border border-input bg-background hover:bg-accent hover:text-accent-foreground", - secondary: - "bg-secondary text-secondary-foreground hover:bg-secondary/80", - ghost: "hover:bg-accent hover:text-accent-foreground", - link: "text-primary underline-offset-4 hover:underline", - }, - size: { - default: "h-10 px-4 py-2", - sm: "h-9 rounded-md px-3", - lg: "h-11 rounded-md px-8", - icon: "h-10 w-10", - }, - }, - defaultVariants: { - variant: "default", - size: "default", - }, - }, -); - -export interface ButtonProps - extends React.ButtonHTMLAttributes, - VariantProps { - asChild?: boolean; -} - -const Button = React.forwardRef( - ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button"; - return ( - - ); - }, -); -Button.displayName = "Button"; - -export { Button, buttonVariants }; diff --git a/libs/ui/src/globals.css b/libs/ui/src/globals.css deleted file mode 100644 index 8abdb15c..00000000 --- a/libs/ui/src/globals.css +++ /dev/null @@ -1,76 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -@layer base { - :root { - --background: 0 0% 100%; - --foreground: 222.2 84% 4.9%; - - --card: 0 0% 100%; - --card-foreground: 222.2 84% 4.9%; - - --popover: 0 0% 100%; - --popover-foreground: 222.2 84% 4.9%; - - --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; - - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; - - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; - - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 210 40% 98%; - - --border: 214.3 31.8% 91.4%; - --input: 214.3 31.8% 91.4%; - --ring: 222.2 84% 4.9%; - - --radius: 0.5rem; - } - - .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; - - --card: 222.2 84% 4.9%; - --card-foreground: 210 40% 98%; - - --popover: 222.2 84% 4.9%; - --popover-foreground: 210 40% 98%; - - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 11.2%; - - --secondary: 217.2 32.6% 17.5%; - --secondary-foreground: 210 40% 98%; - - --muted: 217.2 32.6% 17.5%; - --muted-foreground: 215 20.2% 65.1%; - - --accent: 217.2 32.6% 17.5%; - --accent-foreground: 210 40% 98%; - - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 210 40% 98%; - - --border: 217.2 32.6% 17.5%; - --input: 217.2 32.6% 17.5%; - --ring: 212.7 26.8% 83.9%; - } -} - -@layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground; - } -} diff --git a/libs/ui/tailwind.config.ts b/libs/ui/tailwind.config.ts deleted file mode 100644 index 41bdcac6..00000000 --- a/libs/ui/tailwind.config.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { Config } from "tailwindcss"; -import tailwindcssAnimate from "tailwindcss-animate"; - -const config = { - darkMode: ["class"], - content: [ - "./pages/**/*.{ts,tsx}", - "./components/**/*.{ts,tsx}", - "./app/**/*.{ts,tsx}", - "./src/**/*.{ts,tsx}", - "../../packages/ui/src/**/*.{ts,tsx}", - ], - prefix: "", - theme: { - container: { - center: true, - padding: "2rem", - screens: { - "2xl": "1400px", - }, - }, - extend: { - colors: { - border: "hsl(var(--border))", - input: "hsl(var(--input))", - ring: "hsl(var(--ring))", - background: "hsl(var(--background))", - foreground: "hsl(var(--foreground))", - primary: { - DEFAULT: "hsl(var(--primary))", - foreground: "hsl(var(--primary-foreground))", - }, - secondary: { - DEFAULT: "hsl(var(--secondary))", - foreground: "hsl(var(--secondary-foreground))", - }, - destructive: { - DEFAULT: "hsl(var(--destructive))", - foreground: "hsl(var(--destructive-foreground))", - }, - muted: { - DEFAULT: "hsl(var(--muted))", - foreground: "hsl(var(--muted-foreground))", - }, - accent: { - DEFAULT: "hsl(var(--accent))", - foreground: "hsl(var(--accent-foreground))", - }, - popover: { - DEFAULT: "hsl(var(--popover))", - foreground: "hsl(var(--popover-foreground))", - }, - card: { - DEFAULT: "hsl(var(--card))", - foreground: "hsl(var(--card-foreground))", - }, - }, - borderRadius: { - lg: "var(--radius)", - md: "calc(var(--radius) - 2px)", - sm: "calc(var(--radius) - 4px)", - }, - keyframes: { - "accordion-down": { - from: { height: "0" }, - to: { height: "var(--radix-accordion-content-height)" }, - }, - "accordion-up": { - from: { height: "var(--radix-accordion-content-height)" }, - to: { height: "0" }, - }, - }, - animation: { - "accordion-down": "accordion-down 0.2s ease-out", - "accordion-up": "accordion-up 0.2s ease-out", - }, - }, - }, - plugins: [tailwindcssAnimate], -} satisfies Config; - -export default config; diff --git a/modules.bak/invoices/package.json b/modules.bak/invoices/package.json new file mode 100644 index 00000000..bce4acf0 --- /dev/null +++ b/modules.bak/invoices/package.json @@ -0,0 +1,32 @@ +{ + "name": "@modules/invoices", + "version": "0.0.0", + "private": true, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**" + ], + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "lint": "eslint src/", + "lint:fix": "eslint src/ --fix", + "typecheck": "tsc --noEmit", + "test": "jest" + }, + "jest": { + "preset": "@repo/jest-presets/node" + }, + "devDependencies": { + "@rdx/utils": "workspace:*", + "@repo/eslint-config": "workspace:*", + "@repo/jest-presets": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@types/dinero.js": "^1.9.4", + "jest": "^29.7.0", + "typescript": "^5.7.3" + }, + "dependencies": {} +} diff --git a/modules.bak/invoices/src/client/index.ts b/modules.bak/invoices/src/client/index.ts new file mode 100644 index 00000000..2d1ec238 --- /dev/null +++ b/modules.bak/invoices/src/client/index.ts @@ -0,0 +1 @@ +export default () => {}; diff --git a/modules.bak/invoices/src/index.ts b/modules.bak/invoices/src/index.ts new file mode 100644 index 00000000..5ec76921 --- /dev/null +++ b/modules.bak/invoices/src/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/modules.bak/invoices/src/server/application/create-invoice.use-case.ts b/modules.bak/invoices/src/server/application/create-invoice.use-case.ts new file mode 100644 index 00000000..2912a099 --- /dev/null +++ b/modules.bak/invoices/src/server/application/create-invoice.use-case.ts @@ -0,0 +1,147 @@ +import { UniqueID, UtcDate } from "core/common/domain"; + +import { + IInvoiceProps, + IInvoiceService, + Invoice, + InvoiceNumber, + InvoiceSerie, + InvoiceStatus, +} from "@contexts/invoices/domain"; +import { Result } from "core/common/helpers"; +import { ITransactionManager } from "core/common/infrastructure/database"; +import { logger } from "core/common/infrastructure/logger"; +import { ICreateInvoiceRequestDTO } from "../presentation/dto"; + +export class CreateInvoiceUseCase { + constructor( + private readonly invoiceService: IInvoiceService, + private readonly transactionManager: ITransactionManager + ) {} + + public execute( + invoiceID: UniqueID, + dto: ICreateInvoiceRequestDTO + ): Promise> { + return this.transactionManager.complete(async (transaction) => { + try { + const validOrErrors = this.validateInvoiceData(dto); + if (validOrErrors.isFailure) { + return Result.fail(validOrErrors.error); + } + + const data = validOrErrors.data; + + // Update invoice with dto + return await this.invoiceService.createInvoice(invoiceID, data, transaction); + } catch (error: unknown) { + logger.error(error as Error); + return Result.fail(error as Error); + } + }); + } + + private validateInvoiceData(dto: ICreateInvoiceRequestDTO): Result { + const errors: Error[] = []; + + const invoiceNumerOrError = InvoiceNumber.create(dto.invoice_number); + const invoiceSeriesOrError = InvoiceSerie.create(dto.invoice_series); + const issueDateOrError = UtcDate.create(dto.issue_date); + const operationDateOrError = UtcDate.create(dto.operation_date); + + const result = Result.combine([ + invoiceNumerOrError, + invoiceSeriesOrError, + issueDateOrError, + operationDateOrError, + ]); + + if (result.isFailure) { + return Result.fail(result.error); + } + + const validatedData: IInvoiceProps = { + status: InvoiceStatus.createDraft(), + invoiceNumber: invoiceNumerOrError.data, + invoiceSeries: invoiceSeriesOrError.data, + issueDate: issueDateOrError.data, + operationDate: operationDateOrError.data, + invoiceCurrency: dto.currency_code, + }; + + /*if (errors.length > 0) { + const message = errors.map((err) => err.message).toString(); + return Result.fail(new Error(message)); + }*/ + return Result.ok(validatedData); + + /*let invoice_status = InvoiceStatus.create(dto.status).object; + if (invoice_status.isEmpty()) { + invoice_status = InvoiceStatus.createDraft(); + } + + let invoice_series = InvoiceSeries.create(dto.invoice_series).object; + if (invoice_series.isEmpty()) { + invoice_series = InvoiceSeries.create(dto.invoice_series).object; + } + + let issue_date = InvoiceDate.create(dto.issue_date).object; + if (issue_date.isEmpty()) { + issue_date = InvoiceDate.createCurrentDate().object; + } + + let operation_date = InvoiceDate.create(dto.operation_date).object; + if (operation_date.isEmpty()) { + operation_date = InvoiceDate.createCurrentDate().object; + } + + let invoiceCurrency = Currency.createFromCode(dto.currency).object; + + if (invoiceCurrency.isEmpty()) { + invoiceCurrency = Currency.createDefaultCode().object; + } + + let invoiceLanguage = Language.createFromCode(dto.language_code).object; + + if (invoiceLanguage.isEmpty()) { + invoiceLanguage = Language.createDefaultCode().object; + } + + const items = new Collection( + dto.items?.map( + (item) => + InvoiceSimpleItem.create({ + description: Description.create(item.description).object, + quantity: Quantity.create(item.quantity).object, + unitPrice: UnitPrice.create({ + amount: item.unit_price.amount, + currencyCode: item.unit_price.currency, + precision: item.unit_price.precision, + }).object, + }).object + ) + ); + + if (!invoice_status.isDraft()) { + throw Error("Error al crear una factura que no es borrador"); + } + + return DraftInvoice.create( + { + invoiceSeries: invoice_series, + issueDate: issue_date, + operationDate: operation_date, + invoiceCurrency, + language: invoiceLanguage, + invoiceNumber: InvoiceNumber.create(undefined).object, + //notes: Note.create(invoiceDTO.notes).object, + + //senderId: UniqueID.create(null).object, + recipient, + + items, + }, + invoiceId + );*/ + } +} diff --git a/modules.bak/invoices/src/server/application/delete-invoice.use-case.ts b/modules.bak/invoices/src/server/application/delete-invoice.use-case.ts new file mode 100644 index 00000000..40988859 --- /dev/null +++ b/modules.bak/invoices/src/server/application/delete-invoice.use-case.ts @@ -0,0 +1,23 @@ +import { UniqueID } from "core/common/domain"; +import { Result } from "core/common/helpers"; +import { ITransactionManager } from "core/common/infrastructure/database"; +import { logger } from "core/common/infrastructure/logger"; +import { IInvoiceService, Invoice } from "../domain"; + +export class DeleteInvoiceUseCase { + constructor( + private readonly invoiceService: IInvoiceService, + private readonly transactionManager: ITransactionManager + ) {} + + public execute(invoiceID: UniqueID): Promise> { + return this.transactionManager.complete(async (transaction) => { + try { + return await this.invoiceService.deleteInvoiceById(invoiceID, transaction); + } catch (error: unknown) { + logger.error(error as Error); + return Result.fail(error as Error); + } + }); + } +} diff --git a/modules.bak/invoices/src/server/application/get-invoice.use-case.ts b/modules.bak/invoices/src/server/application/get-invoice.use-case.ts new file mode 100644 index 00000000..a396d4e2 --- /dev/null +++ b/modules.bak/invoices/src/server/application/get-invoice.use-case.ts @@ -0,0 +1,23 @@ +import { UniqueID } from "core/common/domain"; +import { Result } from "core/common/helpers"; +import { ITransactionManager } from "core/common/infrastructure/database"; +import { logger } from "core/common/infrastructure/logger"; +import { IInvoiceService, Invoice } from "../domain"; + +export class GetInvoiceUseCase { + constructor( + private readonly invoiceService: IInvoiceService, + private readonly transactionManager: ITransactionManager + ) {} + + public execute(invoiceID: UniqueID): Promise> { + return this.transactionManager.complete(async (transaction) => { + try { + return await this.invoiceService.findInvoiceById(invoiceID, transaction); + } catch (error: unknown) { + logger.error(error as Error); + return Result.fail(error as Error); + } + }); + } +} diff --git a/modules.bak/invoices/src/server/application/index.ts b/modules.bak/invoices/src/server/application/index.ts new file mode 100644 index 00000000..83e308e7 --- /dev/null +++ b/modules.bak/invoices/src/server/application/index.ts @@ -0,0 +1,5 @@ +export * from "./create-invoice.use-case"; +export * from "./delete-invoice.use-case"; +export * from "./get-invoice.use-case"; +export * from "./list-invoices.use-case"; +export * from "./update-invoice.use-case"; diff --git a/modules.bak/invoices/src/server/application/list-invoices.use-case.ts b/modules.bak/invoices/src/server/application/list-invoices.use-case.ts new file mode 100644 index 00000000..66a16dfa --- /dev/null +++ b/modules.bak/invoices/src/server/application/list-invoices.use-case.ts @@ -0,0 +1,22 @@ +import { Collection, Result } from "core/common/helpers"; +import { ITransactionManager } from "core/common/infrastructure/database"; +import { logger } from "core/common/infrastructure/logger"; +import { IInvoiceService, Invoice } from "../domain"; + +export class ListInvoicesUseCase { + constructor( + private readonly invoiceService: IInvoiceService, + private readonly transactionManager: ITransactionManager + ) {} + + public execute(): Promise, Error>> { + return this.transactionManager.complete(async (transaction) => { + try { + return await this.invoiceService.findInvoices(transaction); + } catch (error: unknown) { + logger.error(error as Error); + return Result.fail(error as Error); + } + }); + } +} diff --git a/modules.bak/invoices/src/server/application/services/index.ts b/modules.bak/invoices/src/server/application/services/index.ts new file mode 100644 index 00000000..b79a7a12 --- /dev/null +++ b/modules.bak/invoices/src/server/application/services/index.ts @@ -0,0 +1,2 @@ +export * from "./participantAddressFinder"; +export * from "./participantFinder"; diff --git a/modules.bak/invoices/src/server/application/services/participantAddressFinder.ts b/modules.bak/invoices/src/server/application/services/participantAddressFinder.ts new file mode 100644 index 00000000..7a85cfaf --- /dev/null +++ b/modules.bak/invoices/src/server/application/services/participantAddressFinder.ts @@ -0,0 +1,70 @@ +import { + ApplicationServiceError, + IApplicationServiceError, +} from "@/contexts/common/application/services/ApplicationServiceError"; +import { IAdapter, RepositoryBuilder } from "@/contexts/common/domain"; +import { Result, UniqueID } from "@shared/contexts"; +import { NullOr } from "@shared/utilities"; +import { + IInvoiceParticipantAddress, + IInvoiceParticipantAddressRepository, +} from "../../domain"; + +export const participantAddressFinder = async ( + addressId: UniqueID, + adapter: IAdapter, + repository: RepositoryBuilder, +) => { + if (addressId.isNull()) { + return Result.fail( + ApplicationServiceError.create( + ApplicationServiceError.INVALID_REQUEST_PARAM, + `Participant address ID required`, + ), + ); + } + + const transaction = adapter.startTransaction(); + let address: NullOr = null; + + try { + await transaction.complete(async (t) => { + address = await repository({ transaction: t }).getById(addressId); + }); + + if (address === null) { + return Result.fail( + ApplicationServiceError.create( + ApplicationServiceError.NOT_FOUND_ERROR, + "", + { + id: addressId.toString(), + entity: "participant address", + }, + ), + ); + } + + return Result.ok(address); + } catch (error: unknown) { + const _error = error as Error; + + if (repository().isRepositoryError(_error)) { + return Result.fail( + ApplicationServiceError.create( + ApplicationServiceError.REPOSITORY_ERROR, + _error.message, + _error, + ), + ); + } + + return Result.fail( + ApplicationServiceError.create( + ApplicationServiceError.UNEXCEPTED_ERROR, + _error.message, + _error, + ), + ); + } +}; diff --git a/modules.bak/invoices/src/server/application/services/participantFinder.ts b/modules.bak/invoices/src/server/application/services/participantFinder.ts new file mode 100644 index 00000000..b73ad1c2 --- /dev/null +++ b/modules.bak/invoices/src/server/application/services/participantFinder.ts @@ -0,0 +1,20 @@ +import { IAdapter, RepositoryBuilder } from "@/contexts/common/domain"; +import { UniqueID } from "@shared/contexts"; +import { IInvoiceParticipantRepository } from "../../domain"; +import { InvoiceCustomer } from "../../domain/entities/invoice-customer/invoice-customer"; + +export const participantFinder = async ( + participantId: UniqueID, + adapter: IAdapter, + repository: RepositoryBuilder +): Promise => { + if (!participantId || (participantId && participantId.isNull())) { + return Promise.resolve(undefined); + } + + const participant = await adapter + .startTransaction() + .complete((t) => repository({ transaction: t }).getById(participantId)); + + return Promise.resolve(participant ? participant : undefined); +}; diff --git a/modules.bak/invoices/src/server/application/update-invoice.use-case.ts b/modules.bak/invoices/src/server/application/update-invoice.use-case.ts new file mode 100644 index 00000000..87ac3306 --- /dev/null +++ b/modules.bak/invoices/src/server/application/update-invoice.use-case.ts @@ -0,0 +1,398 @@ +import { UniqueID } from "core/common/domain"; + +import { Result } from "core/common/helpers"; +import { ITransactionManager } from "core/common/infrastructure/database"; +import { logger } from "core/common/infrastructure/logger"; +import { IUpdateInvoiceRequestDTO } from "../presentation/dto"; + +export class CreateInvoiceUseCase { + constructor( + private readonly invoiceService: IInvoiceService, + private readonly transactionManager: ITransactionManager + ) {} + + public execute( + invoiceID: UniqueID, + dto: Partial + ): Promise> { + return this.transactionManager.complete(async (transaction) => { + try { + const validOrErrors = this.validateInvoiceData(dto); + if (validOrErrors.isFailure) { + return Result.fail(validOrErrors.error); + } + + const data = validOrErrors.data; + + // Update invoice with dto + return await this.invoiceService.updateInvoiceById(invoiceID, data, transaction); + } catch (error: unknown) { + logger.error(error as Error); + return Result.fail(error as Error); + } + }); + } + + private validateInvoiceData( + dto: Partial + ): Result, Error> { + const errors: Error[] = []; + const validatedData: Partial = {}; + + // Create invoice + let invoice_status = InvoiceStatus.create(invoiceDTO.status).object; + if (invoice_status.isEmpty()) { + invoice_status = InvoiceStatus.createDraft(); + } + + let invoice_series = InvoiceSeries.create(invoiceDTO.invoice_series).object; + if (invoice_series.isEmpty()) { + invoice_series = InvoiceSeries.create(invoiceDTO.invoice_series).object; + } + + let issue_date = InvoiceDate.create(invoiceDTO.issue_date).object; + if (issue_date.isEmpty()) { + issue_date = InvoiceDate.createCurrentDate().object; + } + + let operation_date = InvoiceDate.create(invoiceDTO.operation_date).object; + if (operation_date.isEmpty()) { + operation_date = InvoiceDate.createCurrentDate().object; + } + + let invoiceCurrency = Currency.createFromCode(invoiceDTO.currency).object; + + if (invoiceCurrency.isEmpty()) { + invoiceCurrency = Currency.createDefaultCode().object; + } + + let invoiceLanguage = Language.createFromCode(invoiceDTO.language_code).object; + + if (invoiceLanguage.isEmpty()) { + invoiceLanguage = Language.createDefaultCode().object; + } + + const items = new Collection( + invoiceDTO.items?.map( + (item) => + InvoiceSimpleItem.create({ + description: Description.create(item.description).object, + quantity: Quantity.create(item.quantity).object, + unitPrice: UnitPrice.create({ + amount: item.unit_price.amount, + currencyCode: item.unit_price.currency, + precision: item.unit_price.precision, + }).object, + }).object + ) + ); + + if (!invoice_status.isDraft()) { + throw Error("Error al crear una factura que no es borrador"); + } + + return DraftInvoice.create( + { + invoiceSeries: invoice_series, + issueDate: issue_date, + operationDate: operation_date, + invoiceCurrency, + language: invoiceLanguage, + invoiceNumber: InvoiceNumber.create(undefined).object, + //notes: Note.create(invoiceDTO.notes).object, + + //senderId: UniqueID.create(null).object, + recipient, + + items, + }, + invoiceId + ); + } +} + +export type UpdateInvoiceResponseOrError = + | Result // Misc errors (value objects) + | Result; // Success! + +export class UpdateInvoiceUseCase2 + implements + IUseCase<{ id: UniqueID; data: IUpdateInvoice_DTO }, Promise> +{ + private _context: IInvoicingContext; + private _adapter: ISequelizeAdapter; + private _repositoryManager: IRepositoryManager; + + constructor(context: IInvoicingContext) { + this._context = context; + this._adapter = context.adapter; + this._repositoryManager = context.repositoryManager; + } + + private getRepository(name: string) { + return this._repositoryManager.getRepository(name); + } + + private handleValidationFailure( + validationError: Error, + message?: string + ): Result { + return Result.fail( + UseCaseError.create( + UseCaseError.INVALID_INPUT_DATA, + message ? message : validationError.message, + validationError + ) + ); + } + + async execute(request: { + id: UniqueID; + data: IUpdateInvoice_DTO; + }): Promise { + const { id, data: invoiceDTO } = request; + + // Validaciones + const invoiceDTOOrError = ensureUpdateInvoice_DTOIsValid(invoiceDTO); + if (invoiceDTOOrError.isFailure) { + return this.handleValidationFailure(invoiceDTOOrError.error); + } + + const transaction = this._adapter.startTransaction(); + + const invoiceRepoBuilder = this.getRepository("Invoice"); + + let invoice: Invoice | null = null; + + try { + await transaction.complete(async (t) => { + invoice = await invoiceRepoBuilder({ transaction: t }).getById(id); + }); + + if (invoice === null) { + return Result.fail( + UseCaseError.create(UseCaseError.NOT_FOUND_ERROR, `Invoice not found`, { + id: request.id.toString(), + entity: "invoice", + }) + ); + } + + return Result.ok(invoice); + } catch (error: unknown) { + const _error = error as Error; + if (invoiceRepoBuilder().isRepositoryError(_error)) { + return this.handleRepositoryError(error as BaseError, invoiceRepoBuilder()); + } else { + return this.handleUnexceptedError(error); + } + } + + // Recipient validations + /*const recipientIdOrError = ensureParticipantIdIsValid( + invoiceDTO?.recipient?.id, + ); + if (recipientIdOrError.isFailure) { + return this.handleValidationFailure( + recipientIdOrError.error, + "Recipient ID not valid", + ); + } + const recipientId = recipientIdOrError.object; + + const recipientBillingIdOrError = ensureParticipantAddressIdIsValid( + invoiceDTO?.recipient?.billing_address_id, + ); + if (recipientBillingIdOrError.isFailure) { + return this.handleValidationFailure( + recipientBillingIdOrError.error, + "Recipient billing address ID not valid", + ); + } + const recipientBillingId = recipientBillingIdOrError.object; + + const recipientShippingIdOrError = ensureParticipantAddressIdIsValid( + invoiceDTO?.recipient?.shipping_address_id, + ); + if (recipientShippingIdOrError.isFailure) { + return this.handleValidationFailure( + recipientShippingIdOrError.error, + "Recipient shipping address ID not valid", + ); + } + const recipientShippingId = recipientShippingIdOrError.object; + + const recipientContact = await this.findContact( + recipientId, + recipientBillingId, + recipientShippingId, + ); + + if (!recipientContact) { + return this.handleValidationFailure( + new Error(`Recipient with ID ${recipientId.toString()} does not exist`), + ); + } + + // Crear invoice + const invoiceOrError = await this.tryUpdateInvoiceInstance( + invoiceDTO, + invoiceIdOrError.object, + //senderId, + //senderBillingId, + //senderShippingId, + recipientContact, + ); + + if (invoiceOrError.isFailure) { + const { error: domainError } = invoiceOrError; + let errorCode = ""; + let message = ""; + + switch (domainError.code) { + case Invoice.ERROR_CUSTOMER_WITHOUT_NAME: + errorCode = UseCaseError.INVALID_INPUT_DATA; + message = + "El cliente debe ser una compañía o tener nombre y apellidos."; + break; + + default: + errorCode = UseCaseError.UNEXCEPTED_ERROR; + message = ""; + break; + } + + return Result.fail( + UseCaseError.create(errorCode, message, domainError), + ); + } + + return this.saveInvoice(invoiceOrError.object); + */ + } + + private async tryUpdateInvoiceInstance(invoiceDTO, invoiceId, recipient) { + // Create invoice + let invoice_status = InvoiceStatus.create(invoiceDTO.status).object; + if (invoice_status.isEmpty()) { + invoice_status = InvoiceStatus.createDraft(); + } + + let invoice_series = InvoiceSeries.create(invoiceDTO.invoice_series).object; + if (invoice_series.isEmpty()) { + invoice_series = InvoiceSeries.create(invoiceDTO.invoice_series).object; + } + + let issue_date = InvoiceDate.create(invoiceDTO.issue_date).object; + if (issue_date.isEmpty()) { + issue_date = InvoiceDate.createCurrentDate().object; + } + + let operation_date = InvoiceDate.create(invoiceDTO.operation_date).object; + if (operation_date.isEmpty()) { + operation_date = InvoiceDate.createCurrentDate().object; + } + + let invoiceCurrency = Currency.createFromCode(invoiceDTO.currency).object; + + if (invoiceCurrency.isEmpty()) { + invoiceCurrency = Currency.createDefaultCode().object; + } + + let invoiceLanguage = Language.createFromCode(invoiceDTO.language_code).object; + + if (invoiceLanguage.isEmpty()) { + invoiceLanguage = Language.createDefaultCode().object; + } + + const items = new Collection( + invoiceDTO.items?.map( + (item) => + InvoiceSimpleItem.create({ + description: Description.create(item.description).object, + quantity: Quantity.create(item.quantity).object, + unitPrice: UnitPrice.create({ + amount: item.unit_price.amount, + currencyCode: item.unit_price.currency, + precision: item.unit_price.precision, + }).object, + }).object + ) + ); + + if (!invoice_status.isDraft()) { + throw Error("Error al crear una factura que no es borrador"); + } + + return DraftInvoice.create( + { + invoiceSeries: invoice_series, + issueDate: issue_date, + operationDate: operation_date, + invoiceCurrency, + language: invoiceLanguage, + invoiceNumber: InvoiceNumber.create(undefined).object, + //notes: Note.create(invoiceDTO.notes).object, + + //senderId: UniqueID.create(null).object, + recipient, + + items, + }, + invoiceId + ); + } + + private async findContact( + contactId: UniqueID, + billingAddressId: UniqueID, + shippingAddressId: UniqueID + ) { + const contactRepoBuilder = this.getRepository("Contact"); + + const contact = await contactRepoBuilder().getById2( + contactId, + billingAddressId, + shippingAddressId + ); + + return contact; + } + + private async saveInvoice(invoice: DraftInvoice) { + const transaction = this._adapter.startTransaction(); + const invoiceRepoBuilder = this.getRepository("Invoice"); + + try { + await transaction.complete(async (t) => { + const invoiceRepo = invoiceRepoBuilder({ transaction: t }); + await invoiceRepo.save(invoice); + }); + + return Result.ok(invoice); + } catch (error: unknown) { + const _error = error as Error; + if (invoiceRepoBuilder().isRepositoryError(_error)) { + return this.handleRepositoryError(error as BaseError, invoiceRepoBuilder()); + } else { + return this.handleUnexceptedError(error); + } + } + } + + private handleUnexceptedError(error): Result { + return Result.fail( + UseCaseError.create(UseCaseError.UNEXCEPTED_ERROR, error.message, error) + ); + } + + private handleRepositoryError( + error: BaseError, + repository: IInvoiceRepository + ): Result { + const { message, details } = repository.handleRepositoryError(error); + return Result.fail( + UseCaseError.create(UseCaseError.REPOSITORY_ERROR, message, details) + ); + } +} diff --git a/modules.bak/invoices/src/server/domain/aggregates/index.ts b/modules.bak/invoices/src/server/domain/aggregates/index.ts new file mode 100644 index 00000000..c759eb69 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/aggregates/index.ts @@ -0,0 +1 @@ +export * from "./invoice"; diff --git a/modules.bak/invoices/src/server/domain/aggregates/invoice.ts b/modules.bak/invoices/src/server/domain/aggregates/invoice.ts new file mode 100644 index 00000000..e5be6b14 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/aggregates/invoice.ts @@ -0,0 +1,203 @@ +import { AggregateRoot, MoneyValue, UniqueID, UtcDate } from "core/common/domain"; +import { Collection, Result } from "core/common/helpers"; +import { InvoiceCustomer, InvoiceItem, InvoiceItems } from "../entities"; +import { InvoiceNumber, InvoiceSerie, InvoiceStatus } from "../value-objects"; + +export interface IInvoiceProps { + invoiceNumber: InvoiceNumber; + invoiceSeries: InvoiceSerie; + + status: InvoiceStatus; + + issueDate: UtcDate; + operationDate: UtcDate; + + //dueDate: UtcDate; // ? --> depende de la forma de pago + + //tax: Tax; // ? --> detalles? + invoiceCurrency: string; + + //language: Language; + + //purchareOrderNumber: string; + //notes: Note; + + //senderId: UniqueID; + + //paymentInstructions: Note; + //paymentTerms: string; + + customer?: InvoiceCustomer; + items?: InvoiceItems; +} + +export interface IInvoice { + id: UniqueID; + invoiceNumber: InvoiceNumber; + invoiceSeries: InvoiceSerie; + + status: InvoiceStatus; + + issueDate: UtcDate; + operationDate: UtcDate; + + //senderId: UniqueID; + + customer?: InvoiceCustomer; + + //dueDate + + //tax: Tax; + //language: Language; + invoiceCurrency: string; + + //purchareOrderNumber: string; + //notes: Note; + + //paymentInstructions: Note; + //paymentTerms: string; + + items: InvoiceItems; + + calculateSubtotal: () => MoneyValue; + calculateTaxTotal: () => MoneyValue; + calculateTotal: () => MoneyValue; +} + +export class Invoice extends AggregateRoot implements IInvoice { + private _items!: Collection; + //protected _status: InvoiceStatus; + + protected constructor(props: IInvoiceProps, id?: UniqueID) { + super(props, id); + + this._items = props.items || InvoiceItems.create(); + } + + static create(props: IInvoiceProps, id?: UniqueID): Result { + const invoice = new Invoice(props, id); + + // Reglas de negocio / validaciones + // ... + // ... + + // 🔹 Disparar evento de dominio "InvoiceAuthenticatedEvent" + //const { invoice } = props; + //user.addDomainEvent(new InvoiceAuthenticatedEvent(id, invoice.toString())); + + return Result.ok(invoice); + } + + get invoiceNumber() { + return this.props.invoiceNumber; + } + + get invoiceSeries() { + return this.props.invoiceSeries; + } + + get issueDate() { + return this.props.issueDate; + } + + /*get senderId(): UniqueID { + return this.props.senderId; + }*/ + + get customer(): InvoiceCustomer | undefined { + return this.props.customer; + } + + get operationDate() { + return this.props.operationDate; + } + + /*get language() { + return this.props.language; + }*/ + + get dueDate() { + return undefined; + } + + get tax() { + return undefined; + } + + get status() { + return this.props.status; + } + + get items() { + return this._items; + } + + /*get purchareOrderNumber() { + return this.props.purchareOrderNumber; + } + + get paymentInstructions() { + return this.props.paymentInstructions; + } + + get paymentTerms() { + return this.props.paymentTerms; + } + + get billTo() { + return this.props.billTo; + } + + get shipTo() { + return this.props.shipTo; + }*/ + + get invoiceCurrency() { + return this.props.invoiceCurrency; + } + + /*get notes() { + return this.props.notes; + }*/ + + // Method to get the complete list of line items + /*get lineItems(): InvoiceLineItem[] { + return this._lineItems; + } + + addLineItem(lineItem: InvoiceLineItem, position?: number): void { + if (position === undefined) { + this._lineItems.push(lineItem); + } else { + this._lineItems.splice(position, 0, lineItem); + } + }*/ + + calculateSubtotal(): MoneyValue { + const invoiceSubtotal = MoneyValue.create({ + amount: 0, + currency_code: this.props.invoiceCurrency, + scale: 2, + }).data; + + return this._items.getAll().reduce((subtotal, item) => { + return subtotal.add(item.calculateTotal()); + }, invoiceSubtotal); + } + + // Method to calculate the total tax in the invoice + calculateTaxTotal(): MoneyValue { + const taxTotal = MoneyValue.create({ + amount: 0, + currency_code: this.props.invoiceCurrency, + scale: 2, + }).data; + + return taxTotal; + } + + // Method to calculate the total invoice amount, including taxes + calculateTotal(): MoneyValue { + return this.calculateSubtotal().add(this.calculateTaxTotal()); + } +} diff --git a/modules.bak/invoices/src/server/domain/entities/index.ts b/modules.bak/invoices/src/server/domain/entities/index.ts new file mode 100644 index 00000000..4c02277f --- /dev/null +++ b/modules.bak/invoices/src/server/domain/entities/index.ts @@ -0,0 +1,2 @@ +export * from "./invoice-customer"; +export * from "./invoice-items"; diff --git a/modules.bak/invoices/src/server/domain/entities/invoice-customer/index.ts b/modules.bak/invoices/src/server/domain/entities/invoice-customer/index.ts new file mode 100644 index 00000000..1f5a7b22 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/entities/invoice-customer/index.ts @@ -0,0 +1,2 @@ +export * from "./invoice-address"; +export * from "./invoice-customer"; diff --git a/modules.bak/invoices/src/server/domain/entities/invoice-customer/invoice-address.ts b/modules.bak/invoices/src/server/domain/entities/invoice-customer/invoice-address.ts new file mode 100644 index 00000000..2d3ebbae --- /dev/null +++ b/modules.bak/invoices/src/server/domain/entities/invoice-customer/invoice-address.ts @@ -0,0 +1,78 @@ +import { EmailAddress, Name, PostalAddress, ValueObject } from "core/common/domain"; +import { Result } from "core/common/helpers"; +import { PhoneNumber } from "libphonenumber-js"; +import { InvoiceAddressType } from "../../value-objects"; + +export interface IInvoiceAddressProps { + type: InvoiceAddressType; + title: Name; + address: PostalAddress; + email: EmailAddress; + phone: PhoneNumber; +} + +export interface IInvoiceAddress { + type: InvoiceAddressType; + title: Name; + address: PostalAddress; + email: EmailAddress; + phone: PhoneNumber; +} + +export class InvoiceAddress extends ValueObject implements IInvoiceAddress { + public static create(props: IInvoiceAddressProps) { + return Result.ok(new this(props)); + } + + public static createShippingAddress(props: IInvoiceAddressProps) { + return Result.ok( + new this({ + ...props, + type: InvoiceAddressType.create("shipping").data, + }) + ); + } + + public static createBillingAddress(props: IInvoiceAddressProps) { + return Result.ok( + new this({ + ...props, + type: InvoiceAddressType.create("billing").data, + }) + ); + } + + get title(): Name { + return this.props.title; + } + + get address(): PostalAddress { + return this.props.address; + } + + get email(): EmailAddress { + return this.props.email; + } + + get phone(): PhoneNumber { + return this.props.phone; + } + + get type(): InvoiceAddressType { + return this.props.type; + } + + getValue(): IInvoiceAddressProps { + return this.props; + } + + toPrimitive() { + return { + type: this.type.toString(), + title: this.title.toString(), + address: this.address.toString(), + email: this.email.toString(), + phone: this.phone.toString(), + }; + } +} diff --git a/modules.bak/invoices/src/server/domain/entities/invoice-customer/invoice-customer.ts b/modules.bak/invoices/src/server/domain/entities/invoice-customer/invoice-customer.ts new file mode 100644 index 00000000..a9eb085c --- /dev/null +++ b/modules.bak/invoices/src/server/domain/entities/invoice-customer/invoice-customer.ts @@ -0,0 +1,61 @@ +import { DomainEntity, Name, TINNumber, UniqueID } from "core/common/domain"; +import { Result } from "core/common/helpers"; +import { InvoiceAddress } from "./invoice-address"; + +export interface IInvoiceCustomerProps { + tin: TINNumber; + companyName: Name; + firstName: Name; + lastName: Name; + + billingAddress?: InvoiceAddress; + shippingAddress?: InvoiceAddress; +} + +export interface IInvoiceCustomer { + id: UniqueID; + tin: TINNumber; + companyName: Name; + firstName: Name; + lastName: Name; + + billingAddress?: InvoiceAddress; + shippingAddress?: InvoiceAddress; +} + +export class InvoiceCustomer + extends DomainEntity + implements IInvoiceCustomer +{ + public static create( + props: IInvoiceCustomerProps, + id?: UniqueID + ): Result { + const participant = new InvoiceCustomer(props, id); + return Result.ok(participant); + } + + get tin(): TINNumber { + return this.props.tin; + } + + get companyName(): Name { + return this.props.companyName; + } + + get firstName(): Name { + return this.props.firstName; + } + + get lastName(): Name { + return this.props.lastName; + } + + get billingAddress() { + return this.props.billingAddress; + } + + get shippingAddress() { + return this.props.shippingAddress; + } +} diff --git a/modules.bak/invoices/src/server/domain/entities/invoice-items/index.ts b/modules.bak/invoices/src/server/domain/entities/invoice-items/index.ts new file mode 100644 index 00000000..f95bd889 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/entities/invoice-items/index.ts @@ -0,0 +1,2 @@ +export * from "./invoice-item"; +export * from "./invoice-items"; diff --git a/modules.bak/invoices/src/server/domain/entities/invoice-items/invoice-item.test.ts b/modules.bak/invoices/src/server/domain/entities/invoice-items/invoice-item.test.ts new file mode 100644 index 00000000..965426ec --- /dev/null +++ b/modules.bak/invoices/src/server/domain/entities/invoice-items/invoice-item.test.ts @@ -0,0 +1,83 @@ +import { MoneyValue, Percentage, Quantity } from "core/common/domain"; +import { InvoiceItemDescription } from "../../value-objects"; +import { InvoiceItem } from "./invoice-item"; + +describe("InvoiceItem", () => { + it("debería calcular correctamente el subtotal (unitPrice * quantity)", () => { + const props = { + description: InvoiceItemDescription.create("Producto A"), + quantity: Quantity.create({ amount: 200, scale: 2 }), + unitPrice: MoneyValue.create(50), + discount: Percentage.create(0), + }; + + const result = InvoiceItem.create(props); + + expect(result.isOk()).toBe(true); + const invoiceItem = result.unwrap(); + expect(invoiceItem.subtotalPrice.value).toBe(100); // 50 * 2 + }); + + it("debería calcular correctamente el total con descuento", () => { + const props = { + description: new InvoiceItemDescription("Producto B"), + quantity: new Quantity(3), + unitPrice: new MoneyValue(30), + discount: new Percentage(10), // 10% + }; + + const result = InvoiceItem.create(props); + + expect(result.isOk()).toBe(true); + const invoiceItem = result.unwrap(); + expect(invoiceItem.totalPrice.value).toBe(81); // (30 * 3) - 10% de (30 * 3) + }); + + it("debería devolver los valores correctos de las propiedades", () => { + const props = { + description: new InvoiceItemDescription("Producto C"), + quantity: new Quantity(1), + unitPrice: new MoneyValue(100), + discount: new Percentage(5), + }; + + const result = InvoiceItem.create(props); + + expect(result.isOk()).toBe(true); + const invoiceItem = result.unwrap(); + expect(invoiceItem.description.value).toBe("Producto C"); + expect(invoiceItem.quantity.value).toBe(1); + expect(invoiceItem.unitPrice.value).toBe(100); + expect(invoiceItem.discount.value).toBe(5); + }); + + it("debería manejar correctamente un descuento del 0%", () => { + const props = { + description: new InvoiceItemDescription("Producto D"), + quantity: new Quantity(4), + unitPrice: new MoneyValue(25), + discount: new Percentage(0), + }; + + const result = InvoiceItem.create(props); + + expect(result.isOk()).toBe(true); + const invoiceItem = result.unwrap(); + expect(invoiceItem.totalPrice.value).toBe(100); // 25 * 4 + }); + + it("debería manejar correctamente un descuento del 100%", () => { + const props = { + description: new InvoiceItemDescription("Producto E"), + quantity: new Quantity(2), + unitPrice: new MoneyValue(50), + discount: new Percentage(100), + }; + + const result = InvoiceItem.create(props); + + expect(result.isOk()).toBe(true); + const invoiceItem = result.unwrap(); + expect(invoiceItem.totalPrice.value).toBe(0); // (50 * 2) - 100% de (50 * 2) + }); +}); diff --git a/modules.bak/invoices/src/server/domain/entities/invoice-items/invoice-item.ts b/modules.bak/invoices/src/server/domain/entities/invoice-items/invoice-item.ts new file mode 100644 index 00000000..268a3c3c --- /dev/null +++ b/modules.bak/invoices/src/server/domain/entities/invoice-items/invoice-item.ts @@ -0,0 +1,94 @@ +import { DomainEntity, MoneyValue, Percentage, Quantity, UniqueID } from "core/common/domain"; +import { Result } from "core/common/helpers"; +import { InvoiceItemDescription } from "../../value-objects"; + +export interface IInvoiceItemProps { + description: InvoiceItemDescription; + quantity: Quantity; // Cantidad de unidades + unitPrice: MoneyValue; // Precio unitario en la moneda de la factura + //subtotalPrice?: MoneyValue; // Precio unitario * Cantidad + discount: Percentage; // % descuento + //totalPrice?: MoneyValue; +} + +export interface IInvoiceItem { + id: UniqueID; + description: InvoiceItemDescription; + quantity: Quantity; + unitPrice: MoneyValue; + subtotalPrice: MoneyValue; + discount: Percentage; + totalPrice: MoneyValue; +} + +export class InvoiceItem extends DomainEntity implements IInvoiceItem { + private _subtotalPrice!: MoneyValue; + private _totalPrice!: MoneyValue; + + public static create(props: IInvoiceItemProps, id?: UniqueID): Result { + const item = new InvoiceItem(props, id); + + // Reglas de negocio / validaciones + // ... + // ... + + // 🔹 Disparar evento de dominio "InvoiceItemCreatedEvent" + //const { invoice } = props; + //user.addDomainEvent(new InvoiceAuthenticatedEvent(id, invoice.toString())); + + return Result.ok(item); + } + + get description(): InvoiceItemDescription { + return this.props.description; + } + + get quantity(): Quantity { + return this.props.quantity; + } + + get unitPrice(): MoneyValue { + return this.props.unitPrice; + } + + get subtotalPrice(): MoneyValue { + if (!this._subtotalPrice) { + this._subtotalPrice = this.calculateSubtotal(); + } + return this._subtotalPrice; + } + + get discount(): Percentage { + return this.props.discount; + } + + get totalPrice(): MoneyValue { + if (!this._totalPrice) { + this._totalPrice = this.calculateTotal(); + } + return this._totalPrice; + } + + getValue() { + return this.props; + } + + toPrimitive() { + return { + description: this.description.toPrimitive(), + quantity: this.quantity.toPrimitive(), + unit_price: this.unitPrice.toPrimitive(), + subtotal_price: this.subtotalPrice.toPrimitive(), + discount: this.discount.toPrimitive(), + total_price: this.totalPrice.toPrimitive(), + }; + } + + calculateSubtotal(): MoneyValue { + return this.unitPrice.multiply(this.quantity.toNumber()); // Precio unitario * Cantidad + } + + calculateTotal(): MoneyValue { + return this.subtotalPrice.subtract(this.subtotalPrice.percentage(this.discount.toNumber())); + } +} diff --git a/modules.bak/invoices/src/server/domain/entities/invoice-items/invoice-items.ts b/modules.bak/invoices/src/server/domain/entities/invoice-items/invoice-items.ts new file mode 100644 index 00000000..5a0c749b --- /dev/null +++ b/modules.bak/invoices/src/server/domain/entities/invoice-items/invoice-items.ts @@ -0,0 +1,8 @@ +import { Collection } from "core/common/helpers"; +import { InvoiceItem } from "./invoice-item"; + +export class InvoiceItems extends Collection { + public static create(items?: InvoiceItem[]): InvoiceItems { + return new InvoiceItems(items); + } +} diff --git a/modules.bak/invoices/src/server/domain/index.ts b/modules.bak/invoices/src/server/domain/index.ts new file mode 100644 index 00000000..2c5c423d --- /dev/null +++ b/modules.bak/invoices/src/server/domain/index.ts @@ -0,0 +1,5 @@ +export * from "./aggregates"; +export * from "./entities"; +export * from "./repositories"; +export * from "./services"; +export * from "./value-objects"; diff --git a/modules.bak/invoices/src/server/domain/repositories/index.ts b/modules.bak/invoices/src/server/domain/repositories/index.ts new file mode 100644 index 00000000..7a8b94a0 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/repositories/index.ts @@ -0,0 +1 @@ +export * from "./invoice-repository.interface"; diff --git a/modules.bak/invoices/src/server/domain/repositories/invoice-repository.interface.ts b/modules.bak/invoices/src/server/domain/repositories/invoice-repository.interface.ts new file mode 100644 index 00000000..3a4732e0 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/repositories/invoice-repository.interface.ts @@ -0,0 +1,12 @@ +import { UniqueID } from "core/common/domain"; +import { Collection, Result } from "core/common/helpers"; +import { Invoice } from "../aggregates"; + +export interface IInvoiceRepository { + findAll(transaction?: any): Promise, Error>>; + getById(id: UniqueID, transaction?: any): Promise>; + deleteById(id: UniqueID, transaction?: any): Promise>; + + create(invoice: Invoice, transaction?: any): Promise; + update(invoice: Invoice, transaction?: any): Promise; +} diff --git a/modules.bak/invoices/src/server/domain/services/index.ts b/modules.bak/invoices/src/server/domain/services/index.ts new file mode 100644 index 00000000..73a5d9ba --- /dev/null +++ b/modules.bak/invoices/src/server/domain/services/index.ts @@ -0,0 +1,2 @@ +export * from "./invoice-service.interface"; +export * from "./invoice.service"; diff --git a/modules.bak/invoices/src/server/domain/services/invoice-service.interface.ts b/modules.bak/invoices/src/server/domain/services/invoice-service.interface.ts new file mode 100644 index 00000000..4c42d8dd --- /dev/null +++ b/modules.bak/invoices/src/server/domain/services/invoice-service.interface.ts @@ -0,0 +1,22 @@ +import { UniqueID } from "core/common/domain"; +import { Collection, Result } from "core/common/helpers"; +import { IInvoiceProps, Invoice } from "../aggregates"; + +export interface IInvoiceService { + findInvoices(transaction?: any): Promise, Error>>; + findInvoiceById(invoiceId: UniqueID, transaction?: any): Promise>; + + updateInvoiceById( + invoiceId: UniqueID, + data: Partial, + transaction?: any + ): Promise>; + + createInvoice( + invoiceId: UniqueID, + data: IInvoiceProps, + transaction?: any + ): Promise>; + + deleteInvoiceById(invoiceId: UniqueID, transaction?: any): Promise>; +} diff --git a/modules.bak/invoices/src/server/domain/services/invoice.service.ts b/modules.bak/invoices/src/server/domain/services/invoice.service.ts new file mode 100644 index 00000000..a9598f15 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/services/invoice.service.ts @@ -0,0 +1,80 @@ +import { UniqueID } from "core/common/domain"; +import { Collection, Result } from "core/common/helpers"; +import { Transaction } from "sequelize"; +import { IInvoiceProps, Invoice } from "../aggregates"; +import { IInvoiceRepository } from "../repositories"; +import { IInvoiceService } from "./invoice-service.interface"; + +export class InvoiceService implements IInvoiceService { + constructor(private readonly repo: IInvoiceRepository) {} + + async findInvoices(transaction?: Transaction): Promise, Error>> { + const invoicesOrError = await this.repo.findAll(transaction); + if (invoicesOrError.isFailure) { + return Result.fail(invoicesOrError.error); + } + + // Solo devolver usuarios activos + //const allInvoices = invoicesOrError.data.filter((invoice) => invoice.isActive); + //return Result.ok(new Collection(allInvoices)); + + return invoicesOrError; + } + + async findInvoiceById(invoiceId: UniqueID, transaction?: Transaction): Promise> { + return await this.repo.getById(invoiceId, transaction); + } + + async updateInvoiceById( + invoiceId: UniqueID, + data: Partial, + transaction?: Transaction + ): Promise> { + // Verificar si la factura existe + const invoiceOrError = await this.repo.getById(invoiceId, transaction); + if (invoiceOrError.isFailure) { + return Result.fail(new Error("Invoice not found")); + } + + const updatedInvoiceOrError = Invoice.update(invoiceOrError.data, data); + if (updatedInvoiceOrError.isFailure) { + return Result.fail( + new Error(`Error updating invoice: ${updatedInvoiceOrError.error.message}`) + ); + } + + const updateInvoice = updatedInvoiceOrError.data; + + await this.repo.update(updateInvoice, transaction); + return Result.ok(updateInvoice); + } + + async createInvoice( + invoiceId: UniqueID, + data: IInvoiceProps, + transaction?: Transaction + ): Promise> { + // Verificar si la factura existe + const invoiceOrError = await this.repo.getById(invoiceId, transaction); + if (invoiceOrError.isSuccess) { + return Result.fail(new Error("Invoice exists")); + } + + const newInvoiceOrError = Invoice.create(data, invoiceId); + if (newInvoiceOrError.isFailure) { + return Result.fail(new Error(`Error creating invoice: ${newInvoiceOrError.error.message}`)); + } + + const newInvoice = newInvoiceOrError.data; + + await this.repo.create(newInvoice, transaction); + return Result.ok(newInvoice); + } + + async deleteInvoiceById( + invoiceId: UniqueID, + transaction?: Transaction + ): Promise> { + return this.repo.deleteById(invoiceId, transaction); + } +} diff --git a/modules.bak/invoices/src/server/domain/value-objects/index.ts b/modules.bak/invoices/src/server/domain/value-objects/index.ts new file mode 100644 index 00000000..4169e9d8 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/value-objects/index.ts @@ -0,0 +1,5 @@ +export * from "./invoice-address-type"; +export * from "./invoice-item-description"; +export * from "./invoice-number"; +export * from "./invoice-serie"; +export * from "./invoice-status"; diff --git a/modules.bak/invoices/src/server/domain/value-objects/invoice-address-type.ts b/modules.bak/invoices/src/server/domain/value-objects/invoice-address-type.ts new file mode 100644 index 00000000..04a0f97b --- /dev/null +++ b/modules.bak/invoices/src/server/domain/value-objects/invoice-address-type.ts @@ -0,0 +1,38 @@ +import { ValueObject } from "core/common/domain"; +import { Result } from "core/common/helpers"; + +interface IInvoiceAddressTypeProps { + value: string; +} + +export enum INVOICE_ADDRESS_TYPE { + SHIPPING = "shipping", + BILLING = "billing", +} + +export class InvoiceAddressType extends ValueObject { + private static readonly ALLOWED_TYPES = ["shipping", "billing"]; + + static create(value: string): Result { + if (!this.ALLOWED_TYPES.includes(value)) { + return Result.fail( + new Error( + `Invalid address type: ${value}. Allowed types are: ${this.ALLOWED_TYPES.join(", ")}` + ) + ); + } + return Result.ok(new InvoiceAddressType({ value })); + } + + getValue(): string { + return this.props.value; + } + + toString(): string { + return this.getValue(); + } + + toPrimitive(): string { + return this.getValue(); + } +} diff --git a/modules.bak/invoices/src/server/domain/value-objects/invoice-item-description.ts b/modules.bak/invoices/src/server/domain/value-objects/invoice-item-description.ts new file mode 100644 index 00000000..64f825f7 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/value-objects/invoice-item-description.ts @@ -0,0 +1,50 @@ +import { ValueObject } from "core/common/domain"; +import { Maybe, Result } from "core/common/helpers"; +import { z } from "zod"; + +interface IInvoiceItemDescriptionProps { + value: string; +} + +export class InvoiceItemDescription extends ValueObject { + private static readonly MAX_LENGTH = 255; + + protected static validate(value: string) { + const schema = z + .string() + .trim() + .max(InvoiceItemDescription.MAX_LENGTH, { + message: `Description must be at most ${InvoiceItemDescription.MAX_LENGTH} characters long`, + }); + return schema.safeParse(value); + } + + static create(value: string) { + const valueIsValid = InvoiceItemDescription.validate(value); + + if (!valueIsValid.success) { + return Result.fail(new Error(valueIsValid.error.errors[0].message)); + } + return Result.ok(new InvoiceItemDescription({ value })); + } + + static createNullable(value?: string): Result, Error> { + if (!value || value.trim() === "") { + return Result.ok(Maybe.none()); + } + + return InvoiceItemDescription.create(value!).map((value) => Maybe.some(value)); + } + + getValue(): string { + return this.props.value; + } + + toString(): string { + return this.getValue(); + } + + toPrimitive() { + return this.getValue(); + } +} diff --git a/modules.bak/invoices/src/server/domain/value-objects/invoice-number.ts b/modules.bak/invoices/src/server/domain/value-objects/invoice-number.ts new file mode 100644 index 00000000..92341077 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/value-objects/invoice-number.ts @@ -0,0 +1,42 @@ +import { ValueObject } from "core/common/domain"; +import { Result } from "core/common/helpers"; +import { z } from "zod"; + +interface IInvoiceNumberProps { + value: string; +} + +export class InvoiceNumber extends ValueObject { + private static readonly MAX_LENGTH = 255; + + protected static validate(value: string) { + const schema = z + .string() + .trim() + .max(InvoiceNumber.MAX_LENGTH, { + message: `Name must be at most ${InvoiceNumber.MAX_LENGTH} characters long`, + }); + return schema.safeParse(value); + } + + static create(value: string) { + const valueIsValid = InvoiceNumber.validate(value); + + if (!valueIsValid.success) { + return Result.fail(new Error(valueIsValid.error.errors[0].message)); + } + return Result.ok(new InvoiceNumber({ value })); + } + + getValue(): string { + return this.props.value; + } + + toString(): string { + return this.getValue(); + } + + toPrimitive() { + return this.getValue(); + } +} diff --git a/modules.bak/invoices/src/server/domain/value-objects/invoice-serie.ts b/modules.bak/invoices/src/server/domain/value-objects/invoice-serie.ts new file mode 100644 index 00000000..7fc0e0e0 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/value-objects/invoice-serie.ts @@ -0,0 +1,50 @@ +import { ValueObject } from "core/common/domain"; +import { Maybe, Result } from "core/common/helpers"; +import { z } from "zod"; + +interface IInvoiceSerieProps { + value: string; +} + +export class InvoiceSerie extends ValueObject { + private static readonly MAX_LENGTH = 255; + + protected static validate(value: string) { + const schema = z + .string() + .trim() + .max(InvoiceSerie.MAX_LENGTH, { + message: `Name must be at most ${InvoiceSerie.MAX_LENGTH} characters long`, + }); + return schema.safeParse(value); + } + + static create(value: string) { + const valueIsValid = InvoiceSerie.validate(value); + + if (!valueIsValid.success) { + return Result.fail(new Error(valueIsValid.error.errors[0].message)); + } + return Result.ok(new InvoiceSerie({ value })); + } + + static createNullable(value?: string): Result, Error> { + if (!value || value.trim() === "") { + return Result.ok(Maybe.none()); + } + + return InvoiceSerie.create(value!).map((value) => Maybe.some(value)); + } + + getValue(): string { + return this.props.value; + } + + toString(): string { + return this.getValue(); + } + + toPrimitive() { + return this.getValue(); + } +} diff --git a/modules.bak/invoices/src/server/domain/value-objects/invoice-status.ts b/modules.bak/invoices/src/server/domain/value-objects/invoice-status.ts new file mode 100644 index 00000000..15ad5d43 --- /dev/null +++ b/modules.bak/invoices/src/server/domain/value-objects/invoice-status.ts @@ -0,0 +1,80 @@ +import { ValueObject } from "core/common/domain"; +import { Result } from "core/common/helpers"; + +interface IInvoiceStatusProps { + value: string; +} + +export enum INVOICE_STATUS { + DRAFT = "draft", + EMITTED = "emitted", + SENT = "sent", + REJECTED = "rejected", +} +export class InvoiceStatus extends ValueObject { + private static readonly ALLOWED_STATUSES = ["draft", "emitted", "sent", "rejected"]; + + private static readonly TRANSITIONS: Record = { + draft: [INVOICE_STATUS.EMITTED], + emitted: [INVOICE_STATUS.SENT, INVOICE_STATUS.REJECTED, INVOICE_STATUS.DRAFT], + sent: [INVOICE_STATUS.REJECTED], + rejected: [], + }; + + static create(value: string): Result { + if (!this.ALLOWED_STATUSES.includes(value)) { + return Result.fail(new Error(`Estado de la factura no válido: ${value}`)); + } + + return Result.ok( + value === "rejected" + ? InvoiceStatus.createRejected() + : value === "sent" + ? InvoiceStatus.createSent() + : value === "emitted" + ? InvoiceStatus.createSent() + : InvoiceStatus.createDraft() + ); + } + + public static createDraft(): InvoiceStatus { + return new InvoiceStatus({ value: INVOICE_STATUS.DRAFT }); + } + + public static createEmitted(): InvoiceStatus { + return new InvoiceStatus({ value: INVOICE_STATUS.EMITTED }); + } + + public static createSent(): InvoiceStatus { + return new InvoiceStatus({ value: INVOICE_STATUS.SENT }); + } + + public static createRejected(): InvoiceStatus { + return new InvoiceStatus({ value: INVOICE_STATUS.REJECTED }); + } + + getValue(): string { + return this.props.value; + } + + toPrimitive() { + return this.getValue(); + } + + canTransitionTo(nextStatus: string): boolean { + return InvoiceStatus.TRANSITIONS[this.props.value].includes(nextStatus); + } + + transitionTo(nextStatus: string): Result { + if (!this.canTransitionTo(nextStatus)) { + return Result.fail( + new Error(`Transición no permitida de ${this.props.value} a ${nextStatus}`) + ); + } + return InvoiceStatus.create(nextStatus); + } + + toString(): string { + return this.getValue(); + } +} diff --git a/packages/invoices/server/index.ts b/modules.bak/invoices/src/server/index.ts similarity index 57% rename from packages/invoices/server/index.ts rename to modules.bak/invoices/src/server/index.ts index 9feba167..a8e88dc7 100644 --- a/packages/invoices/server/index.ts +++ b/modules.bak/invoices/src/server/index.ts @@ -1,6 +1,7 @@ /* import { getService } from "@apps/server/src/core/service-registry"; */ -import { IPackageServer } from "@libs/package"; -//import initInvoiceModel from './models/contact.model'; +import { IPackageServer } from "@packages/package"; +import { invoicesRouter } from "./intrastructure"; +import initInvoiceModel from "./intrastructure/sequelize/invoice.model"; export const InvoicesPackage: IPackageServer = { metadata: { @@ -10,17 +11,11 @@ export const InvoicesPackage: IPackageServer = { }, init(app) { // const contacts = getService("contacts"); - - app.get("/invoices", (req, res) => { - // const customer = await contacts.getContactById('123'); - res.send("Aquí van las facturas"); - }); + invoicesRouter(app); }, registerDependencies() { return { - models: [ - /*initInvoiceModel*/ - ], + models: [(sequelize) => initInvoiceModel(sequelize)], services: { getInvoice: () => {}, /*...*/ diff --git a/modules.bak/invoices/src/server/intrastructure/Contact.repository.ts b/modules.bak/invoices/src/server/intrastructure/Contact.repository.ts new file mode 100644 index 00000000..9ccd432a --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/Contact.repository.ts @@ -0,0 +1,77 @@ +import { + ISequelizeAdapter, + SequelizeRepository, +} from "@/contexts/common/infrastructure/sequelize"; +import { UniqueID } from "@shared/contexts"; +import { Transaction } from "sequelize"; +import { Contact, IContactRepository } from "../domain/Contact"; +import { IContactMapper } from "./mappers/contact.mapper"; + +export class ContactRepository + extends SequelizeRepository + implements IContactRepository +{ + protected mapper: IContactMapper; + + public constructor(props: { + mapper: IContactMapper; + adapter: ISequelizeAdapter; + transaction: Transaction; + }) { + const { adapter, mapper, transaction } = props; + super({ adapter, transaction }); + this.mapper = mapper; + } + + public async getById2( + id: UniqueID, + billingAddressId: UniqueID, + shippingAddressId: UniqueID, + ) { + const Contact_Model = this.adapter.getModel("Contact_Model"); + const ContactAddress_Model = this.adapter.getModel("ContactAddress_Model"); + + const rawContact: any = await Contact_Model.findOne({ + where: { id: id.toString() }, + include: [ + { + model: ContactAddress_Model, + as: "billingAddress", + where: { + id: billingAddressId.toString(), + }, + }, + { + model: ContactAddress_Model, + as: "shippingAddress", + where: { + id: shippingAddressId.toString(), + }, + }, + ], + transaction: this.transaction, + }); + + if (!rawContact === true) { + return null; + } + + return this.mapper.mapToDomain(rawContact); + } + + public async getById(id: UniqueID): Promise { + const rawContact: any = await this._getById("Contact_Model", id, { + include: [{ all: true }], + }); + + if (!rawContact === true) { + return null; + } + + return this.mapper.mapToDomain(rawContact); + } + + public async exists(id: UniqueID): Promise { + return this._exists("Customer", "id", id.toString()); + } +} diff --git a/apps/server/src/contexts/invoices/intrastructure/Invoice.repository.ts b/modules.bak/invoices/src/server/intrastructure/Invoice.repository.ts similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/Invoice.repository.ts rename to modules.bak/invoices/src/server/intrastructure/Invoice.repository.ts diff --git a/apps/server/src/contexts/invoices/intrastructure/InvoiceParticipant.repository.ts b/modules.bak/invoices/src/server/intrastructure/InvoiceParticipant.repository.ts similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/InvoiceParticipant.repository.ts rename to modules.bak/invoices/src/server/intrastructure/InvoiceParticipant.repository.ts diff --git a/apps/server/src/contexts/invoices/intrastructure/InvoiceParticipantAddress.repository.ts b/modules.bak/invoices/src/server/intrastructure/InvoiceParticipantAddress.repository.ts similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/InvoiceParticipantAddress.repository.ts rename to modules.bak/invoices/src/server/intrastructure/InvoiceParticipantAddress.repository.ts diff --git a/apps/server/src/contexts/invoices/intrastructure/InvoicingContext.ts b/modules.bak/invoices/src/server/intrastructure/InvoicingContext.ts similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/InvoicingContext.ts rename to modules.bak/invoices/src/server/intrastructure/InvoicingContext.ts diff --git a/modules.bak/invoices/src/server/intrastructure/express/index.ts b/modules.bak/invoices/src/server/intrastructure/express/index.ts new file mode 100644 index 00000000..af28f816 --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/express/index.ts @@ -0,0 +1 @@ +export * from "./invoices.routes"; diff --git a/modules.bak/invoices/src/server/intrastructure/express/invoices.routes.ts b/modules.bak/invoices/src/server/intrastructure/express/invoices.routes.ts new file mode 100644 index 00000000..2b4482c5 --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/express/invoices.routes.ts @@ -0,0 +1,65 @@ +import { validateAndParseBody } from "@repo/shared"; +import { Express } from "express"; +import { + buildCreateInvoiceController, + buildGetInvoiceController, + buildListInvoicesController, + ICreateInvoiceRequestSchema, +} from "../../presentation"; + +import { NextFunction, Request, Response, Router } from "express"; + +export const invoicesRouter = (app: Express) => { + const routes: Router = Router({ mergeParams: true }); + + routes.get( + "/", + //checkTabContext, + //checkUser, + (req: Request, res: Response, next: NextFunction) => { + buildListInvoicesController().execute(req, res, next); + } + ); + + routes.get( + "/:invoiceId", + //checkTabContext, + //checkUser, + (req: Request, res: Response, next: NextFunction) => { + buildGetInvoiceController().execute(req, res, next); + } + ); + + routes.post( + "/", + validateAndParseBody(ICreateInvoiceRequestSchema, { sanitize: false }), + //checkTabContext, + //checkUser, + (req: Request, res: Response, next: NextFunction) => { + buildCreateInvoiceController().execute(req, res, next); + } + ); + + /* + routes.put( + "/:invoiceId", + validateAndParseBody(IUpdateInvoiceRequestSchema), + checkTabContext, + //checkUser, + (req: Request, res: Response, next: NextFunction) => { + buildUpdateInvoiceController().execute(req, res, next); + } + ); + + routes.delete( + "/:invoiceId", + validateAndParseBody(IDeleteInvoiceRequestSchema), + checkTabContext, + //checkUser, + (req: Request, res: Response, next: NextFunction) => { + buildDeleteInvoiceController().execute(req, res, next); + } + );*/ + + app.use("/invoices", routes); +}; diff --git a/modules.bak/invoices/src/server/intrastructure/index.ts b/modules.bak/invoices/src/server/intrastructure/index.ts new file mode 100644 index 00000000..f35c8878 --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/index.ts @@ -0,0 +1,3 @@ +export * from "./express"; +export * from "./mappers"; +export * from "./sequelize"; diff --git a/modules.bak/invoices/src/server/intrastructure/mappers/contact.mapper.ts b/modules.bak/invoices/src/server/intrastructure/mappers/contact.mapper.ts new file mode 100644 index 00000000..8fdf7ee9 --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/mappers/contact.mapper.ts @@ -0,0 +1,63 @@ +import { ISequelizeMapper, SequelizeMapper } from "@/contexts/common/infrastructure"; +import { Name, TINNumber, UniqueID } from "@shared/contexts"; + +import { Contact, IContactProps } from "../../domain"; +import { IInvoicingContext } from "../InvoicingContext"; +import { Contact_Model, TCreationContact_Model } from "../sequelize/contact.mo.del"; +import { IContactAddressMapper, createContactAddressMapper } from "./contactAddress.mapper"; + +export interface IContactMapper + extends ISequelizeMapper {} + +class ContactMapper + extends SequelizeMapper + implements IContactMapper +{ + public constructor(props: { addressMapper: IContactAddressMapper; context: IInvoicingContext }) { + super(props); + } + + protected toDomainMappingImpl(source: Contact_Model, params: any): Contact { + if (!source.billingAddress) { + this.handleRequiredFieldError( + "billingAddress", + new Error("Missing participant's billing address") + ); + } + + if (!source.shippingAddress) { + this.handleRequiredFieldError( + "shippingAddress", + new Error("Missing participant's shipping address") + ); + } + + const billingAddress = this.props.addressMapper.mapToDomain(source.billingAddress!, params); + + const shippingAddress = this.props.addressMapper.mapToDomain(source.shippingAddress!, params); + + const props: IContactProps = { + tin: this.mapsValue(source, "tin", TINNumber.create), + firstName: this.mapsValue(source, "first_name", Name.create), + lastName: this.mapsValue(source, "last_name", Name.create), + companyName: this.mapsValue(source, "company_name", Name.create), + billingAddress, + shippingAddress, + }; + + const id = this.mapsValue(source, "id", UniqueID.create); + const contactOrError = Contact.create(props, id); + + if (contactOrError.isFailure) { + throw contactOrError.error; + } + + return contactOrError.object; + } +} + +export const createContactMapper = (context: IInvoicingContext): IContactMapper => + new ContactMapper({ + addressMapper: createContactAddressMapper(context), + context, + }); diff --git a/modules.bak/invoices/src/server/intrastructure/mappers/contactAddress.mapper.ts b/modules.bak/invoices/src/server/intrastructure/mappers/contactAddress.mapper.ts new file mode 100644 index 00000000..4e05d8f8 --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/mappers/contactAddress.mapper.ts @@ -0,0 +1,65 @@ +import { + ISequelizeMapper, + SequelizeMapper, +} from "@/contexts/common/infrastructure"; +import { + City, + Country, + Email, + Note, + Phone, + PostalCode, + Province, + Street, + UniqueID, +} from "@shared/contexts"; +import { ContactAddress, IContactAddressProps } from "../../domain"; +import { IInvoicingContext } from "../InvoicingContext"; +import { + ContactAddress_Model, + TCreationContactAddress_Attributes, +} from "../sequelize"; + +export interface IContactAddressMapper + extends ISequelizeMapper< + ContactAddress_Model, + TCreationContactAddress_Attributes, + ContactAddress + > {} + +export const createContactAddressMapper = ( + context: IInvoicingContext +): IContactAddressMapper => new ContactAddressMapper({ context }); + +class ContactAddressMapper + extends SequelizeMapper< + ContactAddress_Model, + TCreationContactAddress_Attributes, + ContactAddress + > + implements IContactAddressMapper +{ + protected toDomainMappingImpl(source: ContactAddress_Model, params: any) { + const id = this.mapsValue(source, "id", UniqueID.create); + + const props: IContactAddressProps = { + type: source.type, + street: this.mapsValue(source, "street", Street.create), + city: this.mapsValue(source, "city", City.create), + province: this.mapsValue(source, "province", Province.create), + postalCode: this.mapsValue(source, "postal_code", PostalCode.create), + country: this.mapsValue(source, "country", Country.create), + email: this.mapsValue(source, "email", Email.create), + phone: this.mapsValue(source, "phone", Phone.create), + notes: this.mapsValue(source, "notes", Note.create), + }; + + const addressOrError = ContactAddress.create(props, id); + + if (addressOrError.isFailure) { + throw addressOrError.error; + } + + return addressOrError.object; + } +} diff --git a/modules.bak/invoices/src/server/intrastructure/mappers/index.ts b/modules.bak/invoices/src/server/intrastructure/mappers/index.ts new file mode 100644 index 00000000..722a3c8b --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/mappers/index.ts @@ -0,0 +1 @@ +export * from "./invoice.mapper"; diff --git a/modules.bak/invoices/src/server/intrastructure/mappers/invoice-item.mapper.ts b/modules.bak/invoices/src/server/intrastructure/mappers/invoice-item.mapper.ts new file mode 100644 index 00000000..e645976e --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/mappers/invoice-item.mapper.ts @@ -0,0 +1,104 @@ +import { Invoice, InvoiceItem, InvoiceItemDescription } from "@contexts/invoices/domain/"; +import { MoneyValue, Percentage, Quantity, UniqueID } from "core/common/domain"; +import { Result } from "core/common/helpers"; +import { + ISequelizeMapper, + MapperParamsType, + SequelizeMapper, +} from "core/common/infrastructure/sequelize/sequelize-mapper"; +import { InferCreationAttributes } from "sequelize"; +import { InvoiceItemCreationAttributes, InvoiceItemModel, InvoiceModel } from "../sequelize"; + +export interface IInvoiceItemMapper + extends ISequelizeMapper {} + +export class InvoiceItemMapper + extends SequelizeMapper + implements IInvoiceItemMapper +{ + public mapToDomain( + source: InvoiceItemModel, + params?: MapperParamsType + ): Result { + const { sourceParent } = params as { sourceParent: InvoiceModel }; + + const idOrError = UniqueID.create(source.item_id); + + const descriptionOrError = InvoiceItemDescription.create(source.description); + + const quantityOrError = Quantity.create({ + amount: source.quantity_amount, + scale: source.quantity_scale, + }); + + const unitPriceOrError = MoneyValue.create({ + amount: source.unit_price_amount, + scale: source.unit_price_scale, + currency_code: sourceParent.invoice_currency, + }); + + const discountOrError = Percentage.create({ + amount: source.discount_amount, + scale: source.discount_scale, + }); + + const result = Result.combine([ + idOrError, + descriptionOrError, + quantityOrError, + unitPriceOrError, + discountOrError, + ]); + + if (result.isFailure) { + return Result.fail(result.error); + } + + return InvoiceItem.create( + { + description: descriptionOrError.data, + quantity: quantityOrError.data, + unitPrice: unitPriceOrError.data, + discount: discountOrError.data, + }, + idOrError.data + //sourceParent + ); + } + + public mapToPersistence( + source: InvoiceItem, + params?: MapperParamsType + ): InferCreationAttributes { + const { index, sourceParent } = params as { + index: number; + sourceParent: Invoice; + }; + + const lineData = { + parent_id: undefined, + invoice_id: sourceParent.id.toPrimitive(), + item_type: "simple", + position: index, + + item_id: source.id.toPrimitive(), + description: source.description.toPrimitive(), + + quantity_amount: source.quantity.toPrimitive().amount, + quantity_scale: source.quantity.toPrimitive().scale, + + unit_price_amount: source.unitPrice.toPrimitive().amount, + unit_price_scale: source.unitPrice.toPrimitive().scale, + + subtotal_amount: source.subtotalPrice.toPrimitive().amount, + subtotal_scale: source.subtotalPrice.toPrimitive().scale, + + discount_amount: source.discount.toPrimitive().amount, + discount_scale: source.discount.toPrimitive().scale, + + total_amount: source.totalPrice.toPrimitive().amount, + total_scale: source.totalPrice.toPrimitive().scale, + }; + return lineData; + } +} diff --git a/modules.bak/invoices/src/server/intrastructure/mappers/invoice.mapper.ts b/modules.bak/invoices/src/server/intrastructure/mappers/invoice.mapper.ts new file mode 100644 index 00000000..25377f40 --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/mappers/invoice.mapper.ts @@ -0,0 +1,101 @@ +import { Invoice, InvoiceNumber, InvoiceSerie, InvoiceStatus } from "@contexts/invoices/domain/"; +import { UniqueID, UtcDate } from "core/common/domain"; +import { Result } from "core/common/helpers"; +import { + ISequelizeMapper, + MapperParamsType, + SequelizeMapper, +} from "core/common/infrastructure/sequelize/sequelize-mapper"; +import { InvoiceCreationAttributes, InvoiceModel } from "../sequelize"; +import { InvoiceItemMapper } from "./invoice-item.mapper"; // Importar el mapper de items + +export interface IInvoiceMapper + extends ISequelizeMapper {} + +export class InvoiceMapper + extends SequelizeMapper + implements IInvoiceMapper +{ + private invoiceItemMapper: InvoiceItemMapper; + + constructor() { + super(); + this.invoiceItemMapper = new InvoiceItemMapper(); // Instanciar el mapper de items + } + + public mapToDomain(source: InvoiceModel, params?: MapperParamsType): Result { + const idOrError = UniqueID.create(source.id); + const statusOrError = InvoiceStatus.create(source.invoice_status); + const invoiceSeriesOrError = InvoiceSerie.create(source.invoice_series); + const invoiceNumberOrError = InvoiceNumber.create(source.invoice_number); + const issueDateOrError = UtcDate.create(source.issue_date); + const operationDateOrError = UtcDate.create(source.operation_date); + + const result = Result.combine([ + idOrError, + statusOrError, + invoiceSeriesOrError, + invoiceNumberOrError, + issueDateOrError, + operationDateOrError, + ]); + + if (result.isFailure) { + return Result.fail(result.error); + } + + // Mapear los items de la factura + const itemsOrErrors = this.invoiceItemMapper.mapArrayToDomain(source.items, { + sourceParent: source, + ...params, + }); + + if (itemsOrErrors.isFailure) { + return Result.fail(itemsOrErrors.error); + } + + const invoiceCurrency = source.invoice_currency || "EUR"; + + return Invoice.create( + { + status: statusOrError.data, + invoiceSeries: invoiceSeriesOrError.data, + invoiceNumber: invoiceNumberOrError.data, + issueDate: issueDateOrError.data, + operationDate: operationDateOrError.data, + invoiceCurrency, + items: itemsOrErrors.data, + }, + idOrError.data + ); + } + + public mapToPersistence(source: Invoice, params?: MapperParamsType): InvoiceCreationAttributes { + const subtotal = source.calculateSubtotal(); + const total = source.calculateTotal(); + + const items = this.invoiceItemMapper.mapCollectionToPersistence(source.items, params); + + return { + id: source.id.toString(), + invoice_status: source.status.toPrimitive(), + invoice_series: source.invoiceSeries.toPrimitive(), + invoice_number: source.invoiceNumber.toPrimitive(), + issue_date: source.issueDate.toPrimitive(), + operation_date: source.operationDate.toPrimitive(), + invoice_language: "es", + invoice_currency: source.invoiceCurrency || "EUR", + + subtotal_amount: subtotal.amount, + subtotal_scale: subtotal.scale, + + total_amount: total.amount, + total_scale: total.scale, + + items, + }; + } +} + +const invoiceMapper: InvoiceMapper = new InvoiceMapper(); +export { invoiceMapper }; diff --git a/modules.bak/invoices/src/server/intrastructure/mappers/invoiceParticipant.mapper.ts b/modules.bak/invoices/src/server/intrastructure/mappers/invoiceParticipant.mapper.ts new file mode 100644 index 00000000..aa6944f3 --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/mappers/invoiceParticipant.mapper.ts @@ -0,0 +1,119 @@ +import { ISequelizeMapper, SequelizeMapper } from "@/contexts/common/infrastructure"; +import { Name, TINNumber, UniqueID } from "@shared/contexts"; +import { + IInvoiceCustomerProps, + Invoice, + InvoiceCustomer, + InvoiceParticipantBillingAddress, + InvoiceParticipantShippingAddress, +} from "../../domain"; +import { IInvoicingContext } from "../InvoicingContext"; +import { InvoiceParticipant_Model, TCreationInvoiceParticipant_Model } from "../sequelize"; +import { + IInvoiceParticipantAddressMapper, + createInvoiceParticipantAddressMapper, +} from "./invoiceParticipantAddress.mapper"; + +export interface IInvoiceParticipantMapper + extends ISequelizeMapper< + InvoiceParticipant_Model, + TCreationInvoiceParticipant_Model, + InvoiceCustomer + > {} + +export const createInvoiceParticipantMapper = ( + context: IInvoicingContext +): IInvoiceParticipantMapper => + new InvoiceParticipantMapper({ + context, + addressMapper: createInvoiceParticipantAddressMapper(context), + }); + +class InvoiceParticipantMapper + extends SequelizeMapper< + InvoiceParticipant_Model, + TCreationInvoiceParticipant_Model, + InvoiceCustomer + > + implements IInvoiceParticipantMapper +{ + public constructor(props: { + addressMapper: IInvoiceParticipantAddressMapper; + context: IInvoicingContext; + }) { + super(props); + } + + protected toDomainMappingImpl(source: InvoiceParticipant_Model, params: any) { + /*if (!source.billingAddress) { + this.handleRequiredFieldError( + "billingAddress", + new Error("Missing participant's billing address"), + ); + } + + if (!source.shippingAddress) { + this.handleRequiredFieldError( + "shippingAddress", + new Error("Missing participant's shipping address"), + ); + } +*/ + const billingAddress = source.billingAddress + ? ((this.props.addressMapper as IInvoiceParticipantAddressMapper).mapToDomain( + source.billingAddress, + params + ) as InvoiceParticipantBillingAddress) + : undefined; + + const shippingAddress = source.shippingAddress + ? ((this.props.addressMapper as IInvoiceParticipantAddressMapper).mapToDomain( + source.shippingAddress, + params + ) as InvoiceParticipantShippingAddress) + : undefined; + + const props: IInvoiceCustomerProps = { + tin: this.mapsValue(source, "tin", TINNumber.create), + firstName: this.mapsValue(source, "first_name", Name.create), + lastName: this.mapsValue(source, "last_name", Name.create), + companyName: this.mapsValue(source, "company_name", Name.create), + billingAddress, + shippingAddress, + }; + + const id = this.mapsValue(source, "participant_id", UniqueID.create); + const participantOrError = InvoiceCustomer.create(props, id); + + if (participantOrError.isFailure) { + throw participantOrError.error; + } + + return participantOrError.object; + } + + protected toPersistenceMappingImpl( + source: InvoiceCustomer, + params: { sourceParent: Invoice } + ): TCreationInvoiceParticipant_Model { + const { sourceParent } = params; + + return { + invoice_id: sourceParent.id.toPrimitive(), + + participant_id: source.id.toPrimitive(), + tin: source.tin.toPrimitive(), + first_name: source.firstName.toPrimitive(), + last_name: source.lastName.toPrimitive(), + company_name: source.companyName.toPrimitive(), + + billingAddress: ( + this.props.addressMapper as IInvoiceParticipantAddressMapper + ).mapToPersistence(source.billingAddress!, { sourceParent: source }), + + shippingAddress: ( + this.props.addressMapper as IInvoiceParticipantAddressMapper + ).mapToPersistence(source.shippingAddress!, { sourceParent: source }), + }; + } +} diff --git a/modules.bak/invoices/src/server/intrastructure/mappers/invoiceParticipantAddress.mapper.ts b/modules.bak/invoices/src/server/intrastructure/mappers/invoiceParticipantAddress.mapper.ts new file mode 100644 index 00000000..1e898f64 --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/mappers/invoiceParticipantAddress.mapper.ts @@ -0,0 +1,87 @@ +import { ISequelizeMapper, SequelizeMapper } from "@/contexts/common/infrastructure"; +import { + City, + Country, + Email, + Note, + Phone, + PostalCode, + Province, + Street, + UniqueID, +} from "@shared/contexts"; +import { + IInvoiceParticipantAddressProps, + InvoiceCustomer, + InvoiceParticipantAddress, +} from "../../domain"; +import { IInvoicingContext } from "../InvoicingContext"; +import { + InvoiceParticipantAddress_Model, + TCreationInvoiceParticipantAddress_Model, +} from "../sequelize"; + +export interface IInvoiceParticipantAddressMapper + extends ISequelizeMapper< + InvoiceParticipantAddress_Model, + TCreationInvoiceParticipantAddress_Model, + InvoiceParticipantAddress + > {} + +export const createInvoiceParticipantAddressMapper = ( + context: IInvoicingContext +): IInvoiceParticipantAddressMapper => new InvoiceParticipantAddressMapper({ context }); + +class InvoiceParticipantAddressMapper + extends SequelizeMapper< + InvoiceParticipantAddress_Model, + TCreationInvoiceParticipantAddress_Model, + InvoiceParticipantAddress + > + implements IInvoiceParticipantAddressMapper +{ + protected toDomainMappingImpl(source: InvoiceParticipantAddress_Model, params: any) { + const id = this.mapsValue(source, "address_id", UniqueID.create); + + const props: IInvoiceParticipantAddressProps = { + type: source.type, + street: this.mapsValue(source, "street", Street.create), + city: this.mapsValue(source, "city", City.create), + province: this.mapsValue(source, "province", Province.create), + postalCode: this.mapsValue(source, "postal_code", PostalCode.create), + country: this.mapsValue(source, "country", Country.create), + email: this.mapsValue(source, "email", Email.create), + phone: this.mapsValue(source, "phone", Phone.create), + notes: this.mapsValue(source, "notes", Note.create), + }; + + const addressOrError = InvoiceParticipantAddress.create(props, id); + + if (addressOrError.isFailure) { + throw addressOrError.error; + } + + return addressOrError.object; + } + + protected toPersistenceMappingImpl( + source: InvoiceParticipantAddress, + params: { sourceParent: InvoiceCustomer } + ) { + const { sourceParent } = params; + + return { + address_id: source.id.toPrimitive(), + participant_id: sourceParent.id.toPrimitive(), + type: String(source.type), + title: source.title, + street: source.street.toPrimitive(), + city: source.city.toPrimitive(), + postal_code: source.postalCode.toPrimitive(), + province: source.province.toPrimitive(), + country: source.country.toPrimitive(), + email: source.email.toPrimitive(), + phone: source.phone.toPrimitive(), + }; + } +} diff --git a/modules.bak/invoices/src/server/intrastructure/sequelize/contact.mo.del.ts b/modules.bak/invoices/src/server/intrastructure/sequelize/contact.mo.del.ts new file mode 100644 index 00000000..d5b11b17 --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/sequelize/contact.mo.del.ts @@ -0,0 +1,84 @@ +import { + CreationOptional, + DataTypes, + InferAttributes, + InferCreationAttributes, + Model, + NonAttribute, + Sequelize, +} from "sequelize"; + +import { ContactAddress_Model, TCreationContactAddress_Attributes } from "./contactAddress.mo.del"; + +export type TCreationContact_Model = InferCreationAttributes< + Contact_Model, + { omit: "shippingAddress" | "billingAddress" } +> & { + billingAddress: TCreationContactAddress_Attributes; + shippingAddress: TCreationContactAddress_Attributes; +}; + +export class Contact_Model extends Model< + InferAttributes, + InferCreationAttributes +> { + // To avoid table creation + static async sync(): Promise { + return Promise.resolve(); + } + + static associate(connection: Sequelize) { + const { Contact_Model, ContactAddress_Model } = connection.models; + + Contact_Model.hasOne(ContactAddress_Model, { + as: "shippingAddress", + foreignKey: "customer_id", + onDelete: "CASCADE", + }); + + Contact_Model.hasOne(ContactAddress_Model, { + as: "billingAddress", + foreignKey: "customer_id", + onDelete: "CASCADE", + }); + } + + declare id: string; + declare tin: CreationOptional; + declare company_name: CreationOptional; + declare first_name: CreationOptional; + declare last_name: CreationOptional; + + declare shippingAddress?: NonAttribute; + declare billingAddress?: NonAttribute; +} + +export default (sequelize: Sequelize) => { + Contact_Model.init( + { + id: { + type: new DataTypes.UUID(), + primaryKey: true, + }, + tin: { + type: new DataTypes.STRING(), + }, + company_name: { + type: new DataTypes.STRING(), + }, + first_name: { + type: new DataTypes.STRING(), + }, + last_name: { + type: new DataTypes.STRING(), + }, + }, + { + sequelize, + tableName: "customers", + timestamps: false, + } + ); + + return Contact_Model; +}; diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/contactAddress.mo.del.ts b/modules.bak/invoices/src/server/intrastructure/sequelize/contactAddress.mo.del.ts similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/sequelize/contactAddress.mo.del.ts rename to modules.bak/invoices/src/server/intrastructure/sequelize/contactAddress.mo.del.ts diff --git a/modules.bak/invoices/src/server/intrastructure/sequelize/index.ts b/modules.bak/invoices/src/server/intrastructure/sequelize/index.ts new file mode 100644 index 00000000..d063103a --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/sequelize/index.ts @@ -0,0 +1,11 @@ +import { IInvoiceRepository } from "@contexts/invoices/domain"; +import { invoiceRepository } from "./invoice.repository"; + +export * from "./invoice-item.model"; +export * from "./invoice.model"; + +export * from "./invoice.repository"; + +export const createInvoiceRepository = (): IInvoiceRepository => { + return invoiceRepository; +}; diff --git a/modules.bak/invoices/src/server/intrastructure/sequelize/invoice-item.model.ts b/modules.bak/invoices/src/server/intrastructure/sequelize/invoice-item.model.ts new file mode 100644 index 00000000..b63992b3 --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/sequelize/invoice-item.model.ts @@ -0,0 +1,165 @@ +import { + CreationOptional, + DataTypes, + InferAttributes, + InferCreationAttributes, + Model, +} from "sequelize"; + +export type InvoiceItemCreationAttributes = InferCreationAttributes & {}; + +export class InvoiceItemModel extends Model< + InferAttributes, + InvoiceItemCreationAttributes +> { + static associate(connection: Sequelize) { + /*const { Invoice_Model, InvoiceItem_Model } = connection.models; + + InvoiceItem_Model.belongsTo(Invoice_Model, { + as: "invoice", + foreignKey: "invoice_id", + onDelete: "CASCADE", + });*/ + } + + declare item_id: string; + declare invoice_id: string; + + declare parent_id: CreationOptional; + declare position: number; + declare item_type: string; + + declare description: CreationOptional; + + declare quantity_amount: CreationOptional; + declare quantity_scale: CreationOptional; + + declare unit_price_amount: CreationOptional; + declare unit_price_scale: CreationOptional; + + declare subtotal_amount: CreationOptional; + declare subtotal_scale: CreationOptional; + + declare discount_amount: CreationOptional; + declare discount_scale: CreationOptional; + + declare total_amount: CreationOptional; + declare total_scale: CreationOptional; + + //declare invoice?: NonAttribute; +} + +export default (sequelize: Sequelize) => { + InvoiceItemModel.init( + { + item_id: { + type: new DataTypes.UUID(), + primaryKey: true, + }, + invoice_id: { + type: new DataTypes.UUID(), + primaryKey: true, + }, + parent_id: { + type: new DataTypes.UUID(), + allowNull: true, // Puede ser nulo para elementos de nivel superior + }, + position: { + type: new DataTypes.MEDIUMINT(), + autoIncrement: false, + allowNull: false, + }, + item_type: { + type: new DataTypes.STRING(), + allowNull: false, + defaultValue: "simple", + }, + description: { + type: new DataTypes.TEXT(), + allowNull: true, + }, + + quantity_amount: { + type: new DataTypes.BIGINT(), + allowNull: true, + defaultValue: null, + }, + quantity_scale: { + type: new DataTypes.SMALLINT(), + allowNull: true, + defaultValue: null, + }, + + unit_price_amount: { + type: new DataTypes.BIGINT(), + allowNull: true, + defaultValue: null, + }, + unit_price_scale: { + type: new DataTypes.SMALLINT(), + allowNull: true, + defaultValue: null, + }, + + /*tax_slug: { + type: new DataTypes.DECIMAL(3, 2), + allowNull: true, + }, + tax_rate: { + type: new DataTypes.DECIMAL(3, 2), + allowNull: true, + }, + tax_equalization: { + type: new DataTypes.DECIMAL(3, 2), + allowNull: true, + },*/ + + subtotal_amount: { + type: new DataTypes.BIGINT(), // importante: evita problemas de precisión con valores grandes + allowNull: true, + defaultValue: null, + }, + subtotal_scale: { + type: new DataTypes.SMALLINT(), + allowNull: true, + defaultValue: null, + }, + + discount_amount: { + type: new DataTypes.SMALLINT(), + allowNull: true, + defaultValue: null, + }, + discount_scale: { + type: new DataTypes.SMALLINT(), + allowNull: true, + defaultValue: null, + }, + + /*tax_amount: { + type: new DataTypes.BIGINT(), + allowNull: true, + },*/ + total_amount: { + type: new DataTypes.BIGINT(), // importante: evita problemas de precisión con valores grandes + allowNull: true, + defaultValue: null, + }, + total_scale: { + type: new DataTypes.SMALLINT(), + allowNull: true, + defaultValue: null, + }, + }, + { + sequelize, + tableName: "invoice_items", + + defaultScope: {}, + + scopes: {}, + } + ); + + return InvoiceItemModel; +}; diff --git a/modules.bak/invoices/src/server/intrastructure/sequelize/invoice.model.ts b/modules.bak/invoices/src/server/intrastructure/sequelize/invoice.model.ts new file mode 100644 index 00000000..1d4bb7ca --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/sequelize/invoice.model.ts @@ -0,0 +1,144 @@ +import { + CreationOptional, + DataTypes, + InferAttributes, + InferCreationAttributes, + Model, + NonAttribute, + Sequelize, +} from "sequelize"; +import { InvoiceItemCreationAttributes, InvoiceItemModel } from "./invoice-item.model"; + +export type InvoiceCreationAttributes = InferCreationAttributes & { + items?: InvoiceItemCreationAttributes[]; +}; + +export class InvoiceModel extends Model< + InferAttributes, + InferCreationAttributes +> { + declare id: string; + + declare invoice_status: string; + declare invoice_series: CreationOptional; + declare invoice_number: CreationOptional; + declare issue_date: CreationOptional; + declare operation_date: CreationOptional; + declare invoice_language: string; + declare invoice_currency: string; + + // Subtotal + declare subtotal_amount: CreationOptional; + declare subtotal_scale: CreationOptional; + + // Total + declare total_amount: CreationOptional; + declare total_scale: CreationOptional; + + // Relaciones + declare items: NonAttribute; + //declare customer: NonAttribute; + + static associate(database: Sequelize) { + const { InvoiceModel, InvoiceItemModel } = database.models; + + InvoiceModel.hasMany(InvoiceItemModel, { + as: "items", + foreignKey: "invoice_id", + onDelete: "CASCADE", + }); + } +} + +export default (database: Sequelize) => { + InvoiceModel.init( + { + id: { + type: new DataTypes.UUID(), + primaryKey: true, + }, + + invoice_status: { + type: new DataTypes.STRING(), + allowNull: false, + }, + + invoice_series: { + type: new DataTypes.STRING(), + allowNull: true, + defaultValue: null, + }, + + invoice_number: { + type: new DataTypes.STRING(), + allowNull: true, + defaultValue: null, + }, + + issue_date: { + type: new DataTypes.DATEONLY(), + allowNull: true, + defaultValue: null, + }, + + operation_date: { + type: new DataTypes.DATEONLY(), + allowNull: true, + defaultValue: null, + }, + + invoice_language: { + type: new DataTypes.STRING(), + allowNull: false, + }, + + invoice_currency: { + type: new DataTypes.STRING(3), // ISO 4217 + allowNull: false, + }, + + subtotal_amount: { + type: new DataTypes.BIGINT(), // importante: evita problemas de precisión con valores grandes + allowNull: true, + defaultValue: null, + }, + subtotal_scale: { + type: new DataTypes.SMALLINT(), + allowNull: true, + defaultValue: null, + }, + + total_amount: { + type: new DataTypes.BIGINT(), // importante: evita problemas de precisión con valores grandes + allowNull: true, + defaultValue: null, + }, + total_scale: { + type: new DataTypes.SMALLINT(), + allowNull: true, + defaultValue: null, + }, + }, + { + sequelize: database, + tableName: "invoices", + + paranoid: true, // softs deletes + timestamps: true, + + createdAt: "created_at", + updatedAt: "updated_at", + deletedAt: "deleted_at", + + indexes: [{ unique: true, fields: ["invoice_number"] }], + + whereMergeStrategy: "and", // <- cómo tratar el merge de un scope + + defaultScope: {}, + + scopes: {}, + } + ); + + return InvoiceModel; +}; diff --git a/modules.bak/invoices/src/server/intrastructure/sequelize/invoice.repository.ts b/modules.bak/invoices/src/server/intrastructure/sequelize/invoice.repository.ts new file mode 100644 index 00000000..49e2a00a --- /dev/null +++ b/modules.bak/invoices/src/server/intrastructure/sequelize/invoice.repository.ts @@ -0,0 +1,112 @@ +import { Invoice } from "@contexts/invoices/domain"; +import { IInvoiceRepository } from "@contexts/invoices/domain/repositories/invoice-repository.interface"; +import { UniqueID } from "core/common/domain"; +import { Collection, Result } from "core/common/helpers"; +import { SequelizeRepository } from "core/common/infrastructure"; +import { Transaction } from "sequelize"; +import { IInvoiceMapper, invoiceMapper } from "../mappers/invoice.mapper"; +import { InvoiceItemModel } from "./invoice-item.model"; +import { InvoiceModel } from "./invoice.model"; + +class InvoiceRepository extends SequelizeRepository implements IInvoiceRepository { + private readonly _mapper!: IInvoiceMapper; + + /** + * 🔹 Función personalizada para mapear errores de unicidad en autenticación + */ + private _customErrorMapper(error: Error): string | null { + if (error.name === "SequelizeUniqueConstraintError") { + return "Invoice with this email already exists"; + } + + return null; + } + + constructor(mapper: IInvoiceMapper) { + super(); + this._mapper = mapper; + } + + async invoiceExists(id: UniqueID, transaction?: Transaction): Promise> { + try { + const _invoice = await this._getById(InvoiceModel, id, {}, transaction); + + return Result.ok(Boolean(id.equals(_invoice.id))); + } catch (error: any) { + return this._handleDatabaseError(error, this._customErrorMapper); + } + } + + async findAll(transaction?: Transaction): Promise, Error>> { + try { + const rawInvoices: any = await this._findAll( + InvoiceModel, + { + include: [ + { + model: InvoiceItemModel, + as: "items", + }, + ], + }, + transaction + ); + + if (!rawInvoices === true) { + return Result.fail(new Error("Invoice with email not exists")); + } + + return this._mapper.mapArrayToDomain(rawInvoices); + } catch (error: any) { + return this._handleDatabaseError(error, this._customErrorMapper); + } + } + + async getById(id: UniqueID, transaction?: Transaction): Promise> { + try { + const rawInvoice: any = await this._getById( + InvoiceModel, + id, + { + include: [ + { + model: InvoiceItemModel, + as: "items", + }, + ], + }, + transaction + ); + + if (!rawInvoice === true) { + return Result.fail(new Error(`Invoice with id ${id.toString()} not exists`)); + } + + return this._mapper.mapToDomain(rawInvoice); + } catch (error: any) { + return this._handleDatabaseError(error, this._customErrorMapper); + } + } + + async deleteById(id: UniqueID, transaction?: Transaction): Promise> { + try { + this._deleteById(InvoiceModel, id); + return Result.ok(true); + } catch (error: any) { + return this._handleDatabaseError(error, this._customErrorMapper); + } + } + + async create(invoice: Invoice, transaction?: Transaction): Promise { + const invoiceData = this._mapper.mapToPersistence(invoice); + await this._save(InvoiceModel, invoice.id, invoiceData, {}, transaction); + } + + async update(invoice: Invoice, transaction?: Transaction): Promise { + const invoiceData = this._mapper.mapToPersistence(invoice); + await this._save(InvoiceModel, invoice.id, invoiceData, {}, transaction); + } +} + +const invoiceRepository = new InvoiceRepository(invoiceMapper); +export { invoiceRepository }; diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/invoiceParticipant.mo.del.ts b/modules.bak/invoices/src/server/intrastructure/sequelize/invoiceParticipant.mo.del.ts similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/sequelize/invoiceParticipant.mo.del.ts rename to modules.bak/invoices/src/server/intrastructure/sequelize/invoiceParticipant.mo.del.ts diff --git a/apps/server/src/contexts/invoices/intrastructure/sequelize/invoiceParticipantAddress.mo.del.ts b/modules.bak/invoices/src/server/intrastructure/sequelize/invoiceParticipantAddress.mo.del.ts similarity index 100% rename from apps/server/src/contexts/invoices/intrastructure/sequelize/invoiceParticipantAddress.mo.del.ts rename to modules.bak/invoices/src/server/intrastructure/sequelize/invoiceParticipantAddress.mo.del.ts diff --git a/modules.bak/invoices/src/server/presentation/controllers/create-invoice/create-invoice.controller.ts b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/create-invoice.controller.ts new file mode 100644 index 00000000..f848fd28 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/create-invoice.controller.ts @@ -0,0 +1,45 @@ +import { UniqueID } from "core/common/domain"; +import { ExpressController } from "core/common/presentation"; +import { CreateInvoiceUseCase } from "../../../application"; +import { ICreateInvoiceRequestDTO } from "../../dto"; +import { ICreateInvoicePresenter } from "./presenter"; + +export class CreateInvoiceController extends ExpressController { + public constructor( + private readonly createInvoice: CreateInvoiceUseCase, + private readonly presenter: ICreateInvoicePresenter + ) { + super(); + } + + protected async executeImpl() { + const createDTO: ICreateInvoiceRequestDTO = this.req.body; + + // Validar ID + const invoiceIdOrError = UniqueID.create(createDTO.id); + if (invoiceIdOrError.isFailure) return this.invalidInputError("Invoice ID not valid"); + + const invoiceOrError = await this.createInvoice.execute(invoiceIdOrError.data, createDTO); + + if (invoiceOrError.isFailure) { + return this.handleError(invoiceOrError.error); + } + + return this.ok(this.presenter.toDTO(invoiceOrError.data)); + } + + private handleError(error: Error) { + const message = error.message; + + if ( + message.includes("Database connection lost") || + message.includes("Database request timed out") + ) { + return this.unavailableError( + "Database service is currently unavailable. Please try again later." + ); + } + + return this.conflictError(message); + } +} diff --git a/modules.bak/invoices/src/server/presentation/controllers/create-invoice/index.ts b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/index.ts new file mode 100644 index 00000000..3f3ac725 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/index.ts @@ -0,0 +1,16 @@ +import { CreateInvoiceUseCase } from "@contexts/invoices/application/create-invoice.use-case"; +import { InvoiceService } from "@contexts/invoices/domain"; +import { invoiceRepository } from "@contexts/invoices/intrastructure"; +import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { CreateInvoiceController } from "./create-invoice.controller"; +import { createInvoicePresenter } from "./presenter"; + +export const buildCreateInvoiceController = () => { + const transactionManager = new SequelizeTransactionManager(); + const invoiceService = new InvoiceService(invoiceRepository); + + const useCase = new CreateInvoiceUseCase(invoiceService, transactionManager); + const presenter = createInvoicePresenter; + + return new CreateInvoiceController(useCase, presenter); +}; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceItem.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/InvoiceItem.presenter.ts similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/update-invoice/presenter/InvoiceItem.presenter.ts rename to modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/InvoiceItem.presenter.ts diff --git a/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/InvoiceParticipant.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/InvoiceParticipant.presenter.ts new file mode 100644 index 00000000..ea628008 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/InvoiceParticipant.presenter.ts @@ -0,0 +1,26 @@ +import { IInvoiceParticipant } from "@/contexts/invoicing/domain"; +import { IInvoicingContext } from "@/contexts/invoicing/intrastructure/InvoicingContext"; +import { ICreateInvoice_Participant_Response_DTO } from "@shared/contexts"; +import { InvoiceParticipantAddressPresenter } from "./InvoiceParticipantAddress.presenter"; + +export const InvoiceParticipantPresenter = ( + participant: IInvoiceParticipant, + context: IInvoicingContext, +): ICreateInvoice_Participant_Response_DTO | undefined => { + return { + id: participant.id.toString(), + tin: participant.tin.toString(), + first_name: participant.firstName.toString(), + last_name: participant.lastName.toString(), + company_name: participant.companyName.toString(), + + billing_address: InvoiceParticipantAddressPresenter( + participant.billingAddress!, + context, + ), + shipping_address: InvoiceParticipantAddressPresenter( + participant.shippingAddress!, + context, + ), + }; +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/InvoiceParticipantAddress.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/InvoiceParticipantAddress.presenter.ts new file mode 100644 index 00000000..4e637287 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/InvoiceParticipantAddress.presenter.ts @@ -0,0 +1,19 @@ +import { InvoiceParticipantAddress } from "@/contexts/invoicing/domain"; +import { IInvoicingContext } from "@/contexts/invoicing/intrastructure/InvoicingContext"; +import { ICreateInvoice_AddressParticipant_Response_DTO } from "@shared/contexts"; + +export const InvoiceParticipantAddressPresenter = ( + address: InvoiceParticipantAddress, + context: IInvoicingContext, +): ICreateInvoice_AddressParticipant_Response_DTO => { + return { + id: address.id.toString(), + street: address.street.toString(), + city: address.city.toString(), + postal_code: address.postalCode.toString(), + province: address.province.toString(), + country: address.country.toString(), + email: address.email.toString(), + phone: address.phone.toString(), + }; +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/create-invoice.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/create-invoice.presenter.ts new file mode 100644 index 00000000..811e676a --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/create-invoice.presenter.ts @@ -0,0 +1,28 @@ +import { Invoice } from "@contexts/invoices/domain"; +import { ICreateInvoiceResponseDTO } from "../../../dto"; + +export interface ICreateInvoicePresenter { + toDTO: (invoice: Invoice) => ICreateInvoiceResponseDTO; +} + +export const createInvoicePresenter: ICreateInvoicePresenter = { + toDTO: (invoice: Invoice): ICreateInvoiceResponseDTO => ({ + id: invoice.id.toString(), + + invoice_status: invoice.status.toString(), + invoice_number: invoice.invoiceNumber.toString(), + invoice_series: invoice.invoiceSeries.toString(), + issue_date: invoice.issueDate.toDateString(), + operation_date: invoice.operationDate.toDateString(), + language_code: "es", + currency: invoice.invoiceCurrency || "EUR", + subtotal: invoice.calculateSubtotal().toPrimitive(), + total: invoice.calculateTotal().toPrimitive(), + + //sender: {}, //await InvoiceParticipantPresenter(invoice.senderId, context), + + //customer: InvoiceParticipantPresenter(invoice.recipient, context), + + //items: invoiceItemPresenter(invoice.items, context), + }), +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/index.ts b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/index.ts new file mode 100644 index 00000000..3677365d --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/create-invoice/presenter/index.ts @@ -0,0 +1 @@ +export * from "./create-invoice.presenter"; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/delete-invoice/delete-invoice.controller.ts b/modules.bak/invoices/src/server/presentation/controllers/delete-invoice/delete-invoice.controller.ts similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/delete-invoice/delete-invoice.controller.ts rename to modules.bak/invoices/src/server/presentation/controllers/delete-invoice/delete-invoice.controller.ts diff --git a/apps/server/src/contexts/invoices/presentation/controllers/delete-invoice/index.ts b/modules.bak/invoices/src/server/presentation/controllers/delete-invoice/index.ts similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/delete-invoice/index.ts rename to modules.bak/invoices/src/server/presentation/controllers/delete-invoice/index.ts diff --git a/modules.bak/invoices/src/server/presentation/controllers/get-invoice/get-invoice.controller.ts b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/get-invoice.controller.ts new file mode 100644 index 00000000..67e1964d --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/get-invoice.controller.ts @@ -0,0 +1,44 @@ +import { GetInvoiceUseCase } from "@contexts/invoices/application"; +import { UniqueID } from "core/common/domain"; +import { ExpressController } from "core/common/presentation"; +import { IGetInvoicePresenter } from "./presenter"; + +export class GetInvoiceController extends ExpressController { + public constructor( + private readonly getInvoice: GetInvoiceUseCase, + private readonly presenter: IGetInvoicePresenter + ) { + super(); + } + + protected async executeImpl() { + const { invoiceId } = this.req.params; + + // Validar ID + const invoiceIdOrError = UniqueID.create(invoiceId); + if (invoiceIdOrError.isFailure) return this.invalidInputError("Invoice ID not valid"); + + const invoiceOrError = await this.getInvoice.execute(invoiceIdOrError.data); + + if (invoiceOrError.isFailure) { + return this.handleError(invoiceOrError.error); + } + + return this.ok(this.presenter.toDTO(invoiceOrError.data)); + } + + private handleError(error: Error) { + const message = error.message; + + if ( + message.includes("Database connection lost") || + message.includes("Database request timed out") + ) { + return this.unavailableError( + "Database service is currently unavailable. Please try again later." + ); + } + + return this.conflictError(message); + } +} diff --git a/modules.bak/invoices/src/server/presentation/controllers/get-invoice/index.ts b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/index.ts new file mode 100644 index 00000000..53c8898f --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/index.ts @@ -0,0 +1,16 @@ +import { GetInvoiceUseCase } from "@contexts/invoices/application"; +import { InvoiceService } from "@contexts/invoices/domain"; +import { invoiceRepository } from "@contexts/invoices/intrastructure"; +import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { GetInvoiceController } from "./get-invoice.controller"; +import { getInvoicePresenter } from "./presenter"; + +export const buildGetInvoiceController = () => { + const transactionManager = new SequelizeTransactionManager(); + const invoiceService = new InvoiceService(invoiceRepository); + + const useCase = new GetInvoiceUseCase(invoiceService, transactionManager); + const presenter = getInvoicePresenter; + + return new GetInvoiceController(useCase, presenter); +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/InvoiceItem.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/InvoiceItem.presenter.ts new file mode 100644 index 00000000..3177298b --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/InvoiceItem.presenter.ts @@ -0,0 +1,19 @@ +import { InvoiceItem } from "@/contexts/invoicing/domain/InvoiceItems"; +import { IInvoicingContext } from "@/contexts/invoicing/intrastructure/InvoicingContext"; +import { ICollection, IMoney_Response_DTO } from "@shared/contexts"; + +export const invoiceItemPresenter = ( + items: ICollection, + context: IInvoicingContext +) => + items.totalCount > 0 + ? items.items.map((item: InvoiceItem) => ({ + description: item.description.toString(), + quantity: item.quantity.toString(), + unit_measure: "", + unit_price: item.unitPrice.toPrimitive() as IMoney_Response_DTO, + subtotal: item.calculateSubtotal().toPrimitive() as IMoney_Response_DTO, + tax_amount: item.calculateTaxAmount().toPrimitive() as IMoney_Response_DTO, + total: item.calculateTotal().toPrimitive() as IMoney_Response_DTO, + })) + : []; diff --git a/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/InvoiceParticipant.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/InvoiceParticipant.presenter.ts new file mode 100644 index 00000000..635aa696 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/InvoiceParticipant.presenter.ts @@ -0,0 +1,26 @@ +import { IInvoiceParticipant } from "@/contexts/invoicing/domain"; +import { IInvoicingContext } from "@/contexts/invoicing/intrastructure/InvoicingContext"; +import { ICreateInvoice_Participant_Response_DTO } from "@shared/contexts"; +import { InvoiceParticipantAddressPresenter } from "./InvoiceParticipantAddress.presenter"; + +export const InvoiceParticipantPresenter = async ( + participant: IInvoiceParticipant, + context: IInvoicingContext, +): Promise => { + return { + id: participant.id.toString(), + tin: participant.tin.toString(), + first_name: participant.firstName.toString(), + last_name: participant.lastName.toString(), + company_name: participant.companyName.toString(), + + billing_address: await InvoiceParticipantAddressPresenter( + participant.billingAddress!, + context, + ), + shipping_address: await InvoiceParticipantAddressPresenter( + participant.shippingAddress!, + context, + ), + }; +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/InvoiceParticipantAddress.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/InvoiceParticipantAddress.presenter.ts new file mode 100644 index 00000000..15478c1b --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/InvoiceParticipantAddress.presenter.ts @@ -0,0 +1,19 @@ +import { InvoiceParticipantAddress } from "@/contexts/invoicing/domain"; +import { IInvoicingContext } from "@/contexts/invoicing/intrastructure/InvoicingContext"; +import { ICreateInvoice_AddressParticipant_Response_DTO } from "@shared/contexts"; + +export const InvoiceParticipantAddressPresenter = async ( + address: InvoiceParticipantAddress, + context: IInvoicingContext, +): Promise => { + return { + id: address.id.toString(), + street: address.street.toString(), + city: address.city.toString(), + postal_code: address.postalCode.toString(), + province: address.province.toString(), + country: address.country.toString(), + email: address.email.toString(), + phone: address.phone.toString(), + }; +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/get-invoice.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/get-invoice.presenter.ts new file mode 100644 index 00000000..1598ac79 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/get-invoice.presenter.ts @@ -0,0 +1,59 @@ +import { Invoice, InvoiceItem } from "@contexts/invoices/domain"; +import { IGetInvoiceResponseDTO } from "../../../dto"; + +export interface IGetInvoicePresenter { + toDTO: (invoice: Invoice) => IGetInvoiceResponseDTO; +} + +export const getInvoicePresenter: IGetInvoicePresenter = { + toDTO: (invoice: Invoice): IGetInvoiceResponseDTO => ({ + id: invoice.id.toPrimitive(), + + invoice_status: invoice.status.toString(), + invoice_number: invoice.invoiceNumber.toString(), + invoice_series: invoice.invoiceSeries.toString(), + issue_date: invoice.issueDate.toDateString(), + operation_date: invoice.operationDate.toDateString(), + language_code: "ES", + currency: invoice.invoiceCurrency.toString(), + subtotal: invoice.calculateSubtotal().toPrimitive(), + total: invoice.calculateTotal().toPrimitive(), + + items: + invoice.items.size() > 0 + ? invoice.items.map((item: InvoiceItem) => ({ + description: item.description.toString(), + quantity: item.quantity.toPrimitive(), + unit_measure: "", + unit_price: item.unitPrice.toPrimitive(), + subtotal: item.calculateSubtotal().toPrimitive(), + //tax_amount: item.calculateTaxAmount().toPrimitive(), + total: item.calculateTotal().toPrimitive(), + })) + : [], + + //sender: {}, //await InvoiceParticipantPresenter(invoice.senderId, context), + + /*recipient: await InvoiceParticipantPresenter(invoice.recipient, context), + items: invoiceItemPresenter(invoice.items, context), + + payment_term: { + payment_type: "", + due_date: "", + }, + + due_amount: { + currency: invoice.currency.toString(), + precision: 2, + amount: 0, + }, + + custom_fields: [], + + metadata: { + create_time: "", + last_updated_time: "", + delete_time: "", + },*/ + }), +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/index.ts b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/index.ts new file mode 100644 index 00000000..60624c19 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/get-invoice/presenter/index.ts @@ -0,0 +1 @@ +export * from "./get-invoice.presenter"; diff --git a/modules.bak/invoices/src/server/presentation/controllers/index.ts b/modules.bak/invoices/src/server/presentation/controllers/index.ts new file mode 100644 index 00000000..70c32af4 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/index.ts @@ -0,0 +1,5 @@ +export * from "./create-invoice"; +//export * from "./delete-invoice"; +export * from "./get-invoice"; +export * from "./list-invoices"; +//export * from "./update-invoice"; diff --git a/modules.bak/invoices/src/server/presentation/controllers/list-invoices/index.ts b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/index.ts new file mode 100644 index 00000000..775666b7 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/index.ts @@ -0,0 +1,16 @@ +import { invoiceRepository } from "@contexts/invoices/intrastructure"; +import { SequelizeTransactionManager } from "core/common/infrastructure"; +import { ListInvoicesUseCase } from "../../../application"; +import { InvoiceService } from "../../../domain"; +import { ListInvoicesController } from "./list-invoices.controller"; +import { listInvoicesPresenter } from "./presenter"; + +export const buildListInvoicesController = () => { + const transactionManager = new SequelizeTransactionManager(); + const invoiceService = new InvoiceService(invoiceRepository); + + const useCase = new ListInvoicesUseCase(invoiceService, transactionManager); + const presenter = listInvoicesPresenter; + + return new ListInvoicesController(useCase, presenter); +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/list-invoices/list-invoices.controller.ts b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/list-invoices.controller.ts new file mode 100644 index 00000000..64a69032 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/list-invoices.controller.ts @@ -0,0 +1,47 @@ +import { ListInvoicesUseCase } from "@contexts/invoices/application"; +import { ExpressController } from "core/common/presentation"; +import { IListInvoicesPresenter } from "./list-invoices.presenter"; + +export class ListInvoicesController extends ExpressController { + public constructor( + private readonly listInvoices: ListInvoicesUseCase, + private readonly presenter: IListInvoicesPresenter + ) { + super(); + } + + protected async executeImpl() { + const { query } = this.req; + //const queryCriteria: IQueryCriteria = QueryCriteriaService.parse(query); + + const invoicesOrError = await this.listInvoices.execute(/* queryCriteria */); + + if (invoicesOrError.isFailure) { + return this.handleError(invoicesOrError.error); + } + + return this.ok( + this.presenter.toDTO( + invoicesOrError.data /*, { + page: queryCriteria.pagination.offset, + limit: queryCriteria.pagination.limit, + }*/ + ) + ); + } + + private handleError(error: Error) { + const message = error.message; + + if ( + message.includes("Database connection lost") || + message.includes("Database request timed out") + ) { + return this.unavailableError( + "Database service is currently unavailable. Please try again later." + ); + } + + return this.conflictError(message); + } +} diff --git a/modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/InvoiceParticipant.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/InvoiceParticipant.presenter.ts new file mode 100644 index 00000000..a6030b13 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/InvoiceParticipant.presenter.ts @@ -0,0 +1,22 @@ +import { IInvoiceParticipant } from "@/contexts/invoicing/domain"; +import { IListInvoice_Participant_Response_DTO } from "@shared/contexts"; +import { InvoiceParticipantAddressPresenter } from "./InvoiceParticipantAddress.presenter"; + +export const InvoiceParticipantPresenter = ( + participant: IInvoiceParticipant, +): IListInvoice_Participant_Response_DTO => { + return { + participant_id: participant?.id?.toString(), + tin: participant?.tin?.toString(), + first_name: participant?.firstName?.toString(), + last_name: participant?.lastName?.toString(), + company_name: participant?.companyName?.toString(), + + billing_address: InvoiceParticipantAddressPresenter( + participant?.billingAddress!, + ), + shipping_address: InvoiceParticipantAddressPresenter( + participant?.shippingAddress!, + ), + }; +}; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/InvoiceParticipantAddress.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/InvoiceParticipantAddress.presenter.ts similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/list-invoices/presenter/InvoiceParticipantAddress.presenter.ts rename to modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/InvoiceParticipantAddress.presenter.ts diff --git a/modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/index.ts b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/index.ts new file mode 100644 index 00000000..9ecb5c89 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/index.ts @@ -0,0 +1 @@ +export * from "./list-invoices.presenter"; diff --git a/modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/list-invoices.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/list-invoices.presenter.ts new file mode 100644 index 00000000..40f58c3f --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/list-invoices/presenter/list-invoices.presenter.ts @@ -0,0 +1,31 @@ +import { Invoice } from "@contexts/invoices/domain"; +import { IListInvoicesResponseDTO } from "@contexts/invoices/presentation/dto"; +import { Collection } from "core/common/helpers"; + +export interface IListInvoicesPresenter { + toDTO: (invoices: Collection) => IListInvoicesResponseDTO[]; +} + +export const listInvoicesPresenter: IListInvoicesPresenter = { + toDTO: (invoices: Collection): IListInvoicesResponseDTO[] => { + return invoices.map((invoice) => { + const result = { + id: invoice.id.toPrimitive(), + + invoice_status: invoice.status.toString(), + invoice_number: invoice.invoiceNumber.toString(), + invoice_series: invoice.invoiceSeries.toString(), + issue_date: invoice.issueDate.toISOString(), + operation_date: invoice.operationDate.toISOString(), + language_code: "ES", + currency: invoice.currency, + subtotal: invoice.calculateSubtotal().toPrimitive(), + total: invoice.calculateTotal().toPrimitive(), + + //recipient: InvoiceParticipantPresenter(invoice.recipient), + }; + + return result; + }); + }, +}; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/index.ts b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/index.ts similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/update-invoice/index.ts rename to modules.bak/invoices/src/server/presentation/controllers/update-invoice/index.ts diff --git a/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/InvoiceItem.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/InvoiceItem.presenter.ts new file mode 100644 index 00000000..3177298b --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/InvoiceItem.presenter.ts @@ -0,0 +1,19 @@ +import { InvoiceItem } from "@/contexts/invoicing/domain/InvoiceItems"; +import { IInvoicingContext } from "@/contexts/invoicing/intrastructure/InvoicingContext"; +import { ICollection, IMoney_Response_DTO } from "@shared/contexts"; + +export const invoiceItemPresenter = ( + items: ICollection, + context: IInvoicingContext +) => + items.totalCount > 0 + ? items.items.map((item: InvoiceItem) => ({ + description: item.description.toString(), + quantity: item.quantity.toString(), + unit_measure: "", + unit_price: item.unitPrice.toPrimitive() as IMoney_Response_DTO, + subtotal: item.calculateSubtotal().toPrimitive() as IMoney_Response_DTO, + tax_amount: item.calculateTaxAmount().toPrimitive() as IMoney_Response_DTO, + total: item.calculateTotal().toPrimitive() as IMoney_Response_DTO, + })) + : []; diff --git a/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/InvoiceParticipant.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/InvoiceParticipant.presenter.ts new file mode 100644 index 00000000..b416c7ba --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/InvoiceParticipant.presenter.ts @@ -0,0 +1,26 @@ +import { IInvoiceParticipant } from "@/contexts/invoicing/domain"; +import { IInvoicingContext } from "@/contexts/invoicing/intrastructure/InvoicingContext"; +import { IUpdateInvoice_Participant_Response_DTO } from "@shared/contexts"; +import { InvoiceParticipantAddressPresenter } from "./InvoiceParticipantAddress.presenter"; + +export const InvoiceParticipantPresenter = ( + participant: IInvoiceParticipant, + context: IInvoicingContext, +): IUpdateInvoice_Participant_Response_DTO | undefined => { + return { + id: participant.id.toString(), + tin: participant.tin.toString(), + first_name: participant.firstName.toString(), + last_name: participant.lastName.toString(), + company_name: participant.companyName.toString(), + + billing_address: InvoiceParticipantAddressPresenter( + participant.billingAddress!, + context, + ), + shipping_address: InvoiceParticipantAddressPresenter( + participant.shippingAddress!, + context, + ), + }; +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/InvoiceParticipantAddress.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/InvoiceParticipantAddress.presenter.ts new file mode 100644 index 00000000..376d491f --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/InvoiceParticipantAddress.presenter.ts @@ -0,0 +1,19 @@ +import { InvoiceParticipantAddress } from "@/contexts/invoicing/domain"; +import { IInvoicingContext } from "@/contexts/invoicing/intrastructure/InvoicingContext"; +import { IUpdateInvoice_AddressParticipant_Response_DTO } from "@shared/contexts"; + +export const InvoiceParticipantAddressPresenter = ( + address: InvoiceParticipantAddress, + context: IInvoicingContext, +): IUpdateInvoice_AddressParticipant_Response_DTO => { + return { + id: address.id.toString(), + street: address.street.toString(), + city: address.city.toString(), + postal_code: address.postalCode.toString(), + province: address.province.toString(), + country: address.country.toString(), + email: address.email.toString(), + phone: address.phone.toString(), + }; +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/UpdateInvoice.presenter.ts b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/UpdateInvoice.presenter.ts new file mode 100644 index 00000000..bd0a9815 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/UpdateInvoice.presenter.ts @@ -0,0 +1,33 @@ +import { Invoice } from "@/contexts/invoicing/domain"; +import { IInvoicingContext } from "@/contexts/invoicing/intrastructure/InvoicingContext"; +import { IUpdateInvoice_Response_DTO } from "@shared/contexts"; +import { invoiceItemPresenter } from "./InvoiceItem.presenter"; +import { InvoiceParticipantPresenter } from "./InvoiceParticipant.presenter"; + +export interface IUpdateInvoicePresenter { + map: (invoice: Invoice, context: IInvoicingContext) => IUpdateInvoice_Response_DTO; +} + +export const updateInvoicePresenter: IUpdateInvoicePresenter = { + map: (invoice: Invoice, context: IInvoicingContext): IUpdateInvoice_Response_DTO => { + return { + id: invoice.id.toString(), + + invoice_status: invoice.status.toString(), + invoice_number: invoice.invoiceNumber.toString(), + invoice_series: invoice.invoiceSeries.toString(), + issue_date: invoice.issueDate.toISO8601(), + operation_date: invoice.operationDate.toISO8601(), + language_code: invoice.language.toString(), + currency: invoice.currency.toString(), + subtotal: invoice.calculateSubtotal().toPrimitive(), + total: invoice.calculateTotal().toPrimitive(), + + //sender: {}, //await InvoiceParticipantPresenter(invoice.senderId, context), + + recipient: InvoiceParticipantPresenter(invoice.recipient, context), + + items: invoiceItemPresenter(invoice.items, context), + }; + }, +}; diff --git a/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/index.ts b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/index.ts new file mode 100644 index 00000000..88e907ef --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/presenter/index.ts @@ -0,0 +1 @@ +export * from "./UpdateInvoice.presenter"; diff --git a/apps/server/src/contexts/invoices/presentation/controllers/update-invoice/update-invoice.controller.ts b/modules.bak/invoices/src/server/presentation/controllers/update-invoice/update-invoice.controller.ts similarity index 100% rename from apps/server/src/contexts/invoices/presentation/controllers/update-invoice/update-invoice.controller.ts rename to modules.bak/invoices/src/server/presentation/controllers/update-invoice/update-invoice.controller.ts diff --git a/modules.bak/invoices/src/server/presentation/dto/index.ts b/modules.bak/invoices/src/server/presentation/dto/index.ts new file mode 100644 index 00000000..804ee569 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/dto/index.ts @@ -0,0 +1,3 @@ +export * from "./invoices.request.dto"; +export * from "./invoices.response.dto"; +export * from "./invoices.schemas"; diff --git a/modules.bak/invoices/src/server/presentation/dto/invoices.request.dto.ts b/modules.bak/invoices/src/server/presentation/dto/invoices.request.dto.ts new file mode 100644 index 00000000..6964685d --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/dto/invoices.request.dto.ts @@ -0,0 +1,37 @@ +export interface IListInvoicesRequestDTO {} + +export interface ICreateInvoiceRequestDTO { + id: string; + + invoice_number: string; + invoice_series: string; + issue_date: string; + operation_date: string; + language_code: string; + currency: string; +} + +export interface IUpdateInvoiceRequestDTO { + is_freelancer: boolean; + name: string; + trade_name: string; + tin: string; + + street: string; + city: string; + state: string; + postal_code: string; + country: string; + + email: string; + phone: string; + fax: string; + website: string; + + legal_record: string; + + default_tax: number; + lang_code: string; + currency_code: string; + logo: string; +} diff --git a/modules.bak/invoices/src/server/presentation/dto/invoices.response.dto.ts b/modules.bak/invoices/src/server/presentation/dto/invoices.response.dto.ts new file mode 100644 index 00000000..d1dddcea --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/dto/invoices.response.dto.ts @@ -0,0 +1,76 @@ +import { IMoneyDTO, IQuantityDTO } from "core/common/presentation"; + +export interface IListInvoicesResponseDTO { + id: string; + + invoice_status: string; + invoice_number: string; + invoice_series: string; + issue_date: string; + operation_date: string; + language_code: string; + currency: string; + + subtotal: IMoneyDTO; + total: IMoneyDTO; +} + +export interface IGetInvoiceResponseDTO { + id: string; + + invoice_status: string; + invoice_number: string; + invoice_series: string; + issue_date: string; + operation_date: string; + language_code: string; + currency: string; + + subtotal: IMoneyDTO; + total: IMoneyDTO; + + items: { + description: string; + quantity: IQuantityDTO; + unit_measure: string; + unit_price: IMoneyDTO; + subtotal: IMoneyDTO; + //tax_amount: IMoneyDTO; + total: IMoneyDTO; + }[]; + + //customer: +} + +export interface ICreateInvoiceResponseDTO { + id: string; + + invoice_status: string; + invoice_number: string; + invoice_series: string; + issue_date: string; + operation_date: string; + language_code: string; + currency: string; + + subtotal: IMoneyDTO; + total: IMoneyDTO; +} + +// Inferir el tipo en TypeScript desde el esquema Zod +//export type IUpdateAcccountResponseDTO = z.infer; + +export interface IUpdateInvoiceResponseDTO { + id: string; + + invoice_status: string; + invoice_number: string; + invoice_series: string; + issue_date: string; + operation_date: string; + language_code: string; + currency: string; + + subtotal: IMoneyDTO; + total: IMoneyDTO; +} diff --git a/modules.bak/invoices/src/server/presentation/dto/invoices.schemas.ts b/modules.bak/invoices/src/server/presentation/dto/invoices.schemas.ts new file mode 100644 index 00000000..e07ec582 --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/dto/invoices.schemas.ts @@ -0,0 +1,43 @@ +import { z } from "zod"; + +export const ICreateInvoiceRequestSchema = z.object({ + id: z.string().uuid(), + invoice_number: z.string().min(1), + invoice_series: z.string().min(1), + issue_date: z.string().refine((date) => { + const dateStr = z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Invalid YYYY-MM-DD format"); + return dateStr.safeParse(date).success; + }), + operation_date: z.string().refine((date) => { + const dateStr = z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Invalid YYYY-MM-DD format"); + return dateStr.safeParse(date).success; + }), + //customerId: z.string().uuid(), + lang_code: z.string().min(1), + currency_code: z.string().min(1), + + items: z + .array( + z.object({ + //id: z.string().uuid(), + description: z.string().optional(), + unit_price: z + .object({ + amount: z.number().positive(), + scale: z.number().positive(), + }) + .optional(), + quantity: z + .object({ + amount: z.number().positive(), + scale: z.number().positive(), + }) + .optional(), + }) + ) + .optional(), +}); + +export const IUpdateInvoiceRequestSchema = z.object({}); + +export const IDeleteInvoiceRequestSchema = z.object({}); diff --git a/modules.bak/invoices/src/server/presentation/index.ts b/modules.bak/invoices/src/server/presentation/index.ts new file mode 100644 index 00000000..a123289d --- /dev/null +++ b/modules.bak/invoices/src/server/presentation/index.ts @@ -0,0 +1,2 @@ +export * from "./controllers"; +export * from "./dto"; diff --git a/modules.bak/invoices/tsconfig.json b/modules.bak/invoices/tsconfig.json new file mode 100644 index 00000000..18573208 --- /dev/null +++ b/modules.bak/invoices/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "outDir": "dist", + "types": ["jest", "node"] + }, + "include": ["."], + "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"] +} diff --git a/modules.bak/invoices/turbo.json b/modules.bak/invoices/turbo.json new file mode 100644 index 00000000..52a7d7ab --- /dev/null +++ b/modules.bak/invoices/turbo.json @@ -0,0 +1,9 @@ +{ + "extends": ["//"], + "tasks": { + "build": { + "dependsOn": ["^build"], + "outputs": ["dist/**"] + } + } +} diff --git a/package.json b/package.json index 7378b82c..e38fbc4b 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "scripts": { "build": "turbo build", "dev": "turbo dev", + "dev:server": "turbo dev --filter=server", + "dev:client": "turbo dev --filter=client", "lint": "turbo lint", "format": "prettier --write \"**/*.{ts,tsx,md}\"", "ui:add": "pnpm --filter @repo/ui ui:add", @@ -15,25 +17,16 @@ "@typescript-eslint/eslint-plugin": "^8.31.0", "@typescript-eslint/parser": "^8.31.0", "eslint": "^9.25.1", - "eslint-plugin-react": "^7.37.5", "fs": "0.0.1-security", "inquirer": "^12.5.2", "path": "^0.12.7", "prettier": "^3.5.3", "ts-node": "^10.9.2", - "turbo": "^2.5.0", + "turbo": "^2.5.1", "typescript": "5.8.3" }, "engines": { "node": ">=18" }, - "volta": { - "node": "22.2.0" - }, - "packageManager": "pnpm@9.15.4", - "workspaces": [ - "apps/*", - "packages/*", - "libs/*" - ] + "packageManager": "pnpm@10.9.0" } diff --git a/apps/client/.eslintrc.js b/packages.bak/client/.eslintrc.js similarity index 100% rename from apps/client/.eslintrc.js rename to packages.bak/client/.eslintrc.js diff --git a/apps/client/.gitignore b/packages.bak/client/.gitignore similarity index 100% rename from apps/client/.gitignore rename to packages.bak/client/.gitignore diff --git a/apps/client/README.md b/packages.bak/client/README.md similarity index 100% rename from apps/client/README.md rename to packages.bak/client/README.md diff --git a/apps/client/index.html b/packages.bak/client/index.html similarity index 100% rename from apps/client/index.html rename to packages.bak/client/index.html diff --git a/apps/client/package.json b/packages.bak/client/package.json similarity index 88% rename from apps/client/package.json rename to packages.bak/client/package.json index 4def7ba0..aff5125a 100644 --- a/apps/client/package.json +++ b/packages.bak/client/package.json @@ -1,7 +1,7 @@ { - "name": "web", + "name": "client", "private": true, - "version": "0.0.0", + "version": "1.0.0", "type": "module", "scripts": { "dev": "vite", @@ -15,7 +15,7 @@ }, "devDependencies": { "@repo/eslint-config": "workspace:*", - "@repo/tsconfig": "workspace:*", + "@repo/typescript-config": "workspace:*", "@eslint/js": "^9.17.0", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", diff --git a/packages.bak/client/public/vite.svg b/packages.bak/client/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/packages.bak/client/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/client/src/App.css b/packages.bak/client/src/App.css similarity index 100% rename from apps/client/src/App.css rename to packages.bak/client/src/App.css diff --git a/apps/client/src/App.tsx b/packages.bak/client/src/App.tsx similarity index 100% rename from apps/client/src/App.tsx rename to packages.bak/client/src/App.tsx diff --git a/apps/client/src/assets/react.svg b/packages.bak/client/src/assets/react.svg similarity index 100% rename from apps/client/src/assets/react.svg rename to packages.bak/client/src/assets/react.svg diff --git a/apps/client/src/index.css b/packages.bak/client/src/index.css similarity index 100% rename from apps/client/src/index.css rename to packages.bak/client/src/index.css diff --git a/apps/client/src/main.tsx b/packages.bak/client/src/main.tsx similarity index 100% rename from apps/client/src/main.tsx rename to packages.bak/client/src/main.tsx diff --git a/apps/client/tsconfig.app.json b/packages.bak/client/tsconfig.app.json similarity index 91% rename from apps/client/tsconfig.app.json rename to packages.bak/client/tsconfig.app.json index 8872de2f..bea2ae9f 100644 --- a/apps/client/tsconfig.app.json +++ b/packages.bak/client/tsconfig.app.json @@ -22,5 +22,5 @@ "noUncheckedSideEffectImports": true }, "include": ["src"], - "extends": "@repo/tsconfig/react" + "extends": "@repo/typescript-config/react-library" } diff --git a/packages.bak/client/tsconfig.app.tsbuildinfo b/packages.bak/client/tsconfig.app.tsbuildinfo new file mode 100644 index 00000000..d92192f8 --- /dev/null +++ b/packages.bak/client/tsconfig.app.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./src/App.tsx","./src/main.tsx"],"errors":true,"version":"5.8.3"} \ No newline at end of file diff --git a/packages.bak/client/tsconfig.json b/packages.bak/client/tsconfig.json new file mode 100644 index 00000000..d32ff682 --- /dev/null +++ b/packages.bak/client/tsconfig.json @@ -0,0 +1,4 @@ +{ + "files": [], + "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }] +} diff --git a/apps/client/tsconfig.node.json b/packages.bak/client/tsconfig.node.json similarity index 92% rename from apps/client/tsconfig.node.json rename to packages.bak/client/tsconfig.node.json index 9c959d4c..c64dcfa5 100644 --- a/apps/client/tsconfig.node.json +++ b/packages.bak/client/tsconfig.node.json @@ -20,5 +20,5 @@ "noUncheckedSideEffectImports": true }, "include": ["vite.config.ts"], - "extends": "@repo/tsconfig/node" + "extends": "@repo/typescript-config/node" } diff --git a/packages.bak/client/tsconfig.node.tsbuildinfo b/packages.bak/client/tsconfig.node.tsbuildinfo new file mode 100644 index 00000000..f17a3a99 --- /dev/null +++ b/packages.bak/client/tsconfig.node.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./vite.config.ts"],"errors":true,"version":"5.8.3"} \ No newline at end of file diff --git a/apps/client/vite.config.ts b/packages.bak/client/vite.config.ts similarity index 100% rename from apps/client/vite.config.ts rename to packages.bak/client/vite.config.ts diff --git a/packages.bak/rdx-criteria/package.json b/packages.bak/rdx-criteria/package.json new file mode 100644 index 00000000..ceb6578c --- /dev/null +++ b/packages.bak/rdx-criteria/package.json @@ -0,0 +1,18 @@ +{ + "name": "@rdx/criteria", + "private": true, + "type": "module", + "scripts": { + "test": "node --import tsx --test test/*.test.ts", + "build": "tsc" + }, + "devDependencies": { + "@changesets/cli": "^2.27.5", + "@faker-js/faker": "^8.3.1", + "@repo/typescript-config": "workspace:*", + "@types/node": "^22.10.7", + "eslint-config-codely": "^3.1.4", + "tsx": "^4.13.2", + "typescript": "^5.7.3" + } +} diff --git a/libs/rdx-criteria/packages/criteria/src/criteria.ts b/packages.bak/rdx-criteria/src/criteria.ts similarity index 100% rename from libs/rdx-criteria/packages/criteria/src/criteria.ts rename to packages.bak/rdx-criteria/src/criteria.ts diff --git a/libs/rdx-criteria/packages/criteria/src/index.ts b/packages.bak/rdx-criteria/src/index.ts similarity index 100% rename from libs/rdx-criteria/packages/criteria/src/index.ts rename to packages.bak/rdx-criteria/src/index.ts diff --git a/libs/rdx-criteria/packages/criteria/src/pagination.ts/index.ts b/packages.bak/rdx-criteria/src/pagination.ts/index.ts similarity index 100% rename from libs/rdx-criteria/packages/criteria/src/pagination.ts/index.ts rename to packages.bak/rdx-criteria/src/pagination.ts/index.ts diff --git a/libs/rdx-criteria/packages/criteria/src/pagination.ts/pagination-defaults.ts b/packages.bak/rdx-criteria/src/pagination.ts/pagination-defaults.ts similarity index 100% rename from libs/rdx-criteria/packages/criteria/src/pagination.ts/pagination-defaults.ts rename to packages.bak/rdx-criteria/src/pagination.ts/pagination-defaults.ts diff --git a/packages.bak/rdx-criteria/tsconfig.json b/packages.bak/rdx-criteria/tsconfig.json new file mode 100644 index 00000000..c23cdeef --- /dev/null +++ b/packages.bak/rdx-criteria/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["."], + "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"] +} diff --git a/packages.bak/rdx-ddd-domain/package.json b/packages.bak/rdx-ddd-domain/package.json new file mode 100644 index 00000000..ce254390 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/package.json @@ -0,0 +1,38 @@ +{ + "name": "@rdx/ddd-domain", + "version": "0.0.0", + "private": true, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**" + ], + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "lint": "eslint src/", + "lint:fix": "eslint src/ --fix", + "typecheck": "tsc --noEmit", + "test": "jest" + }, + "jest": { + "preset": "@repo/jest-presets/node" + }, + "devDependencies": { + "@rdx/utils": "workspace:*", + "@repo/eslint-config": "workspace:*", + "@repo/jest-presets": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@types/dinero.js": "^1.9.4", + "jest": "^29.7.0", + "typescript": "^5.7.3" + }, + "dependencies": { + "dinero.js": "^1.9.1", + "libphonenumber-js": "^1.12.7", + "shallow-equal-object": "^1.1.1", + "uuid": "^11.1.0", + "zod": "^3.24.3" + } +} diff --git a/packages.bak/rdx-ddd-domain/src/aggregate-root-repository.interface.ts b/packages.bak/rdx-ddd-domain/src/aggregate-root-repository.interface.ts new file mode 100644 index 00000000..845c7ae7 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/aggregate-root-repository.interface.ts @@ -0,0 +1 @@ +export interface IAggregateRootRepository {} diff --git a/packages.bak/rdx-ddd-domain/src/aggregate-root.ts b/packages.bak/rdx-ddd-domain/src/aggregate-root.ts new file mode 100644 index 00000000..3255fcd1 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/aggregate-root.ts @@ -0,0 +1,38 @@ +import { DomainEntity } from "./domain-entity"; +import { IDomainEvent } from "./events"; + +export abstract class AggregateRoot extends DomainEntity { + private _domainEvents: IDomainEvent[] = []; + + private logDomainEventAdded(event: IDomainEvent): void { + const thisClass = Reflect.getPrototypeOf(this); + const domainEventClass = Reflect.getPrototypeOf(event); + logger.info( + `[Domain Event Created]: ${thisClass?.constructor.name} ==> ${domainEventClass?.constructor.name}` + ); + } + + /** + * 🔹 Agregar un evento de dominio al agregado + */ + protected addDomainEvent(event: IDomainEvent): void { + this._domainEvents.push(event); + + // Log the domain event + this.logDomainEventAdded(event); + } + + /** + * 🔹 Obtener los eventos de dominio pendientes + */ + get domainEvents(): IDomainEvent[] { + return this._domainEvents; + } + + /** + * 🔹 Limpiar la lista de eventos después de procesarlos + */ + public clearDomainEvents(): void { + this._domainEvents.splice(0, this._domainEvents.length); + } +} diff --git a/packages.bak/rdx-ddd-domain/src/domain-entity.ts b/packages.bak/rdx-ddd-domain/src/domain-entity.ts new file mode 100644 index 00000000..d7d7dcf3 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/domain-entity.ts @@ -0,0 +1,33 @@ +import { UniqueID } from "./value-objects/unique-id"; + +export abstract class DomainEntity { + protected readonly props: T; + public readonly id: UniqueID; + + protected constructor(props: T, id?: UniqueID) { + this.id = id ? id : UniqueID.generateNewID().data; + this.props = props; + } + + protected _flattenProps(props: T): { [s: string]: any } { + return Object.entries(props).reduce((result: any, [key, valueObject]) => { + console.log(key, valueObject.value); + result[key] = valueObject.value; + + return result; + }, {}); + } + + equals(other: DomainEntity): boolean { + return other instanceof DomainEntity && this.id.equals(other.id); + } + + toString(): { [s: string]: string } { + const flattenProps = this._flattenProps(this.props); + + return { + id: this.id.toString(), + ...flattenProps.map((prop: any) => String(prop)), + }; + } +} diff --git a/packages.bak/rdx-ddd-domain/src/events/domain-event-handle.ts b/packages.bak/rdx-ddd-domain/src/events/domain-event-handle.ts new file mode 100644 index 00000000..4301cdc6 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/events/domain-event-handle.ts @@ -0,0 +1,3 @@ +export interface IHandle { + setupSubscriptions(): void; +} diff --git a/packages.bak/rdx-ddd-domain/src/events/domain-event.interface.ts b/packages.bak/rdx-ddd-domain/src/events/domain-event.interface.ts new file mode 100644 index 00000000..8a2730d9 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/events/domain-event.interface.ts @@ -0,0 +1,7 @@ +import { UniqueID } from "../value-objects/unique-id"; + +export interface IDomainEvent { + eventName: string; // Nombre del evento + aggregateId: UniqueID; // ID del agregado que generó el evento + occurredAt: Date; // Fecha y hora del evento +} diff --git a/packages.bak/rdx-ddd-domain/src/events/domain-event.ts b/packages.bak/rdx-ddd-domain/src/events/domain-event.ts new file mode 100644 index 00000000..cb989292 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/events/domain-event.ts @@ -0,0 +1,135 @@ +// https://khalilstemmler.com/articles/typescript-domain-driven-design/chain-business-logic-domain-events/ + +import { AggregateRoot } from "../aggregate-root"; +import { UniqueID } from "../value-objects/unique-id"; +import { IDomainEvent } from "./domain-event.interface"; + +export class DomainEvents { + private static handlersMap: { [key: string]: Array<(event: IDomainEvent) => void> } = {}; + private static markedAggregates: AggregateRoot[] = []; + + /** + * @method markAggregateForDispatch + * @static + * @desc Called by aggregate root objects that have created domain + * events to eventually be dispatched when the infrastructure commits + * the unit of work. + */ + + public static markAggregateForDispatch(aggregate: AggregateRoot): void { + const aggregateFound = !!this.findMarkedAggregateByID(aggregate.id); + + if (!aggregateFound) { + this.markedAggregates.push(aggregate); + } + } + + /** + * @method dispatchAggregateEvents + * @static + * @private + * @desc Call all of the handlers for any domain events on this aggregate. + */ + + private static dispatchAggregateEvents(aggregate: AggregateRoot): void { + aggregate.domainEvents.forEach((event: IDomainEvent) => this.dispatch(event)); + } + + /** + * @method removeAggregateFromMarkedDispatchList + * @static + * @desc Removes an aggregate from the marked list. + */ + + private static removeAggregateFromMarkedDispatchList(aggregate: AggregateRoot): void { + const index = this.markedAggregates.findIndex((a) => a.equals(aggregate)); + + this.markedAggregates.splice(index, 1); + } + + /** + * @method findMarkedAggregateByID + * @static + * @desc Finds an aggregate within the list of marked aggregates. + */ + + private static findMarkedAggregateByID(id: UniqueID): AggregateRoot { + let found!: AggregateRoot; + + for (let aggregate of this.markedAggregates) { + if (aggregate.id.equals(id)) { + found = aggregate; + } + } + + return found; + } + + /** + * @method dispatchEventsForAggregate + * @static + * @desc When all we know is the ID of the aggregate, call this + * in order to dispatch any handlers subscribed to events on the + * aggregate. + */ + + public static dispatchEventsForAggregate(id: UniqueID): void { + const aggregate = this.findMarkedAggregateByID(id); + + if (aggregate) { + this.dispatchAggregateEvents(aggregate); + aggregate.clearDomainEvents(); + this.removeAggregateFromMarkedDispatchList(aggregate); + } + } + + /** + * @method register + * @static + * @desc Register a handler to a domain event. + */ + + public static register(callback: (event: IDomainEvent) => void, eventClassName: string): void { + if (!this.handlersMap.hasOwnProperty(eventClassName)) { + this.handlersMap[eventClassName] = []; + } + this.handlersMap[eventClassName].push(callback); + } + + /** + * @method clearHandlers + * @static + * @desc Useful for testing. + */ + + public static clearHandlers(): void { + this.handlersMap = {}; + } + + /** + * @method clearMarkedAggregates + * @static + * @desc Useful for testing. + */ + + public static clearMarkedAggregates(): void { + this.markedAggregates = []; + } + + /** + * @method dispatch + * @static + * @desc Invokes all of the subscribers to a particular domain event. + */ + + private static dispatch(event: IDomainEvent): void { + const eventClassName: string = event.constructor.name; + + if (this.handlersMap.hasOwnProperty(eventClassName)) { + const handlers: any[] = this.handlersMap[eventClassName]; + for (let handler of handlers) { + handler(event); + } + } + } +} diff --git a/packages.bak/rdx-ddd-domain/src/events/index.ts b/packages.bak/rdx-ddd-domain/src/events/index.ts new file mode 100644 index 00000000..1ba97866 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/events/index.ts @@ -0,0 +1,2 @@ +export * from "./domain-event"; +export * from "./domain-event.interface"; diff --git a/packages.bak/rdx-ddd-domain/src/index.ts b/packages.bak/rdx-ddd-domain/src/index.ts new file mode 100644 index 00000000..8f115f96 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/index.ts @@ -0,0 +1,5 @@ +export * from "./aggregate-root"; +export * from "./aggregate-root-repository.interface"; +export * from "./domain-entity"; +export * from "./events/domain-event.interface"; +export * from "./value-objects"; diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/email-address.test.ts b/packages.bak/rdx-ddd-domain/src/value-objects/email-address.test.ts new file mode 100644 index 00000000..20b59573 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/email-address.test.ts @@ -0,0 +1,61 @@ +import { EmailAddress } from "./email-address"; + +describe("EmailAddress Value Object", () => { + it("should create a valid email", () => { + const result = EmailAddress.create("user@example.com"); + + expect(result.isSuccess).toBe(true); + expect(result.data.getValue()).toBe("user@example.com"); + }); + + it("should return an error for invalid email format", () => { + const result = EmailAddress.create("invalid-email"); + + expect(result.isFailure).toBe(true); + expect(result.error.message).toBe("Invalid email format"); + }); + + it("should allow null email", () => { + const result = EmailAddress.createNullable(); + expect(result.isSuccess).toBe(true); + expect(result.data.getOrUndefined()).toBeUndefined(); + }); + + it("should return an error for empty string", () => { + const result = EmailAddress.create(""); + + expect(result.isSuccess).toBe(false); + }); + + it("should compare two equal email objects correctly", () => { + const email1 = EmailAddress.create("test@example.com"); + const email2 = EmailAddress.create("test@example.com"); + + expect(email1.isSuccess).toBe(true); + expect(email2.isSuccess).toBe(true); + expect(email1.data.equals(email2.data)).toBe(true); + }); + + it("should compare two different email objects as not equal", () => { + const email1 = EmailAddress.create("test@example.com"); + const email2 = EmailAddress.create("other@example.com"); + + expect(email1.isSuccess).toBe(true); + expect(email2.isSuccess).toBe(true); + expect(email1.data.equals(email2.data)).toBe(false); + }); + + it("should detect empty email correctly", () => { + const email = EmailAddress.createNullable(); + + expect(email.isSuccess).toBe(true); + expect(email.data.isSome()).toBe(false); + }); + + it("should detect non-empty email correctly", () => { + const email = EmailAddress.create("test@example.com"); + + expect(email.isSuccess).toBe(true); + expect(email.data.getValue()).toBe("test@example.com"); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/email-address.ts b/packages.bak/rdx-ddd-domain/src/value-objects/email-address.ts new file mode 100644 index 00000000..5c1f7db3 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/email-address.ts @@ -0,0 +1,55 @@ +import { Result } from "@rdx/utils"; +import { z } from "zod"; +import { ValueObject } from "./value-object"; + +interface EmailAddressProps { + value: string; +} + +export class EmailAddress extends ValueObject { + static create(value: string): Result { + const valueIsValid = EmailAddress.validate(value); + + if (!valueIsValid.success) { + return Result.fail(new Error(valueIsValid.error.errors[0]?.message)); + } + return Result.ok(new EmailAddress({ value: valueIsValid.data! })); + } + + static createNullable(value?: string): Result, Error> { + if (!value || value.trim() === "") { + return Result.ok(Maybe.none()); + } + + return EmailAddress.create(value!).map((value) => Maybe.some(value)); + } + + private static validate(value: string) { + const schema = z.string().email({ message: "Invalid email format" }); + return schema.safeParse(value); + } + + getLocalPart(): string { + return this.props.value.split("@")[0] ?? ""; + } + + getDomain(): string { + return this.props.value.split("@")[1] ?? ""; + } + + getDomainExtension(): string { + return this.getDomain().split(".")[1] ?? ""; + } + + getDomainName(): string { + return this.getDomain().split(".")[0] ?? ""; + } + + getValue(): string { + return this.props.value; + } + + toPrimitive() { + return this.getValue(); + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/index.ts b/packages.bak/rdx-ddd-domain/src/value-objects/index.ts new file mode 100644 index 00000000..5d341ab4 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/index.ts @@ -0,0 +1,12 @@ +export * from "./email-address"; +export * from "./money-value"; +export * from "./name"; +export * from "./percentage"; +export * from "./phone-number"; +export * from "./postal-address"; +export * from "./quantity"; +export * from "./slug"; +export * from "./tin-number"; +export * from "./unique-id"; +export * from "./utc-date"; +export * from "./value-object"; diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/money-value.test.ts b/packages.bak/rdx-ddd-domain/src/value-objects/money-value.test.ts new file mode 100644 index 00000000..c990fb25 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/money-value.test.ts @@ -0,0 +1,54 @@ +import { MoneyValue } from "./money-value"; + +describe("MoneyValue", () => { + test("should correctly instantiate with amount, scale, and currency", () => { + const money = new MoneyValue({ amount: 10000, scale: 2, currency_code: "EUR" }); + expect(money.amount).toBe(100); + expect(money.currency).toBe("EUR"); + expect(money.scale).toBe(2); + }); + + test("should add two MoneyValue instances with the same currency", () => { + const money1 = new MoneyValue({ amount: 10000, scale: 2, currency_code: "EUR" }); + const money2 = new MoneyValue({ amount: 5000, scale: 2, currency_code: "EUR" }); + const result = money1.add(money2); + expect(result.amount).toBe(150); + }); + + test("should subtract two MoneyValue instances with the same currency", () => { + const money1 = new MoneyValue({ amount: 20000, scale: 2, currency_code: "EUR" }); + const money2 = new MoneyValue({ amount: 5000, scale: 2, currency_code: "EUR" }); + const result = money1.subtract(money2); + expect(result.amount).toBe(150); + }); + + test("should throw an error when adding different currencies", () => { + const money1 = new MoneyValue({ amount: 10000, scale: 2, currency_code: "EUR" }); + const money2 = new MoneyValue({ amount: 5000, scale: 2, currency_code: "USD" }); + expect(() => money1.add(money2)).toThrow( + "You must provide a Dinero instance with the same currency" + ); + }); + + test("should correctly convert scale", () => { + const money = new MoneyValue({ amount: 10000, scale: 2, currency_code: "EUR" }); + const converted = money.convertScale(4); + expect(converted.amount).toBe(100); + expect(converted.scale).toBe(4); + }); + + test("should format correctly according to locale", () => { + const money = new MoneyValue({ amount: 123456, scale: 2, currency_code: "EUR" }); + expect(money.format("en-US")).toBe("€1,234.56"); + }); + + test("should compare MoneyValue instances correctly", () => { + const money1 = new MoneyValue({ amount: 10000, scale: 2, currency_code: "EUR" }); + const money2 = new MoneyValue({ amount: 10000, scale: 2, currency_code: "EUR" }); + const money3 = new MoneyValue({ amount: 5000, scale: 2, currency_code: "EUR" }); + + expect(money1.equalsTo(money2)).toBe(true); + expect(money1.greaterThan(money3)).toBe(true); + expect(money3.lessThan(money1)).toBe(true); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/money-value.ts b/packages.bak/rdx-ddd-domain/src/value-objects/money-value.ts new file mode 100644 index 00000000..a86bb443 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/money-value.ts @@ -0,0 +1,216 @@ +import { Result } from "@rdx/utils"; +import DineroFactory, { Currency, Dinero } from "dinero.js"; +import { Percentage } from "./percentage"; +import { Quantity } from "./quantity"; +import { ValueObject } from "./value-object"; + +const DEFAULT_SCALE = 2; +const DEFAULT_CURRENCY_CODE = "EUR"; + +type CurrencyData = Currency; + +export type RoundingMode = + | "HALF_ODD" + | "HALF_EVEN" + | "HALF_UP" + | "HALF_DOWN" + | "HALF_TOWARDS_ZERO" + | "HALF_AWAY_FROM_ZERO" + | "DOWN"; + +interface IMoneyValueProps { + amount: number; + scale?: number; + currency_code?: string; +} + +interface IMoneyValue { + amount: number; + scale: number; + currency: Dinero.Currency; + + getValue(): IMoneyValueProps; + convertScale(newScale: number): MoneyValue; + add(addend: MoneyValue): MoneyValue; + subtract(subtrahend: MoneyValue): MoneyValue; + multiply(multiplier: number | Quantity, roundingMode?: RoundingMode): MoneyValue; + divide(divisor: number, roundingMode?: RoundingMode): MoneyValue; + percentage(percentage: number, roundingMode?: RoundingMode): MoneyValue; + equalsTo(comparator: MoneyValue): boolean; + greaterThan(comparator: MoneyValue): boolean; + lessThan(comparator: MoneyValue): boolean; + isZero(): boolean; + isPositive(): boolean; + isNegative(): boolean; + hasSameCurrency(comparator: MoneyValue): boolean; + hasSameAmount(comparator: MoneyValue): boolean; + format(locale: string): string; +} + +export class MoneyValue extends ValueObject implements IMoneyValue { + private readonly dinero: Dinero; + + static create(props: IMoneyValueProps) { + return Result.ok(new MoneyValue(props)); + } + + constructor(props: IMoneyValueProps) { + super(props); + const { amount, scale, currency_code } = props; + this.dinero = Object.freeze( + DineroFactory({ + amount, + precision: scale || DEFAULT_SCALE, + currency: (currency_code as Currency) || DEFAULT_CURRENCY_CODE, + }) + ); // 🔒 Garantiza inmutabilidad + } + + get amount(): number { + return this.dinero.getAmount() / Math.pow(10, this.dinero.getPrecision()); + } + + get currency(): CurrencyData { + return this.dinero.getCurrency(); + } + + get scale(): number { + return this.dinero.getPrecision(); + } + + getValue(): IMoneyValueProps { + return this.props; + } + + /** Serializa el VO a una cadena del tipo "EUR:123400:2" */ + toPersistence(): string { + return `${this.currency}:${this.dinero.getAmount()}:${this.scale}`; + } + + /** Reconstruye el VO desde la cadena persistida */ + static fromPersistence(value: string): MoneyValue { + const [currencyCode, amountStr, scaleStr] = value.split(":"); + const amount = parseInt(amountStr ?? "", 10); + const scale = parseInt(scaleStr ?? "", 10); + const currency = currencyCode; + return new MoneyValue({ amount, scale, currency_code: currency }); + } + + toPrimitive() { + return { + amount: this.amount, + scale: this.scale, + currency_code: this.currency, + }; + } + + convertScale(newScale: number, roundingMode: RoundingMode = "HALF_UP"): MoneyValue { + const _newDinero = this.dinero.convertPrecision(newScale, roundingMode); + return new MoneyValue({ + amount: _newDinero.getAmount(), + scale: _newDinero.getPrecision(), + currency_code: _newDinero.getCurrency(), + }); + } + + add(addend: MoneyValue): MoneyValue { + return new MoneyValue({ + amount: this.dinero.add(addend.dinero).getAmount(), + scale: this.scale, + currency_code: this.currency, + }); + } + + subtract(subtrahend: MoneyValue): MoneyValue { + return new MoneyValue({ + amount: this.dinero.subtract(subtrahend.dinero).getAmount(), + scale: this.scale, + currency_code: this.currency, + }); + } + + multiply(multiplier: number | Quantity, roundingMode?: RoundingMode): MoneyValue { + const _multiplier = typeof multiplier === "number" ? multiplier : multiplier.toNumber(); + + const _newDinero = this.dinero.multiply(_multiplier, roundingMode); + return new MoneyValue({ + amount: _newDinero.getAmount(), + scale: _newDinero.getPrecision(), + currency_code: _newDinero.getCurrency(), + }); + } + + divide(divisor: number | Quantity, roundingMode?: RoundingMode): MoneyValue { + const _divisor = typeof divisor === "number" ? divisor : divisor.toNumber(); + + const _newDinero = this.dinero.divide(_divisor, roundingMode); + return new MoneyValue({ + amount: _newDinero.getAmount(), + scale: _newDinero.getPrecision(), + currency_code: _newDinero.getCurrency(), + }); + } + + percentage(percentage: number | Percentage, roundingMode?: RoundingMode): MoneyValue { + const _percentage = typeof percentage === "number" ? percentage : percentage.toNumber(); + + const _newDinero = this.dinero.percentage(_percentage, roundingMode); + return new MoneyValue({ + amount: _newDinero.getAmount(), + scale: _newDinero.getPrecision(), + currency_code: _newDinero.getCurrency(), + }); + } + + equalsTo(comparator: MoneyValue): boolean { + return this.dinero.equalsTo(comparator.dinero); + } + + greaterThan(comparator: MoneyValue): boolean { + return this.dinero.greaterThan(comparator.dinero); + } + + lessThan(comparator: MoneyValue): boolean { + return this.dinero.lessThan(comparator.dinero); + } + + isZero(): boolean { + return this.dinero.isZero(); + } + + isPositive(): boolean { + return this.amount > 0; + } + + isNegative(): boolean { + return this.amount < 0; + } + + hasSameCurrency(comparator: MoneyValue): boolean { + return this.dinero.hasSameCurrency(comparator.dinero); + } + + hasSameAmount(comparator: MoneyValue): boolean { + return this.dinero.hasSameAmount(comparator.dinero); + } + + /** + * Devuelve una cadena con el importe formateado. + * Ejemplo: 123456 -> €1,234.56 + * @param locale Código de idioma y país (ej. "es-ES") + * @returns Importe formateado + */ + format(locale: string): string { + const amount = this.amount; + const currency = this.currency; + const scale = this.scale; + + return new Intl.NumberFormat(locale, { + style: "currency", + currency: currency, + minimumFractionDigits: scale, + maximumFractionDigits: scale, + useGrouping: true, + }).format(amount); + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/name.spec.ts b/packages.bak/rdx-ddd-domain/src/value-objects/name.spec.ts new file mode 100644 index 00000000..0557f757 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/name.spec.ts @@ -0,0 +1,41 @@ +import { Name } from "./name"; + +describe("Name Value Object", () => { + test("Debe crear un Name válido", () => { + const nameResult = Name.create("John Doe"); + expect(nameResult.isSuccess).toBe(true); + expect(nameResult.data.getValue()).toBe("John Doe"); + }); + + test("Debe fallar si el nombre excede los 255 caracteres", () => { + const longName = "A".repeat(256); + const nameResult = Name.create(longName); + expect(nameResult.isSuccess).toBe(false); + expect(nameResult.error).toBeInstanceOf(Error); + }); + + test("Debe permitir un Name nullable vacío", () => { + const nullableNameResult = Name.createNullable(""); + expect(nullableNameResult.isSuccess).toBe(true); + expect(nullableNameResult.data.isSome()).toBe(false); + }); + + test("Debe permitir un Name nullable con un valor válido", () => { + const nullableNameResult = Name.createNullable("Alice"); + expect(nullableNameResult.isSuccess).toBe(true); + expect(nullableNameResult.data.isSome()).toBe(true); + expect(nullableNameResult.data.getOrUndefined()?.toString()).toBe("Alice"); + }); + + test("Debe generar acrónimos correctamente", () => { + expect(Name.generateAcronym("John Doe")).toBe("JDXX"); + expect(Name.generateAcronym("Alice Bob Charlie")).toBe("ABCX"); + expect(Name.generateAcronym("A B C D E")).toBe("ABCD"); + expect(Name.generateAcronym("SingleWord")).toBe("SXXX"); + }); + + test("Debe obtener el acrónimo de una instancia de Name", () => { + const name = Name.create("John Doe").data; + expect(name.getAcronym()).toBe("JDXX"); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/name.ts b/packages.bak/rdx-ddd-domain/src/value-objects/name.ts new file mode 100644 index 00000000..bd2ab175 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/name.ts @@ -0,0 +1,62 @@ +import { Maybe, Result } from "@rdx/utils"; +import { z } from "zod"; +import { ValueObject } from "./value-object"; + +interface INameProps { + value: string; +} + +export class Name extends ValueObject { + private static readonly MAX_LENGTH = 255; + + protected static validate(value: string) { + const schema = z + .string() + .trim() + .max(Name.MAX_LENGTH, { message: `Name must be at most ${Name.MAX_LENGTH} characters long` }); + return schema.safeParse(value); + } + + static create(value: string) { + const valueIsValid = Name.validate(value); + + if (!valueIsValid.success) { + return Result.fail(new Error(valueIsValid.error.errors[0]?.message)); + } + return Result.ok(new Name({ value })); + } + + static createNullable(value?: string): Result, Error> { + if (!value || value.trim() === "") { + return Result.ok(Maybe.none()); + } + + return Name.create(value!).map((value) => Maybe.some(value)); + } + + static generateAcronym(name: string): string { + const words = name.split(" ").map((word) => word[0]?.toUpperCase()); + let acronym = words.join(""); + + // Asegurarse de que tenga 4 caracteres, recortando o añadiendo letras + if (acronym.length > 4) { + acronym = acronym.slice(0, 4); + } else if (acronym.length < 4) { + acronym = acronym.padEnd(4, "X"); // Se completa con 'X' si es necesario + } + + return acronym; + } + + getAcronym(): string { + return Name.generateAcronym(this.toString()); + } + + getValue(): string { + return this.props.value; + } + + toPrimitive() { + return this.getValue(); + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/percentage.test.ts b/packages.bak/rdx-ddd-domain/src/value-objects/percentage.test.ts new file mode 100644 index 00000000..8b89ec03 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/percentage.test.ts @@ -0,0 +1,51 @@ +import { Percentage } from "./percentage"; // Ajusta la ruta según sea necesario + +describe("Percentage Value Object", () => { + test("Debe crear un porcentaje válido con escala por defecto", () => { + const result = Percentage.create({ amount: 200 }); // 2.00% + expect(result.isSuccess).toBe(true); + expect(result.data?.toString()).toBe("2.00%"); + }); + + test("Debe crear un porcentaje válido con escala definida", () => { + const result = Percentage.create({ amount: 2150, scale: 2 }); // 21.50% + expect(result.isSuccess).toBe(true); + expect(result.data?.toString()).toBe("21.50%"); + }); + + test("Debe devolver error si la cantidad supera el 100%", () => { + const result = Percentage.create({ amount: 48732000, scale: 4 }); + expect(result.isSuccess).toBe(false); + expect(result.error.message).toBe("La escala debe estar entre 0 y 2."); + }); + + test("Debe devolver error si la cantidad es negativa", () => { + const result = Percentage.create({ amount: -100, scale: 2 }); + expect(result.isSuccess).toBe(false); + expect(result.error.message).toContain("La cantidad no puede ser negativa."); + }); + + test("Debe devolver error si la escala es menor a 0", () => { + const result = Percentage.create({ amount: 100, scale: -1 }); + expect(result.isSuccess).toBe(false); + expect(result.error.message).toContain("Number must be greater than or equal to 0"); + }); + + test("Debe devolver error si la escala es mayor a 10", () => { + const result = Percentage.create({ amount: 100, scale: 11 }); + expect(result.isSuccess).toBe(false); + expect(result.error.message).toContain("La escala debe estar entre 0 y 2."); + }); + + test("Debe representar correctamente el valor como string", () => { + const result = Percentage.create({ amount: 750, scale: 2 }); // 7.50% + expect(result.isSuccess).toBe(true); + expect(result.data?.toString()).toBe("7.50%"); + }); + + test("Debe manejar correctamente el caso de 0%", () => { + const result = Percentage.create({ amount: 0, scale: 2 }); + expect(result.isSuccess).toBe(true); + expect(result.data?.toString()).toBe("0.00%"); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/percentage.ts b/packages.bak/rdx-ddd-domain/src/value-objects/percentage.ts new file mode 100644 index 00000000..a69f5d69 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/percentage.ts @@ -0,0 +1,87 @@ +import { Result } from "@rdx/utils"; +import { z } from "zod"; +import { ValueObject } from "./value-object"; + +const DEFAULT_SCALE = 2; + +interface IPercentageProps { + amount: number; + scale: number; +} + +interface IPercentage { + amount: number; + scale: number; + + getValue(): IPercentageProps; + toNumber(): number; + toString(): string; +} + +export class Percentage extends ValueObject implements IPercentage { + public static readonly DEFAULT_SCALE = DEFAULT_SCALE; + public static readonly MIN_VALUE = 0; + public static readonly MAX_VALUE = 100; + + public static readonly MIN_SCALE = 0; + public static readonly MAX_SCALE = 2; + + protected static validate(values: IPercentageProps) { + const schema = z.object({ + amount: z.number().int().min(Percentage.MIN_VALUE, "La cantidad no puede ser negativa."), + scale: z + .number() + .int() + .min(Percentage.MIN_SCALE) + .max( + Percentage.MAX_SCALE, + `La escala debe estar entre ${Percentage.MIN_SCALE} y ${Percentage.MAX_SCALE}.` + ), + }); + + return schema.safeParse(values); + } + + static create(props: { amount: number; scale?: number }): Result { + const { amount, scale = Percentage.DEFAULT_SCALE } = props; + + const validationResult = Percentage.validate({ amount, scale }); + if (!validationResult.success) { + return Result.fail(new Error(validationResult.error.errors.map((e) => e.message).join(", "))); + } + + // Cálculo del valor real del porcentaje + const realValue = amount / Math.pow(10, scale); + + // Validación de rango + if (realValue > Percentage.MAX_VALUE) { + return Result.fail(new Error("El porcentaje no puede ser mayor a 100%.")); + } + + return Result.ok(new Percentage({ amount, scale })); + } + + get amount(): number { + return this.props.amount; + } + + get scale(): number { + return this.props.scale; + } + + getValue(): IPercentageProps { + return this.props; + } + + toPrimitive() { + return this.getValue(); + } + + toNumber(): number { + return this.amount / Math.pow(10, this.scale); + } + + toString(): string { + return `${this.toNumber().toFixed(this.scale)}%`; + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/phone-number.test.ts b/packages.bak/rdx-ddd-domain/src/value-objects/phone-number.test.ts new file mode 100644 index 00000000..e888dee6 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/phone-number.test.ts @@ -0,0 +1,70 @@ +import { parsePhoneNumberWithError } from "libphonenumber-js"; +import { Maybe } from "../../helpers/maybe"; +import { PhoneNumber } from "./phone-number"; + +describe("PhoneNumber", () => { + const validPhone = "+14155552671"; // Número válido en formato internacional + const invalidPhone = "12345"; // Número inválido + const nullablePhone = ""; + + test("debe crear un número de teléfono válido", () => { + const result = PhoneNumber.create(validPhone); + expect(result.isSuccess).toBe(true); + expect(result.data).toBeInstanceOf(PhoneNumber); + }); + + test("debe fallar al crear un número de teléfono inválido", () => { + const result = PhoneNumber.create(invalidPhone); + expect(result.isFailure).toBe(true); + expect(result.getError()?.message).toBe( + "Please specify a valid phone number (include the international prefix)." + ); + }); + + test("debe devolver None para valores nulos o vacíos", () => { + const result = PhoneNumber.createNullable(nullablePhone); + expect(result.isSuccess).toBe(true); + expect(result.data).toEqual(Maybe.none()); + }); + + test("debe devolver Some con un número de teléfono válido", () => { + const result = PhoneNumber.createNullable(validPhone); + expect(result.isSuccess).toBe(true); + expect(result.data.isSome()).toBe(true); + }); + + test("debe obtener el valor del número de teléfono", () => { + const result = PhoneNumber.create(validPhone); + expect(result.isSuccess).toBe(true); + const phoneNumber = result.data; + expect(phoneNumber?.getValue()).toBe(validPhone); + }); + + test("debe obtener el código de país del número", () => { + const result = PhoneNumber.create(validPhone); + expect(result.isSuccess).toBe(true); + const phoneNumber = result.data; + expect(phoneNumber?.getCountryCode()).toBe("US"); + }); + + test("debe obtener el número nacional del teléfono", () => { + const result = PhoneNumber.create(validPhone); + expect(result.isSuccess).toBe(true); + const phoneNumber = result.data; + expect(phoneNumber?.getNationalNumber()).toBe("4155552671"); + }); + + test("debe obtener el número formateado", () => { + const result = PhoneNumber.create(validPhone); + expect(result.isSuccess).toBe(true); + const phoneNumber = result.data; + expect(phoneNumber?.getNumber()).toBe(parsePhoneNumberWithError(validPhone).number.toString()); + }); + + test("debe devolver undefined para la extensión si no hay una", () => { + const result = PhoneNumber.create(validPhone); + expect(result.isSuccess).toBe(true); + const phoneNumber = result.data; + expect(phoneNumber?.getExtension()).toBeUndefined(); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/phone-number.ts b/packages.bak/rdx-ddd-domain/src/value-objects/phone-number.ts new file mode 100644 index 00000000..448bcbfa --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/phone-number.ts @@ -0,0 +1,62 @@ +import { Result } from "@rdx/utils"; +import { isValidPhoneNumber, parsePhoneNumberWithError } from "libphonenumber-js"; +import { z } from "zod"; +import { ValueObject } from "./value-object"; + +interface PhoneNumberProps { + value: string; +} + +export class PhoneNumber extends ValueObject { + static create(value: string): Result { + const valueIsValid = PhoneNumber.validate(value); + + if (!valueIsValid.success) { + return Result.fail(new Error(valueIsValid.error.errors[0]?.message)); + } + return Result.ok(new PhoneNumber({ value: valueIsValid.data! })); + } + + static createNullable(value?: string): Result, Error> { + if (!value || value.trim() === "") { + return Result.ok(Maybe.none()); + } + + return PhoneNumber.create(value!).map((value) => Maybe.some(value)); + } + + static validate(value: string) { + const schema = z + .string() + .refine( + isValidPhoneNumber, + "Please specify a valid phone number (include the international prefix)." + ) + .transform((value: string) => parsePhoneNumberWithError(value).number.toString()); + return schema.safeParse(value); + } + + getValue(): string { + return this.props.value; + } + + toPrimitive(): string { + return this.getValue(); + } + + getCountryCode(): string | undefined { + return parsePhoneNumberWithError(this.props.value).country; + } + + getNationalNumber(): string { + return parsePhoneNumberWithError(this.props.value).nationalNumber; + } + + getNumber(): string { + return parsePhoneNumberWithError(this.props.value).number.toString(); + } + + getExtension(): string | undefined { + return parsePhoneNumberWithError(this.props.value).ext; + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/postal-address.test.ts b/packages.bak/rdx-ddd-domain/src/value-objects/postal-address.test.ts new file mode 100644 index 00000000..e1ca44e1 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/postal-address.test.ts @@ -0,0 +1,64 @@ +import { PostalAddress } from "./postal-address"; + +describe("PostalAddress Value Object", () => { + const validAddress = { + street: "123 Main St", + city: "Springfield", + postalCode: "12345", + state: "IL", + country: "USA", + }; + + test("✅ Debería crear un PostalAddress con valores válidos", () => { + const result = PostalAddress.create(validAddress); + + expect(result.isSuccess).toBe(true); + expect(result.data).toBeInstanceOf(PostalAddress); + }); + + test("❌ Debería fallar al crear un PostalAddress con código postal inválido", () => { + const invalidAddress = { ...validAddress, postalCode: "abc" }; // Código postal inválido + const result = PostalAddress.create(invalidAddress); + + expect(result.isFailure).toBe(true); + expect(result.error?.message).toBe("Invalid postal code format"); + }); + + test("✅ `createNullable` debería devolver Maybe.none si los valores son nulos o vacíos", () => { + expect(PostalAddress.createNullable().data.isSome()).toBe(false); + expect( + PostalAddress.createNullable({ + street: "", + city: "", + postalCode: "", + state: "", + country: "", + }).data.isSome() + ).toBe(false); + }); + + test("✅ `createNullable` debería devolver Maybe.some si los valores son válidos", () => { + const result = PostalAddress.createNullable(validAddress); + + expect(result.isSuccess).toBe(true); + expect(result.data.isSome()).toBe(true); + expect(result.data.unwrap()).toBeInstanceOf(PostalAddress); + }); + + test("✅ Métodos getters deberían devolver valores esperados", () => { + const address = PostalAddress.create(validAddress).data; + + expect(address.street).toBe(validAddress.street); + expect(address.city).toBe(validAddress.city); + expect(address.postalCode).toBe(validAddress.postalCode); + expect(address.state).toBe(validAddress.state); + expect(address.country).toBe(validAddress.country); + }); + + test("✅ `toString()` debería devolver la representación correcta", () => { + const address = PostalAddress.create(validAddress).data; + const expectedString = `${validAddress.street}, ${validAddress.city}, ${validAddress.postalCode}, ${validAddress.state}, ${validAddress.country}`; + + expect(address.toString()).toBe(expectedString); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/postal-address.ts b/packages.bak/rdx-ddd-domain/src/value-objects/postal-address.ts new file mode 100644 index 00000000..3ebfc579 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/postal-address.ts @@ -0,0 +1,109 @@ +import { Maybe, Result } from "@rdx/utils"; +import { z } from "zod"; +import { ValueObject } from "./value-object"; + +// 📌 Validaciones usando `zod` +const postalCodeSchema = z + .string() + .min(4, "Invalid postal code format") + .max(10, "Invalid postal code format") + .regex(/^\d{4,10}$/, { + message: "Invalid postal code format", + }); + +const streetSchema = z.string().min(2).max(255); +const street2Schema = z.string().optional(); +const citySchema = z.string().min(2).max(50); +const stateSchema = z.string().min(2).max(50); +const countrySchema = z.string().min(2).max(56); + +interface IPostalAddressProps { + street: string; + street2?: string; + city: string; + postalCode: string; + state: string; + country: string; +} + +export class PostalAddress extends ValueObject { + protected static validate(values: IPostalAddressProps) { + return z + .object({ + street: streetSchema, + street2: street2Schema, + city: citySchema, + postalCode: postalCodeSchema, + state: stateSchema, + country: countrySchema, + }) + .safeParse(values); + } + + static create(values: IPostalAddressProps): Result { + const valueIsValid = PostalAddress.validate(values); + + if (!valueIsValid.success) { + return Result.fail(new Error(valueIsValid.error.errors[0]?.message)); + } + return Result.ok(new PostalAddress(values)); + } + + static createNullable(values?: IPostalAddressProps): Result, Error> { + if (!values || Object.values(values).every((value) => value.trim() === "")) { + return Result.ok(Maybe.none()); + } + + return PostalAddress.create(values!).map((value) => Maybe.some(value)); + } + + static update( + oldAddress: PostalAddress, + data: Partial + ): Result { + return PostalAddress.create({ + street: data.street ?? oldAddress.street, + street2: data.street2?.getOrUndefined() ?? oldAddress.street2.getOrUndefined(), + city: data.city ?? oldAddress.city, + postalCode: data.postalCode ?? oldAddress.postalCode, + state: data.state ?? oldAddress.state, + country: data.country ?? oldAddress.country, + }).getOrElse(this); + } + + get street(): string { + return this.props.street; + } + + get street2(): Maybe { + return Maybe.fromNullable(this.props.street2); + } + + get city(): string { + return this.props.city; + } + + get postalCode(): string { + return this.props.postalCode; + } + + get state(): string { + return this.props.state; + } + + get country(): string { + return this.props.country; + } + + getValue(): IPostalAddressProps { + return this.props; + } + + toPrimitive() { + return this.getValue(); + } + + toString(): string { + return `${this.props.street}, ${this.props.street2}, ${this.props.city}, ${this.props.postalCode}, ${this.props.state}, ${this.props.country}`; + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/quantity.spec.ts b/packages.bak/rdx-ddd-domain/src/value-objects/quantity.spec.ts new file mode 100644 index 00000000..67e01d06 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/quantity.spec.ts @@ -0,0 +1,112 @@ +import { Quantity } from "./quantity"; + +describe("Quantity", () => { + describe("create", () => { + it("debería crear una cantidad válida", () => { + const result = Quantity.create({ amount: 100, scale: 2 }); + expect(result.isSuccess).toBe(true); + expect(result.data.amount).toBe(100); + expect(result.data.scale).toBe(2); + }); + + it("debería fallar si la escala es negativa", () => { + const result = Quantity.create({ amount: 100, scale: -1 }); + expect(result.isFailure).toBe(true); + }); + }); + + describe("toNumber & toString", () => { + it("debería convertir correctamente a número", () => { + const quantity = Quantity.create({ amount: 150, scale: 2 }).data; + expect(quantity.toNumber()).toBe(1.5); + }); + + it("debería convertir correctamente a string", () => { + const quantity = Quantity.create({ amount: 123, scale: 2 }).data; + expect(quantity.toString()).toBe("1.23"); + }); + }); + + describe("increment", () => { + it("debería incrementar en 1 si no se pasa otra cantidad", () => { + const quantity = Quantity.create({ amount: 100, scale: 2 }).data; + const incremented = quantity.increment().data; + expect(incremented.amount).toBe(101); + expect(incremented.scale).toBe(2); + }); + + it("debería sumar correctamente si tienen la misma escala", () => { + const quantity1 = Quantity.create({ amount: 100, scale: 2 }).data; + const quantity2 = Quantity.create({ amount: 50, scale: 2 }).data; + + const result = quantity1.increment(quantity2); + expect(result.isSuccess).toBe(true); + expect(result.data.amount).toBe(150); + }); + + it("debería fallar si las escalas son diferentes", () => { + const quantity1 = Quantity.create({ amount: 100, scale: 2 }).data; + const quantity2 = Quantity.create({ amount: 50, scale: 1 }).data; + + const result = quantity1.increment(quantity2); + expect(result.isFailure).toBe(true); + }); + }); + + describe("decrement", () => { + it("debería decrementar en 1 si no se pasa otra cantidad", () => { + const quantity = Quantity.create({ amount: 100, scale: 2 }).data; + const decremented = quantity.decrement().data; + expect(decremented.amount).toBe(99); + }); + + it("debería restar correctamente si tienen la misma escala", () => { + const quantity1 = Quantity.create({ amount: 100, scale: 2 }).data; + const quantity2 = Quantity.create({ amount: 50, scale: 2 }).data; + + const result = quantity1.decrement(quantity2); + expect(result.isSuccess).toBe(true); + expect(result.data.amount).toBe(50); + }); + + it("debería fallar si las escalas son diferentes", () => { + const quantity1 = Quantity.create({ amount: 100, scale: 2 }).data; + const quantity2 = Quantity.create({ amount: 50, scale: 1 }).data; + + const result = quantity1.decrement(quantity2); + expect(result.isFailure).toBe(true); + }); + }); + + describe("convertScale", () => { + it("debería convertir correctamente a una nueva escala", () => { + const quantity = Quantity.create({ amount: 100, scale: 2 }).data; + const result = quantity.convertScale(1); + expect(result.isSuccess).toBe(true); + expect(result.data.amount).toBe(10); + expect(result.data.scale).toBe(1); + }); + + it("debería fallar si la escala está fuera de rango", () => { + const quantity = Quantity.create({ amount: 100, scale: 2 }).data; + const result = quantity.convertScale(3); + expect(result.isFailure).toBe(true); + }); + }); + + describe("hasSameScale", () => { + it("debería retornar true si las escalas son iguales", () => { + const quantity1 = Quantity.create({ amount: 100, scale: 2 }).data; + const quantity2 = Quantity.create({ amount: 50, scale: 2 }).data; + + expect(quantity1.hasSameScale(quantity2)).toBe(true); + }); + + it("debería retornar false si las escalas son diferentes", () => { + const quantity1 = Quantity.create({ amount: 100, scale: 2 }).data; + const quantity2 = Quantity.create({ amount: 50, scale: 1 }).data; + + expect(quantity1.hasSameScale(quantity2)).toBe(false); + }); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/quantity.ts b/packages.bak/rdx-ddd-domain/src/value-objects/quantity.ts new file mode 100644 index 00000000..906aed61 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/quantity.ts @@ -0,0 +1,142 @@ +import { Result } from "@rdx/utils"; +import { z } from "zod"; +import { ValueObject } from "./value-object"; + +const DEFAULT_SCALE = 2; + +interface IQuantityProps { + amount: number; + scale: number; +} + +interface IQuantity { + amount: number; + scale: number; + + getValue(): IQuantityProps; + toNumber(): number; + toString(): string; + + isZero(): boolean; + isPositive(): boolean; + isNegative(): boolean; + + increment(anotherQuantity?: Quantity): Result; + decrement(anotherQuantity?: Quantity): Result; + hasSameScale(otherQuantity: Quantity): boolean; + convertScale(newScale: number): Result; +} + +export class Quantity extends ValueObject implements IQuantity { + protected static validate(values: IQuantityProps) { + const schema = z.object({ + amount: z.number().int(), + scale: z.number().int().min(Quantity.MIN_SCALE).max(Quantity.MAX_SCALE), + }); + + return schema.safeParse(values); + } + + public static readonly DEFAULT_SCALE = DEFAULT_SCALE; + public static readonly MIN_SCALE = 0; + public static readonly MAX_SCALE = 2; + + static create(props: IQuantityProps) { + const checkProps = Quantity.validate(props); + + if (!checkProps.success) { + return Result.fail(new Error(checkProps.error.errors[0].message)); + } + return Result.ok(new Quantity({ ...checkProps.data! })); + } + + get amount(): number { + return this.props.amount; + } + + get scale(): number { + return this.props.scale; + } + + getValue(): IQuantityProps { + return this.props; + } + + toPrimitive() { + return this.getValue(); + } + + toNumber(): number { + return this.amount / Math.pow(10, this.scale); + } + + toString(): string { + return this.toNumber().toFixed(this.scale); + } + + isZero(): boolean { + return this.amount === 0; + } + + isPositive(): boolean { + return this.amount > 0; + } + + isNegative(): boolean { + return this.amount < 0; + } + + increment(anotherQuantity?: Quantity): Result { + if (!anotherQuantity) { + return Quantity.create({ + amount: Number(this.amount) + 1, + scale: this.scale, + }); + } + + if (!this.hasSameScale(anotherQuantity)) { + return Result.fail(Error("No se pueden sumar cantidades con diferentes escalas.")); + } + + return Quantity.create({ + amount: Number(this.amount) + Number(anotherQuantity.amount), + scale: this.scale, + }); + } + + decrement(anotherQuantity?: Quantity): Result { + if (!anotherQuantity) { + return Quantity.create({ + amount: Number(this.amount) - 1, + scale: this.scale, + }); + } + + if (!this.hasSameScale(anotherQuantity)) { + return Result.fail(Error("No se pueden restar cantidades con diferentes escalas.")); + } + + return Quantity.create({ + amount: Number(this.amount) - Number(anotherQuantity.amount), + scale: this.scale, + }); + } + + hasSameScale(otherQuantity: Quantity): boolean { + return this.scale === otherQuantity.scale; + } + + convertScale(newScale: number): Result { + if (newScale < Quantity.MIN_SCALE || newScale > Quantity.MAX_SCALE) { + return Result.fail(new Error(`Scale out of range: ${newScale}`)); + } + + const oldFactor = Math.pow(10, this.scale); + const value = Number(this.amount) / oldFactor; + + const newFactor = Math.pow(10, newScale); + const newValue = Math.round(value * newFactor); + + return Quantity.create({ amount: newValue, scale: newScale }); + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/slug.spec.ts b/packages.bak/rdx-ddd-domain/src/value-objects/slug.spec.ts new file mode 100644 index 00000000..9172ddf7 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/slug.spec.ts @@ -0,0 +1,41 @@ +import { Slug } from "./slug"; // Ajusta la ruta según corresponda + +describe("Slug Value Object", () => { + test("Debe crear un Slug válido", () => { + const slugResult = Slug.create("valid-slug-123"); + expect(slugResult.isSuccess).toBe(true); + expect(slugResult.data.getValue()).toBe("valid-slug-123"); + }); + + test("Debe fallar si el Slug contiene caracteres inválidos", () => { + const slugResult = Slug.create("Invalid_Slug!"); + expect(slugResult.isSuccess).toBe(false); + expect(slugResult.error).toBeInstanceOf(Error); + }); + + test("Debe fallar si el Slug tiene menos de 2 caracteres", () => { + const slugResult = Slug.create("a"); + expect(slugResult.isSuccess).toBe(false); + expect(slugResult.error).toBeInstanceOf(Error); + }); + + test("Debe fallar si el Slug tiene más de 100 caracteres", () => { + const longSlug = "a".repeat(101); + const slugResult = Slug.create(longSlug); + expect(slugResult.isSuccess).toBe(false); + expect(slugResult.error).toBeInstanceOf(Error); + }); + + test("Debe permitir un Slug nullable vacío", () => { + const nullableSlugResult = Slug.createNullable(""); + expect(nullableSlugResult.isSuccess).toBe(true); + expect(nullableSlugResult.data.isSome()).toBe(false); + }); + + test("Debe permitir un Slug nullable con un valor válido", () => { + const nullableSlugResult = Slug.createNullable("my-slug"); + expect(nullableSlugResult.isSuccess).toBe(true); + expect(nullableSlugResult.data.isSome()).toBe(true); + expect(nullableSlugResult.data.getOrUndefined()?.toString()).toBe("my-slug"); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/slug.ts b/packages.bak/rdx-ddd-domain/src/value-objects/slug.ts new file mode 100644 index 00000000..355aa9a4 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/slug.ts @@ -0,0 +1,49 @@ +import { Maybe, Result } from "@rdx/utils"; +import { z } from "zod"; +import { ValueObject } from "./value-object"; + +interface SlugProps { + value: string; +} + +export class Slug extends ValueObject { + protected static readonly MIN_LENGTH = 2; + protected static readonly MAX_LENGTH = 100; + + protected static validate(value: string) { + const schema = z + .string() + .trim() + .regex(/^[a-z0-9-]+$/, { + message: "Slug must contain only lowercase letters, numbers, and hyphens", + }) + .min(Slug.MIN_LENGTH, { message: `Slug must be at least ${Slug.MIN_LENGTH} characters long` }) + .max(Slug.MAX_LENGTH, { message: `Slug must be at most ${Slug.MAX_LENGTH} characters long` }); + return schema.safeParse(value); + } + + static create(value: string) { + const valueIsValid = Slug.validate(value); + + if (!valueIsValid.success) { + return Result.fail(new Error(valueIsValid.error.errors[0].message)); + } + return Result.ok(new Slug({ value: valueIsValid.data! })); + } + + static createNullable(value?: string): Result, Error> { + if (!value || value.trim() === "") { + return Result.ok(Maybe.none()); + } + + return Slug.create(value!).map((value: Slug) => Maybe.some(value)); + } + + getValue(): string { + return this.props.value; + } + + toPrimitive(): string { + return this.getValue(); + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/tin-number.test.ts b/packages.bak/rdx-ddd-domain/src/value-objects/tin-number.test.ts new file mode 100644 index 00000000..39f7b6e1 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/tin-number.test.ts @@ -0,0 +1,40 @@ +import { TINNumber } from "./tin-number"; + +describe("TINNumber", () => { + it("debería crear un TINNumber válido", () => { + const result = TINNumber.create("12345"); + expect(result.isSuccess).toBe(true); + expect(result.data.getValue()).toBe("12345"); + }); + + it("debería fallar si el valor es demasiado corto", () => { + const result = TINNumber.create("1"); + expect(result.isFailure).toBe(true); + expect(result.error?.message).toBe("TIN must be at least 2 characters long"); + }); + + it("debería fallar si el valor es demasiado largo", () => { + const result = TINNumber.create("12345678901"); + expect(result.isFailure).toBe(true); + expect(result.error?.message).toBe("TIN must be at most 10 characters long"); + }); + + it("debería devolver None cuando el valor es nulo o vacío en createNullable", () => { + const result = TINNumber.createNullable(""); + expect(result.isSuccess).toBe(true); + expect(result.data.isNone()).toBe(true); + }); + + it("debería devolver Some cuando el valor es válido en createNullable", () => { + const result = TINNumber.createNullable("6789"); + expect(result.isSuccess).toBe(true); + expect(result.data.isSome()).toBe(true); + expect(result.data.unwrap()?.toString()).toBe("6789"); + }); + + it("debería devolver el valor correcto en toString()", () => { + const result = TINNumber.create("ABC123"); + expect(result.isSuccess).toBe(true); + expect(result.data.toString()).toBe("ABC123"); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/tin-number.ts b/packages.bak/rdx-ddd-domain/src/value-objects/tin-number.ts new file mode 100644 index 00000000..62029158 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/tin-number.ts @@ -0,0 +1,51 @@ +import { Maybe, Result } from "@rdx/utils"; +import { z } from "zod"; +import { ValueObject } from "./value-object"; + +interface TINNumberProps { + value: string; +} + +export class TINNumber extends ValueObject { + private static readonly MIN_LENGTH = 2; + private static readonly MAX_LENGTH = 10; + + protected static validate(value: string) { + const schema = z + .string() + .trim() + .min(TINNumber.MIN_LENGTH, { + message: `TIN must be at least ${TINNumber.MIN_LENGTH} characters long`, + }) + .max(TINNumber.MAX_LENGTH, { + message: `TIN must be at most ${TINNumber.MAX_LENGTH} characters long`, + }); + + return schema.safeParse(value); + } + + static create(value: string): Result { + const valueIsValid = TINNumber.validate(value); + + if (!valueIsValid.success) { + return Result.fail(new Error(valueIsValid.error.errors[0]?.message)); + } + return Result.ok(new TINNumber({ value: valueIsValid.data! })); + } + + static createNullable(value?: string): Result, Error> { + if (!value || value.trim() === "") { + return Result.ok(Maybe.none()); + } + + return TINNumber.create(value!).map((value) => Maybe.some(value)); + } + + getValue(): string { + return this.props.value; + } + + toPrimitive(): string { + return this.props.value; + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/unique-id.test.ts b/packages.bak/rdx-ddd-domain/src/value-objects/unique-id.test.ts new file mode 100644 index 00000000..c656b0aa --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/unique-id.test.ts @@ -0,0 +1,59 @@ +import { UniqueID } from "./unique-id"; + +// Mock UUID generation to ensure predictable tests +jest.mock("uuid", () => ({ v4: () => "123e4567-e89b-12d3-a456-426614174000" })); + +describe("UniqueID", () => { + test("should create a UniqueID with a valid UUID", () => { + const id = "123e4567-e89b-12d3-a456-426614174000"; + const result = UniqueID.create(id); + + expect(result.isSuccess).toBe(true); + expect(result.data.toString()).toBe(id); + }); + + test("should generate a UniqueID with a valid UUID", () => { + const result = UniqueID.generate(); + + expect(result.isSuccess).toBe(true); + expect(result.data.toString()).toBeTruthy(); + }); + + test("should fail to create UniqueID with an invalid UUID", () => { + const result = UniqueID.create("invalid-uuid"); + + expect(result.isFailure).toBe(true); + }); + + test("should fail when id is undefined and generateOnEmpty is false", () => { + const result = UniqueID.create(undefined, false); + + expect(result.isFailure).toBe(true); + }); + + test("should generate a new UUID when id is undefined and generateOnEmpty is true", () => { + const result = UniqueID.create(undefined, true); + + expect(result.isSuccess).toBe(true); + expect(result.data?.toString()).toBeTruthy(); + }); + + test("should fail when id is null", () => { + const result = UniqueID.create(null as any); + + expect(result.isFailure).toBe(true); + }); + + test("should create a UniqueID when id is an empty string and generateOnEmpty is true", () => { + const result = UniqueID.create(" ", true); + + expect(result.isSuccess).toBe(true); + expect(result.data?.toString()).toBeTruthy(); + }); + + test("should fail when id is an empty string and generateOnEmpty is false", () => { + const result = UniqueID.create(" ", false); + + expect(result.isFailure).toBe(true); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/unique-id.ts b/packages.bak/rdx-ddd-domain/src/value-objects/unique-id.ts new file mode 100644 index 00000000..f7309408 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/unique-id.ts @@ -0,0 +1,46 @@ +import { Result } from "@rdx/utils"; +import { v4 as uuidv4 } from "uuid"; +import { z } from "zod"; +import { ValueObject } from "./value-object"; + +export class UniqueID extends ValueObject { + static create(id?: string, generateOnEmpty: boolean = false): Result { + if (!id || id?.trim() === "") { + if (!generateOnEmpty) { + return Result.fail(new Error("ID cannot be undefined or null")); + } + return UniqueID.generateNewID(); + } + + const result = UniqueID.validate(id!); + + return result.success + ? Result.ok(new UniqueID(result.data)) + : Result.fail(new Error(result.error.errors[0]?.message)); + } + + static generate(): Result { + return Result.ok(new UniqueID(uuidv4())); + } + + static validate(id: string) { + const schema = z.string().trim().uuid({ message: "Invalid UUID format" }); + return schema.safeParse(id); + } + + static generateNewID(): Result { + return Result.ok(new UniqueID(uuidv4())); + } + + getValue(): string { + return this.props; + } + + toString(): string { + return this.getValue(); + } + + toPrimitive() { + return this.getValue(); + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/utc-date.test.ts b/packages.bak/rdx-ddd-domain/src/value-objects/utc-date.test.ts new file mode 100644 index 00000000..4eb2b57e --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/utc-date.test.ts @@ -0,0 +1,41 @@ +import { UtcDate } from "./utc-date"; + +describe("UtcDate Value Object con Zod y Result", () => { + test("Debe crear una instancia con fecha y hora en UTC", () => { + const result = UtcDate.create("2025-01-06T19:36:18Z"); + expect(result.isSuccess).toBe(true); + expect(result.data?.toISOString()).toBe("2025-01-06T19:36:18.000Z"); + expect(result.data?.toDateString()).toBe("2025-01-06"); + }); + + test("Debe crear una instancia con solo fecha (sin hora)", () => { + const result = UtcDate.create("2020-11-12"); + expect(result.isSuccess).toBe(true); + expect(result.data?.toISOString()).toBe("2020-11-12T00:00:00.000Z"); // Normalizado con 00:00 UTC + expect(result.data?.toDateString()).toBe("2020-11-12"); + }); + + test("Debe devolver un Result.fail para formatos inválidos", () => { + expect(UtcDate.create("2020-07-32").isFailure).toBe(true); + expect(UtcDate.create("invalid-date").isFailure).toBe(true); + expect(UtcDate.create("2020/11/12").isFailure).toBe(true); + }); + + test("Debe comparar correctamente dos fechas idénticas", () => { + const date1 = UtcDate.create("2023-12-31T23:59:59Z").data!; + const date2 = UtcDate.create("2023-12-31T23:59:59Z").data!; + expect(date1.equals(date2)).toBe(true); + }); + + test("Debe comparar correctamente dos fechas diferentes", () => { + const date1 = UtcDate.create("2023-12-31T23:59:59Z").data!; + const date2 = UtcDate.create("2023-12-30T23:59:59Z").data!; + expect(date1.equals(date2)).toBe(false); + }); + + test("Debe manejar fechas sin hora correctamente en equals", () => { + const date1 = UtcDate.create("2020-11-12").data!; + const date2 = UtcDate.create("2020-11-12T00:00:00Z").data!; + expect(date1.equals(date2)).toBe(true); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/utc-date.ts b/packages.bak/rdx-ddd-domain/src/value-objects/utc-date.ts new file mode 100644 index 00000000..0832d338 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/utc-date.ts @@ -0,0 +1,74 @@ +import { Result } from "@rdx/utils"; +import { z } from "zod"; +import { ValueObject } from "./value-object"; + +interface IUtcDateProps { + value: string; +} + +export class UtcDate extends ValueObject { + private readonly date!: Date; + + private constructor(props: IUtcDateProps) { + super(props); + const { value: dateString } = props; + this.date = Object.freeze(new Date(dateString)); + } + + static validate(dateString: string) { + const dateStr = z.union([ + z.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/, "Invalid ISO 8601 format"), + z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Invalid YYYY-MM-DD format"), + ]); + + const dateStrToDate = dateStr.pipe(z.coerce.date()); + + return dateStrToDate.safeParse(dateString); + } + + /** + * Crea una instancia de UtcDate a partir de un string en formato UTC ISO 8601. + * @param dateString Fecha en formato UTC (con o sin hora YYYY-MM-DD) + * @returns UtcDate si es válida, Error en caso contrario. + */ + static create(dateString: string): Result { + const dateIsValid = UtcDate.validate(dateString); + if (!dateIsValid.success) { + return Result.fail(new Error(`Invalid UTC date format: ${dateString}`)); + } + + return Result.ok(new UtcDate({ value: dateString })); + } + + getValue(): string { + return this.props.value; + } + + /** + * Devuelve la fecha completa en formato UTC con hora (ISO 8601). Ejemplo: 2025-12-31T23:59:59Z. + */ + toPrimitive() { + return this.toISOString(); + } + + /** + * Devuelve la fecha en formato UTC sin hora (YYYY-MM-DD). + */ + toDateString(): string { + return this.date.toISOString().split("T")[0] ?? ""; + } + + /** + * Devuelve la fecha en formato UTC con hora (ISO 8601). Ejemplo: 2025-12-31T23:59:59Z. + */ + toISOString(): string { + return this.date.toISOString(); + } + + /** + * Compara si dos instancias de UtcDate son iguales. + */ + equals(other: UtcDate): boolean { + return this.toISOString() === other.toISOString(); + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/value-object.ts b/packages.bak/rdx-ddd-domain/src/value-objects/value-object.ts new file mode 100644 index 00000000..d356a178 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/value-object.ts @@ -0,0 +1,25 @@ +import { shallowEqual } from "shallow-equal-object"; + +export abstract class ValueObject { + protected readonly props: T; + + protected constructor(props: T) { + this.props = Object.freeze(props); // 🔒 Garantiza inmutabilidad + } + + abstract getValue(): any; + + abstract toPrimitive(): any; + + equals(other: ValueObject): boolean { + if (!(other instanceof ValueObject)) { + return false; + } + + if (other.props === undefined || other.props === null) { + return false; + } + + return shallowEqual(this.props, other.props); + } +} diff --git a/packages.bak/rdx-ddd-domain/src/value-objects/value-objects.test.ts b/packages.bak/rdx-ddd-domain/src/value-objects/value-objects.test.ts new file mode 100644 index 00000000..6762c11a --- /dev/null +++ b/packages.bak/rdx-ddd-domain/src/value-objects/value-objects.test.ts @@ -0,0 +1,47 @@ +import { ValueObject } from "./value-object"; + +interface ITestValueProps { + value: string; +} + +class TestValueObject extends ValueObject { + constructor(value: string) { + super({ value }); + } + + getValue() { + return this.props; + } +} + +describe("ValueObject", () => { + test("debe considerar dos ValueObjects con los mismos valores como iguales", () => { + const vo1 = new TestValueObject("test"); + const vo2 = new TestValueObject("test"); + expect(vo1.equals(vo2)).toBe(true); + }); + + test("debe considerar dos ValueObjects con valores diferentes como distintos", () => { + const vo1 = new TestValueObject("test1"); + const vo2 = new TestValueObject("test2"); + expect(vo1.equals(vo2)).toBe(false); + }); + + test("debe devolver false si el objeto comparado no es una instancia de ValueObject", () => { + const vo1 = new TestValueObject("test"); + expect(vo1.equals({ prop: "test" } as any)).toBe(false); + }); + + test("debe devolver false si el objeto comparado es null o undefined", () => { + const vo1 = new TestValueObject("test"); + expect(vo1.equals(null as any)).toBe(false); + expect(vo1.equals(undefined as any)).toBe(false); + }); + + test("debe garantizar la inmutabilidad de las propiedades", () => { + const vo = new TestValueObject("immutable"); + expect(() => { + (vo as any).props.prop = "mutated"; + }).toThrow(); + }); +}); diff --git a/packages.bak/rdx-ddd-domain/tsconfig.json b/packages.bak/rdx-ddd-domain/tsconfig.json new file mode 100644 index 00000000..18573208 --- /dev/null +++ b/packages.bak/rdx-ddd-domain/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "outDir": "dist", + "types": ["jest", "node"] + }, + "include": ["."], + "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"] +} diff --git a/packages.bak/rdx-ddd-domain/turbo.json b/packages.bak/rdx-ddd-domain/turbo.json new file mode 100644 index 00000000..52a7d7ab --- /dev/null +++ b/packages.bak/rdx-ddd-domain/turbo.json @@ -0,0 +1,9 @@ +{ + "extends": ["//"], + "tasks": { + "build": { + "dependsOn": ["^build"], + "outputs": ["dist/**"] + } + } +} diff --git a/packages.bak/rdx-module/package.json b/packages.bak/rdx-module/package.json new file mode 100644 index 00000000..5dd8b688 --- /dev/null +++ b/packages.bak/rdx-module/package.json @@ -0,0 +1,39 @@ +{ + "name": "@rdx/module", + "version": "0.0.0", + "private": true, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**" + ], + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "lint": "eslint src/", + "lint:fix": "eslint src/ --fix", + "typecheck": "tsc --noEmit", + "test": "jest" + }, + "jest": { + "preset": "@repo/jest-presets/node" + }, + "devDependencies": { + "@repo/eslint-config": "workspace:*", + "@repo/jest-presets": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@types/express": "^4.17.21", + "@types/jest": "^29.5.14", + "@types/node": "^22.14.0", + "@types/react": "^19.1.2", + "jest": "^29.7.0", + "typescript": "^5.7.3" + }, + "dependencies": { + "express": "^4.21.2", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "sequelize": "^6.37.5" + } +} diff --git a/packages.bak/rdx-module/src/index.ts b/packages.bak/rdx-module/src/index.ts new file mode 100644 index 00000000..cb2c4139 --- /dev/null +++ b/packages.bak/rdx-module/src/index.ts @@ -0,0 +1,3 @@ +export * from "./module-client.interface"; +export * from "./module-server.interface"; +export * from "./types"; diff --git a/libs/package/package-client.interface.ts b/packages.bak/rdx-module/src/module-client.interface.ts similarity index 91% rename from libs/package/package-client.interface.ts rename to packages.bak/rdx-module/src/module-client.interface.ts index bb435b05..8fa0c672 100644 --- a/libs/package/package-client.interface.ts +++ b/packages.bak/rdx-module/src/module-client.interface.ts @@ -1,5 +1,6 @@ // Contrato para los packages frontend (React) +import * as React from "react"; import { ReactNode } from "react"; import { PackageMetadata } from "./types"; diff --git a/libs/package/package-server.interface.ts b/packages.bak/rdx-module/src/module-server.interface.ts similarity index 100% rename from libs/package/package-server.interface.ts rename to packages.bak/rdx-module/src/module-server.interface.ts diff --git a/libs/package/types.ts b/packages.bak/rdx-module/src/types.ts similarity index 67% rename from libs/package/types.ts rename to packages.bak/rdx-module/src/types.ts index c28e2056..06d6a8dc 100644 --- a/libs/package/types.ts +++ b/packages.bak/rdx-module/src/types.ts @@ -1,8 +1,8 @@ // Contiene tipos comunes entre cliente y servidor -import { Model, Sequelize } from "sequelize"; +import { Model, ModelStatic, Sequelize } from "sequelize"; -type ModelInitializer = (sequelize: Sequelize) => typeof Model; +type ModelInitializer = (sequelize: Sequelize) => ModelStatic>; export interface PackageMetadata { name: string; diff --git a/packages.bak/rdx-module/tsconfig.json b/packages.bak/rdx-module/tsconfig.json new file mode 100644 index 00000000..18573208 --- /dev/null +++ b/packages.bak/rdx-module/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@repo/typescript-config/base.json", + "compilerOptions": { + "outDir": "dist", + "types": ["jest", "node"] + }, + "include": ["."], + "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"] +} diff --git a/packages.bak/rdx-module/turbo.json b/packages.bak/rdx-module/turbo.json new file mode 100644 index 00000000..35be9c68 --- /dev/null +++ b/packages.bak/rdx-module/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "tasks": { + "build": { + "outputs": ["dist/**"] + } + } +} diff --git a/packages.bak/rdx-utils/package.json b/packages.bak/rdx-utils/package.json new file mode 100644 index 00000000..80fecc34 --- /dev/null +++ b/packages.bak/rdx-utils/package.json @@ -0,0 +1,36 @@ +{ + "name": "@rdx/utils", + "version": "0.0.0", + "private": true, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**" + ], + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "lint": "eslint src/", + "lint:fix": "eslint src/ --fix", + "typecheck": "tsc --noEmit", + "test": "jest" + }, + "jest": { + "preset": "@repo/jest-presets/node" + }, + "devDependencies": { + "@repo/eslint-config": "workspace:*", + "@repo/jest-presets": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@types/node": "^22.14.1", + "typescript": "^5.8.3" + }, + "dependencies": { + "cls-rtracer": "^2.6.3", + "dotenv": "^16.5.0", + "path": "^0.12.7", + "winston": "^3.17.0", + "winston-daily-rotate-file": "^5.0.0" + } +} diff --git a/packages.bak/rdx-utils/src/helpers/collection.ts b/packages.bak/rdx-utils/src/helpers/collection.ts new file mode 100644 index 00000000..4c08253f --- /dev/null +++ b/packages.bak/rdx-utils/src/helpers/collection.ts @@ -0,0 +1,124 @@ +/** + * Clase genérica para manejar una colección de elementos. + * Ofrece métodos básicos para manipular, consultar y recorrer los elementos. + */ +export class Collection { + private items: T[]; + private totalItems: number | null; + + /** + * Crea una nueva colección. + * @param items - Elementos iniciales de la colección. + * @param totalItems - Total de elementos esperados (opcional). Si no se define, se usa la longitud del array inicial. + */ + constructor(items: T[] = [], totalItems: number | null = null) { + this.items = [...items]; + this.totalItems = totalItems ?? items.length; + } + + /** + * Vacía la colección y reinicia el total de elementos. + */ + reset(): void { + this.items = []; + this.totalItems = 0; + } + + /** + * Agrega un nuevo elemento a la colección. + * @param item - Elemento a agregar. + */ + add(item: T): void { + this.items.push(item); + if (this.totalItems !== null) { + this.totalItems++; + } + } + + /** + * Elimina un elemento de la colección, si existe. + * @param item - Elemento a eliminar. + * @returns `true` si el elemento fue eliminado, `false` si no se encontró. + */ + remove(item: T): boolean { + const index = this.items.indexOf(item); + if (index !== -1) { + this.items.splice(index, 1); + if (this.totalItems !== null) { + this.totalItems--; + } + return true; + } + return false; + } + + /** + * Devuelve una copia de todos los elementos de la colección. + * @returns Array de elementos. + */ + getAll(): T[] { + return [...this.items]; + } + + /** + * Devuelve la cantidad actual de elementos en la colección. + * @returns Número de elementos presentes. + */ + size(): number { + return this.items.length; + } + + /** + * Devuelve el total de elementos esperados en la colección. + * Puede diferir de `size()` si los datos son paginados, por ejemplo. + * @returns Número total o `null` si no se especificó. + */ + total(): number | null { + return this.totalItems; + } + + /** + * Aplica una función a cada elemento y devuelve un nuevo array con los resultados. + * @param callback - Función transformadora. + * @returns Nuevo array con los elementos transformados. + */ + map(callback: (item: T, index: number, array: T[]) => U): U[] { + return this.items.map(callback); + } + + /** + * Devuelve un array con los elementos que cumplen la condición del callback. + * @param callback - Función de filtrado. + * @returns Nuevo array con los elementos filtrados. + */ + filter(callback: (item: T, index: number, array: T[]) => boolean): T[] { + return this.items.filter(callback); + } + + /** + * Devuelve el primer elemento que cumple la condición del callback. + * @param callback - Función de búsqueda. + * @returns El primer elemento que cumple la condición, o `undefined` si no hay coincidencias. + */ + find(callback: (item: T, index: number, array: T[]) => boolean): T | undefined { + return this.items.find(callback); + } + + /** + * Verifica si al menos un elemento cumple la condición dada. + * @param callback - Función de evaluación. + * @returns `true` si al menos un elemento cumple, `false` en caso contrario. + */ + some(callback: (item: T, index: number, array: T[]) => boolean): boolean { + return this.items.some(callback); + } + + /** + * Verifica si todos los elementos cumplen la condición dada. + * @param callback - Función de evaluación. + * @returns `true` si todos cumplen, `false` si alguno no. + */ + every(callback: (item: T, index: number, array: T[]) => boolean): boolean { + return this.items.every(callback); + } +} diff --git a/packages.bak/rdx-utils/src/helpers/index.ts b/packages.bak/rdx-utils/src/helpers/index.ts new file mode 100644 index 00000000..5d1da0b4 --- /dev/null +++ b/packages.bak/rdx-utils/src/helpers/index.ts @@ -0,0 +1,4 @@ +export * from "./collection"; +export * from "./maybe"; +export * from "./result"; +export * from "./utils"; diff --git a/packages.bak/rdx-utils/src/helpers/maybe.ts b/packages.bak/rdx-utils/src/helpers/maybe.ts new file mode 100644 index 00000000..390c090b --- /dev/null +++ b/packages.bak/rdx-utils/src/helpers/maybe.ts @@ -0,0 +1,46 @@ +/** + * Uso: + * + * const maybeNumber = Maybe.some(10); + * const doubled = maybeNumber.map(n => n * 2); + * console.log(doubled.getValue()); // 20 + + * const noValue = Maybe.none(); + * console.log(noValue.isSome()); // false + **/ + +export class Maybe { + private constructor(private readonly value?: T) {} + + static fromNullable(value?: T): Maybe { + return value === undefined || value === null ? Maybe.none() : Maybe.some(value); + } + + static some(value: T): Maybe { + return new Maybe(value); + } + + static none(): Maybe { + return new Maybe(); + } + + isSome(): boolean { + return this.value !== undefined; + } + + isNone(): boolean { + return !this.isSome(); + } + + unwrap(): T | undefined { + return this.value; + } + + getOrUndefined(): T | undefined { + return this.unwrap(); + } + + map(fn: (value: T) => U): Maybe { + return this.isSome() ? Maybe.some(fn(this.value as T)) : Maybe.none(); + } +} diff --git a/packages.bak/rdx-utils/src/helpers/result.ts b/packages.bak/rdx-utils/src/helpers/result.ts new file mode 100644 index 00000000..a0136f04 --- /dev/null +++ b/packages.bak/rdx-utils/src/helpers/result.ts @@ -0,0 +1,92 @@ +export class Result { + private readonly _isSuccess: boolean; + private readonly _data?: T; + private readonly _error?: E; + + private constructor(props: { isSuccess: boolean; error?: E; data?: T }) { + const { isSuccess, error, data } = props; + if (isSuccess && error) { + throw new Error(`InvalidOperation: A result cannot be successful and contain an error`); + } + if (!isSuccess && !error) { + throw new Error(`InvalidOperation: A failing result needs to contain an error message`); + } + + this._isSuccess = isSuccess; + this._error = error; + this._data = data; + + Object.freeze(this); + } + + static ok(data?: T): Result { + return new Result({ isSuccess: true, data }); + } + + static fail(error?: E): Result { + return new Result({ isSuccess: false, error }); + } + + static combine(results: Result[]): Result { + for (const result of results) { + if (result.isFailure) { + return result; + } + } + + return Result.ok(); + } + + get isSuccess(): boolean { + return this._isSuccess; + } + + get isFailure(): boolean { + return !this._isSuccess; + } + + get data(): T { + return this.getData(); + } + + get error(): E { + return this.getError(); + } + + getError(): E { + if (this._isSuccess) { + throw new Error("Cannot get error from a successful result."); + } + return this._error as E; + } + + getData(): T { + if (!this._isSuccess) { + throw new Error("Cannot get value data from a failed result."); + } + return this._data as T; + } + + map(fn: (value: T) => U): Result { + if (this.isSuccess && this._data !== undefined) { + return Result.ok(fn(this.data)); + } + return Result.fail(this.error || new Error("Unknown error")); + } + + /** + * 🔹 `getOrElse(defaultValue: T): T` + * Si el `Result` es un `ok`, devuelve `data`, de lo contrario, devuelve `defaultValue`. + */ + getOrElse(defaultValue: any): T | any { + return this._isSuccess ? this.data : defaultValue; + } + + /** + * 🔹 `match(onOk: (data: T) => R, onError: (error: E) => R): R` + * Evalúa el `Result`: ejecuta `onOk()` si es `ok` o `onError()` si es `fail`. + */ + match(onOk: (data: T) => R, onError: (error: E) => R): R { + return this._isSuccess ? onOk(this.data) : onError(this.error); + } +} diff --git a/packages.bak/rdx-utils/src/helpers/utils.ts b/packages.bak/rdx-utils/src/helpers/utils.ts new file mode 100644 index 00000000..3f3d0750 --- /dev/null +++ b/packages.bak/rdx-utils/src/helpers/utils.ts @@ -0,0 +1,12 @@ +// Función genérica para asegurar valores básicos +function ensure(value: T | undefined | null, defaultValue: T): T { + return value ?? defaultValue; +} + +// Implementaciones específicas para tipos básicos +export const ensureString = (value?: string): string => ensure(value, ""); +export const ensureNumber = (value?: number): number => ensure(value, 0); +export const ensureBoolean = (value?: boolean): boolean => ensure(value, false); +export const ensureBigInt = (value?: bigint): bigint => ensure(value, BigInt(0)); +export const ensureSymbol = (value?: symbol, defaultSymbol = Symbol()): symbol => + ensure(value, defaultSymbol); diff --git a/packages.bak/rdx-utils/src/index.ts b/packages.bak/rdx-utils/src/index.ts new file mode 100644 index 00000000..33ab11f9 --- /dev/null +++ b/packages.bak/rdx-utils/src/index.ts @@ -0,0 +1,2 @@ +export * from "./helpers"; +export * from "./logger"; diff --git a/packages.bak/rdx-utils/src/logger.ts b/packages.bak/rdx-utils/src/logger.ts new file mode 100644 index 00000000..98cb8ac3 --- /dev/null +++ b/packages.bak/rdx-utils/src/logger.ts @@ -0,0 +1,98 @@ +import rTracer from "cls-rtracer"; +import dotenv from "dotenv"; +import path from "path"; +import { createLogger, format, transports } from "winston"; +import DailyRotateFile from "winston-daily-rotate-file"; + +dotenv.config(); + +//const splatSymbol = Symbol.for("splat"); + +const initLogger = () => { + const isProduction = process.env.NODE_ENV === "production"; + + const consoleFormat = format.combine( + format.colorize(), + format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }), + format.align(), + format.splat(), + format.errors({ stack: !isProduction }), + + format.printf((info) => { + const rid = rTracer.id(); + + if (typeof info.message === "object") { + info.message = JSON.stringify(info.message, null, 3); + } + + let out = + isProduction && rid + ? `${info.timestamp} [request-id:${rid}] - ${info.level}: [${info.label}]: ${info.message}` + : `${info.timestamp} - ${info.level}: [${info.label}]: ${info.message}`; + + /*if (info.metadata["error"]) { + out = `${out} ${info.metadata.error}`; + if (info.metadata?.error?.stack) { + out = `${out} ${info.metadata.error.stack}`; + } + }*/ + + return out; + }) + ); + + const fileFormat = format.combine( + format.timestamp(), + format.splat(), + format.label({ label: path.basename(String(require.main?.filename)) }), + //format.metadata(), + format.metadata({ fillExcept: ["message", "level", "timestamp", "label"] }), + format.simple(), + format.json() + ); + + const logger = createLogger({ + level: isProduction ? "error" : "debug", + + format: fileFormat, + + transports: [ + new DailyRotateFile({ + dirname: isProduction ? "/logs" : ".", + filename: "error-%DATE%.log", + datePattern: "YYYY-MM-DD", + utc: true, + level: "error", + maxSize: "5m", + maxFiles: "1d", + }), + new DailyRotateFile({ + dirname: isProduction ? "/logs" : ".", + filename: "debug-%DATE%.log", + datePattern: "YYYY-MM-DD", + utc: true, + level: "debug", + maxSize: "5m", + maxFiles: "1d", + }), + ], + }); + + // + // If we're not in production then log to the `console` with the format: + // `${info.level}: ${info.message} JSON.stringify({ ...rest }) ` + // + if (!isProduction) { + logger.add( + new transports.Console({ + format: consoleFormat, + level: "debug", + }) + ); + } + + return logger; +}; + +const logger = initLogger(); +export { logger }; diff --git a/packages.bak/rdx-utils/tsconfig.json b/packages.bak/rdx-utils/tsconfig.json new file mode 100644 index 00000000..a40d12a9 --- /dev/null +++ b/packages.bak/rdx-utils/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "@repo/typescript-config/library.json", + "compilerOptions": { + "rootDir": "." + }, + "include": ["."] +} diff --git a/packages.bak/rdx-utils/turbo.json b/packages.bak/rdx-utils/turbo.json new file mode 100644 index 00000000..35be9c68 --- /dev/null +++ b/packages.bak/rdx-utils/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "tasks": { + "build": { + "outputs": ["dist/**"] + } + } +} diff --git a/libs/rdx-criteria/.eslintrc.json b/packages.bak/rdx-verifactu/.eslintrc.json similarity index 100% rename from libs/rdx-criteria/.eslintrc.json rename to packages.bak/rdx-verifactu/.eslintrc.json diff --git a/libs/rdx-criteria/.gitignore b/packages.bak/rdx-verifactu/.gitignore similarity index 100% rename from libs/rdx-criteria/.gitignore rename to packages.bak/rdx-verifactu/.gitignore diff --git a/libs/rdx-verifactu/package.json b/packages.bak/rdx-verifactu/package.json similarity index 100% rename from libs/rdx-verifactu/package.json rename to packages.bak/rdx-verifactu/package.json diff --git a/libs/rdx-criteria/tsconfig.json b/packages.bak/rdx-verifactu/tsconfig.json similarity index 100% rename from libs/rdx-criteria/tsconfig.json rename to packages.bak/rdx-verifactu/tsconfig.json diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md new file mode 100644 index 00000000..8b42d901 --- /dev/null +++ b/packages/eslint-config/README.md @@ -0,0 +1,3 @@ +# `@turbo/eslint-config` + +Collection of internal eslint configurations. diff --git a/packages/eslint-config/base.js b/packages/eslint-config/base.js new file mode 100644 index 00000000..09d316ef --- /dev/null +++ b/packages/eslint-config/base.js @@ -0,0 +1,32 @@ +import js from "@eslint/js"; +import eslintConfigPrettier from "eslint-config-prettier"; +import turboPlugin from "eslint-plugin-turbo"; +import tseslint from "typescript-eslint"; +import onlyWarn from "eslint-plugin-only-warn"; + +/** + * A shared ESLint configuration for the repository. + * + * @type {import("eslint").Linter.Config[]} + * */ +export const config = [ + js.configs.recommended, + eslintConfigPrettier, + ...tseslint.configs.recommended, + { + plugins: { + turbo: turboPlugin, + }, + rules: { + "turbo/no-undeclared-env-vars": "warn", + }, + }, + { + plugins: { + onlyWarn, + }, + }, + { + ignores: ["dist/**"], + }, +]; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json new file mode 100644 index 00000000..4e38076f --- /dev/null +++ b/packages/eslint-config/package.json @@ -0,0 +1,23 @@ +{ + "name": "@repo/eslint-config", + "version": "0.0.0", + "type": "module", + "private": true, + "exports": { + "./base": "./base.js", + "./react-internal": "./react-internal.js" + }, + "devDependencies": { + "@eslint/js": "^9.25.0", + "@next/eslint-plugin-next": "^15.3.0", + "eslint": "^9.25.0", + "eslint-config-prettier": "^10.1.1", + "eslint-plugin-only-warn": "^1.1.0", + "eslint-plugin-react": "^7.37.4", + "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-turbo": "^2.5.0", + "globals": "^16.0.0", + "typescript": "^5.8.2", + "typescript-eslint": "^8.30.1" + } +} diff --git a/packages/eslint-config/react-internal.js b/packages/eslint-config/react-internal.js new file mode 100644 index 00000000..daeccba2 --- /dev/null +++ b/packages/eslint-config/react-internal.js @@ -0,0 +1,39 @@ +import js from "@eslint/js"; +import eslintConfigPrettier from "eslint-config-prettier"; +import tseslint from "typescript-eslint"; +import pluginReactHooks from "eslint-plugin-react-hooks"; +import pluginReact from "eslint-plugin-react"; +import globals from "globals"; +import { config as baseConfig } from "./base.js"; + +/** + * A custom ESLint configuration for libraries that use React. + * + * @type {import("eslint").Linter.Config[]} */ +export const config = [ + ...baseConfig, + js.configs.recommended, + eslintConfigPrettier, + ...tseslint.configs.recommended, + pluginReact.configs.flat.recommended, + { + languageOptions: { + ...pluginReact.configs.flat.recommended.languageOptions, + globals: { + ...globals.serviceworker, + ...globals.browser, + }, + }, + }, + { + plugins: { + "react-hooks": pluginReactHooks, + }, + settings: { react: { version: "detect" } }, + rules: { + ...pluginReactHooks.configs.recommended.rules, + // React scope no longer necessary with new JSX transform. + "react/react-in-jsx-scope": "off", + }, + }, +]; diff --git a/packages/typescript-config/base.json b/packages/typescript-config/base.json new file mode 100644 index 00000000..0e3dae77 --- /dev/null +++ b/packages/typescript-config/base.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "compilerOptions": { + "composite": false, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "inlineSources": false, + "isolatedModules": true, + "module": "NodeNext", + "moduleResolution": "NodeNext", + "noUnusedLocals": false, + "noUnusedParameters": false, + "preserveWatchOutput": true, + "skipLibCheck": true, + "strict": true + }, + "exclude": ["node_modules"] +} diff --git a/packages/typescript-config/express.json b/packages/typescript-config/express.json new file mode 100644 index 00000000..379b7940 --- /dev/null +++ b/packages/typescript-config/express.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "ExpressJS Server", + + "extends": "./base.json", // Extiende la configuración base definida en base.json. + + /*"ts-node": { + "compilerOptions": { + "module": "commonjs", + "moduleResolution": "Node10" + } + },*/ + + "compilerOptions": { + /* Basic Options */ + "target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, + "module": "NodeNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, + + "allowJs": false /* Allow javascript files to be compiled. */, + "pretty": true, + + "jsx": "preserve" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, + + "sourceMap": false /* Generates corresponding '.map' file. */, + "removeComments": true /* Do not emit comments to output. */, + + /* Strict Type-Checking Options */ + "skipLibCheck": true /* Skip type checking of declaration files. */, + "strict": true /* Enable all strict type-checking options. */, + "noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */, + "strictNullChecks": true /* Enable strict null checks. */, + "strictFunctionTypes": true /* Enable strict checking of function types. */, + "strictPropertyInitialization": false /* Enable strict checking of property initialization in classes. */, + "noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */, + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + "noUnusedLocals": false /* Report errors on unused locals. */, + "noUnusedParameters": false /* Report errors on unused parameters. */, + "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, + "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, + + /* Module Resolution Options */ + "moduleResolution": "nodenext" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + + "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + "forceConsistentCasingInFileNames": false, // Obliga a que los nombres de archivo sean consistentes en cuanto a mayúsculas y minúsculas. + + /* Experimental Options */ + "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */, + "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */, + + /* Advanced Options */ + "resolveJsonModule": true, // Permite importar archivos JSON como módulos. + "suppressImplicitAnyIndexErrors": false, + "verbatimModuleSyntax": false // Mantiene la sintaxis de los módulos tal como está escrita en el código fuente. + + //"baseUrl": "./" /* Base directory to resolve non-absolute module names. */, + } +} diff --git a/packages/typescript-config/library.json b/packages/typescript-config/library.json new file mode 100644 index 00000000..79bcf922 --- /dev/null +++ b/packages/typescript-config/library.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./base.json", + "compilerOptions": { + "lib": ["ES2022"], + "target": "ES2022", + "skipLibCheck": true, + "resolveJsonModule": true, + "outDir": "dist", + "allowJs": false + }, + "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"] +} diff --git a/libs/tsconfig/node.json b/packages/typescript-config/node.json similarity index 100% rename from libs/tsconfig/node.json rename to packages/typescript-config/node.json diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json new file mode 100644 index 00000000..bff20b7f --- /dev/null +++ b/packages/typescript-config/package.json @@ -0,0 +1,8 @@ +{ + "name": "@repo/typescript-config", + "version": "0.0.0", + "private": true, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/typescript-config/react-library.json b/packages/typescript-config/react-library.json new file mode 100644 index 00000000..8cb3a642 --- /dev/null +++ b/packages/typescript-config/react-library.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./base.json", + "compilerOptions": { + "lib": ["ES2015"], + "target": "ES6", + "jsx": "react-jsx" + }, + "exclude": ["node_modules"] +} diff --git a/packages/typescript-config/vite.json b/packages/typescript-config/vite.json new file mode 100644 index 00000000..d76ba135 --- /dev/null +++ b/packages/typescript-config/vite.json @@ -0,0 +1,16 @@ +{ + "extends": "./base.json", + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ESNext", "DOM"], + "sourceMap": true, + "resolveJsonModule": true, + "noEmit": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true + }, + "exclude": ["node_modules"] + } \ No newline at end of file diff --git a/packages/ui/components.json b/packages/ui/components.json new file mode 100644 index 00000000..87eb4dd7 --- /dev/null +++ b/packages/ui/components.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "", + "css": "src/styles/globals.css", + "baseColor": "neutral", + "cssVariables": true + }, + "iconLibrary": "lucide", + "aliases": { + "components": "@repo/ui/components", + "utils": "@repo/ui/lib/utils", + "hooks": "@repo/ui/hooks", + "lib": "@repo/ui/lib", + "ui": "@repo/ui/components" + } +} diff --git a/packages/ui/eslint.config.mjs b/packages/ui/eslint.config.mjs new file mode 100644 index 00000000..abf0fd0e --- /dev/null +++ b/packages/ui/eslint.config.mjs @@ -0,0 +1,4 @@ +import reactInternalConfig from "@repo/eslint-config/react-internal"; + +/** @type {import("eslint").Linter.Config[]} */ +export default [...reactInternalConfig]; diff --git a/packages/ui/package.json b/packages/ui/package.json new file mode 100644 index 00000000..a8be9e98 --- /dev/null +++ b/packages/ui/package.json @@ -0,0 +1,40 @@ +{ + "name": "@repo/ui", + "version": "0.0.0", + "type": "module", + "private": true, + "scripts": { + "lint": "eslint . --max-warnings 0", + "ui": "pnpm dlx shadcn@latest add" + }, + "dependencies": { + "@radix-ui/react-slot": "^1.2.0", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "lucide-react": "^0.503.0", + "next-themes": "^0.4.6", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "tailwind-merge": "^3.2.0", + "tw-animate-css": "^1.2.8", + "zod": "^3.24.3" + }, + "devDependencies": { + "@repo/eslint-config": "workspace:*", + "@repo/typescript-config": "workspace:*", + "@tailwindcss/postcss": "^4.1.5", + "@turbo/gen": "^2.5.2", + "@types/node": "^22.15.3", + "@types/react": "^19.1.2", + "@types/react-dom": "^19.1.3", + "tailwindcss": "^4.1.5", + "typescript": "^5.8.3" + }, + "exports": { + "./globals.css": "./src/styles/globals.css", + "./postcss.config": "./postcss.config.mjs", + "./lib/*": "./src/lib/*.ts", + "./components/*": "./src/components/*.tsx", + "./hooks/*": "./src/hooks/*.ts" + } +} diff --git a/packages/ui/postcss.config.mjs b/packages/ui/postcss.config.mjs new file mode 100644 index 00000000..c15b9985 --- /dev/null +++ b/packages/ui/postcss.config.mjs @@ -0,0 +1,6 @@ +/** @type {import('postcss-load-config').Config} */ +const config = { + plugins: { "@tailwindcss/postcss": {} }, +}; + +export default config; diff --git a/packages/ui/src/components/button.tsx b/packages/ui/src/components/button.tsx new file mode 100644 index 00000000..f9c6fc34 --- /dev/null +++ b/packages/ui/src/components/button.tsx @@ -0,0 +1,56 @@ +import { Slot } from "@radix-ui/react-slot"; +import { cva, type VariantProps } from "class-variance-authority"; +import * as React from "react"; + +import { cn } from "@repo/ui/lib/utils"; + +const buttonVariants = cva( + "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90", + destructive: + "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40", + outline: + "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground", + secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-9 px-4 py-2 has-[>svg]:px-3", + sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5", + lg: "h-10 rounded-md px-6 has-[>svg]:px-4", + icon: "size-9", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +); + +function Button({ + className, + variant, + size, + asChild = false, + ...props +}: React.ComponentProps<"button"> & + VariantProps & { + asChild?: boolean; + }) { + const Comp = asChild ? Slot : "button"; + + return ( + + ); +} + +export { Button, buttonVariants }; diff --git a/libs/ui/src/lib/utils.ts b/packages/ui/src/lib/utils.ts similarity index 72% rename from libs/ui/src/lib/utils.ts rename to packages/ui/src/lib/utils.ts index 365058ce..a5ef1935 100644 --- a/libs/ui/src/lib/utils.ts +++ b/packages/ui/src/lib/utils.ts @@ -1,4 +1,4 @@ -import { type ClassValue, clsx } from "clsx"; +import { clsx, type ClassValue } from "clsx"; import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { diff --git a/packages/ui/src/styles/globals.css b/packages/ui/src/styles/globals.css new file mode 100644 index 00000000..7a8944df --- /dev/null +++ b/packages/ui/src/styles/globals.css @@ -0,0 +1,128 @@ +@import "tailwindcss"; +@import "tw-animate-css"; + +@source "../../../apps/**/*.{ts,tsx}"; +@source "../../../modules/**/*.{ts,tsx}"; +@source "../../../components/**/*.{ts,tsx}"; +@source "../**/*.{ts,tsx}"; + +@custom-variant dark (&:is(.dark *)); + +:root { + --background: oklch(1 0 0); + --foreground: oklch(0.145 0 0); + --card: oklch(1 0 0); + --card-foreground: oklch(0.145 0 0); + --popover: oklch(1 0 0); + --popover-foreground: oklch(0.145 0 0); + --primary: oklch(0.205 0 0); + --primary-foreground: oklch(0.985 0 0); + --secondary: oklch(0.97 0 0); + --secondary-foreground: oklch(0.205 0 0); + --muted: oklch(0.97 0 0); + --muted-foreground: oklch(0.556 0 0); + --accent: oklch(0.97 0 0); + --accent-foreground: oklch(0.205 0 0); + --destructive: oklch(0.577 0.245 27.325); + --destructive-foreground: oklch(0.577 0.245 27.325); + --border: oklch(0.922 0 0); + --input: oklch(0.922 0 0); + --ring: oklch(0.708 0 0); + --chart-1: oklch(0.646 0.222 41.116); + --chart-2: oklch(0.6 0.118 184.704); + --chart-3: oklch(0.398 0.07 227.392); + --chart-4: oklch(0.828 0.189 84.429); + --chart-5: oklch(0.769 0.188 70.08); + --radius: 0.625rem; + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); +} + +.dark { + --background: oklch(0.145 0 0); + --foreground: oklch(0.985 0 0); + --card: oklch(0.145 0 0); + --card-foreground: oklch(0.985 0 0); + --popover: oklch(0.145 0 0); + --popover-foreground: oklch(0.985 0 0); + --primary: oklch(0.985 0 0); + --primary-foreground: oklch(0.205 0 0); + --secondary: oklch(0.269 0 0); + --secondary-foreground: oklch(0.985 0 0); + --muted: oklch(0.269 0 0); + --muted-foreground: oklch(0.708 0 0); + --accent: oklch(0.269 0 0); + --accent-foreground: oklch(0.985 0 0); + --destructive: oklch(0.396 0.141 25.723); + --destructive-foreground: oklch(0.637 0.237 25.331); + --border: oklch(0.269 0 0); + --input: oklch(0.269 0 0); + --ring: oklch(0.556 0 0); + --chart-1: oklch(0.488 0.243 264.376); + --chart-2: oklch(0.696 0.17 162.48); + --chart-3: oklch(0.769 0.188 70.08); + --chart-4: oklch(0.627 0.265 303.9); + --chart-5: oklch(0.645 0.246 16.439); + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(0.269 0 0); + --sidebar-ring: oklch(0.439 0 0); +} + +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --color-chart-1: var(--chart-1); + --color-chart-2: var(--chart-2); + --color-chart-3: var(--chart-3); + --color-chart-4: var(--chart-4); + --color-chart-5: var(--chart-5); + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + --color-sidebar: var(--sidebar); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-ring: var(--sidebar-ring); +} + +@layer base { + * { + @apply border-border outline-ring/50; + } + body { + @apply bg-background text-foreground; + } +} diff --git a/libs/ui/tsconfig.json b/packages/ui/tsconfig.json similarity index 59% rename from libs/ui/tsconfig.json rename to packages/ui/tsconfig.json index 88819180..3b368a49 100644 --- a/libs/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -3,9 +3,9 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "@ui/*": ["./src/*"] + "@repo/ui/*": ["./src/*"] } }, - "include": ["src"], - "exclude": ["node_modules"] + "include": ["."], + "exclude": ["node_modules", "dist"] } diff --git a/packages/ui/tsconfig.lint.json b/packages/ui/tsconfig.lint.json new file mode 100644 index 00000000..df2762ee --- /dev/null +++ b/packages/ui/tsconfig.lint.json @@ -0,0 +1,8 @@ +{ + "extends": "@repo/typescript-config/react-library.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["src", "turbo"], + "exclude": ["node_modules", "dist"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1bf2c865..038b5c5f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,25 +10,22 @@ importers: devDependencies: '@types/node': specifier: ^22.14.1 - version: 22.14.1 + version: 22.15.3 '@typescript-eslint/eslint-plugin': specifier: ^8.31.0 - version: 8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3))(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) + version: 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/parser': specifier: ^8.31.0 - version: 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) + version: 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) eslint: specifier: ^9.25.1 - version: 9.25.1(jiti@1.21.7) - eslint-plugin-react: - specifier: ^7.37.5 - version: 7.37.5(eslint@9.25.1(jiti@1.21.7)) + version: 9.25.1(jiti@2.4.2) fs: specifier: 0.0.1-security version: 0.0.1-security inquirer: specifier: ^12.5.2 - version: 12.5.2(@types/node@22.14.1) + version: 12.5.2(@types/node@22.15.3) path: specifier: ^0.12.7 version: 0.12.7 @@ -37,68 +34,16 @@ importers: version: 3.5.3 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.14.1)(typescript@5.8.3) + version: 10.9.2(@types/node@22.15.3)(typescript@5.8.3) turbo: - specifier: ^2.5.0 - version: 2.5.0 + specifier: ^2.5.1 + version: 2.5.1 typescript: specifier: 5.8.3 version: 5.8.3 - apps/client: - dependencies: - react: - specifier: ^18.3.1 - version: 18.3.1 - react-dom: - specifier: ^18.3.1 - version: 18.3.1(react@18.3.1) - devDependencies: - '@eslint/js': - specifier: ^9.17.0 - version: 9.25.1 - '@repo/eslint-config': - specifier: workspace:* - version: link:../../libs/eslint-config - '@repo/tsconfig': - specifier: workspace:* - version: link:../../libs/tsconfig - '@types/react': - specifier: ^18.3.18 - version: 18.3.20 - '@types/react-dom': - specifier: ^18.3.5 - version: 18.3.6(@types/react@18.3.20) - '@vitejs/plugin-react': - specifier: ^4.3.4 - version: 4.4.1(vite@6.3.2(@types/node@22.14.1)(jiti@1.21.7)(tsx@4.19.3)(yaml@2.7.1)) - eslint: - specifier: ^9.17.0 - version: 9.25.1(jiti@1.21.7) - eslint-plugin-react-hooks: - specifier: ^5.0.0 - version: 5.2.0(eslint@9.25.1(jiti@1.21.7)) - eslint-plugin-react-refresh: - specifier: ^0.4.16 - version: 0.4.20(eslint@9.25.1(jiti@1.21.7)) - globals: - specifier: ^15.14.0 - version: 15.15.0 - typescript: - specifier: ^5.7.3 - version: 5.8.3 - typescript-eslint: - specifier: ^8.18.2 - version: 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) - vite: - specifier: ^6.0.5 - version: 6.3.2(@types/node@22.14.1)(jiti@1.21.7)(tsx@4.19.3)(yaml@2.7.1) - apps/server: dependencies: - '@types/dinero.js': - specifier: ^1.9.4 - version: 1.9.4 bcrypt: specifier: ^5.1.1 version: 5.1.1 @@ -112,7 +57,7 @@ importers: specifier: ^1.9.1 version: 1.9.1 dotenv: - specifier: ^16.4.7 + specifier: ^16.5.0 version: 16.5.0 esbuild: specifier: ^0.24.0 @@ -122,7 +67,7 @@ importers: version: 4.21.2 glob: specifier: ^11.0.1 - version: 11.0.1 + version: 11.0.2 helmet: specifier: ^8.0.0 version: 8.1.0 @@ -146,7 +91,7 @@ importers: version: 2.2.3 mysql2: specifier: ^3.12.0 - version: 3.14.0 + version: 3.14.1 passport: specifier: ^0.7.0 version: 0.7.0 @@ -167,13 +112,13 @@ importers: version: 2.3.3 sequelize: specifier: ^6.37.5 - version: 6.37.7(mysql2@3.14.0) + version: 6.37.7(mysql2@3.14.1) shallow-equal-object: specifier: ^1.1.1 version: 1.1.1 ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@22.14.1)(typescript@5.7.3) + version: 10.9.2(@types/node@22.15.3)(typescript@5.8.3) uuid: specifier: ^11.0.5 version: 11.1.0 @@ -189,13 +134,19 @@ importers: devDependencies: '@repo/eslint-config': specifier: workspace:* - version: link:../../libs/eslint-config - '@repo/tsconfig': + version: link:../../packages/eslint-config + '@repo/typescript-config': specifier: workspace:* - version: link:../../libs/tsconfig + version: link:../../packages/typescript-config '@types/bcrypt': specifier: ^5.0.2 version: 5.0.2 + '@types/dinero.js': + specifier: ^1.9.4 + version: 1.9.4 + '@types/dotenv': + specifier: ^8.2.3 + version: 8.2.3 '@types/express': specifier: ^4.17.21 version: 4.17.21 @@ -213,7 +164,7 @@ importers: version: 3.6.2 '@types/node': specifier: ^22.10.7 - version: 22.14.1 + version: 22.15.3 '@types/passport': specifier: ^1.0.16 version: 1.0.17 @@ -228,99 +179,112 @@ importers: version: 2.3.8 '@typescript-eslint/eslint-plugin': specifier: ^8.22.0 - version: 8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3))(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3) + version: 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/parser': specifier: ^8.22.0 - version: 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3) + version: 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + version: 29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)) nodemon: specifier: ^3.1.9 - version: 3.1.9 + version: 3.1.10 ts-jest: specifier: ^29.2.5 - version: 29.3.2(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.24.2)(jest@29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)))(typescript@5.7.3) + version: 29.3.2(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.24.2)(jest@29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)))(typescript@5.8.3) ts-node-dev: specifier: ^2.0.0 - version: 2.0.0(@types/node@22.14.1)(typescript@5.7.3) + version: 2.0.0(@types/node@22.15.3)(typescript@5.8.3) tsconfig-paths: specifier: ^4.2.0 version: 4.2.0 typescript: specifier: ^5.7.3 - version: 5.7.3 - - libs/eslint-config: - dependencies: - '@typescript-eslint/eslint-plugin': - specifier: ^8.31.0 - version: 8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3))(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) - '@typescript-eslint/parser': - specifier: ^8.31.0 - version: 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) - eslint: - specifier: ^9.19.0 - version: 9.25.1(jiti@1.21.7) - eslint-plugin-react: - specifier: ^7.0.0 - version: 7.37.5(eslint@9.25.1(jiti@1.21.7)) - typescript: - specifier: '*' version: 5.8.3 - libs/package: + apps/web: dependencies: - '@types/express': - specifier: ^4.17.21 - version: 4.17.21 + '@repo/ui': + specifier: workspace:* + version: link:../../packages/ui + react: + specifier: ^19.1.0 + version: 19.1.0 + react-dom: + specifier: ^19.1.0 + version: 19.1.0(react@19.1.0) + devDependencies: + '@repo/eslint-config': + specifier: workspace:* + version: link:../../packages/eslint-config + '@repo/typescript-config': + specifier: workspace:* + version: link:../../packages/typescript-config '@types/react': specifier: ^19.1.2 version: 19.1.2 - express: - specifier: ^4.18.2 - version: 4.21.2 - react: - specifier: ^18.3.1 - version: 18.3.1 - sequelize: - specifier: ^6.37.5 - version: 6.37.7(mysql2@3.14.0) + '@types/react-dom': + specifier: ^19.1.3 + version: 19.1.3(@types/react@19.1.2) + '@vitejs/plugin-react': + specifier: ^4.4.1 + version: 4.4.1(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(lightningcss@1.29.2)) + globals: + specifier: ^16.0.0 + version: 16.0.0 typescript: - specifier: '*' - version: 5.7.3 + specifier: ^5.8.3 + version: 5.8.3 + typescript-eslint: + specifier: ^8.31.1 + version: 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + vite: + specifier: ^6.3.4 + version: 6.3.4(@types/node@22.15.3)(jiti@2.4.2)(lightningcss@1.29.2) - libs/rdx-criteria: + packages/eslint-config: devDependencies: - '@changesets/cli': - specifier: ^2.27.5 - version: 2.29.2 - '@types/node': - specifier: ^22.10.7 - version: 22.14.1 - eslint-config-codely: - specifier: ^3.1.4 - version: 3.1.4 - tsx: - specifier: ^4.13.2 - version: 4.19.3 + '@eslint/js': + specifier: ^9.25.0 + version: 9.25.1 + '@next/eslint-plugin-next': + specifier: ^15.3.0 + version: 15.3.1 + eslint: + specifier: ^9.25.0 + version: 9.25.1(jiti@2.4.2) + eslint-config-prettier: + specifier: ^10.1.1 + version: 10.1.2(eslint@9.25.1(jiti@2.4.2)) + eslint-plugin-only-warn: + specifier: ^1.1.0 + version: 1.1.0 + eslint-plugin-react: + specifier: ^7.37.4 + version: 7.37.5(eslint@9.25.1(jiti@2.4.2)) + eslint-plugin-react-hooks: + specifier: ^5.2.0 + version: 5.2.0(eslint@9.25.1(jiti@2.4.2)) + eslint-plugin-turbo: + specifier: ^2.5.0 + version: 2.5.1(eslint@9.25.1(jiti@2.4.2))(turbo@2.5.1) + globals: + specifier: ^16.0.0 + version: 16.0.0 typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^5.8.2 + version: 5.8.3 + typescript-eslint: + specifier: ^8.30.1 + version: 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) - libs/rdx-ddd: {} + packages/typescript-config: {} - libs/rdx-verifactu: {} - - libs/shared: {} - - libs/tsconfig: {} - - libs/ui: + packages/ui: dependencies: '@radix-ui/react-slot': - specifier: ^1.1.1 - version: 1.2.0(@types/react@19.1.2)(react@18.3.1) + specifier: ^1.2.0 + version: 1.2.0(@types/react@19.1.2)(react@19.1.0) class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -328,39 +292,54 @@ importers: specifier: ^2.1.1 version: 2.1.1 lucide-react: - specifier: ^0.473.0 - version: 0.473.0(react@18.3.1) + specifier: ^0.503.0 + version: 0.503.0(react@19.1.0) + next-themes: + specifier: ^0.4.6 + version: 0.4.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + react: + specifier: ^19.1.0 + version: 19.1.0 + react-dom: + specifier: ^19.1.0 + version: 19.1.0(react@19.1.0) tailwind-merge: - specifier: ^2.6.0 - version: 2.6.0 - tailwindcss-animate: - specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3))) + specifier: ^3.2.0 + version: 3.2.0 + tw-animate-css: + specifier: ^1.2.8 + version: 1.2.9 + zod: + specifier: ^3.24.3 + version: 3.24.3 devDependencies: '@repo/eslint-config': specifier: workspace:* version: link:../eslint-config - '@repo/tsconfig': + '@repo/typescript-config': specifier: workspace:* - version: link:../tsconfig + version: link:../typescript-config + '@tailwindcss/postcss': + specifier: ^4.1.5 + version: 4.1.5 + '@turbo/gen': + specifier: ^2.5.2 + version: 2.5.2(@types/node@22.15.3)(typescript@5.8.3) '@types/node': - specifier: ^22.10.7 - version: 22.14.1 + specifier: ^22.15.3 + version: 22.15.3 '@types/react': - specifier: ^19.0.7 + specifier: ^19.1.2 version: 19.1.2 - autoprefixer: - specifier: ^10.4.20 - version: 10.4.21(postcss@8.5.3) - postcss: - specifier: ^8.5.1 - version: 8.5.3 + '@types/react-dom': + specifier: ^19.1.3 + version: 19.1.3(@types/react@19.1.2) tailwindcss: - specifier: ^3.4.17 - version: 3.4.17(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + specifier: ^4.1.5 + version: 4.1.5 typescript: - specifier: ^5.7.3 - version: 5.7.3 + specifier: ^5.8.3 + version: 5.8.3 packages: @@ -384,13 +363,6 @@ packages: resolution: {integrity: sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==} engines: {node: '>=6.9.0'} - '@babel/eslint-parser@7.27.0': - resolution: {integrity: sha512-dtnzmSjXfgL/HDgMcmsLSzyGbEosi4DrGWoCNfuI+W4IkVJw6izpTe7LtOdwAXnkDqw5yweboYCTkM2rQizCng==} - engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} - peerDependencies: - '@babel/core': ^7.11.0 - eslint: ^7.5.0 || ^8.0.0 || ^9.0.0 - '@babel/generator@7.27.0': resolution: {integrity: sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==} engines: {node: '>=6.9.0'} @@ -413,6 +385,10 @@ packages: resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} engines: {node: '>=6.9.0'} + '@babel/helper-plugin-utils@7.27.1': + resolution: {integrity: sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==} + engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.25.9': resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} @@ -525,20 +501,20 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx-self@7.25.9': - resolution: {integrity: sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==} + '@babel/plugin-transform-react-jsx-self@7.27.1': + resolution: {integrity: sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx-source@7.25.9': - resolution: {integrity: sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==} + '@babel/plugin-transform-react-jsx-source@7.27.1': + resolution: {integrity: sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/runtime@7.27.0': - resolution: {integrity: sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==} + '@babel/runtime-corejs3@7.27.1': + resolution: {integrity: sha512-909rVuj3phpjW6y0MCXAZ5iNeORePa6ldJvp2baWGcTjwqbBDDz6xoS5JHJ7lS88NlwLYj07ImL/8IUMtDZzTA==} engines: {node: '>=6.9.0'} '@babel/template@7.27.0': @@ -556,61 +532,6 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@changesets/apply-release-plan@7.0.12': - resolution: {integrity: sha512-EaET7As5CeuhTzvXTQCRZeBUcisoYPDDcXvgTE/2jmmypKp0RC7LxKj/yzqeh/1qFTZI7oDGFcL1PHRuQuketQ==} - - '@changesets/assemble-release-plan@6.0.6': - resolution: {integrity: sha512-Frkj8hWJ1FRZiY3kzVCKzS0N5mMwWKwmv9vpam7vt8rZjLL1JMthdh6pSDVSPumHPshTTkKZ0VtNbE0cJHZZUg==} - - '@changesets/changelog-git@0.2.1': - resolution: {integrity: sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==} - - '@changesets/cli@2.29.2': - resolution: {integrity: sha512-vwDemKjGYMOc0l6WUUTGqyAWH3AmueeyoJa1KmFRtCYiCoY5K3B68ErYpDB6H48T4lLI4czum4IEjh6ildxUeg==} - hasBin: true - - '@changesets/config@3.1.1': - resolution: {integrity: sha512-bd+3Ap2TKXxljCggI0mKPfzCQKeV/TU4yO2h2C6vAihIo8tzseAn2e7klSuiyYYXvgu53zMN1OeYMIQkaQoWnA==} - - '@changesets/errors@0.2.0': - resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} - - '@changesets/get-dependents-graph@2.1.3': - resolution: {integrity: sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==} - - '@changesets/get-release-plan@4.0.10': - resolution: {integrity: sha512-CCJ/f3edYaA3MqoEnWvGGuZm0uMEMzNJ97z9hdUR34AOvajSwySwsIzC/bBu3+kuGDsB+cny4FljG8UBWAa7jg==} - - '@changesets/get-version-range-type@0.4.0': - resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - - '@changesets/git@3.0.4': - resolution: {integrity: sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==} - - '@changesets/logger@0.1.1': - resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} - - '@changesets/parse@0.4.1': - resolution: {integrity: sha512-iwksMs5Bf/wUItfcg+OXrEpravm5rEd9Bf4oyIPL4kVTmJQ7PNDSd6MDYkpSJR1pn7tz/k8Zf2DhTCqX08Ou+Q==} - - '@changesets/pre@2.0.2': - resolution: {integrity: sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==} - - '@changesets/read@0.6.5': - resolution: {integrity: sha512-UPzNGhsSjHD3Veb0xO/MwvasGe8eMyNrR/sT9gR8Q3DhOQZirgKhhXv/8hVsI0QpPjR004Z9iFxoJU6in3uGMg==} - - '@changesets/should-skip-package@0.1.2': - resolution: {integrity: sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==} - - '@changesets/types@4.1.0': - resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} - - '@changesets/types@6.1.0': - resolution: {integrity: sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==} - - '@changesets/write@0.4.0': - resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} - '@colors/colors@1.6.0': resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} @@ -628,8 +549,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.25.2': - resolution: {integrity: sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==} + '@esbuild/aix-ppc64@0.25.3': + resolution: {integrity: sha512-W8bFfPA8DowP8l//sxjJLSLkD8iEjMc7cBVyP+u4cEv9sM7mdUCkgsj+t0n/BWPFtv7WWCN5Yzj0N6FJNUUqBQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -640,8 +561,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.25.2': - resolution: {integrity: sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==} + '@esbuild/android-arm64@0.25.3': + resolution: {integrity: sha512-XelR6MzjlZuBM4f5z2IQHK6LkK34Cvv6Rj2EntER3lwCBFdg6h2lKbtRjpTTsdEjD/WSe1q8UyPBXP1x3i/wYQ==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -652,8 +573,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.25.2': - resolution: {integrity: sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==} + '@esbuild/android-arm@0.25.3': + resolution: {integrity: sha512-PuwVXbnP87Tcff5I9ngV0lmiSu40xw1At6i3GsU77U7cjDDB4s0X2cyFuBiDa1SBk9DnvWwnGvVaGBqoFWPb7A==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -664,8 +585,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.25.2': - resolution: {integrity: sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==} + '@esbuild/android-x64@0.25.3': + resolution: {integrity: sha512-ogtTpYHT/g1GWS/zKM0cc/tIebFjm1F9Aw1boQ2Y0eUQ+J89d0jFY//s9ei9jVIlkYi8AfOjiixcLJSGNSOAdQ==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -676,8 +597,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.25.2': - resolution: {integrity: sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==} + '@esbuild/darwin-arm64@0.25.3': + resolution: {integrity: sha512-eESK5yfPNTqpAmDfFWNsOhmIOaQA59tAcF/EfYvo5/QWQCzXn5iUSOnqt3ra3UdzBv073ykTtmeLJZGt3HhA+w==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -688,8 +609,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.25.2': - resolution: {integrity: sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==} + '@esbuild/darwin-x64@0.25.3': + resolution: {integrity: sha512-Kd8glo7sIZtwOLcPbW0yLpKmBNWMANZhrC1r6K++uDR2zyzb6AeOYtI6udbtabmQpFaxJ8uduXMAo1gs5ozz8A==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -700,8 +621,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.25.2': - resolution: {integrity: sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==} + '@esbuild/freebsd-arm64@0.25.3': + resolution: {integrity: sha512-EJiyS70BYybOBpJth3M0KLOus0n+RRMKTYzhYhFeMwp7e/RaajXvP+BWlmEXNk6uk+KAu46j/kaQzr6au+JcIw==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -712,8 +633,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.2': - resolution: {integrity: sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==} + '@esbuild/freebsd-x64@0.25.3': + resolution: {integrity: sha512-Q+wSjaLpGxYf7zC0kL0nDlhsfuFkoN+EXrx2KSB33RhinWzejOd6AvgmP5JbkgXKmjhmpfgKZq24pneodYqE8Q==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -724,8 +645,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.25.2': - resolution: {integrity: sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==} + '@esbuild/linux-arm64@0.25.3': + resolution: {integrity: sha512-xCUgnNYhRD5bb1C1nqrDV1PfkwgbswTTBRbAd8aH5PhYzikdf/ddtsYyMXFfGSsb/6t6QaPSzxtbfAZr9uox4A==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -736,8 +657,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.25.2': - resolution: {integrity: sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==} + '@esbuild/linux-arm@0.25.3': + resolution: {integrity: sha512-dUOVmAUzuHy2ZOKIHIKHCm58HKzFqd+puLaS424h6I85GlSDRZIA5ycBixb3mFgM0Jdh+ZOSB6KptX30DD8YOQ==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -748,8 +669,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.25.2': - resolution: {integrity: sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==} + '@esbuild/linux-ia32@0.25.3': + resolution: {integrity: sha512-yplPOpczHOO4jTYKmuYuANI3WhvIPSVANGcNUeMlxH4twz/TeXuzEP41tGKNGWJjuMhotpGabeFYGAOU2ummBw==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -760,8 +681,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.25.2': - resolution: {integrity: sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==} + '@esbuild/linux-loong64@0.25.3': + resolution: {integrity: sha512-P4BLP5/fjyihmXCELRGrLd793q/lBtKMQl8ARGpDxgzgIKJDRJ/u4r1A/HgpBpKpKZelGct2PGI4T+axcedf6g==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -772,8 +693,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.25.2': - resolution: {integrity: sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==} + '@esbuild/linux-mips64el@0.25.3': + resolution: {integrity: sha512-eRAOV2ODpu6P5divMEMa26RRqb2yUoYsuQQOuFUexUoQndm4MdpXXDBbUoKIc0iPa4aCO7gIhtnYomkn2x+bag==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -784,8 +705,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.25.2': - resolution: {integrity: sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==} + '@esbuild/linux-ppc64@0.25.3': + resolution: {integrity: sha512-ZC4jV2p7VbzTlnl8nZKLcBkfzIf4Yad1SJM4ZMKYnJqZFD4rTI+pBG65u8ev4jk3/MPwY9DvGn50wi3uhdaghg==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -796,8 +717,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.25.2': - resolution: {integrity: sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==} + '@esbuild/linux-riscv64@0.25.3': + resolution: {integrity: sha512-LDDODcFzNtECTrUUbVCs6j9/bDVqy7DDRsuIXJg6so+mFksgwG7ZVnTruYi5V+z3eE5y+BJZw7VvUadkbfg7QA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -808,8 +729,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.25.2': - resolution: {integrity: sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==} + '@esbuild/linux-s390x@0.25.3': + resolution: {integrity: sha512-s+w/NOY2k0yC2p9SLen+ymflgcpRkvwwa02fqmAwhBRI3SC12uiS10edHHXlVWwfAagYSY5UpmT/zISXPMW3tQ==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -820,8 +741,8 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.25.2': - resolution: {integrity: sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==} + '@esbuild/linux-x64@0.25.3': + resolution: {integrity: sha512-nQHDz4pXjSDC6UfOE1Fw9Q8d6GCAd9KdvMZpfVGWSJztYCarRgSDfOVBY5xwhQXseiyxapkiSJi/5/ja8mRFFA==} engines: {node: '>=18'} cpu: [x64] os: [linux] @@ -832,8 +753,8 @@ packages: cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-arm64@0.25.2': - resolution: {integrity: sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==} + '@esbuild/netbsd-arm64@0.25.3': + resolution: {integrity: sha512-1QaLtOWq0mzK6tzzp0jRN3eccmN3hezey7mhLnzC6oNlJoUJz4nym5ZD7mDnS/LZQgkrhEbEiTn515lPeLpgWA==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] @@ -844,8 +765,8 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.2': - resolution: {integrity: sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==} + '@esbuild/netbsd-x64@0.25.3': + resolution: {integrity: sha512-i5Hm68HXHdgv8wkrt+10Bc50zM0/eonPb/a/OFVfB6Qvpiirco5gBA5bz7S2SHuU+Y4LWn/zehzNX14Sp4r27g==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] @@ -856,8 +777,8 @@ packages: cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-arm64@0.25.2': - resolution: {integrity: sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==} + '@esbuild/openbsd-arm64@0.25.3': + resolution: {integrity: sha512-zGAVApJEYTbOC6H/3QBr2mq3upG/LBEXr85/pTtKiv2IXcgKV0RT0QA/hSXZqSvLEpXeIxah7LczB4lkiYhTAQ==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -868,8 +789,8 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.2': - resolution: {integrity: sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==} + '@esbuild/openbsd-x64@0.25.3': + resolution: {integrity: sha512-fpqctI45NnCIDKBH5AXQBsD0NDPbEFczK98hk/aa6HJxbl+UtLkJV2+Bvy5hLSLk3LHmqt0NTkKNso1A9y1a4w==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] @@ -880,8 +801,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.25.2': - resolution: {integrity: sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==} + '@esbuild/sunos-x64@0.25.3': + resolution: {integrity: sha512-ROJhm7d8bk9dMCUZjkS8fgzsPAZEjtRJqCAmVgB0gMrvG7hfmPmz9k1rwO4jSiblFjYmNvbECL9uhaPzONMfgA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -892,8 +813,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.25.2': - resolution: {integrity: sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==} + '@esbuild/win32-arm64@0.25.3': + resolution: {integrity: sha512-YWcow8peiHpNBiIXHwaswPnAXLsLVygFwCB3A7Bh5jRkIBFWHGmNQ48AlX4xDvQNoMZlPYzjVOQDYEzWCqufMQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -904,8 +825,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.25.2': - resolution: {integrity: sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==} + '@esbuild/win32-ia32@0.25.3': + resolution: {integrity: sha512-qspTZOIGoXVS4DpNqUYUs9UxVb04khS1Degaw/MnfMe7goQ3lTfQ13Vw4qY/Nj0979BGvMRpAYbs/BAxEvU8ew==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -916,8 +837,8 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.25.2': - resolution: {integrity: sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==} + '@esbuild/win32-x64@0.25.3': + resolution: {integrity: sha512-ICgUR+kPimx0vvRzf+N/7L7tVSQeE3BYY+NhHRHXS1kBuPO7z2+7ea2HbhDyZdTephgvNvKrlDDKUexuCVBVvg==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -944,18 +865,10 @@ packages: resolution: {integrity: sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/eslintrc@3.3.1': resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.57.1': - resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.25.1': resolution: {integrity: sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -976,19 +889,10 @@ packages: resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} engines: {node: '>=18.18.0'} - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead - '@humanwhocodes/retry@0.3.1': resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} @@ -1217,18 +1121,12 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@manypkg/find-root@1.1.0': - resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} - - '@manypkg/get-packages@1.1.3': - resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} - '@mapbox/node-pre-gyp@1.0.11': resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} hasBin: true - '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': - resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==} + '@next/eslint-plugin-next@15.3.1': + resolution: {integrity: sha512-oEs4dsfM6iyER3jTzMm4kDSbrQJq8wZw5fmT6fg2V3SMo+kgG+cShzLfEV20senZzv8VF+puNLheiGPlBGsv2A==} '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -1242,14 +1140,6 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - - '@pkgr/core@0.2.4': - resolution: {integrity: sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@radix-ui/react-compose-refs@1.1.2': resolution: {integrity: sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==} peerDependencies: @@ -1268,109 +1158,106 @@ packages: '@types/react': optional: true - '@rollup/rollup-android-arm-eabi@4.40.0': - resolution: {integrity: sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==} + '@rollup/rollup-android-arm-eabi@4.40.1': + resolution: {integrity: sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.40.0': - resolution: {integrity: sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==} + '@rollup/rollup-android-arm64@4.40.1': + resolution: {integrity: sha512-PPkxTOisoNC6TpnDKatjKkjRMsdaWIhyuMkA4UsBXT9WEZY4uHezBTjs6Vl4PbqQQeu6oION1w2voYZv9yquCw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.40.0': - resolution: {integrity: sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==} + '@rollup/rollup-darwin-arm64@4.40.1': + resolution: {integrity: sha512-VWXGISWFY18v/0JyNUy4A46KCFCb9NVsH+1100XP31lud+TzlezBbz24CYzbnA4x6w4hx+NYCXDfnvDVO6lcAA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.40.0': - resolution: {integrity: sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==} + '@rollup/rollup-darwin-x64@4.40.1': + resolution: {integrity: sha512-nIwkXafAI1/QCS7pxSpv/ZtFW6TXcNUEHAIA9EIyw5OzxJZQ1YDrX+CL6JAIQgZ33CInl1R6mHet9Y/UZTg2Bw==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.40.0': - resolution: {integrity: sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==} + '@rollup/rollup-freebsd-arm64@4.40.1': + resolution: {integrity: sha512-BdrLJ2mHTrIYdaS2I99mriyJfGGenSaP+UwGi1kB9BLOCu9SR8ZpbkmmalKIALnRw24kM7qCN0IOm6L0S44iWw==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.40.0': - resolution: {integrity: sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==} + '@rollup/rollup-freebsd-x64@4.40.1': + resolution: {integrity: sha512-VXeo/puqvCG8JBPNZXZf5Dqq7BzElNJzHRRw3vjBE27WujdzuOPecDPc/+1DcdcTptNBep3861jNq0mYkT8Z6Q==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.40.0': - resolution: {integrity: sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==} + '@rollup/rollup-linux-arm-gnueabihf@4.40.1': + resolution: {integrity: sha512-ehSKrewwsESPt1TgSE/na9nIhWCosfGSFqv7vwEtjyAqZcvbGIg4JAcV7ZEh2tfj/IlfBeZjgOXm35iOOjadcg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.40.0': - resolution: {integrity: sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==} + '@rollup/rollup-linux-arm-musleabihf@4.40.1': + resolution: {integrity: sha512-m39iO/aaurh5FVIu/F4/Zsl8xppd76S4qoID8E+dSRQvTyZTOI2gVk3T4oqzfq1PtcvOfAVlwLMK3KRQMaR8lg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.40.0': - resolution: {integrity: sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==} + '@rollup/rollup-linux-arm64-gnu@4.40.1': + resolution: {integrity: sha512-Y+GHnGaku4aVLSgrT0uWe2o2Rq8te9hi+MwqGF9r9ORgXhmHK5Q71N757u0F8yU1OIwUIFy6YiJtKjtyktk5hg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.40.0': - resolution: {integrity: sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==} + '@rollup/rollup-linux-arm64-musl@4.40.1': + resolution: {integrity: sha512-jEwjn3jCA+tQGswK3aEWcD09/7M5wGwc6+flhva7dsQNRZZTe30vkalgIzV4tjkopsTS9Jd7Y1Bsj6a4lzz8gQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.40.0': - resolution: {integrity: sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==} + '@rollup/rollup-linux-loongarch64-gnu@4.40.1': + resolution: {integrity: sha512-ySyWikVhNzv+BV/IDCsrraOAZ3UaC8SZB67FZlqVwXwnFhPihOso9rPOxzZbjp81suB1O2Topw+6Ug3JNegejQ==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': - resolution: {integrity: sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==} + '@rollup/rollup-linux-powerpc64le-gnu@4.40.1': + resolution: {integrity: sha512-BvvA64QxZlh7WZWqDPPdt0GH4bznuL6uOO1pmgPnnv86rpUpc8ZxgZwcEgXvo02GRIZX1hQ0j0pAnhwkhwPqWg==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.40.0': - resolution: {integrity: sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==} + '@rollup/rollup-linux-riscv64-gnu@4.40.1': + resolution: {integrity: sha512-EQSP+8+1VuSulm9RKSMKitTav89fKbHymTf25n5+Yr6gAPZxYWpj3DzAsQqoaHAk9YX2lwEyAf9S4W8F4l3VBQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.40.0': - resolution: {integrity: sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==} + '@rollup/rollup-linux-riscv64-musl@4.40.1': + resolution: {integrity: sha512-n/vQ4xRZXKuIpqukkMXZt9RWdl+2zgGNx7Uda8NtmLJ06NL8jiHxUawbwC+hdSq1rrw/9CghCpEONor+l1e2gA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.40.0': - resolution: {integrity: sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==} + '@rollup/rollup-linux-s390x-gnu@4.40.1': + resolution: {integrity: sha512-h8d28xzYb98fMQKUz0w2fMc1XuGzLLjdyxVIbhbil4ELfk5/orZlSTpF/xdI9C8K0I8lCkq+1En2RJsawZekkg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.40.0': - resolution: {integrity: sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==} + '@rollup/rollup-linux-x64-gnu@4.40.1': + resolution: {integrity: sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.40.0': - resolution: {integrity: sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==} + '@rollup/rollup-linux-x64-musl@4.40.1': + resolution: {integrity: sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.40.0': - resolution: {integrity: sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==} + '@rollup/rollup-win32-arm64-msvc@4.40.1': + resolution: {integrity: sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.40.0': - resolution: {integrity: sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==} + '@rollup/rollup-win32-ia32-msvc@4.40.1': + resolution: {integrity: sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.40.0': - resolution: {integrity: sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==} + '@rollup/rollup-win32-x64-msvc@4.40.1': + resolution: {integrity: sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA==} cpu: [x64] os: [win32] - '@rtsao/scc@1.1.0': - resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} - '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -1380,6 +1267,97 @@ packages: '@sinonjs/fake-timers@10.3.0': resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + '@tailwindcss/node@4.1.5': + resolution: {integrity: sha512-CBhSWo0vLnWhXIvpD0qsPephiaUYfHUX3U9anwDaHZAeuGpTiB3XmsxPAN6qX7bFhipyGBqOa1QYQVVhkOUGxg==} + + '@tailwindcss/oxide-android-arm64@4.1.5': + resolution: {integrity: sha512-LVvM0GirXHED02j7hSECm8l9GGJ1RfgpWCW+DRn5TvSaxVsv28gRtoL4aWKGnXqwvI3zu1GABeDNDVZeDPOQrw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + + '@tailwindcss/oxide-darwin-arm64@4.1.5': + resolution: {integrity: sha512-//TfCA3pNrgnw4rRJOqavW7XUk8gsg9ddi8cwcsWXp99tzdBAZW0WXrD8wDyNbqjW316Pk2hiN/NJx/KWHl8oA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@tailwindcss/oxide-darwin-x64@4.1.5': + resolution: {integrity: sha512-XQorp3Q6/WzRd9OalgHgaqgEbjP3qjHrlSUb5k1EuS1Z9NE9+BbzSORraO+ecW432cbCN7RVGGL/lSnHxcd+7Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@tailwindcss/oxide-freebsd-x64@4.1.5': + resolution: {integrity: sha512-bPrLWbxo8gAo97ZmrCbOdtlz/Dkuy8NK97aFbVpkJ2nJ2Jo/rsCbu0TlGx8joCuA3q6vMWTSn01JY46iwG+clg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.5': + resolution: {integrity: sha512-1gtQJY9JzMAhgAfvd/ZaVOjh/Ju/nCoAsvOVJenWZfs05wb8zq+GOTnZALWGqKIYEtyNpCzvMk+ocGpxwdvaVg==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-gnu@4.1.5': + resolution: {integrity: sha512-dtlaHU2v7MtdxBXoqhxwsWjav7oim7Whc6S9wq/i/uUMTWAzq/gijq1InSgn2yTnh43kR+SFvcSyEF0GCNu1PQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-musl@4.1.5': + resolution: {integrity: sha512-fg0F6nAeYcJ3CriqDT1iVrqALMwD37+sLzXs8Rjy8Z1ZHshJoYceodfyUwGJEsQoTyWbliFNRs2wMQNXtT7MVA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-gnu@4.1.5': + resolution: {integrity: sha512-SO+F2YEIAHa1AITwc8oPwMOWhgorPzzcbhWEb+4oLi953h45FklDmM8dPSZ7hNHpIk9p/SCZKUYn35t5fjGtHA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-musl@4.1.5': + resolution: {integrity: sha512-6UbBBplywkk/R+PqqioskUeXfKcBht3KU7juTi1UszJLx0KPXUo10v2Ok04iBJIaDPkIFkUOVboXms5Yxvaz+g==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-wasm32-wasi@4.1.5': + resolution: {integrity: sha512-hwALf2K9FHuiXTPqmo1KeOb83fTRNbe9r/Ixv9ZNQ/R24yw8Ge1HOWDDgTdtzntIaIUJG5dfXCf4g9AD4RiyhQ==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + bundledDependencies: + - '@napi-rs/wasm-runtime' + - '@emnapi/core' + - '@emnapi/runtime' + - '@tybys/wasm-util' + - '@emnapi/wasi-threads' + - tslib + + '@tailwindcss/oxide-win32-arm64-msvc@4.1.5': + resolution: {integrity: sha512-oDKncffWzaovJbkuR7/OTNFRJQVdiw/n8HnzaCItrNQUeQgjy7oUiYpsm9HUBgpmvmDpSSbGaCa2Evzvk3eFmA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@tailwindcss/oxide-win32-x64-msvc@4.1.5': + resolution: {integrity: sha512-WiR4dtyrFdbb+ov0LK+7XsFOsG+0xs0PKZKkt41KDn9jYpO7baE3bXiudPVkTqUEwNfiglCygQHl2jklvSBi7Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@tailwindcss/oxide@4.1.5': + resolution: {integrity: sha512-1n4br1znquEvyW/QuqMKQZlBen+jxAbvyduU87RS8R3tUSvByAkcaMTkJepNIrTlYhD+U25K4iiCIxE6BGdRYA==} + engines: {node: '>= 10'} + + '@tailwindcss/postcss@4.1.5': + resolution: {integrity: sha512-5lAC2/pzuyfhsFgk6I58HcNy6vPK3dV/PoPxSDuOTVbDvCddYHzHiJZZInGIY0venvzzfrTEUAXJFULAfFmObg==} + + '@tootallnate/quickjs-emscripten@0.23.0': + resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} + '@tsconfig/node10@1.0.11': resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} @@ -1392,6 +1370,14 @@ packages: '@tsconfig/node16@1.0.4': resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + '@turbo/gen@2.5.2': + resolution: {integrity: sha512-hk3ewkf0Fb5DHXY2lgrbebsYqCLCVDbpM1vWjmQTbG/ur2ZqE8Of9+D14BDu813L15crLdbddjlL2vY6NPF67A==} + hasBin: true + + '@turbo/workspaces@2.5.2': + resolution: {integrity: sha512-NxPRAT/mywJ6agqLuVsOag1btEUbPYacVqCndQjvkm5EN0DfjvBIYCsXA/i2Q+Z0hqX84UeIIfIXAQiXpAXZmA==} + hasBin: true + '@types/babel__core@7.20.5': resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} @@ -1419,6 +1405,10 @@ packages: '@types/dinero.js@1.9.4': resolution: {integrity: sha512-mtJnan4ajy9MqvoJGVXu0tC9EAAzFjeoKc3d+8AW+H/Od9+8IiC59ymjrZF+JdTToyDvkLReacTsc50Z8eYr6Q==} + '@types/dotenv@8.2.3': + resolution: {integrity: sha512-g2FXjlDX/cYuc5CiQvyU/6kkbP1JtmGzh0obW50zD7OKeILVL0NSpPWLXVfqoAGQjom2/SLLx9zHq0KXvD6mbw==} + deprecated: This is a stub types definition. dotenv provides its own type definitions, so you do not need this installed. + '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} @@ -1428,6 +1418,9 @@ packages: '@types/express@4.17.21': resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} + '@types/glob@7.2.0': + resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} + '@types/glob@8.1.0': resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==} @@ -1437,6 +1430,9 @@ packages: '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} + '@types/inquirer@6.5.0': + resolution: {integrity: sha512-rjaYQ9b9y/VFGOpqBEXRavc3jh0a+e6evAbI31tMda8VlPaSy0AZJfXsvmIe3wklc7W6C3zCSfleuMXR7NOyXw==} + '@types/istanbul-lib-coverage@2.0.6': resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} @@ -1452,9 +1448,6 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/json5@0.0.29': - resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/jsonwebtoken@9.0.9': resolution: {integrity: sha512-uoe+GxEuHbvy12OUQct2X9JenKM3qAscquYymuQN4fMWG9DBQtykrQEFcAbVACF7qaLw9BePSodUL0kquqBJpQ==} @@ -1470,14 +1463,8 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node@12.20.55': - resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - - '@types/node@20.17.30': - resolution: {integrity: sha512-7zf4YyHA+jvBNfVrk2Gtvs6x7E8V+YDW05bNfG2XkWDJfYRXrTiP/DsB2zSYTaHX0bGIujTBQdMVAhb+j7mwpg==} - - '@types/node@22.14.1': - resolution: {integrity: sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==} + '@types/node@22.15.3': + resolution: {integrity: sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==} '@types/passport-jwt@4.0.1': resolution: {integrity: sha512-Y0Ykz6nWP4jpxgEUYq8NoVZeCQPo1ZndJLfapI249g1jHChvRfZRO/LS3tqu26YgAS/laI1qx98sYGz0IalRXQ==} @@ -1491,22 +1478,16 @@ packages: '@types/passport@1.0.17': resolution: {integrity: sha512-aciLyx+wDwT2t2/kJGJR2AEeBz0nJU4WuRX04Wu9Dqc5lSUtwu0WERPHYsLhF9PtseiAMPBGNUOtFjxZ56prsg==} - '@types/prop-types@15.7.14': - resolution: {integrity: sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==} - '@types/qs@6.9.18': resolution: {integrity: sha512-kK7dgTYDyGqS+e2Q4aK9X3D7q234CIZ1Bv0q/7Z5IwRDoADNU81xXJK/YVyLbLTZCoIwUoDoffFeF+p/eIklAA==} '@types/range-parser@1.2.7': resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} - '@types/react-dom@18.3.6': - resolution: {integrity: sha512-nf22//wEbKXusP6E9pfOCDwFdHAX4u172eaJI4YkDRQEZiorm6KfYnSC2SWLDMVWUOWPERmJnN0ujeAfTBLvrw==} + '@types/react-dom@19.1.3': + resolution: {integrity: sha512-rJXC08OG0h3W6wDMFxQrZF00Kq6qQvw0djHRdzl3U5DnIERz0MRce3WVc7IS6JYBwtaP/DwYtRRjVlvivNveKg==} peerDependencies: - '@types/react': ^18.0.0 - - '@types/react@18.3.20': - resolution: {integrity: sha512-IPaCZN7PShZK/3t6Q87pfTkRm6oLTd4vztyoj+cbHUF1g3FfVb2tFIL79uCRKEfv16AhqDMBywP2VW3KIZUvcg==} + '@types/react': ^19.0.0 '@types/react@19.1.2': resolution: {integrity: sha512-oxLPMytKchWGbnQM9O7D67uPa9paTNxO7jVoNMXgkkErULBPhPARCfkKL9ytcIJJRGjbsVwW4ugJzyFFvm/Tiw==} @@ -1529,6 +1510,12 @@ packages: '@types/strip-json-comments@0.0.30': resolution: {integrity: sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==} + '@types/through@0.0.33': + resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} + + '@types/tinycolor2@1.4.6': + resolution: {integrity: sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==} + '@types/triple-beam@1.3.5': resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==} @@ -1541,114 +1528,53 @@ packages: '@types/yargs@17.0.33': resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - '@typescript-eslint/eslint-plugin@7.18.0': - resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/eslint-plugin@8.31.0': - resolution: {integrity: sha512-evaQJZ/J/S4wisevDvC1KFZkPzRetH8kYZbkgcTRyql3mcKsf+ZFDV1BVWUGTCAW5pQHoqn5gK5b8kn7ou9aFQ==} + '@typescript-eslint/eslint-plugin@8.31.1': + resolution: {integrity: sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@7.18.0': - resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/parser@8.31.0': - resolution: {integrity: sha512-67kYYShjBR0jNI5vsf/c3WG4u+zDnCTHTPqVMQguffaWWFs7artgwKmfwdifl+r6XyM5LYLas/dInj2T0SgJyw==} + '@typescript-eslint/parser@8.31.1': + resolution: {integrity: sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/scope-manager@7.18.0': - resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/scope-manager@8.31.0': - resolution: {integrity: sha512-knO8UyF78Nt8O/B64i7TlGXod69ko7z6vJD9uhSlm0qkAbGeRUSudcm0+K/4CrRjrpiHfBCjMWlc08Vav1xwcw==} + '@typescript-eslint/scope-manager@8.31.1': + resolution: {integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.18.0': - resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/type-utils@8.31.0': - resolution: {integrity: sha512-DJ1N1GdjI7IS7uRlzJuEDCgDQix3ZVYVtgeWEyhyn4iaoitpMBX6Ndd488mXSx0xah/cONAkEaYyylDyAeHMHg==} + '@typescript-eslint/type-utils@8.31.1': + resolution: {integrity: sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/types@7.18.0': - resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/types@8.31.0': - resolution: {integrity: sha512-Ch8oSjVyYyJxPQk8pMiP2FFGYatqXQfQIaMp+TpuuLlDachRWpUAeEu1u9B/v/8LToehUIWyiKcA/w5hUFRKuQ==} + '@typescript-eslint/types@8.31.1': + resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@7.18.0': - resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/typescript-estree@8.31.0': - resolution: {integrity: sha512-xLmgn4Yl46xi6aDSZ9KkyfhhtnYI15/CvHbpOy/eR5NWhK/BK8wc709KKwhAR0m4ZKRP7h07bm4BWUYOCuRpQQ==} + '@typescript-eslint/typescript-estree@8.31.1': + resolution: {integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@7.18.0': - resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - - '@typescript-eslint/utils@8.31.0': - resolution: {integrity: sha512-qi6uPLt9cjTFxAb1zGNgTob4x9ur7xC6mHQJ8GwEzGMGE9tYniublmJaowOJ9V2jUzxrltTPfdG2nKlWsq0+Ww==} + '@typescript-eslint/utils@8.31.1': + resolution: {integrity: sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/visitor-keys@7.18.0': - resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/visitor-keys@8.31.0': - resolution: {integrity: sha512-QcGHmlRHWOl93o64ZUMNewCdwKGU6WItOU52H0djgNmn1EOrhVudrDzXz4OycCRSCPwFCDrE2iIt5vmuUdHxuQ==} + '@typescript-eslint/visitor-keys@8.31.1': + resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@ungap/structured-clone@1.3.0': - resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} - '@vitejs/plugin-react@4.4.1': resolution: {integrity: sha512-IpEm5ZmeXAP/osiBXVVP5KjFMzbWOonMs0NaQQl+xYnUAcq4oHUBsF2+p4MgKWG4YMmFYJU8A6sxRPuowllm6w==} engines: {node: ^14.18.0 || >=16.0.0} @@ -1680,13 +1606,17 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} + agent-base@7.1.3: + resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + engines: {node: '>= 14'} + + aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -1699,6 +1629,10 @@ packages: resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -1711,9 +1645,6 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - any-promise@1.3.0: - resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} - anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -1729,9 +1660,6 @@ packages: arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - arg@5.0.2: - resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} - argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -1757,10 +1685,6 @@ packages: resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} engines: {node: '>= 0.4'} - array.prototype.findlastindex@1.2.6: - resolution: {integrity: sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==} - engines: {node: '>= 0.4'} - array.prototype.flat@1.3.3: resolution: {integrity: sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==} engines: {node: '>= 0.4'} @@ -1777,6 +1701,10 @@ packages: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} + ast-types@0.13.4: + resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} + engines: {node: '>=4'} + async-function@1.0.0: resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} engines: {node: '>= 0.4'} @@ -1784,13 +1712,6 @@ packages: async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} - autoprefixer@10.4.21: - resolution: {integrity: sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==} - engines: {node: ^10 || ^12 || >=14} - hasBin: true - peerDependencies: - postcss: ^8.1.0 - available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} @@ -1827,18 +1748,24 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + basic-ftp@5.0.5: + resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} + engines: {node: '>=10.0.0'} + bcrypt@5.1.1: resolution: {integrity: sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==} engines: {node: '>= 10.0.0'} - better-path-resolve@1.0.0: - resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} - engines: {node: '>=4'} - binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + body-parser@1.20.3: resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -1871,6 +1798,9 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} @@ -1891,9 +1821,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - camelcase-css@2.0.1: - resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} - engines: {node: '>= 6'} + camel-case@3.0.0: + resolution: {integrity: sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==} camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} @@ -1906,10 +1835,21 @@ packages: caniuse-lite@1.0.30001715: resolution: {integrity: sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==} + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chalk@3.0.0: + resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} + engines: {node: '>=8'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} + change-case@3.1.0: + resolution: {integrity: sha512-2AZp7uJZbYEzRPsFoa+ijKdvp9zsrnnt6+yFokfwEpeJm0xuJDVoxiRCAaTzyJND8GJkofo2IcKWaUZ/OECVzw==} + char-regex@1.0.2: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} @@ -1935,6 +1875,22 @@ packages: class-variance-authority@0.7.1: resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} + clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + + cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + + cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + cli-width@4.1.0: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} @@ -1943,6 +1899,10 @@ packages: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + cls-rtracer@2.6.3: resolution: {integrity: sha512-O7M/m2M/KfT9v+q7ka9nmsadS67ce9P8+1Zgm6VFamK56oFd1iCoJ9m8hYKUQpK4+RofyaexxHJlOBkxqCDs3Q==} engines: {node: '>=12.17.0 <13.0.0 || >=13.14.0 <14.0.0 || >=14.0.0'} @@ -1984,9 +1944,9 @@ packages: colorspace@1.1.4: resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} - commander@4.1.1: - resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} - engines: {node: '>= 6'} + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -1994,6 +1954,9 @@ packages: console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} + constant-case@2.0.0: + resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} + content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -2012,6 +1975,9 @@ packages: resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} + core-js-pure@3.42.0: + resolution: {integrity: sha512-007bM04u91fF4kMgwom2I5cQxAFIy8jVulgr9eozILl/SZE53QOqnW/+vviC+wQWLv+AunBG+8Q0TLoeSsSxRQ==} + cors@2.8.5: resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} engines: {node: '>= 0.10'} @@ -2028,14 +1994,13 @@ packages: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} - cssesc@3.0.0: - resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} - engines: {node: '>=4'} - hasBin: true - csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + data-uri-to-buffer@6.0.2: + resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} + engines: {node: '>= 14'} + data-view-buffer@1.0.2: resolution: {integrity: sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==} engines: {node: '>= 0.4'} @@ -2056,14 +2021,6 @@ packages: supports-color: optional: true - debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.4.0: resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} engines: {node: '>=6.0'} @@ -2081,6 +2038,10 @@ packages: babel-plugin-macros: optional: true + deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -2088,6 +2049,9 @@ packages: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} @@ -2096,6 +2060,14 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + degenerator@5.0.1: + resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} + engines: {node: '>= 14'} + + del@5.1.0: + resolution: {integrity: sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==} + engines: {node: '>=8'} + delegates@1.0.0: resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} @@ -2111,10 +2083,6 @@ packages: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - detect-indent@6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - detect-libc@2.0.4: resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==} engines: {node: '>=8'} @@ -2123,9 +2091,6 @@ packages: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} - didyoumean@1.2.2: - resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} - diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2141,16 +2106,16 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} - dlv@1.1.3: - resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} - doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} + dot-case@2.1.1: + resolution: {integrity: sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==} + + dotenv@16.0.3: + resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} + engines: {node: '>=12'} dotenv@16.5.0: resolution: {integrity: sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==} @@ -2204,9 +2169,9 @@ packages: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} - enquirer@2.4.1: - resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} - engines: {node: '>=8.6'} + enhanced-resolve@5.18.1: + resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==} + engines: {node: '>=10.13.0'} error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -2248,8 +2213,8 @@ packages: engines: {node: '>=18'} hasBin: true - esbuild@0.25.2: - resolution: {integrity: sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==} + esbuild@0.25.3: + resolution: {integrity: sha512-qKA6Pvai73+M2FtftpNKRxJ78GIjmFXFxd/1DVBqGo/qNhLSfv+G12n9pNoWdytJC8U00TrViOwpjT0zgqQS8Q==} engines: {node: '>=18'} hasBin: true @@ -2260,6 +2225,10 @@ packages: escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + escape-string-regexp@2.0.0: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} engines: {node: '>=8'} @@ -2268,62 +2237,20 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-config-codely@3.1.4: - resolution: {integrity: sha512-hX5CUj8Tsnclzr4glf4Pl2f8Y0r0dPhIOFmf863+zRTI0AUNIxuwfngy8shy4YiyMWMyuFEwEWpkumZ1mfFA7w==} + escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + eslint-config-prettier@10.1.2: + resolution: {integrity: sha512-Epgp/EofAUeEpIdZkW60MHKvPyru1ruQJxPL+WIycnaPApuseK0Zpkrh/FwL9oIpQvIhJwV7ptOy0DWUjTlCiA==} hasBin: true peerDependencies: eslint: '>=7.0.0' - eslint-import-resolver-node@0.3.9: - resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - - eslint-module-utils@2.12.0: - resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - - eslint-plugin-import@2.31.0: - resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - - eslint-plugin-prettier@5.2.6: - resolution: {integrity: sha512-mUcf7QG2Tjk7H055Jk0lGBjbgDnfrvqjhXh9t2xLMSCjZVcw9Rb1V6sVNXO0th3jgeO7zllWPTNRil3JW94TnQ==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true + eslint-plugin-only-warn@1.1.0: + resolution: {integrity: sha512-2tktqUAT+Q3hCAU0iSf4xAN1k9zOpjK5WO8104mB0rT/dGhOa09582HN5HlbxNbPRZ0THV7nLGvzugcNOSjzfA==} + engines: {node: '>=6'} eslint-plugin-react-hooks@5.2.0: resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==} @@ -2331,52 +2258,22 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - eslint-plugin-react-refresh@0.4.20: - resolution: {integrity: sha512-XpbHQ2q5gUF8BGOX4dHe+71qoirYMhApEPZ7sfhF/dNnOF1UXnCMGZf79SFTBO7Bz5YEIT4TMieSlJBWhP9WBA==} - peerDependencies: - eslint: '>=8.40' - eslint-plugin-react@7.37.5: resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-plugin-simple-import-sort@12.1.1: - resolution: {integrity: sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==} + eslint-plugin-turbo@2.5.1: + resolution: {integrity: sha512-liyy40BXnlQP37EX9Z03gqUeH8X8GetqDcOG6EhNqnFktJT3fq+XTLvWzhU+s62JFS5/Njcpm3QTOY9VjD4yAQ==} peerDependencies: - eslint: '>=5.0.0' - - eslint-plugin-unused-imports@3.2.0: - resolution: {integrity: sha512-6uXyn6xdINEpxE1MtDjxQsyXB37lfyO2yKGVVgtD7WEWQGORSOZjgrD6hBhvGv4/SO+TOlS+UnC6JppRqbuwGQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/eslint-plugin': 6 - 7 - eslint: '8' - peerDependenciesMeta: - '@typescript-eslint/eslint-plugin': - optional: true - - eslint-rule-composer@0.3.0: - resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==} - engines: {node: '>=4.0.0'} - - eslint-scope@5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} - - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint: '>6.6.0' + turbo: '>2.0.0' eslint-scope@8.3.0: resolution: {integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint-visitor-keys@2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2385,12 +2282,6 @@ packages: resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. - hasBin: true - eslint@9.25.1: resolution: {integrity: sha512-E6Mtz9oGQWDCpV12319d59n4tx9zOTXSTmc8BLVxBx+G/0RdM5MvEEJLU9c0+aleoePYYgVTOsRblx433qmhWQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2405,10 +2296,6 @@ packages: resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} @@ -2422,10 +2309,6 @@ packages: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} - estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -2454,9 +2337,6 @@ packages: resolution: {integrity: sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==} engines: {node: '>= 0.10.0'} - extendable-error@0.1.7: - resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} - external-editor@3.1.0: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} @@ -2464,8 +2344,9 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + engines: {node: '>=8.6.0'} fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} @@ -2494,9 +2375,9 @@ packages: fecha@4.2.3: resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} @@ -2524,10 +2405,6 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -2550,20 +2427,13 @@ packages: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} - fraction.js@4.3.7: - resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} - fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} - fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} - - fs-extra@8.1.0: - resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} - engines: {node: '>=6 <7 || >=8'} + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} @@ -2626,8 +2496,9 @@ packages: resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} - get-tsconfig@4.10.0: - resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} + get-uri@6.0.4: + resolution: {integrity: sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==} + engines: {node: '>= 14'} glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} @@ -2637,12 +2508,8 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@10.4.5: - resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} - hasBin: true - - glob@11.0.1: - resolution: {integrity: sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==} + glob@11.0.2: + resolution: {integrity: sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ==} engines: {node: 20 || >=22} hasBin: true @@ -2654,25 +2521,21 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} - globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.15.0: - resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} + globals@16.0.0: + resolution: {integrity: sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==} engines: {node: '>=18'} globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} + globby@10.0.2: + resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==} + engines: {node: '>=8'} gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} @@ -2681,9 +2544,18 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + gradient-string@2.0.2: + resolution: {integrity: sha512-rEDCuqUQ4tbD78TpzsMtt5OIf0cBCSDWSJtUDaF6JsAh+k0v9r++NzxNEG87oDZx9ZwGhD8DaezR2L/yrw0Jdw==} + engines: {node: '>=10'} + graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + handlebars@4.7.8: + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} + engines: {node: '>=0.4.7'} + hasBin: true + has-bigints@1.1.0: resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==} engines: {node: '>= 0.4'} @@ -2718,6 +2590,9 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} + header-case@1.0.1: + resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} + helmet@8.1.0: resolution: {integrity: sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==} engines: {node: '>=18.0.0'} @@ -2729,6 +2604,10 @@ packages: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + http-status@2.1.0: resolution: {integrity: sha512-O5kPr7AW7wYd/BBiOezTwnVAnmSNFY+J7hlZD2X5IOxVBetjcHAiTXhzj0gMrnojQlwy+UT1/Y3H3vJ3UlmvLA==} engines: {node: '>= 0.4.0'} @@ -2740,9 +2619,9 @@ packages: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} - human-id@4.1.1: - resolution: {integrity: sha512-3gKm/gCSUipeLsRYZbbdA1BD83lBoWUkZ7G9VFrhWPAU76KwYo5KR8V28bpoPm/ygy0x5/GCbpRQdY7VLYCoIg==} - hasBin: true + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} @@ -2756,6 +2635,9 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + ignore-by-default@1.0.1: resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} @@ -2776,6 +2658,10 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + inflection@1.13.4: resolution: {integrity: sha512-6I/HUDeYFfuNCVS3td055BaXBwKYuzw7K3ExVMStBowKo9oOAMJIXIHvdyR3iboTCp1b+1i5DSkIZTcwIktuDw==} engines: {'0': node >= 0.4.0} @@ -2790,6 +2676,9 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + inquirer@12.5.2: resolution: {integrity: sha512-qoDk/vdSTIaXNXAoNnlg7ubexpJfUo7t8GT2vylxvE49BrLhToFuPPdMViidG2boHV7+AcP1TCkJs/+PPoF2QQ==} engines: {node: '>=18'} @@ -2799,10 +2688,22 @@ packages: '@types/node': optional: true + inquirer@7.3.3: + resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} + engines: {node: '>=8.0.0'} + + inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} + internal-slot@1.1.0: resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} engines: {node: '>= 0.4'} + ip-address@9.0.5: + resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} + engines: {node: '>= 12'} + ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -2873,6 +2774,13 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + + is-lower-case@1.1.3: + resolution: {integrity: sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==} + is-map@2.0.3: resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} engines: {node: '>= 0.4'} @@ -2885,6 +2793,10 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-path-cwd@2.2.0: + resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} + engines: {node: '>=6'} + is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} @@ -2912,10 +2824,6 @@ packages: resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==} engines: {node: '>= 0.4'} - is-subdir@1.2.0: - resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} - engines: {node: '>=4'} - is-symbol@1.1.1: resolution: {integrity: sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==} engines: {node: '>= 0.4'} @@ -2924,6 +2832,13 @@ packages: resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} engines: {node: '>= 0.4'} + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + is-upper-case@1.1.2: + resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==} + is-weakmap@2.0.2: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} engines: {node: '>= 0.4'} @@ -2936,13 +2851,13 @@ packages: resolution: {integrity: sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==} engines: {node: '>= 0.4'} - is-windows@1.0.2: - resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} - engines: {node: '>=0.10.0'} - isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + isbinaryfile@4.0.10: + resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} + engines: {node: '>= 8.0.0'} + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -2974,9 +2889,6 @@ packages: resolution: {integrity: sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==} engines: {node: '>= 0.4'} - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - jackspeak@4.1.0: resolution: {integrity: sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==} engines: {node: 20 || >=22} @@ -3115,8 +3027,8 @@ packages: node-notifier: optional: true - jiti@1.21.7: - resolution: {integrity: sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==} + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} hasBin: true js-tokens@4.0.0: @@ -3130,6 +3042,9 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + jsbn@1.1.0: + resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} + jsesc@3.1.0: resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} engines: {node: '>=6'} @@ -3147,17 +3062,13 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - json5@1.0.2: - resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} - hasBin: true - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true - jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} jsonwebtoken@9.0.2: resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} @@ -3194,9 +3105,69 @@ packages: libphonenumber-js@1.12.7: resolution: {integrity: sha512-0nYZSNj/QEikyhcM5RZFXGlCB/mr4PVamnT1C2sKBnDDTYndrvbybYjvg+PMqAndQHlLbwQ3socolnL3WWTUFA==} - lilconfig@3.1.3: - resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} - engines: {node: '>=14'} + lightningcss-darwin-arm64@1.29.2: + resolution: {integrity: sha512-cK/eMabSViKn/PG8U/a7aCorpeKLMlK0bQeNHmdb7qUnBkNPnL+oV5DjJUo0kqWsJUapZsM4jCfYItbqBDvlcA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.29.2: + resolution: {integrity: sha512-j5qYxamyQw4kDXX5hnnCKMf3mLlHvG44f24Qyi2965/Ycz829MYqjrVg2H8BidybHBp9kom4D7DR5VqCKDXS0w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.29.2: + resolution: {integrity: sha512-wDk7M2tM78Ii8ek9YjnY8MjV5f5JN2qNVO+/0BAGZRvXKtQrBC4/cn4ssQIpKIPP44YXw6gFdpUF+Ps+RGsCwg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.29.2: + resolution: {integrity: sha512-IRUrOrAF2Z+KExdExe3Rz7NSTuuJ2HvCGlMKoquK5pjvo2JY4Rybr+NrKnq0U0hZnx5AnGsuFHjGnNT14w26sg==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.29.2: + resolution: {integrity: sha512-KKCpOlmhdjvUTX/mBuaKemp0oeDIBBLFiU5Fnqxh1/DZ4JPZi4evEH7TKoSBFOSOV3J7iEmmBaw/8dpiUvRKlQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.29.2: + resolution: {integrity: sha512-Q64eM1bPlOOUgxFmoPUefqzY1yV3ctFPE6d/Vt7WzLW4rKTv7MyYNky+FWxRpLkNASTnKQUaiMJ87zNODIrrKQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.29.2: + resolution: {integrity: sha512-0v6idDCPG6epLXtBH/RPkHvYx74CVziHo6TMYga8O2EiQApnUPZsbR9nFNrg2cgBzk1AYqEd95TlrsL7nYABQg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.29.2: + resolution: {integrity: sha512-rMpz2yawkgGT8RULc5S4WiZopVMOFWjiItBT7aSfDX4NQav6M44rhn5hjtkKzB+wMTRlLLqxkeYEtQ3dd9696w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.29.2: + resolution: {integrity: sha512-nL7zRW6evGQqYVu/bKGK+zShyz8OVzsCotFgc7judbt6wnB2KbiKKJwBE4SGoDBQ1O94RjW4asrCjQL4i8Fhbw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.29.2: + resolution: {integrity: sha512-EdIUW3B2vLuHmv7urfzMI/h2fmlnOQBk1xlsDxkN1tCWKjNFjfLhGxYk8C8mzpSfr+A6jFFIi8fU6LbQGsRWjA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.29.2: + resolution: {integrity: sha512-6b6gd/RUXKaw5keVdSEtqFVdzWnU5jMxTUjA2bVcMNPLwSQ08Sv/UodBVtETLCn7k4S1Ibxwh7k68IwLZPgKaA==} + engines: {node: '>= 12.0.0'} lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -3209,6 +3180,10 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + lodash.get@4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. + lodash.includes@4.3.0: resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} @@ -3236,12 +3211,17 @@ packages: lodash.once@4.1.1: resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} - lodash.startcase@4.4.0: - resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + log-symbols@3.0.0: + resolution: {integrity: sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==} + engines: {node: '>=8'} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + logform@2.7.0: resolution: {integrity: sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==} engines: {node: '>= 12.0.0'} @@ -3253,8 +3233,11 @@ packages: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true - lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + lower-case-first@1.0.2: + resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} + + lower-case@1.1.4: + resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} lru-cache@11.1.0: resolution: {integrity: sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==} @@ -3271,8 +3254,8 @@ packages: resolution: {integrity: sha512-Nv9KddBcQSlQopmBHXSsZVY5xsdlZkdH/Iey0BlcBYggMd4two7cZnKOK9vmy3nY0O5RGH99z1PCeTpPqszUYg==} engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'} - lucide-react@0.473.0: - resolution: {integrity: sha512-KW6u5AKeIjkvrxXZ6WuCu9zHE/gEYSXCay+Gre2ZoInD0Je/e3RBtP4OHpJVJ40nDklSvjVKjgH7VU8/e2dzRw==} + lucide-react@0.503.0: + resolution: {integrity: sha512-HGGkdlPWQ0vTF8jJ5TdIqhQXZi6uh3LnNgfZ8MHiuxFfX3RZeA79r2MW2tHAZKlAVfoNE8esm3p+O6VkIvpj6w==} peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -3371,6 +3354,10 @@ packages: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} + mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} @@ -3385,27 +3372,23 @@ packages: moment@2.30.1: resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} - mri@1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} - ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + mute-stream@2.0.0: resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} engines: {node: ^18.17.0 || >=20.5.0} - mysql2@3.14.0: - resolution: {integrity: sha512-8eMhmG6gt/hRkU1G+8KlGOdQi2w+CgtNoD1ksXZq9gQfkfDsX4LHaBwTe1SY0Imx//t2iZA03DFnyYKPinxSRw==} + mysql2@3.14.1: + resolution: {integrity: sha512-7ytuPQJjQB8TNAYX/H2yhL+iQOnIBjAMam361R7UAL0lOVXWjtdrmoL9HYKqKoLp/8UUTRcvo1QPvK9KL7wA8w==} engines: {node: '>= 8.0'} - mz@2.7.0: - resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - named-placeholders@1.1.3: resolution: {integrity: sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==} engines: {node: '>=12.0.0'} @@ -3422,6 +3405,22 @@ packages: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + + netmask@2.0.2: + resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} + engines: {node: '>= 0.4.0'} + + next-themes@0.4.6: + resolution: {integrity: sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==} + peerDependencies: + react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc + react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc + + no-case@2.3.2: + resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} + node-addon-api@5.1.0: resolution: {integrity: sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==} @@ -3437,11 +3436,15 @@ packages: node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + node-plop@0.26.3: + resolution: {integrity: sha512-Cov028YhBZ5aB7MdMWJEmwyBig43aGL5WT4vdoB28Oitau1zZAcHUn8Sgfk9HM33TqhtLJ9PlM/O0Mv+QpV/4Q==} + engines: {node: '>=8.9.4'} + node-releases@2.0.19: resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} - nodemon@3.1.9: - resolution: {integrity: sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==} + nodemon@3.1.10: + resolution: {integrity: sha512-WDjw3pJ0/0jMFmyNDp3gvY2YizjLmmOUQo6DEBY+JgdvW/yQ9mEeSw6H5ythl5Ny2ytb7f9C2nIbjSxMNzbJXw==} engines: {node: '>=10'} hasBin: true @@ -3454,10 +3457,6 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - normalize-range@0.1.2: - resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} - engines: {node: '>=0.10.0'} - npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -3494,10 +3493,6 @@ packages: resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} engines: {node: '>= 0.4'} - object.groupby@1.0.3: - resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} - engines: {node: '>= 0.4'} - object.values@1.2.1: resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==} engines: {node: '>= 0.4'} @@ -3524,21 +3519,22 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} + ora@4.1.1: + resolution: {integrity: sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A==} + engines: {node: '>=8'} + + ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} - outdent@0.5.0: - resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} - own-keys@1.0.1: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} - p-filter@2.1.0: - resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} - engines: {node: '>=8'} - p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -3555,19 +3551,27 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - p-map@2.1.0: - resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} - engines: {node: '>=6'} + p-map@3.0.0: + resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} + engines: {node: '>=8'} p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + pac-proxy-agent@7.2.0: + resolution: {integrity: sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==} + engines: {node: '>= 14'} + + pac-resolver@7.0.1: + resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} + engines: {node: '>= 14'} + package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - package-manager-detector@0.2.11: - resolution: {integrity: sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==} + param-case@2.1.1: + resolution: {integrity: sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==} parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} @@ -3581,6 +3585,9 @@ packages: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} + pascal-case@2.0.1: + resolution: {integrity: sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==} + passport-jwt@4.0.1: resolution: {integrity: sha512-UCKMDYhNuGOBE9/9Ycuoyh7vP6jpeTp/+sfMJl7nLff/t6dps+iaeE0hhNkKN8/HZHcJ7lCdOyDxHdDoxoSvdQ==} @@ -3596,6 +3603,9 @@ packages: resolution: {integrity: sha512-cPLl+qZpSc+ireUvt+IzqbED1cHHkDoVYMo30jbJIdOOjQ1MQYZBPiNvmi8UM6lJuOpTPXJGZQk0DtC4y61MYQ==} engines: {node: '>= 0.4.0'} + path-case@2.1.1: + resolution: {integrity: sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==} + path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -3611,10 +3621,6 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} - path-scurry@2.0.0: resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} engines: {node: 20 || >=22} @@ -3632,8 +3638,11 @@ packages: pause@0.0.1: resolution: {integrity: sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==} - pg-connection-string@2.7.0: - resolution: {integrity: sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==} + pg-connection-string@2.8.5: + resolution: {integrity: sha512-Ni8FuZ8yAF+sWZzojvtLE2b03cqjO5jNULcHFfM9ZZ0/JXrgom5pBREbtnAw7oxsxJqHw9Nz/XWORUEL3/IFow==} + + picocolors@1.0.1: + resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -3646,14 +3655,6 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} - pify@2.3.0: - resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} - engines: {node: '>=0.10.0'} - - pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} - pirates@4.0.7: resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} engines: {node: '>= 6'} @@ -3666,43 +3667,6 @@ packages: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} - postcss-import@15.1.0: - resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} - engines: {node: '>=14.0.0'} - peerDependencies: - postcss: ^8.0.0 - - postcss-js@4.0.1: - resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} - engines: {node: ^12 || ^14 || >= 16} - peerDependencies: - postcss: ^8.4.21 - - postcss-load-config@4.0.2: - resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} - engines: {node: '>= 14'} - peerDependencies: - postcss: '>=8.0.9' - ts-node: '>=9.0.0' - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - - postcss-nested@6.2.0: - resolution: {integrity: sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==} - engines: {node: '>=12.0'} - peerDependencies: - postcss: ^8.2.14 - - postcss-selector-parser@6.1.2: - resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} - engines: {node: '>=4'} - - postcss-value-parser@4.2.0: - resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - postcss@8.5.3: resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} engines: {node: ^10 || ^12 || >=14} @@ -3711,15 +3675,6 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} - - prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - prettier@3.5.3: resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} engines: {node: '>=14'} @@ -3744,6 +3699,13 @@ packages: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} + proxy-agent@6.5.0: + resolution: {integrity: sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==} + engines: {node: '>= 14'} + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + pstree.remy@1.1.8: resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} @@ -3758,9 +3720,6 @@ packages: resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} - quansync@0.2.10: - resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==} - queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -3772,10 +3731,14 @@ packages: resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} engines: {node: '>= 0.8'} - react-dom@18.3.1: - resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + rc@1.2.8: + resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true + + react-dom@19.1.0: + resolution: {integrity: sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==} peerDependencies: - react: ^18.3.1 + react: ^19.1.0 react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -3787,17 +3750,10 @@ packages: resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} engines: {node: '>=0.10.0'} - react@18.3.1: - resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + react@19.1.0: + resolution: {integrity: sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==} engines: {node: '>=0.10.0'} - read-cache@1.0.0: - resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} - - read-yaml-file@1.1.0: - resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} - engines: {node: '>=6'} - readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -3813,13 +3769,17 @@ packages: resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} - regenerator-runtime@0.14.1: - resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - regexp.prototype.flags@1.5.4: resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} engines: {node: '>= 0.4'} + registry-auth-token@3.3.2: + resolution: {integrity: sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==} + + registry-url@3.1.0: + resolution: {integrity: sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==} + engines: {node: '>=0.10.0'} + require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -3836,9 +3796,6 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - resolve-pkg-maps@1.0.0: - resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - resolve.exports@2.0.3: resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} engines: {node: '>=10'} @@ -3856,6 +3813,10 @@ packages: resolution: {integrity: sha512-SsjjOPHl/FfrTQNgmc5oen8Hr1Jxpn6LlHNXxCIFdYMHuK1kMeYMobb9XN3mvxaGQm3dbegqYFMX4+GDORfbWg==} engines: {node: '>= 0.8.0'} + restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + retry-as-promised@7.1.1: resolution: {integrity: sha512-hMD7odLOt3LkTjcif8aRZqi/hybjpLNgSk5oF5FCowfCjok6LukpN2bDX7R5wDmbgBQFn7YoBxSagmtXHaJYJw==} @@ -3873,11 +3834,15 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.40.0: - resolution: {integrity: sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==} + rollup@4.40.1: + resolution: {integrity: sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + run-async@3.0.0: resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} engines: {node: '>=0.12.0'} @@ -3885,6 +3850,10 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + rxjs@6.6.7: + resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} + engines: {npm: '>=2.0.0'} + rxjs@7.8.2: resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} @@ -3910,13 +3879,18 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - scheduler@0.23.2: - resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + scheduler@0.26.0: + resolution: {integrity: sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==} semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + semver@7.6.2: + resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + engines: {node: '>=10'} + hasBin: true + semver@7.7.1: resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} engines: {node: '>=10'} @@ -3926,6 +3900,9 @@ packages: resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} engines: {node: '>= 0.8.0'} + sentence-case@2.1.1: + resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} + seq-queue@0.0.5: resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==} @@ -4036,6 +4013,21 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} + smart-buffer@4.2.0: + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + + snake-case@2.1.0: + resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==} + + socks-proxy-agent@8.0.5: + resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==} + engines: {node: '>= 14'} + + socks@2.8.4: + resolution: {integrity: sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==} + engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} + source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -4043,19 +4035,16 @@ packages: source-map-support@0.5.13: resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} - source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - spawndamnit@3.0.1: - resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} - sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + sprintf-js@1.1.3: + resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + sqlstring@2.3.3: resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==} engines: {node: '>= 0.6'} @@ -4133,11 +4122,6 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - sucrase@3.35.0: - resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} - engines: {node: '>=16 || 14 >=14.17'} - hasBin: true - supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -4154,31 +4138,23 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - synckit@0.11.4: - resolution: {integrity: sha512-Q/XQKRaJiLiFIBNN+mndW7S/RHxvwzuZS6ZwmRzUBqJBv/5QIKCEwkBC8GBf8EQJKYnaFs0wOZbKTXBPj8L9oQ==} - engines: {node: ^14.18.0 || >=16.0.0} + swap-case@1.1.2: + resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} - tailwind-merge@2.6.0: - resolution: {integrity: sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA==} + tailwind-merge@3.2.0: + resolution: {integrity: sha512-FQT/OVqCD+7edmmJpsgCsY820RTD5AkBryuG5IUqR5YQZSdj5xlH5nLgH7YPths7WsLPSpSBNneJdM8aS8aeFA==} - tailwindcss-animate@1.0.7: - resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} - peerDependencies: - tailwindcss: '>=3.0.0 || insiders' + tailwindcss@4.1.5: + resolution: {integrity: sha512-nYtSPfWGDiWgCkwQG/m+aX83XCwf62sBgg3bIlNiiOcggnS1x3uVRDAuyelBFL+vJdOPPCGElxv9DjHJjRHiVA==} - tailwindcss@3.4.17: - resolution: {integrity: sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==} - engines: {node: '>=14.0.0'} - hasBin: true + tapable@2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} tar@6.2.1: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} - term-size@2.2.1: - resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} - engines: {node: '>=8'} - test-exclude@6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} @@ -4186,20 +4162,22 @@ packages: text-hex@1.0.0: resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - thenify-all@1.6.0: - resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} - engines: {node: '>=0.8'} - - thenify@3.3.1: - resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + tinycolor2@1.6.0: + resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} tinyglobby@0.2.13: resolution: {integrity: sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==} engines: {node: '>=12.0.0'} + tinygradient@1.1.5: + resolution: {integrity: sha512-8nIfc2vgQ4TeLnk2lFj4tRLvvJwEfQuabdsmvDdQPT0xlk9TaNtpGd6nNRxXoK6vQhN6RSzj+Cnp5tTQmpxmbw==} + + title-case@2.1.1: + resolution: {integrity: sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==} + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -4233,21 +4211,12 @@ packages: resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} engines: {node: '>= 14.0.0'} - ts-api-utils@1.4.3: - resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - ts-api-utils@2.1.0: resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} engines: {node: '>=18.12'} peerDependencies: typescript: '>=4.8.4' - ts-interface-checker@0.1.13: - resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - ts-jest@29.3.2: resolution: {integrity: sha512-bJJkrWc6PjFVz5g2DGCNUo8z7oFEYaz1xP1NpeDU7KNLMWPpEyV8Chbpkn8xjzgRDpQhnGMyvyldoL7h8JXyug==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} @@ -4297,9 +4266,6 @@ packages: '@swc/wasm': optional: true - tsconfig-paths@3.15.0: - resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - tsconfig-paths@4.2.0: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} @@ -4307,48 +4273,49 @@ packages: tsconfig@7.0.0: resolution: {integrity: sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==} + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - tsx@4.19.3: - resolution: {integrity: sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==} - engines: {node: '>=18.0.0'} - hasBin: true - - turbo-darwin-64@2.5.0: - resolution: {integrity: sha512-fP1hhI9zY8hv0idym3hAaXdPi80TLovmGmgZFocVAykFtOxF+GlfIgM/l4iLAV9ObIO4SUXPVWHeBZQQ+Hpjag==} + turbo-darwin-64@2.5.1: + resolution: {integrity: sha512-U9lT1rZ20PQjEYDiNE0aZrU6K+StAE8rood9xn3pV1w+CSby56HkdR2AffzMdFf8iPTeZfcY1qL62rDcCeRPTw==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.5.0: - resolution: {integrity: sha512-p9sYq7kXH7qeJwIQE86cOWv/xNqvow846l6c/qWc26Ib1ci5W7V0sI5thsrP3eH+VA0d+SHalTKg5SQXgNQBWA==} + turbo-darwin-arm64@2.5.1: + resolution: {integrity: sha512-1Mp0LeP9JENqHnurGNyD557sndPt2BYUbgzUX87tYIdu/26dHyqlobiRzPpEfkOGB/sV4exhJUJGXB1h72szLQ==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.5.0: - resolution: {integrity: sha512-1iEln2GWiF3iPPPS1HQJT6ZCFXynJPd89gs9SkggH2EJsj3eRUSVMmMC8y6d7bBbhBFsiGGazwFIYrI12zs6uQ==} + turbo-linux-64@2.5.1: + resolution: {integrity: sha512-Cl2yKumJQAlNG5UA7vjCU6SPBLrcKaGhOjTaUjGHeD9WLL8vh4FwOlhOD2wk7zCUlhpJaM73WHY+oOZGMqmzOg==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.5.0: - resolution: {integrity: sha512-bKBcbvuQHmsX116KcxHJuAcppiiBOfivOObh2O5aXNER6mce7YDDQJy00xQQNp1DhEfcSV2uOsvb3O3nN2cbcA==} + turbo-linux-arm64@2.5.1: + resolution: {integrity: sha512-OFpb/9YZJG8v3nttD4K5dxW3bwsZp++oxAykpYsPhp552EX6r+dJrt2dzX3C0azls2JLf/UzTpA83fRoM8mC4g==} cpu: [arm64] os: [linux] - turbo-windows-64@2.5.0: - resolution: {integrity: sha512-9BCo8oQ7BO7J0K913Czbc3tw8QwLqn2nTe4E47k6aVYkM12ASTScweXPTuaPFP5iYXAT6z5Dsniw704Ixa5eGg==} + turbo-windows-64@2.5.1: + resolution: {integrity: sha512-6XnfSxE8xPETVAlAwfMqCuVuZbq9gXTj8H/Eggv/i3Tjoh2l5xMVTOmg3/zV4RlDtTcwhnvXgXx8LEXrSRZmQQ==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.5.0: - resolution: {integrity: sha512-OUHCV+ueXa3UzfZ4co/ueIHgeq9B2K48pZwIxKSm5VaLVuv8M13MhM7unukW09g++dpdrrE1w4IOVgxKZ0/exg==} + turbo-windows-arm64@2.5.1: + resolution: {integrity: sha512-Nc9abxTCpRL8ejzzIm5j6jze3jFi23ZtU83Fwz2N9StquYHGEi72isyeCkrhzCiUvZZEPlFyFaXOSShcJUK58Q==} cpu: [arm64] os: [win32] - turbo@2.5.0: - resolution: {integrity: sha512-PvSRruOsitjy6qdqwIIyolv99+fEn57gP6gn4zhsHTEcCYgXPhv6BAxzAjleS8XKpo+Y582vTTA9nuqYDmbRuA==} + turbo@2.5.1: + resolution: {integrity: sha512-LT0wYyT+HY4StvmGMq1k2tHCIwauaWSXwyP+tCUked9vja5xEisW8b8NIJGi9BWH5HYH9Og1DysaQFTf8BiydQ==} hasBin: true + tw-animate-css@1.2.9: + resolution: {integrity: sha512-9O4k1at9pMQff9EAcCEuy1UNO43JmaPQvq+0lwza9Y0BQ6LB38NiMj+qHqjoQf40355MX+gs6wtlR6H9WsSXFg==} + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -4357,10 +4324,6 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} @@ -4389,23 +4352,23 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} - typescript-eslint@8.31.0: - resolution: {integrity: sha512-u+93F0sB0An8WEAPtwxVhFby573E8ckdjwUUQUj9QA4v8JAvgtoDdIyYR3XFwFHq2W1KJ1AurwJCO+w+Y1ixyQ==} + typescript-eslint@8.31.1: + resolution: {integrity: sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - typescript@5.7.3: - resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} - engines: {node: '>=14.17'} - hasBin: true - typescript@5.8.3: resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} engines: {node: '>=14.17'} hasBin: true + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} + engines: {node: '>=0.8.0'} + hasBin: true + unbox-primitive@1.1.0: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} @@ -4413,15 +4376,12 @@ packages: undefsafe@2.0.5: resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} - universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} @@ -4433,6 +4393,15 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + update-check@1.5.4: + resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==} + + upper-case-first@1.1.2: + resolution: {integrity: sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==} + + upper-case@1.1.3: + resolution: {integrity: sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==} + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -4465,6 +4434,10 @@ packages: resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} engines: {node: '>=10.12.0'} + validate-npm-package-name@5.0.1: + resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + validator@13.15.0: resolution: {integrity: sha512-36B2ryl4+oL5QxZ3AzD0t5SsMNGvTtQHpjgFO5tbNxfXbMFkY822ktCDe1MnlqV3301QQI9SLHDNJokDI+Z9pA==} engines: {node: '>= 0.10'} @@ -4473,8 +4446,8 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - vite@6.3.2: - resolution: {integrity: sha512-ZSvGOXKGceizRQIZSz7TGJ0pS3QLlVY/9hwxVh17W3re67je1RKYzFHivZ/t0tubU78Vkyb9WnHPENSBCzbckg==} + vite@6.3.4: + resolution: {integrity: sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -4516,6 +4489,9 @@ packages: walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -4567,6 +4543,9 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -4600,11 +4579,6 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml@2.7.1: - resolution: {integrity: sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==} - engines: {node: '>= 14'} - hasBin: true - yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -4665,14 +4639,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/eslint-parser@7.27.0(@babel/core@7.26.10)(eslint@8.57.1)': - dependencies: - '@babel/core': 7.26.10 - '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 - eslint: 8.57.1 - eslint-visitor-keys: 2.1.0 - semver: 6.3.1 - '@babel/generator@7.27.0': dependencies: '@babel/parser': 7.27.0 @@ -4707,6 +4673,8 @@ snapshots: '@babel/helper-plugin-utils@7.26.5': {} + '@babel/helper-plugin-utils@7.27.1': {} + '@babel/helper-string-parser@7.25.9': {} '@babel/helper-validator-identifier@7.25.9': {} @@ -4807,19 +4775,19 @@ snapshots: '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-react-jsx-self@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-react-jsx-source@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/runtime@7.27.0': + '@babel/runtime-corejs3@7.27.1': dependencies: - regenerator-runtime: 0.14.1 + core-js-pure: 3.42.0 '@babel/template@7.27.0': dependencies: @@ -4846,148 +4814,6 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@changesets/apply-release-plan@7.0.12': - dependencies: - '@changesets/config': 3.1.1 - '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.4 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - detect-indent: 6.1.0 - fs-extra: 7.0.1 - lodash.startcase: 4.4.0 - outdent: 0.5.0 - prettier: 2.8.8 - resolve-from: 5.0.0 - semver: 7.7.1 - - '@changesets/assemble-release-plan@6.0.6': - dependencies: - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.3 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - semver: 7.7.1 - - '@changesets/changelog-git@0.2.1': - dependencies: - '@changesets/types': 6.1.0 - - '@changesets/cli@2.29.2': - dependencies: - '@changesets/apply-release-plan': 7.0.12 - '@changesets/assemble-release-plan': 6.0.6 - '@changesets/changelog-git': 0.2.1 - '@changesets/config': 3.1.1 - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.3 - '@changesets/get-release-plan': 4.0.10 - '@changesets/git': 3.0.4 - '@changesets/logger': 0.1.1 - '@changesets/pre': 2.0.2 - '@changesets/read': 0.6.5 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@changesets/write': 0.4.0 - '@manypkg/get-packages': 1.1.3 - ansi-colors: 4.1.3 - ci-info: 3.9.0 - enquirer: 2.4.1 - external-editor: 3.1.0 - fs-extra: 7.0.1 - mri: 1.2.0 - p-limit: 2.3.0 - package-manager-detector: 0.2.11 - picocolors: 1.1.1 - resolve-from: 5.0.0 - semver: 7.7.1 - spawndamnit: 3.0.1 - term-size: 2.2.1 - - '@changesets/config@3.1.1': - dependencies: - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.3 - '@changesets/logger': 0.1.1 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - micromatch: 4.0.8 - - '@changesets/errors@0.2.0': - dependencies: - extendable-error: 0.1.7 - - '@changesets/get-dependents-graph@2.1.3': - dependencies: - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - picocolors: 1.1.1 - semver: 7.7.1 - - '@changesets/get-release-plan@4.0.10': - dependencies: - '@changesets/assemble-release-plan': 6.0.6 - '@changesets/config': 3.1.1 - '@changesets/pre': 2.0.2 - '@changesets/read': 0.6.5 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - - '@changesets/get-version-range-type@0.4.0': {} - - '@changesets/git@3.0.4': - dependencies: - '@changesets/errors': 0.2.0 - '@manypkg/get-packages': 1.1.3 - is-subdir: 1.2.0 - micromatch: 4.0.8 - spawndamnit: 3.0.1 - - '@changesets/logger@0.1.1': - dependencies: - picocolors: 1.1.1 - - '@changesets/parse@0.4.1': - dependencies: - '@changesets/types': 6.1.0 - js-yaml: 3.14.1 - - '@changesets/pre@2.0.2': - dependencies: - '@changesets/errors': 0.2.0 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - - '@changesets/read@0.6.5': - dependencies: - '@changesets/git': 3.0.4 - '@changesets/logger': 0.1.1 - '@changesets/parse': 0.4.1 - '@changesets/types': 6.1.0 - fs-extra: 7.0.1 - p-filter: 2.1.0 - picocolors: 1.1.1 - - '@changesets/should-skip-package@0.1.2': - dependencies: - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - - '@changesets/types@4.1.0': {} - - '@changesets/types@6.1.0': {} - - '@changesets/write@0.4.0': - dependencies: - '@changesets/types': 6.1.0 - fs-extra: 7.0.1 - human-id: 4.1.1 - prettier: 2.8.8 - '@colors/colors@1.6.0': {} '@cspotcode/source-map-support@0.8.1': @@ -5003,161 +4829,156 @@ snapshots: '@esbuild/aix-ppc64@0.24.2': optional: true - '@esbuild/aix-ppc64@0.25.2': + '@esbuild/aix-ppc64@0.25.3': optional: true '@esbuild/android-arm64@0.24.2': optional: true - '@esbuild/android-arm64@0.25.2': + '@esbuild/android-arm64@0.25.3': optional: true '@esbuild/android-arm@0.24.2': optional: true - '@esbuild/android-arm@0.25.2': + '@esbuild/android-arm@0.25.3': optional: true '@esbuild/android-x64@0.24.2': optional: true - '@esbuild/android-x64@0.25.2': + '@esbuild/android-x64@0.25.3': optional: true '@esbuild/darwin-arm64@0.24.2': optional: true - '@esbuild/darwin-arm64@0.25.2': + '@esbuild/darwin-arm64@0.25.3': optional: true '@esbuild/darwin-x64@0.24.2': optional: true - '@esbuild/darwin-x64@0.25.2': + '@esbuild/darwin-x64@0.25.3': optional: true '@esbuild/freebsd-arm64@0.24.2': optional: true - '@esbuild/freebsd-arm64@0.25.2': + '@esbuild/freebsd-arm64@0.25.3': optional: true '@esbuild/freebsd-x64@0.24.2': optional: true - '@esbuild/freebsd-x64@0.25.2': + '@esbuild/freebsd-x64@0.25.3': optional: true '@esbuild/linux-arm64@0.24.2': optional: true - '@esbuild/linux-arm64@0.25.2': + '@esbuild/linux-arm64@0.25.3': optional: true '@esbuild/linux-arm@0.24.2': optional: true - '@esbuild/linux-arm@0.25.2': + '@esbuild/linux-arm@0.25.3': optional: true '@esbuild/linux-ia32@0.24.2': optional: true - '@esbuild/linux-ia32@0.25.2': + '@esbuild/linux-ia32@0.25.3': optional: true '@esbuild/linux-loong64@0.24.2': optional: true - '@esbuild/linux-loong64@0.25.2': + '@esbuild/linux-loong64@0.25.3': optional: true '@esbuild/linux-mips64el@0.24.2': optional: true - '@esbuild/linux-mips64el@0.25.2': + '@esbuild/linux-mips64el@0.25.3': optional: true '@esbuild/linux-ppc64@0.24.2': optional: true - '@esbuild/linux-ppc64@0.25.2': + '@esbuild/linux-ppc64@0.25.3': optional: true '@esbuild/linux-riscv64@0.24.2': optional: true - '@esbuild/linux-riscv64@0.25.2': + '@esbuild/linux-riscv64@0.25.3': optional: true '@esbuild/linux-s390x@0.24.2': optional: true - '@esbuild/linux-s390x@0.25.2': + '@esbuild/linux-s390x@0.25.3': optional: true '@esbuild/linux-x64@0.24.2': optional: true - '@esbuild/linux-x64@0.25.2': + '@esbuild/linux-x64@0.25.3': optional: true '@esbuild/netbsd-arm64@0.24.2': optional: true - '@esbuild/netbsd-arm64@0.25.2': + '@esbuild/netbsd-arm64@0.25.3': optional: true '@esbuild/netbsd-x64@0.24.2': optional: true - '@esbuild/netbsd-x64@0.25.2': + '@esbuild/netbsd-x64@0.25.3': optional: true '@esbuild/openbsd-arm64@0.24.2': optional: true - '@esbuild/openbsd-arm64@0.25.2': + '@esbuild/openbsd-arm64@0.25.3': optional: true '@esbuild/openbsd-x64@0.24.2': optional: true - '@esbuild/openbsd-x64@0.25.2': + '@esbuild/openbsd-x64@0.25.3': optional: true '@esbuild/sunos-x64@0.24.2': optional: true - '@esbuild/sunos-x64@0.25.2': + '@esbuild/sunos-x64@0.25.3': optional: true '@esbuild/win32-arm64@0.24.2': optional: true - '@esbuild/win32-arm64@0.25.2': + '@esbuild/win32-arm64@0.25.3': optional: true '@esbuild/win32-ia32@0.24.2': optional: true - '@esbuild/win32-ia32@0.25.2': + '@esbuild/win32-ia32@0.25.3': optional: true '@esbuild/win32-x64@0.24.2': optional: true - '@esbuild/win32-x64@0.25.2': + '@esbuild/win32-x64@0.25.3': optional: true - '@eslint-community/eslint-utils@4.6.1(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.6.1(eslint@9.25.1(jiti@2.4.2))': dependencies: - eslint: 8.57.1 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/eslint-utils@4.6.1(eslint@9.25.1(jiti@1.21.7))': - dependencies: - eslint: 9.25.1(jiti@1.21.7) + eslint: 9.25.1(jiti@2.4.2) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -5176,20 +4997,6 @@ snapshots: dependencies: '@types/json-schema': 7.0.15 - '@eslint/eslintrc@2.1.4': - dependencies: - ajv: 6.12.6 - debug: 4.4.0(supports-color@5.5.0) - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - '@eslint/eslintrc@3.3.1': dependencies: ajv: 6.12.6 @@ -5204,8 +5011,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.1': {} - '@eslint/js@9.25.1': {} '@eslint/object-schema@2.1.6': {} @@ -5222,43 +5027,33 @@ snapshots: '@humanfs/core': 0.19.1 '@humanwhocodes/retry': 0.3.1 - '@humanwhocodes/config-array@0.13.0': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.4.0(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.3': {} - '@humanwhocodes/retry@0.3.1': {} '@humanwhocodes/retry@0.4.2': {} - '@inquirer/checkbox@4.1.5(@types/node@22.14.1)': + '@inquirer/checkbox@4.1.5(@types/node@22.15.3)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/type': 3.0.6(@types/node@22.15.3) ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/confirm@5.1.9(@types/node@22.14.1)': + '@inquirer/confirm@5.1.9(@types/node@22.15.3)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) + '@inquirer/type': 3.0.6(@types/node@22.15.3) optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/core@10.1.10(@types/node@22.14.1)': + '@inquirer/core@10.1.10(@types/node@22.15.3)': dependencies: '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/type': 3.0.6(@types/node@22.15.3) ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -5266,93 +5061,93 @@ snapshots: wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/editor@4.2.10(@types/node@22.14.1)': + '@inquirer/editor@4.2.10(@types/node@22.15.3)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) + '@inquirer/type': 3.0.6(@types/node@22.15.3) external-editor: 3.1.0 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/expand@4.0.12(@types/node@22.14.1)': + '@inquirer/expand@4.0.12(@types/node@22.15.3)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) + '@inquirer/type': 3.0.6(@types/node@22.15.3) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@inquirer/figures@1.0.11': {} - '@inquirer/input@4.1.9(@types/node@22.14.1)': + '@inquirer/input@4.1.9(@types/node@22.15.3)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) + '@inquirer/type': 3.0.6(@types/node@22.15.3) optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/number@3.0.12(@types/node@22.14.1)': + '@inquirer/number@3.0.12(@types/node@22.15.3)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) + '@inquirer/type': 3.0.6(@types/node@22.15.3) optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/password@4.0.12(@types/node@22.14.1)': + '@inquirer/password@4.0.12(@types/node@22.15.3)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) + '@inquirer/type': 3.0.6(@types/node@22.15.3) ansi-escapes: 4.3.2 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/prompts@7.4.1(@types/node@22.14.1)': + '@inquirer/prompts@7.4.1(@types/node@22.15.3)': dependencies: - '@inquirer/checkbox': 4.1.5(@types/node@22.14.1) - '@inquirer/confirm': 5.1.9(@types/node@22.14.1) - '@inquirer/editor': 4.2.10(@types/node@22.14.1) - '@inquirer/expand': 4.0.12(@types/node@22.14.1) - '@inquirer/input': 4.1.9(@types/node@22.14.1) - '@inquirer/number': 3.0.12(@types/node@22.14.1) - '@inquirer/password': 4.0.12(@types/node@22.14.1) - '@inquirer/rawlist': 4.0.12(@types/node@22.14.1) - '@inquirer/search': 3.0.12(@types/node@22.14.1) - '@inquirer/select': 4.1.1(@types/node@22.14.1) + '@inquirer/checkbox': 4.1.5(@types/node@22.15.3) + '@inquirer/confirm': 5.1.9(@types/node@22.15.3) + '@inquirer/editor': 4.2.10(@types/node@22.15.3) + '@inquirer/expand': 4.0.12(@types/node@22.15.3) + '@inquirer/input': 4.1.9(@types/node@22.15.3) + '@inquirer/number': 3.0.12(@types/node@22.15.3) + '@inquirer/password': 4.0.12(@types/node@22.15.3) + '@inquirer/rawlist': 4.0.12(@types/node@22.15.3) + '@inquirer/search': 3.0.12(@types/node@22.15.3) + '@inquirer/select': 4.1.1(@types/node@22.15.3) optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/rawlist@4.0.12(@types/node@22.14.1)': + '@inquirer/rawlist@4.0.12(@types/node@22.15.3)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) + '@inquirer/type': 3.0.6(@types/node@22.15.3) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/search@3.0.12(@types/node@22.14.1)': + '@inquirer/search@3.0.12(@types/node@22.15.3)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/type': 3.0.6(@types/node@22.15.3) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/select@4.1.1(@types/node@22.14.1)': + '@inquirer/select@4.1.1(@types/node@22.15.3)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/type': 3.0.6(@types/node@22.15.3) ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 - '@inquirer/type@3.0.6(@types/node@22.14.1)': + '@inquirer/type@3.0.6(@types/node@22.15.3)': optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@isaacs/cliui@8.0.2': dependencies: @@ -5376,27 +5171,27 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.14.1 + '@types/node': 22.15.3 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3))': + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.14.1 + '@types/node': 22.15.3 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -5421,7 +5216,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.14.1 + '@types/node': 22.15.3 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -5439,7 +5234,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.14.1 + '@types/node': 22.15.3 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -5461,7 +5256,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.14.1 + '@types/node': 22.15.3 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -5531,7 +5326,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -5557,22 +5352,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@manypkg/find-root@1.1.0': - dependencies: - '@babel/runtime': 7.27.0 - '@types/node': 12.20.55 - find-up: 4.1.0 - fs-extra: 8.1.0 - - '@manypkg/get-packages@1.1.3': - dependencies: - '@babel/runtime': 7.27.0 - '@changesets/types': 4.1.0 - '@manypkg/find-root': 1.1.0 - fs-extra: 8.1.0 - globby: 11.1.0 - read-yaml-file: 1.1.0 - '@mapbox/node-pre-gyp@1.0.11': dependencies: detect-libc: 2.0.4 @@ -5588,9 +5367,9 @@ snapshots: - encoding - supports-color - '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': + '@next/eslint-plugin-next@15.3.1': dependencies: - eslint-scope: 5.1.1 + fast-glob: 3.3.1 '@nodelib/fs.scandir@2.1.5': dependencies: @@ -5604,86 +5383,79 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 - '@pkgjs/parseargs@0.11.0': - optional: true - - '@pkgr/core@0.2.4': {} - - '@radix-ui/react-compose-refs@1.1.2(@types/react@19.1.2)(react@18.3.1)': + '@radix-ui/react-compose-refs@1.1.2(@types/react@19.1.2)(react@19.1.0)': dependencies: - react: 18.3.1 + react: 19.1.0 optionalDependencies: '@types/react': 19.1.2 - '@radix-ui/react-slot@1.2.0(@types/react@19.1.2)(react@18.3.1)': + '@radix-ui/react-slot@1.2.0(@types/react@19.1.2)(react@19.1.0)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.2)(react@19.1.0) + react: 19.1.0 optionalDependencies: '@types/react': 19.1.2 - '@rollup/rollup-android-arm-eabi@4.40.0': + '@rollup/rollup-android-arm-eabi@4.40.1': optional: true - '@rollup/rollup-android-arm64@4.40.0': + '@rollup/rollup-android-arm64@4.40.1': optional: true - '@rollup/rollup-darwin-arm64@4.40.0': + '@rollup/rollup-darwin-arm64@4.40.1': optional: true - '@rollup/rollup-darwin-x64@4.40.0': + '@rollup/rollup-darwin-x64@4.40.1': optional: true - '@rollup/rollup-freebsd-arm64@4.40.0': + '@rollup/rollup-freebsd-arm64@4.40.1': optional: true - '@rollup/rollup-freebsd-x64@4.40.0': + '@rollup/rollup-freebsd-x64@4.40.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.40.0': + '@rollup/rollup-linux-arm-gnueabihf@4.40.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.40.0': + '@rollup/rollup-linux-arm-musleabihf@4.40.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.40.0': + '@rollup/rollup-linux-arm64-gnu@4.40.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.40.0': + '@rollup/rollup-linux-arm64-musl@4.40.1': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.40.0': + '@rollup/rollup-linux-loongarch64-gnu@4.40.1': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.40.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.40.0': + '@rollup/rollup-linux-riscv64-gnu@4.40.1': optional: true - '@rollup/rollup-linux-riscv64-musl@4.40.0': + '@rollup/rollup-linux-riscv64-musl@4.40.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.40.0': + '@rollup/rollup-linux-s390x-gnu@4.40.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.40.0': + '@rollup/rollup-linux-x64-gnu@4.40.1': optional: true - '@rollup/rollup-linux-x64-musl@4.40.0': + '@rollup/rollup-linux-x64-musl@4.40.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.40.0': + '@rollup/rollup-win32-arm64-msvc@4.40.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.40.0': + '@rollup/rollup-win32-ia32-msvc@4.40.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.40.0': + '@rollup/rollup-win32-x64-msvc@4.40.1': optional: true - '@rtsao/scc@1.1.0': {} - '@sinclair/typebox@0.27.8': {} '@sinonjs/commons@3.0.1': @@ -5694,6 +5466,74 @@ snapshots: dependencies: '@sinonjs/commons': 3.0.1 + '@tailwindcss/node@4.1.5': + dependencies: + enhanced-resolve: 5.18.1 + jiti: 2.4.2 + lightningcss: 1.29.2 + tailwindcss: 4.1.5 + + '@tailwindcss/oxide-android-arm64@4.1.5': + optional: true + + '@tailwindcss/oxide-darwin-arm64@4.1.5': + optional: true + + '@tailwindcss/oxide-darwin-x64@4.1.5': + optional: true + + '@tailwindcss/oxide-freebsd-x64@4.1.5': + optional: true + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.5': + optional: true + + '@tailwindcss/oxide-linux-arm64-gnu@4.1.5': + optional: true + + '@tailwindcss/oxide-linux-arm64-musl@4.1.5': + optional: true + + '@tailwindcss/oxide-linux-x64-gnu@4.1.5': + optional: true + + '@tailwindcss/oxide-linux-x64-musl@4.1.5': + optional: true + + '@tailwindcss/oxide-wasm32-wasi@4.1.5': + optional: true + + '@tailwindcss/oxide-win32-arm64-msvc@4.1.5': + optional: true + + '@tailwindcss/oxide-win32-x64-msvc@4.1.5': + optional: true + + '@tailwindcss/oxide@4.1.5': + optionalDependencies: + '@tailwindcss/oxide-android-arm64': 4.1.5 + '@tailwindcss/oxide-darwin-arm64': 4.1.5 + '@tailwindcss/oxide-darwin-x64': 4.1.5 + '@tailwindcss/oxide-freebsd-x64': 4.1.5 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.5 + '@tailwindcss/oxide-linux-arm64-gnu': 4.1.5 + '@tailwindcss/oxide-linux-arm64-musl': 4.1.5 + '@tailwindcss/oxide-linux-x64-gnu': 4.1.5 + '@tailwindcss/oxide-linux-x64-musl': 4.1.5 + '@tailwindcss/oxide-wasm32-wasi': 4.1.5 + '@tailwindcss/oxide-win32-arm64-msvc': 4.1.5 + '@tailwindcss/oxide-win32-x64-msvc': 4.1.5 + + '@tailwindcss/postcss@4.1.5': + dependencies: + '@alloc/quick-lru': 5.2.0 + '@tailwindcss/node': 4.1.5 + '@tailwindcss/oxide': 4.1.5 + postcss: 8.5.3 + tailwindcss: 4.1.5 + + '@tootallnate/quickjs-emscripten@0.23.0': {} + '@tsconfig/node10@1.0.11': {} '@tsconfig/node12@1.0.11': {} @@ -5702,6 +5542,40 @@ snapshots: '@tsconfig/node16@1.0.4': {} + '@turbo/gen@2.5.2(@types/node@22.15.3)(typescript@5.8.3)': + dependencies: + '@turbo/workspaces': 2.5.2 + commander: 10.0.1 + fs-extra: 10.1.0 + inquirer: 8.2.6 + minimatch: 9.0.5 + node-plop: 0.26.3 + picocolors: 1.0.1 + proxy-agent: 6.5.0 + ts-node: 10.9.2(@types/node@22.15.3)(typescript@5.8.3) + update-check: 1.5.4 + validate-npm-package-name: 5.0.1 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - '@types/node' + - supports-color + - typescript + + '@turbo/workspaces@2.5.2': + dependencies: + commander: 10.0.1 + execa: 5.1.1 + fast-glob: 3.3.3 + fs-extra: 10.1.0 + gradient-string: 2.0.2 + inquirer: 8.2.6 + js-yaml: 4.1.0 + ora: 4.1.1 + picocolors: 1.0.1 + semver: 7.6.2 + update-check: 1.5.4 + '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.27.0 @@ -5725,16 +5599,16 @@ snapshots: '@types/bcrypt@5.0.2': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/connect@3.4.38': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/debug@4.1.12': dependencies: @@ -5742,11 +5616,15 @@ snapshots: '@types/dinero.js@1.9.4': {} + '@types/dotenv@8.2.3': + dependencies: + dotenv: 16.5.0 + '@types/estree@1.0.7': {} '@types/express-serve-static-core@4.19.6': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/qs': 6.9.18 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -5758,17 +5636,27 @@ snapshots: '@types/qs': 6.9.18 '@types/serve-static': 1.15.7 + '@types/glob@7.2.0': + dependencies: + '@types/minimatch': 5.1.2 + '@types/node': 22.15.3 + '@types/glob@8.1.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/http-errors@2.0.4': {} + '@types/inquirer@6.5.0': + dependencies: + '@types/through': 0.0.33 + rxjs: 6.6.7 + '@types/istanbul-lib-coverage@2.0.6': {} '@types/istanbul-lib-report@3.0.3': @@ -5786,12 +5674,10 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/json5@0.0.29': {} - '@types/jsonwebtoken@9.0.9': dependencies: '@types/ms': 2.1.0 - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/luxon@3.6.2': {} @@ -5801,13 +5687,7 @@ snapshots: '@types/ms@2.1.0': {} - '@types/node@12.20.55': {} - - '@types/node@20.17.30': - dependencies: - undici-types: 6.19.8 - - '@types/node@22.14.1': + '@types/node@22.15.3': dependencies: undici-types: 6.21.0 @@ -5831,20 +5711,13 @@ snapshots: dependencies: '@types/express': 4.17.21 - '@types/prop-types@15.7.14': {} - '@types/qs@6.9.18': {} '@types/range-parser@1.2.7': {} - '@types/react-dom@18.3.6(@types/react@18.3.20)': + '@types/react-dom@19.1.3(@types/react@19.1.2)': dependencies: - '@types/react': 18.3.20 - - '@types/react@18.3.20': - dependencies: - '@types/prop-types': 15.7.14 - csstype: 3.1.3 + '@types/react': 19.1.2 '@types/react@19.1.2': dependencies: @@ -5853,17 +5726,17 @@ snapshots: '@types/response-time@2.3.8': dependencies: '@types/express': 4.17.21 - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/serve-static@1.15.7': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 22.14.1 + '@types/node': 22.15.3 '@types/send': 0.17.4 '@types/stack-utils@2.0.3': {} @@ -5872,6 +5745,12 @@ snapshots: '@types/strip-json-comments@0.0.30': {} + '@types/through@0.0.33': + dependencies: + '@types/node': 22.15.3 + + '@types/tinycolor2@1.4.6': {} + '@types/triple-beam@1.3.5': {} '@types/validator@13.15.0': {} @@ -5882,50 +5761,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 8.57.1 - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/eslint-plugin@8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3))(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/scope-manager': 8.31.0 - '@typescript-eslint/type-utils': 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/utils': 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/visitor-keys': 8.31.0 - eslint: 9.25.1(jiti@1.21.7) - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.7.3) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/eslint-plugin@8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3))(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.31.0 - '@typescript-eslint/type-utils': 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) - '@typescript-eslint/utils': 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.31.0 - eslint: 9.25.1(jiti@1.21.7) + '@typescript-eslint/parser': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/type-utils': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 + eslint: 9.25.1(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -5934,124 +5778,40 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3)': + '@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.4.0(supports-color@5.5.0) - eslint: 8.57.1 - optionalDependencies: + eslint: 9.25.1(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/scope-manager@8.31.1': dependencies: - '@typescript-eslint/scope-manager': 8.31.0 - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.7.3) - '@typescript-eslint/visitor-keys': 8.31.0 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 + + '@typescript-eslint/type-utils@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + dependencies: + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) debug: 4.4.0(supports-color@5.5.0) - eslint: 9.25.1(jiti@1.21.7) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.31.0 - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.31.0 - debug: 4.4.0(supports-color@5.5.0) - eslint: 9.25.1(jiti@1.21.7) - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@7.18.0': - dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - - '@typescript-eslint/scope-manager@8.31.0': - dependencies: - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/visitor-keys': 8.31.0 - - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.8.3)': - dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - debug: 4.4.0(supports-color@5.5.0) - eslint: 8.57.1 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/type-utils@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3)': - dependencies: - '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.7.3) - '@typescript-eslint/utils': 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3) - debug: 4.4.0(supports-color@5.5.0) - eslint: 9.25.1(jiti@1.21.7) - ts-api-utils: 2.1.0(typescript@5.7.3) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/type-utils@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3)': - dependencies: - '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) - debug: 4.4.0(supports-color@5.5.0) - eslint: 9.25.1(jiti@1.21.7) + eslint: 9.25.1(jiti@2.4.2) ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@7.18.0': {} + '@typescript-eslint/types@8.31.1': {} - '@typescript-eslint/types@8.31.0': {} - - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.8.3)': + '@typescript-eslint/typescript-estree@8.31.1(typescript@5.8.3)': dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.0(supports-color@5.5.0) - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.7.1 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/typescript-estree@8.31.0(typescript@5.7.3)': - dependencies: - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/visitor-keys': 8.31.0 - debug: 4.4.0(supports-color@5.5.0) - fast-glob: 3.3.3 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.7.1 - ts-api-utils: 2.1.0(typescript@5.7.3) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/typescript-estree@8.31.0(typescript@5.8.3)': - dependencies: - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/visitor-keys': 8.31.0 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.4.0(supports-color@5.5.0) fast-glob: 3.3.3 is-glob: 4.0.3 @@ -6062,59 +5822,30 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.8.3)': + '@typescript-eslint/utils@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.1) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.7.3)': - dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@1.21.7)) - '@typescript-eslint/scope-manager': 8.31.0 - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.7.3) - eslint: 9.25.1(jiti@1.21.7) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3)': - dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@1.21.7)) - '@typescript-eslint/scope-manager': 8.31.0 - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.8.3) - eslint: 9.25.1(jiti@1.21.7) + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + eslint: 9.25.1(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@7.18.0': + '@typescript-eslint/visitor-keys@8.31.1': dependencies: - '@typescript-eslint/types': 7.18.0 - eslint-visitor-keys: 3.4.3 - - '@typescript-eslint/visitor-keys@8.31.0': - dependencies: - '@typescript-eslint/types': 8.31.0 + '@typescript-eslint/types': 8.31.1 eslint-visitor-keys: 4.2.0 - '@ungap/structured-clone@1.3.0': {} - - '@vitejs/plugin-react@4.4.1(vite@6.3.2(@types/node@22.14.1)(jiti@1.21.7)(tsx@4.19.3)(yaml@2.7.1))': + '@vitejs/plugin-react@4.4.1(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(lightningcss@1.29.2))': dependencies: '@babel/core': 7.26.10 - '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.10) + '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.26.10) '@types/babel__core': 7.20.5 react-refresh: 0.17.0 - vite: 6.3.2(@types/node@22.14.1)(jiti@1.21.7)(tsx@4.19.3)(yaml@2.7.1) + vite: 6.3.4(@types/node@22.15.3)(jiti@2.4.2)(lightningcss@1.29.2) transitivePeerDependencies: - supports-color @@ -6141,6 +5872,13 @@ snapshots: transitivePeerDependencies: - supports-color + agent-base@7.1.3: {} + + aggregate-error@3.1.0: + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 @@ -6148,8 +5886,6 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ansi-colors@4.1.3: {} - ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 @@ -6158,6 +5894,10 @@ snapshots: ansi-regex@6.1.0: {} + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 @@ -6166,8 +5906,6 @@ snapshots: ansi-styles@6.2.1: {} - any-promise@1.3.0: {} - anymatch@3.1.3: dependencies: normalize-path: 3.0.0 @@ -6182,8 +5920,6 @@ snapshots: arg@4.1.3: {} - arg@5.0.2: {} - argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -6217,16 +5953,6 @@ snapshots: es-object-atoms: 1.1.1 es-shim-unscopables: 1.1.0 - array.prototype.findlastindex@1.2.6: - dependencies: - call-bind: 1.0.8 - call-bound: 1.0.4 - define-properties: 1.2.1 - es-abstract: 1.23.9 - es-errors: 1.3.0 - es-object-atoms: 1.1.1 - es-shim-unscopables: 1.1.0 - array.prototype.flat@1.3.3: dependencies: call-bind: 1.0.8 @@ -6259,20 +5985,14 @@ snapshots: get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 + ast-types@0.13.4: + dependencies: + tslib: 2.8.1 + async-function@1.0.0: {} async@3.2.6: {} - autoprefixer@10.4.21(postcss@8.5.3): - dependencies: - browserslist: 4.24.4 - caniuse-lite: 1.0.30001715 - fraction.js: 4.3.7 - normalize-range: 0.1.2 - picocolors: 1.1.1 - postcss: 8.5.3 - postcss-value-parser: 4.2.0 - available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.1.0 @@ -6336,6 +6056,10 @@ snapshots: balanced-match@1.0.2: {} + base64-js@1.5.1: {} + + basic-ftp@5.0.5: {} + bcrypt@5.1.1: dependencies: '@mapbox/node-pre-gyp': 1.0.11 @@ -6344,12 +6068,14 @@ snapshots: - encoding - supports-color - better-path-resolve@1.0.0: - dependencies: - is-windows: 1.0.2 - binary-extensions@2.3.0: {} + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + body-parser@1.20.3: dependencies: bytes: 3.1.2 @@ -6399,6 +6125,11 @@ snapshots: buffer-from@1.1.2: {} + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + bytes@3.1.2: {} call-bind-apply-helpers@1.0.2: @@ -6420,7 +6151,10 @@ snapshots: callsites@3.1.0: {} - camelcase-css@2.0.1: {} + camel-case@3.0.0: + dependencies: + no-case: 2.3.2 + upper-case: 1.1.3 camelcase@5.3.1: {} @@ -6428,11 +6162,43 @@ snapshots: caniuse-lite@1.0.30001715: {} + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + + chalk@3.0.0: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + change-case@3.1.0: + dependencies: + camel-case: 3.0.0 + constant-case: 2.0.0 + dot-case: 2.1.1 + header-case: 1.0.1 + is-lower-case: 1.1.3 + is-upper-case: 1.1.2 + lower-case: 1.1.4 + lower-case-first: 1.0.2 + no-case: 2.3.2 + param-case: 2.1.1 + pascal-case: 2.0.1 + path-case: 2.1.1 + sentence-case: 2.1.1 + snake-case: 2.1.0 + swap-case: 1.1.2 + title-case: 2.1.1 + upper-case: 1.1.3 + upper-case-first: 1.1.2 + char-regex@1.0.2: {} chardet@0.7.0: {} @@ -6459,6 +6225,16 @@ snapshots: dependencies: clsx: 2.1.1 + clean-stack@2.2.0: {} + + cli-cursor@3.1.0: + dependencies: + restore-cursor: 3.1.0 + + cli-spinners@2.9.2: {} + + cli-width@3.0.0: {} + cli-width@4.1.0: {} cliui@8.0.1: @@ -6467,6 +6243,8 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + clone@1.0.4: {} + cls-rtracer@2.6.3: dependencies: uuid: 9.0.1 @@ -6506,12 +6284,17 @@ snapshots: color: 3.2.1 text-hex: 1.0.0 - commander@4.1.1: {} + commander@10.0.1: {} concat-map@0.0.1: {} console-control-strings@1.1.0: {} + constant-case@2.0.0: + dependencies: + snake-case: 2.1.0 + upper-case: 1.1.3 + content-disposition@0.5.4: dependencies: safe-buffer: 5.2.1 @@ -6524,18 +6307,20 @@ snapshots: cookie@0.7.1: {} + core-js-pure@3.42.0: {} + cors@2.8.5: dependencies: object-assign: 4.1.1 vary: 1.1.2 - create-jest@29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)): + create-jest@29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -6552,10 +6337,10 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - cssesc@3.0.0: {} - csstype@3.1.3: {} + data-uri-to-buffer@6.0.2: {} + data-view-buffer@1.0.2: dependencies: call-bound: 1.0.4 @@ -6578,10 +6363,6 @@ snapshots: dependencies: ms: 2.0.0 - debug@3.2.7: - dependencies: - ms: 2.1.3 - debug@4.4.0(supports-color@5.5.0): dependencies: ms: 2.1.3 @@ -6590,10 +6371,16 @@ snapshots: dedent@1.5.3: {} + deep-extend@0.6.0: {} + deep-is@0.1.4: {} deepmerge@4.3.1: {} + defaults@1.0.4: + dependencies: + clone: 1.0.4 + define-data-property@1.1.4: dependencies: es-define-property: 1.0.1 @@ -6606,6 +6393,23 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + degenerator@5.0.1: + dependencies: + ast-types: 0.13.4 + escodegen: 2.1.0 + esprima: 4.0.1 + + del@5.1.0: + dependencies: + globby: 10.0.2 + graceful-fs: 4.2.11 + is-glob: 4.0.3 + is-path-cwd: 2.2.0 + is-path-inside: 3.0.3 + p-map: 3.0.0 + rimraf: 3.0.2 + slash: 3.0.0 + delegates@1.0.0: {} denque@2.1.0: {} @@ -6614,14 +6418,10 @@ snapshots: destroy@1.2.0: {} - detect-indent@6.1.0: {} - detect-libc@2.0.4: {} detect-newline@3.1.0: {} - didyoumean@1.2.2: {} - diff-sequences@29.6.3: {} diff@4.0.2: {} @@ -6632,15 +6432,15 @@ snapshots: dependencies: path-type: 4.0.0 - dlv@1.1.3: {} - doctrine@2.1.0: dependencies: esutils: 2.0.3 - doctrine@3.0.0: + dot-case@2.1.1: dependencies: - esutils: 2.0.3 + no-case: 2.3.2 + + dotenv@16.0.3: {} dotenv@16.5.0: {} @@ -6682,10 +6482,10 @@ snapshots: encodeurl@2.0.0: {} - enquirer@2.4.1: + enhanced-resolve@5.18.1: dependencies: - ansi-colors: 4.1.3 - strip-ansi: 6.0.1 + graceful-fs: 4.2.11 + tapable: 2.2.1 error-ex@1.3.2: dependencies: @@ -6817,132 +6617,63 @@ snapshots: '@esbuild/win32-ia32': 0.24.2 '@esbuild/win32-x64': 0.24.2 - esbuild@0.25.2: + esbuild@0.25.3: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.2 - '@esbuild/android-arm': 0.25.2 - '@esbuild/android-arm64': 0.25.2 - '@esbuild/android-x64': 0.25.2 - '@esbuild/darwin-arm64': 0.25.2 - '@esbuild/darwin-x64': 0.25.2 - '@esbuild/freebsd-arm64': 0.25.2 - '@esbuild/freebsd-x64': 0.25.2 - '@esbuild/linux-arm': 0.25.2 - '@esbuild/linux-arm64': 0.25.2 - '@esbuild/linux-ia32': 0.25.2 - '@esbuild/linux-loong64': 0.25.2 - '@esbuild/linux-mips64el': 0.25.2 - '@esbuild/linux-ppc64': 0.25.2 - '@esbuild/linux-riscv64': 0.25.2 - '@esbuild/linux-s390x': 0.25.2 - '@esbuild/linux-x64': 0.25.2 - '@esbuild/netbsd-arm64': 0.25.2 - '@esbuild/netbsd-x64': 0.25.2 - '@esbuild/openbsd-arm64': 0.25.2 - '@esbuild/openbsd-x64': 0.25.2 - '@esbuild/sunos-x64': 0.25.2 - '@esbuild/win32-arm64': 0.25.2 - '@esbuild/win32-ia32': 0.25.2 - '@esbuild/win32-x64': 0.25.2 + '@esbuild/aix-ppc64': 0.25.3 + '@esbuild/android-arm': 0.25.3 + '@esbuild/android-arm64': 0.25.3 + '@esbuild/android-x64': 0.25.3 + '@esbuild/darwin-arm64': 0.25.3 + '@esbuild/darwin-x64': 0.25.3 + '@esbuild/freebsd-arm64': 0.25.3 + '@esbuild/freebsd-x64': 0.25.3 + '@esbuild/linux-arm': 0.25.3 + '@esbuild/linux-arm64': 0.25.3 + '@esbuild/linux-ia32': 0.25.3 + '@esbuild/linux-loong64': 0.25.3 + '@esbuild/linux-mips64el': 0.25.3 + '@esbuild/linux-ppc64': 0.25.3 + '@esbuild/linux-riscv64': 0.25.3 + '@esbuild/linux-s390x': 0.25.3 + '@esbuild/linux-x64': 0.25.3 + '@esbuild/netbsd-arm64': 0.25.3 + '@esbuild/netbsd-x64': 0.25.3 + '@esbuild/openbsd-arm64': 0.25.3 + '@esbuild/openbsd-x64': 0.25.3 + '@esbuild/sunos-x64': 0.25.3 + '@esbuild/win32-arm64': 0.25.3 + '@esbuild/win32-ia32': 0.25.3 + '@esbuild/win32-x64': 0.25.3 escalade@3.2.0: {} escape-html@1.0.3: {} + escape-string-regexp@1.0.5: {} + escape-string-regexp@2.0.0: {} escape-string-regexp@4.0.0: {} - eslint-config-codely@3.1.4: + escodegen@2.1.0: dependencies: - '@babel/core': 7.26.10 - '@babel/eslint-parser': 7.27.0(@babel/core@7.26.10)(eslint@8.57.1) - '@types/node': 20.17.30 - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - eslint: 8.57.1 - eslint-config-prettier: 9.1.0(eslint@8.57.1) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1) - eslint-plugin-prettier: 5.2.6(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.5.3) - eslint-plugin-simple-import-sort: 12.1.1(eslint@8.57.1) - eslint-plugin-unused-imports: 3.2.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1) - prettier: 3.5.3 - typescript: 5.8.3 - transitivePeerDependencies: - - '@types/eslint' - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - eslint-config-prettier@9.1.0(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - - eslint-import-resolver-node@0.3.9: - dependencies: - debug: 3.2.7 - is-core-module: 2.16.1 - resolve: 1.22.10 - transitivePeerDependencies: - - supports-color - - eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): - dependencies: - debug: 3.2.7 + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - transitivePeerDependencies: - - supports-color + source-map: 0.6.1 - eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1): + eslint-config-prettier@10.1.2(eslint@9.25.1(jiti@2.4.2)): dependencies: - '@rtsao/scc': 1.1.0 - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.6 - array.prototype.flat: 1.3.3 - array.prototype.flatmap: 1.3.3 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) - hasown: 2.0.2 - is-core-module: 2.16.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.1 - semver: 6.3.1 - string.prototype.trimend: 1.0.9 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color + eslint: 9.25.1(jiti@2.4.2) - eslint-plugin-prettier@5.2.6(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.5.3): + eslint-plugin-only-warn@1.1.0: {} + + eslint-plugin-react-hooks@5.2.0(eslint@9.25.1(jiti@2.4.2)): dependencies: - eslint: 8.57.1 - prettier: 3.5.3 - prettier-linter-helpers: 1.0.0 - synckit: 0.11.4 - optionalDependencies: - eslint-config-prettier: 9.1.0(eslint@8.57.1) + eslint: 9.25.1(jiti@2.4.2) - eslint-plugin-react-hooks@5.2.0(eslint@9.25.1(jiti@1.21.7)): - dependencies: - eslint: 9.25.1(jiti@1.21.7) - - eslint-plugin-react-refresh@0.4.20(eslint@9.25.1(jiti@1.21.7)): - dependencies: - eslint: 9.25.1(jiti@1.21.7) - - eslint-plugin-react@7.37.5(eslint@9.25.1(jiti@1.21.7)): + eslint-plugin-react@7.37.5(eslint@9.25.1(jiti@2.4.2)): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -6950,7 +6681,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.2.1 - eslint: 9.25.1(jiti@1.21.7) + eslint: 9.25.1(jiti@2.4.2) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -6964,86 +6695,24 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 - eslint-plugin-simple-import-sort@12.1.1(eslint@8.57.1): + eslint-plugin-turbo@2.5.1(eslint@9.25.1(jiti@2.4.2))(turbo@2.5.1): dependencies: - eslint: 8.57.1 - - eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-rule-composer: 0.3.0 - optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) - - eslint-rule-composer@0.3.0: {} - - eslint-scope@5.1.1: - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - - eslint-scope@7.2.2: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 + dotenv: 16.0.3 + eslint: 9.25.1(jiti@2.4.2) + turbo: 2.5.1 eslint-scope@8.3.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-visitor-keys@2.1.0: {} - eslint-visitor-keys@3.4.3: {} eslint-visitor-keys@4.2.0: {} - eslint@8.57.1: + eslint@9.25.1(jiti@2.4.2): dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.1) - '@eslint-community/regexpp': 4.12.1 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.3.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.4.0(supports-color@5.5.0) - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - - eslint@9.25.1(jiti@1.21.7): - dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@1.21.7)) + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.20.0 '@eslint/config-helpers': 0.2.1 @@ -7079,7 +6748,7 @@ snapshots: natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: - jiti: 1.21.7 + jiti: 2.4.2 transitivePeerDependencies: - supports-color @@ -7089,12 +6758,6 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.14.1) eslint-visitor-keys: 4.2.0 - espree@9.6.1: - dependencies: - acorn: 8.14.1 - acorn-jsx: 5.3.2(acorn@8.14.1) - eslint-visitor-keys: 3.4.3 - esprima@4.0.1: {} esquery@1.6.0: @@ -7105,8 +6768,6 @@ snapshots: dependencies: estraverse: 5.3.0 - estraverse@4.3.0: {} - estraverse@5.3.0: {} esutils@2.0.3: {} @@ -7171,8 +6832,6 @@ snapshots: transitivePeerDependencies: - supports-color - extendable-error@0.1.7: {} - external-editor@3.1.0: dependencies: chardet: 0.7.0 @@ -7181,7 +6840,13 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-diff@1.3.0: {} + fast-glob@3.3.1: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 fast-glob@3.3.3: dependencies: @@ -7209,9 +6874,9 @@ snapshots: fecha@4.2.3: {} - file-entry-cache@6.0.1: + figures@3.2.0: dependencies: - flat-cache: 3.2.0 + escape-string-regexp: 1.0.5 file-entry-cache@8.0.0: dependencies: @@ -7251,12 +6916,6 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@3.2.0: - dependencies: - flatted: 3.3.3 - keyv: 4.5.4 - rimraf: 3.0.2 - flat-cache@4.0.1: dependencies: flatted: 3.3.3 @@ -7277,21 +6936,13 @@ snapshots: forwarded@0.2.0: {} - fraction.js@4.3.7: {} - fresh@0.5.2: {} - fs-extra@7.0.1: + fs-extra@10.1.0: dependencies: graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - - fs-extra@8.1.0: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 + jsonfile: 6.1.0 + universalify: 2.0.1 fs-minipass@2.1.0: dependencies: @@ -7365,9 +7016,13 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.3.0 - get-tsconfig@4.10.0: + get-uri@6.0.4: dependencies: - resolve-pkg-maps: 1.0.0 + basic-ftp: 5.0.5 + data-uri-to-buffer: 6.0.2 + debug: 4.4.0(supports-color@5.5.0) + transitivePeerDependencies: + - supports-color glob-parent@5.1.2: dependencies: @@ -7377,16 +7032,7 @@ snapshots: dependencies: is-glob: 4.0.3 - glob@10.4.5: - dependencies: - foreground-child: 3.3.1 - jackspeak: 3.4.3 - minimatch: 9.0.5 - minipass: 7.1.2 - package-json-from-dist: 1.0.1 - path-scurry: 1.11.1 - - glob@11.0.1: + glob@11.0.2: dependencies: foreground-child: 3.3.1 jackspeak: 4.1.0 @@ -7406,24 +7052,22 @@ snapshots: globals@11.12.0: {} - globals@13.24.0: - dependencies: - type-fest: 0.20.2 - globals@14.0.0: {} - globals@15.15.0: {} + globals@16.0.0: {} globalthis@1.0.4: dependencies: define-properties: 1.2.1 gopd: 1.2.0 - globby@11.1.0: + globby@10.0.2: dependencies: + '@types/glob': 7.2.0 array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.3 + glob: 7.2.3 ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -7432,8 +7076,22 @@ snapshots: graceful-fs@4.2.11: {} + gradient-string@2.0.2: + dependencies: + chalk: 4.1.2 + tinygradient: 1.1.5 + graphemer@1.4.0: {} + handlebars@4.7.8: + dependencies: + minimist: 1.2.8 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 + optionalDependencies: + uglify-js: 3.19.3 + has-bigints@1.1.0: {} has-flag@3.0.0: {} @@ -7460,6 +7118,11 @@ snapshots: dependencies: function-bind: 1.1.2 + header-case@1.0.1: + dependencies: + no-case: 2.3.2 + upper-case: 1.1.3 + helmet@8.1.0: {} html-escaper@2.0.2: {} @@ -7472,6 +7135,13 @@ snapshots: statuses: 2.0.1 toidentifier: 1.0.1 + http-proxy-agent@7.0.2: + dependencies: + agent-base: 7.1.3 + debug: 4.4.0(supports-color@5.5.0) + transitivePeerDependencies: + - supports-color + http-status@2.1.0: {} http@0.0.1-security: {} @@ -7483,7 +7153,12 @@ snapshots: transitivePeerDependencies: - supports-color - human-id@4.1.1: {} + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.3 + debug: 4.4.0(supports-color@5.5.0) + transitivePeerDependencies: + - supports-color human-signals@2.1.0: {} @@ -7495,6 +7170,8 @@ snapshots: dependencies: safer-buffer: 2.1.2 + ieee754@1.2.1: {} + ignore-by-default@1.0.1: {} ignore@5.3.2: {} @@ -7511,6 +7188,8 @@ snapshots: imurmurhash@0.1.4: {} + indent-string@4.0.0: {} + inflection@1.13.4: {} inflight@1.0.6: @@ -7522,17 +7201,53 @@ snapshots: inherits@2.0.4: {} - inquirer@12.5.2(@types/node@22.14.1): + ini@1.3.8: {} + + inquirer@12.5.2(@types/node@22.15.3): dependencies: - '@inquirer/core': 10.1.10(@types/node@22.14.1) - '@inquirer/prompts': 7.4.1(@types/node@22.14.1) - '@inquirer/type': 3.0.6(@types/node@22.14.1) + '@inquirer/core': 10.1.10(@types/node@22.15.3) + '@inquirer/prompts': 7.4.1(@types/node@22.15.3) + '@inquirer/type': 3.0.6(@types/node@22.15.3) ansi-escapes: 4.3.2 mute-stream: 2.0.0 run-async: 3.0.0 rxjs: 7.8.2 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 + + inquirer@7.3.3: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + run-async: 2.4.1 + rxjs: 6.6.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + + inquirer@8.2.6: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.2 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 internal-slot@1.1.0: dependencies: @@ -7540,6 +7255,11 @@ snapshots: hasown: 2.0.2 side-channel: 1.1.0 + ip-address@9.0.5: + dependencies: + jsbn: 1.1.0 + sprintf-js: 1.1.3 + ipaddr.js@1.9.1: {} is-array-buffer@3.0.5: @@ -7611,6 +7331,12 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-interactive@1.0.0: {} + + is-lower-case@1.1.3: + dependencies: + lower-case: 1.1.4 + is-map@2.0.3: {} is-number-object@1.1.1: @@ -7620,6 +7346,8 @@ snapshots: is-number@7.0.0: {} + is-path-cwd@2.2.0: {} + is-path-inside@3.0.3: {} is-property@1.0.2: {} @@ -7644,10 +7372,6 @@ snapshots: call-bound: 1.0.4 has-tostringtag: 1.0.2 - is-subdir@1.2.0: - dependencies: - better-path-resolve: 1.0.0 - is-symbol@1.1.1: dependencies: call-bound: 1.0.4 @@ -7658,6 +7382,12 @@ snapshots: dependencies: which-typed-array: 1.1.19 + is-unicode-supported@0.1.0: {} + + is-upper-case@1.1.2: + dependencies: + upper-case: 1.1.3 + is-weakmap@2.0.2: {} is-weakref@1.1.1: @@ -7669,10 +7399,10 @@ snapshots: call-bound: 1.0.4 get-intrinsic: 1.3.0 - is-windows@1.0.2: {} - isarray@2.0.5: {} + isbinaryfile@4.0.10: {} + isexe@2.0.0: {} istanbul-lib-coverage@3.2.2: {} @@ -7725,12 +7455,6 @@ snapshots: has-symbols: 1.1.0 set-function-name: 2.0.2 - jackspeak@3.4.3: - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - jackspeak@4.1.0: dependencies: '@isaacs/cliui': 8.0.2 @@ -7754,7 +7478,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.14.1 + '@types/node': 22.15.3 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -7774,16 +7498,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)): + jest-cli@29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + create-jest: 29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -7793,7 +7517,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)): + jest-config@29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)): dependencies: '@babel/core': 7.26.10 '@jest/test-sequencer': 29.7.0 @@ -7818,8 +7542,8 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.14.1 - ts-node: 10.9.2(@types/node@22.14.1)(typescript@5.7.3) + '@types/node': 22.15.3 + ts-node: 10.9.2(@types/node@22.15.3)(typescript@5.8.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -7848,7 +7572,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.14.1 + '@types/node': 22.15.3 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -7858,7 +7582,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.14.1 + '@types/node': 22.15.3 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -7897,7 +7621,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.14.1 + '@types/node': 22.15.3 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -7932,7 +7656,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.14.1 + '@types/node': 22.15.3 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -7960,7 +7684,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.14.1 + '@types/node': 22.15.3 chalk: 4.1.2 cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.2 @@ -8006,7 +7730,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.14.1 + '@types/node': 22.15.3 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -8025,7 +7749,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.14.1 + '@types/node': 22.15.3 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -8034,24 +7758,24 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)): + jest@29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + jest-cli: 29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros - supports-color - ts-node - jiti@1.21.7: {} + jiti@2.4.2: {} js-tokens@4.0.0: {} @@ -8064,6 +7788,8 @@ snapshots: dependencies: argparse: 2.0.1 + jsbn@1.1.0: {} + jsesc@3.1.0: {} json-buffer@3.0.1: {} @@ -8074,13 +7800,11 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} - json5@1.0.2: - dependencies: - minimist: 1.2.8 - json5@2.2.3: {} - jsonfile@4.0.0: + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 optionalDependencies: graceful-fs: 4.2.11 @@ -8132,7 +7856,50 @@ snapshots: libphonenumber-js@1.12.7: {} - lilconfig@3.1.3: {} + lightningcss-darwin-arm64@1.29.2: + optional: true + + lightningcss-darwin-x64@1.29.2: + optional: true + + lightningcss-freebsd-x64@1.29.2: + optional: true + + lightningcss-linux-arm-gnueabihf@1.29.2: + optional: true + + lightningcss-linux-arm64-gnu@1.29.2: + optional: true + + lightningcss-linux-arm64-musl@1.29.2: + optional: true + + lightningcss-linux-x64-gnu@1.29.2: + optional: true + + lightningcss-linux-x64-musl@1.29.2: + optional: true + + lightningcss-win32-arm64-msvc@1.29.2: + optional: true + + lightningcss-win32-x64-msvc@1.29.2: + optional: true + + lightningcss@1.29.2: + dependencies: + detect-libc: 2.0.4 + optionalDependencies: + lightningcss-darwin-arm64: 1.29.2 + lightningcss-darwin-x64: 1.29.2 + lightningcss-freebsd-x64: 1.29.2 + lightningcss-linux-arm-gnueabihf: 1.29.2 + lightningcss-linux-arm64-gnu: 1.29.2 + lightningcss-linux-arm64-musl: 1.29.2 + lightningcss-linux-x64-gnu: 1.29.2 + lightningcss-linux-x64-musl: 1.29.2 + lightningcss-win32-arm64-msvc: 1.29.2 + lightningcss-win32-x64-msvc: 1.29.2 lines-and-columns@1.2.4: {} @@ -8144,6 +7911,8 @@ snapshots: dependencies: p-locate: 5.0.0 + lodash.get@4.4.2: {} + lodash.includes@4.3.0: {} lodash.isboolean@3.0.3: {} @@ -8162,10 +7931,17 @@ snapshots: lodash.once@4.1.1: {} - lodash.startcase@4.4.0: {} - lodash@4.17.21: {} + log-symbols@3.0.0: + dependencies: + chalk: 2.4.2 + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + logform@2.7.0: dependencies: '@colors/colors': 1.6.0 @@ -8181,7 +7957,11 @@ snapshots: dependencies: js-tokens: 4.0.0 - lru-cache@10.4.3: {} + lower-case-first@1.0.2: + dependencies: + lower-case: 1.1.4 + + lower-case@1.1.4: {} lru-cache@11.1.0: {} @@ -8193,9 +7973,9 @@ snapshots: lru.min@1.1.2: {} - lucide-react@0.473.0(react@18.3.1): + lucide-react@0.503.0(react@19.1.0): dependencies: - react: 18.3.1 + react: 19.1.0 luxon@3.6.1: {} @@ -8271,6 +8051,10 @@ snapshots: minipass: 3.3.6 yallist: 4.0.0 + mkdirp@0.5.6: + dependencies: + minimist: 1.2.8 + mkdirp@1.0.4: {} module-alias@2.2.3: {} @@ -8281,15 +8065,15 @@ snapshots: moment@2.30.1: {} - mri@1.2.0: {} - ms@2.0.0: {} ms@2.1.3: {} + mute-stream@0.0.8: {} + mute-stream@2.0.0: {} - mysql2@3.14.0: + mysql2@3.14.1: dependencies: aws-ssl-profiles: 1.1.2 denque: 2.1.0 @@ -8301,12 +8085,6 @@ snapshots: seq-queue: 0.0.5 sqlstring: 2.3.3 - mz@2.7.0: - dependencies: - any-promise: 1.3.0 - object-assign: 4.1.1 - thenify-all: 1.6.0 - named-placeholders@1.1.3: dependencies: lru-cache: 7.18.3 @@ -8317,6 +8095,19 @@ snapshots: negotiator@0.6.3: {} + neo-async@2.6.2: {} + + netmask@2.0.2: {} + + next-themes@0.4.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + dependencies: + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + + no-case@2.3.2: + dependencies: + lower-case: 1.1.4 + node-addon-api@5.1.0: {} node-fetch@2.7.0: @@ -8325,9 +8116,23 @@ snapshots: node-int64@0.4.0: {} + node-plop@0.26.3: + dependencies: + '@babel/runtime-corejs3': 7.27.1 + '@types/inquirer': 6.5.0 + change-case: 3.1.0 + del: 5.1.0 + globby: 10.0.2 + handlebars: 4.7.8 + inquirer: 7.3.3 + isbinaryfile: 4.0.10 + lodash.get: 4.4.2 + mkdirp: 0.5.6 + resolve: 1.22.10 + node-releases@2.0.19: {} - nodemon@3.1.9: + nodemon@3.1.10: dependencies: chokidar: 3.6.0 debug: 4.4.0(supports-color@5.5.0) @@ -8346,8 +8151,6 @@ snapshots: normalize-path@3.0.0: {} - normalize-range@0.1.2: {} - npm-run-path@4.0.1: dependencies: path-key: 3.1.1 @@ -8390,12 +8193,6 @@ snapshots: es-abstract: 1.23.9 es-object-atoms: 1.1.1 - object.groupby@1.0.3: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.23.9 - object.values@1.2.1: dependencies: call-bind: 1.0.8 @@ -8430,9 +8227,30 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - os-tmpdir@1.0.2: {} + ora@4.1.1: + dependencies: + chalk: 3.0.0 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + log-symbols: 3.0.0 + mute-stream: 0.0.8 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 - outdent@0.5.0: {} + ora@5.4.1: + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + + os-tmpdir@1.0.2: {} own-keys@1.0.1: dependencies: @@ -8440,10 +8258,6 @@ snapshots: object-keys: 1.1.1 safe-push-apply: 1.0.0 - p-filter@2.1.0: - dependencies: - p-map: 2.1.0 - p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -8460,15 +8274,35 @@ snapshots: dependencies: p-limit: 3.1.0 - p-map@2.1.0: {} + p-map@3.0.0: + dependencies: + aggregate-error: 3.1.0 p-try@2.2.0: {} + pac-proxy-agent@7.2.0: + dependencies: + '@tootallnate/quickjs-emscripten': 0.23.0 + agent-base: 7.1.3 + debug: 4.4.0(supports-color@5.5.0) + get-uri: 6.0.4 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + pac-resolver: 7.0.1 + socks-proxy-agent: 8.0.5 + transitivePeerDependencies: + - supports-color + + pac-resolver@7.0.1: + dependencies: + degenerator: 5.0.1 + netmask: 2.0.2 + package-json-from-dist@1.0.1: {} - package-manager-detector@0.2.11: + param-case@2.1.1: dependencies: - quansync: 0.2.10 + no-case: 2.3.2 parent-module@1.0.1: dependencies: @@ -8483,6 +8317,11 @@ snapshots: parseurl@1.3.3: {} + pascal-case@2.0.1: + dependencies: + camel-case: 3.0.0 + upper-case-first: 1.1.2 + passport-jwt@4.0.1: dependencies: jsonwebtoken: 9.0.2 @@ -8500,6 +8339,10 @@ snapshots: pause: 0.0.1 utils-merge: 1.0.1 + path-case@2.1.1: + dependencies: + no-case: 2.3.2 + path-exists@4.0.0: {} path-is-absolute@1.0.1: {} @@ -8508,11 +8351,6 @@ snapshots: path-parse@1.0.7: {} - path-scurry@1.11.1: - dependencies: - lru-cache: 10.4.3 - minipass: 7.1.2 - path-scurry@2.0.0: dependencies: lru-cache: 11.1.0 @@ -8529,7 +8367,9 @@ snapshots: pause@0.0.1: {} - pg-connection-string@2.7.0: {} + pg-connection-string@2.8.5: {} + + picocolors@1.0.1: {} picocolors@1.1.1: {} @@ -8537,10 +8377,6 @@ snapshots: picomatch@4.0.2: {} - pify@2.3.0: {} - - pify@4.0.1: {} - pirates@4.0.7: {} pkg-dir@4.2.0: @@ -8549,38 +8385,6 @@ snapshots: possible-typed-array-names@1.1.0: {} - postcss-import@15.1.0(postcss@8.5.3): - dependencies: - postcss: 8.5.3 - postcss-value-parser: 4.2.0 - read-cache: 1.0.0 - resolve: 1.22.10 - - postcss-js@4.0.1(postcss@8.5.3): - dependencies: - camelcase-css: 2.0.1 - postcss: 8.5.3 - - postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)): - dependencies: - lilconfig: 3.1.3 - yaml: 2.7.1 - optionalDependencies: - postcss: 8.5.3 - ts-node: 10.9.2(@types/node@22.14.1)(typescript@5.7.3) - - postcss-nested@6.2.0(postcss@8.5.3): - dependencies: - postcss: 8.5.3 - postcss-selector-parser: 6.1.2 - - postcss-selector-parser@6.1.2: - dependencies: - cssesc: 3.0.0 - util-deprecate: 1.0.2 - - postcss-value-parser@4.2.0: {} - postcss@8.5.3: dependencies: nanoid: 3.3.11 @@ -8589,12 +8393,6 @@ snapshots: prelude-ls@1.2.1: {} - prettier-linter-helpers@1.0.0: - dependencies: - fast-diff: 1.3.0 - - prettier@2.8.8: {} - prettier@3.5.3: {} pretty-format@29.7.0: @@ -8621,6 +8419,21 @@ snapshots: forwarded: 0.2.0 ipaddr.js: 1.9.1 + proxy-agent@6.5.0: + dependencies: + agent-base: 7.1.3 + debug: 4.4.0(supports-color@5.5.0) + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + lru-cache: 7.18.3 + pac-proxy-agent: 7.2.0 + proxy-from-env: 1.1.0 + socks-proxy-agent: 8.0.5 + transitivePeerDependencies: + - supports-color + + proxy-from-env@1.1.0: {} + pstree.remy@1.1.8: {} punycode@2.3.1: {} @@ -8631,8 +8444,6 @@ snapshots: dependencies: side-channel: 1.1.0 - quansync@0.2.10: {} - queue-microtask@1.2.3: {} range-parser@1.2.1: {} @@ -8644,11 +8455,17 @@ snapshots: iconv-lite: 0.4.24 unpipe: 1.0.0 - react-dom@18.3.1(react@18.3.1): + rc@1.2.8: dependencies: - loose-envify: 1.4.0 - react: 18.3.1 - scheduler: 0.23.2 + deep-extend: 0.6.0 + ini: 1.3.8 + minimist: 1.2.8 + strip-json-comments: 2.0.1 + + react-dom@19.1.0(react@19.1.0): + dependencies: + react: 19.1.0 + scheduler: 0.26.0 react-is@16.13.1: {} @@ -8656,20 +8473,7 @@ snapshots: react-refresh@0.17.0: {} - react@18.3.1: - dependencies: - loose-envify: 1.4.0 - - read-cache@1.0.0: - dependencies: - pify: 2.3.0 - - read-yaml-file@1.1.0: - dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.1 - pify: 4.0.1 - strip-bom: 3.0.0 + react@19.1.0: {} readable-stream@3.6.2: dependencies: @@ -8694,8 +8498,6 @@ snapshots: get-proto: 1.0.1 which-builtin-type: 1.2.1 - regenerator-runtime@0.14.1: {} - regexp.prototype.flags@1.5.4: dependencies: call-bind: 1.0.8 @@ -8705,6 +8507,15 @@ snapshots: gopd: 1.2.0 set-function-name: 2.0.2 + registry-auth-token@3.3.2: + dependencies: + rc: 1.2.8 + safe-buffer: 5.2.1 + + registry-url@3.1.0: + dependencies: + rc: 1.2.8 + require-directory@2.1.1: {} resolve-cwd@3.0.0: @@ -8715,8 +8526,6 @@ snapshots: resolve-from@5.0.0: {} - resolve-pkg-maps@1.0.0: {} - resolve.exports@2.0.3: {} resolve@1.22.10: @@ -8736,6 +8545,11 @@ snapshots: depd: 2.0.0 on-headers: 1.0.2 + restore-cursor@3.1.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + retry-as-promised@7.1.1: {} reusify@1.1.0: {} @@ -8748,38 +8562,44 @@ snapshots: dependencies: glob: 7.2.3 - rollup@4.40.0: + rollup@4.40.1: dependencies: '@types/estree': 1.0.7 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.40.0 - '@rollup/rollup-android-arm64': 4.40.0 - '@rollup/rollup-darwin-arm64': 4.40.0 - '@rollup/rollup-darwin-x64': 4.40.0 - '@rollup/rollup-freebsd-arm64': 4.40.0 - '@rollup/rollup-freebsd-x64': 4.40.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.40.0 - '@rollup/rollup-linux-arm-musleabihf': 4.40.0 - '@rollup/rollup-linux-arm64-gnu': 4.40.0 - '@rollup/rollup-linux-arm64-musl': 4.40.0 - '@rollup/rollup-linux-loongarch64-gnu': 4.40.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.40.0 - '@rollup/rollup-linux-riscv64-gnu': 4.40.0 - '@rollup/rollup-linux-riscv64-musl': 4.40.0 - '@rollup/rollup-linux-s390x-gnu': 4.40.0 - '@rollup/rollup-linux-x64-gnu': 4.40.0 - '@rollup/rollup-linux-x64-musl': 4.40.0 - '@rollup/rollup-win32-arm64-msvc': 4.40.0 - '@rollup/rollup-win32-ia32-msvc': 4.40.0 - '@rollup/rollup-win32-x64-msvc': 4.40.0 + '@rollup/rollup-android-arm-eabi': 4.40.1 + '@rollup/rollup-android-arm64': 4.40.1 + '@rollup/rollup-darwin-arm64': 4.40.1 + '@rollup/rollup-darwin-x64': 4.40.1 + '@rollup/rollup-freebsd-arm64': 4.40.1 + '@rollup/rollup-freebsd-x64': 4.40.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.40.1 + '@rollup/rollup-linux-arm-musleabihf': 4.40.1 + '@rollup/rollup-linux-arm64-gnu': 4.40.1 + '@rollup/rollup-linux-arm64-musl': 4.40.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.40.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.40.1 + '@rollup/rollup-linux-riscv64-gnu': 4.40.1 + '@rollup/rollup-linux-riscv64-musl': 4.40.1 + '@rollup/rollup-linux-s390x-gnu': 4.40.1 + '@rollup/rollup-linux-x64-gnu': 4.40.1 + '@rollup/rollup-linux-x64-musl': 4.40.1 + '@rollup/rollup-win32-arm64-msvc': 4.40.1 + '@rollup/rollup-win32-ia32-msvc': 4.40.1 + '@rollup/rollup-win32-x64-msvc': 4.40.1 fsevents: 2.3.3 + run-async@2.4.1: {} + run-async@3.0.0: {} run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 + rxjs@6.6.7: + dependencies: + tslib: 1.14.1 + rxjs@7.8.2: dependencies: tslib: 2.8.1 @@ -8809,12 +8629,12 @@ snapshots: safer-buffer@2.1.2: {} - scheduler@0.23.2: - dependencies: - loose-envify: 1.4.0 + scheduler@0.26.0: {} semver@6.3.1: {} + semver@7.6.2: {} + semver@7.7.1: {} send@0.19.0: @@ -8835,11 +8655,16 @@ snapshots: transitivePeerDependencies: - supports-color + sentence-case@2.1.1: + dependencies: + no-case: 2.3.2 + upper-case-first: 1.1.2 + seq-queue@0.0.5: {} sequelize-pool@7.1.0: {} - sequelize@6.37.7(mysql2@3.14.0): + sequelize@6.37.7(mysql2@3.14.1): dependencies: '@types/debug': 4.1.12 '@types/validator': 13.15.0 @@ -8849,7 +8674,7 @@ snapshots: lodash: 4.17.21 moment: 2.30.1 moment-timezone: 0.5.48 - pg-connection-string: 2.7.0 + pg-connection-string: 2.8.5 retry-as-promised: 7.1.1 semver: 7.7.1 sequelize-pool: 7.1.0 @@ -8858,7 +8683,7 @@ snapshots: validator: 13.15.0 wkx: 0.5.0 optionalDependencies: - mysql2: 3.14.0 + mysql2: 3.14.1 transitivePeerDependencies: - supports-color @@ -8949,6 +8774,25 @@ snapshots: slash@3.0.0: {} + smart-buffer@4.2.0: {} + + snake-case@2.1.0: + dependencies: + no-case: 2.3.2 + + socks-proxy-agent@8.0.5: + dependencies: + agent-base: 7.1.3 + debug: 4.4.0(supports-color@5.5.0) + socks: 2.8.4 + transitivePeerDependencies: + - supports-color + + socks@2.8.4: + dependencies: + ip-address: 9.0.5 + smart-buffer: 4.2.0 + source-map-js@1.2.1: {} source-map-support@0.5.13: @@ -8956,20 +8800,12 @@ snapshots: buffer-from: 1.1.2 source-map: 0.6.1 - source-map-support@0.5.21: - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - source-map@0.6.1: {} - spawndamnit@3.0.1: - dependencies: - cross-spawn: 7.0.6 - signal-exit: 4.1.0 - sprintf-js@1.0.3: {} + sprintf-js@1.1.3: {} + sqlstring@2.3.3: {} stack-trace@0.0.10: {} @@ -9063,16 +8899,6 @@ snapshots: strip-json-comments@3.1.1: {} - sucrase@3.35.0: - dependencies: - '@jridgewell/gen-mapping': 0.3.8 - commander: 4.1.1 - glob: 10.4.5 - lines-and-columns: 1.2.4 - mz: 2.7.0 - pirates: 4.0.7 - ts-interface-checker: 0.1.13 - supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -9087,43 +8913,16 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - synckit@0.11.4: + swap-case@1.1.2: dependencies: - '@pkgr/core': 0.2.4 - tslib: 2.8.1 + lower-case: 1.1.4 + upper-case: 1.1.3 - tailwind-merge@2.6.0: {} + tailwind-merge@3.2.0: {} - tailwindcss-animate@1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3))): - dependencies: - tailwindcss: 3.4.17(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + tailwindcss@4.1.5: {} - tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)): - dependencies: - '@alloc/quick-lru': 5.2.0 - arg: 5.0.2 - chokidar: 3.6.0 - didyoumean: 1.2.2 - dlv: 1.1.3 - fast-glob: 3.3.3 - glob-parent: 6.0.2 - is-glob: 4.0.3 - jiti: 1.21.7 - lilconfig: 3.1.3 - micromatch: 4.0.8 - normalize-path: 3.0.0 - object-hash: 3.0.0 - picocolors: 1.1.1 - postcss: 8.5.3 - postcss-import: 15.1.0(postcss@8.5.3) - postcss-js: 4.0.1(postcss@8.5.3) - postcss-load-config: 4.0.2(postcss@8.5.3)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) - postcss-nested: 6.2.0(postcss@8.5.3) - postcss-selector-parser: 6.1.2 - resolve: 1.22.10 - sucrase: 3.35.0 - transitivePeerDependencies: - - ts-node + tapable@2.2.1: {} tar@6.2.1: dependencies: @@ -9134,8 +8933,6 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 - term-size@2.2.1: {} - test-exclude@6.0.0: dependencies: '@istanbuljs/schema': 0.1.3 @@ -9144,21 +8941,25 @@ snapshots: text-hex@1.0.0: {} - text-table@0.2.0: {} + through@2.3.8: {} - thenify-all@1.6.0: - dependencies: - thenify: 3.3.1 - - thenify@3.3.1: - dependencies: - any-promise: 1.3.0 + tinycolor2@1.6.0: {} tinyglobby@0.2.13: dependencies: fdir: 6.4.4(picomatch@4.0.2) picomatch: 4.0.2 + tinygradient@1.1.5: + dependencies: + '@types/tinycolor2': 1.4.6 + tinycolor2: 1.6.0 + + title-case@2.1.1: + dependencies: + no-case: 2.3.2 + upper-case: 1.1.3 + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 @@ -9181,33 +8982,23 @@ snapshots: triple-beam@1.4.1: {} - ts-api-utils@1.4.3(typescript@5.8.3): - dependencies: - typescript: 5.8.3 - - ts-api-utils@2.1.0(typescript@5.7.3): - dependencies: - typescript: 5.7.3 - ts-api-utils@2.1.0(typescript@5.8.3): dependencies: typescript: 5.8.3 - ts-interface-checker@0.1.13: {} - - ts-jest@29.3.2(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.24.2)(jest@29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)))(typescript@5.7.3): + ts-jest@29.3.2(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.24.2)(jest@29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3)) + jest: 29.7.0(@types/node@22.15.3)(ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.7.1 type-fest: 4.40.0 - typescript: 5.7.3 + typescript: 5.8.3 yargs-parser: 21.1.1 optionalDependencies: '@babel/core': 7.26.10 @@ -9216,7 +9007,7 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.24.2 - ts-node-dev@2.0.0(@types/node@22.14.1)(typescript@5.7.3): + ts-node-dev@2.0.0(@types/node@22.15.3)(typescript@5.8.3): dependencies: chokidar: 3.6.0 dynamic-dedupe: 0.3.0 @@ -9224,42 +9015,24 @@ snapshots: mkdirp: 1.0.4 resolve: 1.22.10 rimraf: 2.7.1 - source-map-support: 0.5.21 + source-map-support: 0.5.13 tree-kill: 1.2.2 - ts-node: 10.9.2(@types/node@22.14.1)(typescript@5.7.3) + ts-node: 10.9.2(@types/node@22.15.3)(typescript@5.8.3) tsconfig: 7.0.0 - typescript: 5.7.3 + typescript: 5.8.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' - '@types/node' - ts-node@10.9.2(@types/node@22.14.1)(typescript@5.7.3): + ts-node@10.9.2(@types/node@22.15.3)(typescript@5.8.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.14.1 - acorn: 8.14.1 - acorn-walk: 8.3.4 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.7.3 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - - ts-node@10.9.2(@types/node@22.14.1)(typescript@5.8.3): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 22.14.1 + '@types/node': 22.15.3 acorn: 8.14.1 acorn-walk: 8.3.4 arg: 4.1.3 @@ -9270,13 +9043,6 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - tsconfig-paths@3.15.0: - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.2 - minimist: 1.2.8 - strip-bom: 3.0.0 - tsconfig-paths@4.2.0: dependencies: json5: 2.2.3 @@ -9290,41 +9056,38 @@ snapshots: strip-bom: 3.0.0 strip-json-comments: 2.0.1 + tslib@1.14.1: {} + tslib@2.8.1: {} - tsx@4.19.3: - dependencies: - esbuild: 0.25.2 - get-tsconfig: 4.10.0 + turbo-darwin-64@2.5.1: + optional: true + + turbo-darwin-arm64@2.5.1: + optional: true + + turbo-linux-64@2.5.1: + optional: true + + turbo-linux-arm64@2.5.1: + optional: true + + turbo-windows-64@2.5.1: + optional: true + + turbo-windows-arm64@2.5.1: + optional: true + + turbo@2.5.1: optionalDependencies: - fsevents: 2.3.3 + turbo-darwin-64: 2.5.1 + turbo-darwin-arm64: 2.5.1 + turbo-linux-64: 2.5.1 + turbo-linux-arm64: 2.5.1 + turbo-windows-64: 2.5.1 + turbo-windows-arm64: 2.5.1 - turbo-darwin-64@2.5.0: - optional: true - - turbo-darwin-arm64@2.5.0: - optional: true - - turbo-linux-64@2.5.0: - optional: true - - turbo-linux-arm64@2.5.0: - optional: true - - turbo-windows-64@2.5.0: - optional: true - - turbo-windows-arm64@2.5.0: - optional: true - - turbo@2.5.0: - optionalDependencies: - turbo-darwin-64: 2.5.0 - turbo-darwin-arm64: 2.5.0 - turbo-linux-64: 2.5.0 - turbo-linux-arm64: 2.5.0 - turbo-windows-64: 2.5.0 - turbo-windows-arm64: 2.5.0 + tw-animate-css@1.2.9: {} type-check@0.4.0: dependencies: @@ -9332,8 +9095,6 @@ snapshots: type-detect@4.0.8: {} - type-fest@0.20.2: {} - type-fest@0.21.3: {} type-fest@4.40.0: {} @@ -9376,20 +9137,21 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 - typescript-eslint@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3): + typescript-eslint@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3))(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) - '@typescript-eslint/parser': 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) - '@typescript-eslint/utils': 8.31.0(eslint@9.25.1(jiti@1.21.7))(typescript@5.8.3) - eslint: 9.25.1(jiti@1.21.7) + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/parser': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + eslint: 9.25.1(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color - typescript@5.7.3: {} - typescript@5.8.3: {} + uglify-js@3.19.3: + optional: true + unbox-primitive@1.1.0: dependencies: call-bound: 1.0.4 @@ -9399,11 +9161,9 @@ snapshots: undefsafe@2.0.5: {} - undici-types@6.19.8: {} - undici-types@6.21.0: {} - universalify@0.1.2: {} + universalify@2.0.1: {} unpipe@1.0.0: {} @@ -9413,6 +9173,17 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + update-check@1.5.4: + dependencies: + registry-auth-token: 3.3.2 + registry-url: 3.1.0 + + upper-case-first@1.1.2: + dependencies: + upper-case: 1.1.3 + + upper-case@1.1.3: {} + uri-js@4.4.1: dependencies: punycode: 2.3.1 @@ -9439,29 +9210,34 @@ snapshots: '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 2.0.0 + validate-npm-package-name@5.0.1: {} + validator@13.15.0: {} vary@1.1.2: {} - vite@6.3.2(@types/node@22.14.1)(jiti@1.21.7)(tsx@4.19.3)(yaml@2.7.1): + vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(lightningcss@1.29.2): dependencies: - esbuild: 0.25.2 + esbuild: 0.25.3 fdir: 6.4.4(picomatch@4.0.2) picomatch: 4.0.2 postcss: 8.5.3 - rollup: 4.40.0 + rollup: 4.40.1 tinyglobby: 0.2.13 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 fsevents: 2.3.3 - jiti: 1.21.7 - tsx: 4.19.3 - yaml: 2.7.1 + jiti: 2.4.2 + lightningcss: 1.29.2 walker@1.0.8: dependencies: makeerror: 1.0.12 + wcwidth@1.0.1: + dependencies: + defaults: 1.0.4 + webidl-conversions@3.0.1: {} whatwg-url@5.0.0: @@ -9548,10 +9324,12 @@ snapshots: wkx@0.5.0: dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.3 word-wrap@1.2.5: {} + wordwrap@1.0.0: {} + wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0 @@ -9585,8 +9363,6 @@ snapshots: yallist@4.0.0: {} - yaml@2.7.1: {} - yargs-parser@21.1.1: {} yargs@17.7.2: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 57d37a5b..26289377 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,9 @@ packages: - - "apps/*" - - "libs/*" - - "packages/*" + - apps/* + - '!modules/*' + - packages/* + +onlyBuiltDependencies: + - bcrypt + - core-js-pure + - esbuild diff --git a/scripts/create-package.ts b/scripts/create-package.ts index b7e8753b..cea94d7d 100644 --- a/scripts/create-package.ts +++ b/scripts/create-package.ts @@ -2,10 +2,13 @@ import fs from "fs"; import inquirer from "inquirer"; import path from "path"; +function capitalize(str: string) { + return str.charAt(0).toUpperCase() + str.slice(1); +} + async function main() { let rawName = process.argv[2]; - // Preguntar si no se pasó argumento if (!rawName) { const answers = await inquirer.prompt([ { @@ -19,90 +22,44 @@ async function main() { } const name = rawName.toLowerCase(); - const capitalized = name.charAt(0).toUpperCase() + name.slice(1); - const basePath = path.resolve(__dirname, "../packages", name); - const clientPath = path.join(basePath, "client"); - const serverPath = path.join(basePath, "server"); + const capitalized = capitalize(name); + const packagePath = path.resolve(__dirname, "../packages", name); + const clientPath = path.join(packagePath, "client"); + const serverPath = path.join(packagePath, "server"); + const templatePath = path.resolve(__dirname, "./templates"); - // Plantillas - const manifestTemplate = () => ` -import { IPackageClient } from '@libs/package'; -import ${capitalized}Page from './${capitalized}Page'; - -export const ${capitalized}Package: IPackageClient = { - metadata: { - name: '${name}', - route: '/${name}', - version: '1.0.0', - description: '${capitalized} package' - }, - component: ${capitalized}Page -}; -`; - - const pageTemplate = () => ` -export default function ${capitalized}Page() { - return
${capitalized} Package Page
; -} -`; - - const serverIndexTemplate = () => ` -import { IPackageServer } from '@libs/package'; -import { ${name}Controller } from './controller'; - -export const ${capitalized}Package: IPackageServer = { - metadata: { - name: '${name}', - version: '1.0.0', - dependencies: [] - }, - init(app) { - app.get('/${name}', ${name}Controller); - } -}; -`; - - const controllerTemplate = () => ` -export function ${name}Controller(req, res) { - res.send('${capitalized} package response'); -} -`; - - const tsconfigReact = () => - JSON.stringify( - { - extends: "@repo/tsconfig/react", - include: ["."], - }, - null, - 2 - ); - - const tsconfigNode = () => - JSON.stringify( - { - extends: "@repo/tsconfig/node", - include: ["."], - }, - null, - 2 - ); - - // --- Crear carpetas --- + // Crear carpetas fs.mkdirSync(clientPath, { recursive: true }); fs.mkdirSync(serverPath, { recursive: true }); - // --- Crear archivos cliente --- - fs.writeFileSync(path.join(clientPath, `${capitalized}Page.tsx`), pageTemplate()); - fs.writeFileSync(path.join(clientPath, `manifest.ts`), manifestTemplate()); - fs.writeFileSync(path.join(clientPath, `tsconfig.json`), tsconfigReact()); + // Función de reemplazo de contenido + const renderTemplate = (content: string) => + content + .replace(/__PACKAGE_NAME__/g, name) + .replace(/__PACKAGE_NAME_CAPITALIZED__/g, capitalized); - // --- Crear archivos servidor --- - fs.writeFileSync(path.join(serverPath, `index.ts`), serverIndexTemplate()); - fs.writeFileSync(path.join(serverPath, `controller.ts`), controllerTemplate()); - fs.writeFileSync(path.join(serverPath, `tsconfig.json`), tsconfigNode()); + // Copiar plantillas desde carpeta 'templates/client' + const copyFromTemplate = (srcDir: string, destDir: string) => { + const files = fs.readdirSync(srcDir); + for (const file of files) { + const filePath = path.join(srcDir, file); + const content = fs.readFileSync(filePath, "utf-8"); - console.log(`✅ Package '${name}' creado exitosamente en /packages/${name}`); + const outputName = file.replace(/__PACKAGE_NAME__/g, capitalized); + const outputPath = path.join(destDir, outputName); + + fs.writeFileSync(outputPath, renderTemplate(content)); + } + }; + + copyFromTemplate(path.join(templatePath, "client"), clientPath); + copyFromTemplate(path.join(templatePath, "server"), serverPath); + + // package.json + const pkgJsonTemplate = fs.readFileSync(path.join(templatePath, "package.json"), "utf-8"); + fs.writeFileSync(path.join(packagePath, "package.json"), renderTemplate(pkgJsonTemplate)); + + console.log(`✅ Package '${name}' creado correctamente en packages/${name}`); } main(); diff --git a/scripts/templates/client/__PACKAGE_NAME__Page.tsx b/scripts/templates/client/__PACKAGE_NAME__Page.tsx new file mode 100644 index 00000000..443aef51 --- /dev/null +++ b/scripts/templates/client/__PACKAGE_NAME__Page.tsx @@ -0,0 +1,3 @@ +export default function __PACKAGE_NAME_CAPITALIZED__Page() { + return
__PACKAGE_NAME_CAPITALIZED__ Package Page
; +} diff --git a/scripts/templates/client/manifest.ts b/scripts/templates/client/manifest.ts new file mode 100644 index 00000000..165d9809 --- /dev/null +++ b/scripts/templates/client/manifest.ts @@ -0,0 +1,12 @@ +import { IPackageClient } from "@packages/package"; +import __PACKAGE_NAME_CAPITALIZED__Page from "./__PACKAGE_NAME__Page"; + +export const __PACKAGE_NAME_CAPITALIZED__Package: IPackageClient = { + metadata: { + name: "__PACKAGE_NAME__", + route: "/__PACKAGE_NAME__", + version: "1.0.0", + description: "__PACKAGE_NAME_CAPITALIZED__ package", + }, + component: __PACKAGE_NAME_CAPITALIZED__Page, +}; diff --git a/scripts/templates/client/tsconfig.json b/scripts/templates/client/tsconfig.json new file mode 100644 index 00000000..bbb38ed9 --- /dev/null +++ b/scripts/templates/client/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@repo/typescript-config/react", + "include": ["."] +} diff --git a/scripts/templates/package.json b/scripts/templates/package.json new file mode 100644 index 00000000..8295f994 --- /dev/null +++ b/scripts/templates/package.json @@ -0,0 +1,23 @@ +{ + "name": "@packages/__PACKAGE_NAME__", + "version": "1.0.0", + "private": true, + "main": "server/index.ts", + "scripts": { + "build": "tsc -b", + "dev": "turbo run dev --filter=@packages/__PACKAGE_NAME__" + }, + "dependencies": {}, + "devDependencies": {}, + "peerDependencies": { + "@types/express": "*", + "@types/node": "*", + "@types/react": "*", + "express": "*", + "react": "*", + "react-router-dom": "*", + "sequelize": "*", + "typescript": "*", + "zod": "*" + } +} diff --git a/scripts/templates/server/controller.ts b/scripts/templates/server/controller.ts new file mode 100644 index 00000000..7e0c7526 --- /dev/null +++ b/scripts/templates/server/controller.ts @@ -0,0 +1,3 @@ +export function __PACKAGE_NAME__Controller(req, res) { + res.send("__PACKAGE_NAME_CAPITALIZED__ package response"); +} diff --git a/scripts/templates/server/index.ts b/scripts/templates/server/index.ts new file mode 100644 index 00000000..26750cf2 --- /dev/null +++ b/scripts/templates/server/index.ts @@ -0,0 +1,13 @@ +import { IPackageServer } from "@packages/package"; +import { __PACKAGE_NAME__Controller } from "./controller"; + +export const __PACKAGE_NAME_CAPITALIZED__Package: IPackageServer = { + metadata: { + name: "__PACKAGE_NAME__", + version: "1.0.0", + dependencies: [], + }, + init(app) { + app.get("/__PACKAGE_NAME__", __PACKAGE_NAME__Controller); + }, +}; diff --git a/scripts/templates/server/tsconfig.json b/scripts/templates/server/tsconfig.json new file mode 100644 index 00000000..0593b224 --- /dev/null +++ b/scripts/templates/server/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@repo/typescript-config/node", + "include": ["."], + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["./*"] + } + } +} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 3311b452..00000000 --- a/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@apps/*": ["apps/*"], - "@packages/*": ["packages/*"], - "@libs/*": ["libs/*"] - } - } -} diff --git a/turbo.json b/turbo.json index e9a0e86f..fef65f42 100644 --- a/turbo.json +++ b/turbo.json @@ -1,5 +1,6 @@ { "$schema": "https://turbo.build/schema.json", + "ui": "tui", "globalDependencies": ["**/.env.*local"], "tasks": { "dev": { @@ -10,8 +11,10 @@ "dependsOn": ["^lint"] }, "build": { + "cache": false, "dependsOn": ["^build"], - "outputs": [".next/**", "dist/**"] + "inputs": ["$TURBO_DEFAULT$", ".env*"], + "outputs": ["dist/**"] } } }