- ✅ Ticket 1.1: Estructura Clean Architecture en backend - ✅ Ticket 1.2: Schemas Zod compartidos - ✅ Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares) - ✅ Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares) - ✅ Ticket 1.5: Eliminación de duplicidades (~50 líneas) Cambios principales: - Creada estructura Clean Architecture en backend/src/ - Schemas Zod compartidos en backend/src/shared/schemas/ - Refactorización modular de drugs y procedures - Utilidades genéricas en src/utils/ (filter, validation) - Eliminados scripts obsoletos y documentación antigua - Corregidos errores: QueryClient, import test-error-handling - Build verificado y funcionando correctamente
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import IModule from './types/IModule.js';
|
|
import BrowserWindow from '../window/BrowserWindow.js';
|
|
import Location from '../location/Location.js';
|
|
/**
|
|
* Module factory.
|
|
*/
|
|
export default class ModuleFactory {
|
|
private window;
|
|
private parentURL;
|
|
/**
|
|
* Constructor.
|
|
*
|
|
* @param window Window.
|
|
* @param parentURL Parent URL.
|
|
*/
|
|
constructor(window: BrowserWindow, parentURL: URL | Location);
|
|
/**
|
|
* Fetches the source code of the module from the given URL and creates a new module instance.
|
|
*
|
|
* @param url Module URL.
|
|
* @param [parent] Parent module.
|
|
* @param [options] Options.
|
|
* @param [options.with] Options.
|
|
* @param [options.with.type] Module type.
|
|
*/
|
|
getModule(url: string, options?: {
|
|
with?: {
|
|
type?: string;
|
|
};
|
|
}): Promise<IModule>;
|
|
/**
|
|
* Imports a module.
|
|
*
|
|
* @param window Window.
|
|
* @param parentURL Parent URL.
|
|
* @param url URL.
|
|
* @param [options] Options.
|
|
* @param [options.with] With.
|
|
* @param [options.with.type] Type.
|
|
*/
|
|
importModule(url: string, options?: {
|
|
with?: {
|
|
type?: string;
|
|
};
|
|
}): Promise<{
|
|
[key: string]: any;
|
|
}>;
|
|
}
|
|
//# sourceMappingURL=ModuleFactory.d.ts.map
|