codigo0/node_modules/happy-dom/lib/window/GlobalWindow.js
planetazuzu 5d7a6500fe refactor: Fase 1 - Clean Architecture, refactorización modular y eliminación de duplicidades
-  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
2026-01-25 21:09:47 +01:00

85 lines
2.5 KiB
JavaScript

import * as PropertySymbol from '../PropertySymbol.js';
import Window from './Window.js';
import { Buffer } from 'buffer';
/**
* Browser window.
*
* Reference:
* https://developer.mozilla.org/en-US/docs/Web/API/Window.
*/
export default class GlobalWindow extends Window {
// Node.js Globals
Array = globalThis.Array;
ArrayBuffer = globalThis.ArrayBuffer;
Boolean = globalThis.Boolean;
Buffer = Buffer;
DataView = globalThis.DataView;
Date = globalThis.Date;
Error = globalThis.Error;
EvalError = globalThis.EvalError;
Float32Array = globalThis.Float32Array;
Float64Array = globalThis.Float64Array;
Function = globalThis.Function;
Infinity = globalThis.Infinity;
Int16Array = globalThis.Int16Array;
Int32Array = globalThis.Int32Array;
Int8Array = globalThis.Int8Array;
Intl = globalThis.Intl;
JSON = globalThis.JSON;
Map = globalThis.Map;
Math = globalThis.Math;
NaN = globalThis.NaN;
Number = globalThis.Number;
Object = globalThis.Object;
Promise = globalThis.Promise;
RangeError = globalThis.RangeError;
ReferenceError = globalThis.ReferenceError;
RegExp = globalThis.RegExp;
Set = globalThis.Set;
String = globalThis.String;
Symbol = globalThis.Symbol;
SyntaxError = globalThis.SyntaxError;
TypeError = globalThis.TypeError;
URIError = globalThis.URIError;
Uint16Array = globalThis.Uint16Array;
Uint32Array = globalThis.Uint32Array;
Uint8Array = globalThis.Uint8Array;
Uint8ClampedArray = globalThis.Uint8ClampedArray;
WeakMap = globalThis.WeakMap;
WeakSet = globalThis.WeakSet;
decodeURI = globalThis.decodeURI;
decodeURIComponent = globalThis.decodeURIComponent;
encodeURI = globalThis.encodeURI;
encodeURIComponent = globalThis.encodeURIComponent;
eval = globalThis.eval;
/**
* @deprecated
*/
escape = globalThis.escape;
global = globalThis;
isFinite = globalThis.isFinite;
isNaN = globalThis.isNaN;
parseFloat = globalThis.parseFloat;
parseInt = globalThis.parseInt;
undefined = globalThis.undefined;
/**
* @deprecated
*/
unescape = globalThis.unescape;
/**
* @override
*/
[PropertySymbol.evaluateScript](code, options) {
if (options?.filename) {
return this.eval(`${code}\n//# sourceURL=${options.filename}`);
}
return this.eval(code);
}
/**
* @override
*/
[PropertySymbol.setupVMContext]() {
// Do nothing
}
}
//# sourceMappingURL=GlobalWindow.js.map