@morojs/moro 1.8.4 → 1.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/dist/core/http/http-server.js +18 -1
- package/dist/core/http/http-server.js.map +1 -1
- package/dist/core/http/http2-server.js +13 -0
- package/dist/core/http/http2-server.js.map +1 -1
- package/dist/core/http/moro-engine-server.js +13 -0
- package/dist/core/http/moro-engine-server.js.map +1 -1
- package/dist/core/http/uws-http-server.js +16 -1
- package/dist/core/http/uws-http-server.js.map +1 -1
- package/dist/core/jobs/job-executor.d.ts +1 -0
- package/dist/core/jobs/job-executor.js +23 -1
- package/dist/core/jobs/job-executor.js.map +1 -1
- package/dist/core/middleware/built-in/auth/helpers.js +11 -1
- package/dist/core/middleware/built-in/auth/helpers.js.map +1 -1
- package/dist/core/middleware/built-in/cache/adapters/cache/memory.js +5 -1
- package/dist/core/middleware/built-in/cache/adapters/cache/memory.js.map +1 -1
- package/dist/core/middleware/index.d.ts +2 -0
- package/dist/core/middleware/index.js +5 -0
- package/dist/core/middleware/index.js.map +1 -1
- package/dist/core/routing/unified-router.d.ts +2 -0
- package/dist/core/routing/unified-router.js +20 -0
- package/dist/core/routing/unified-router.js.map +1 -1
- package/dist/core/utilities/hooks.d.ts +5 -4
- package/dist/core/utilities/hooks.js +9 -4
- package/dist/core/utilities/hooks.js.map +1 -1
- package/dist/moro.d.ts +1 -0
- package/dist/moro.js +57 -14
- package/dist/moro.js.map +1 -1
- package/dist/types/hooks.d.ts +2 -0
- package/dist/types/hooks.js.map +1 -1
- package/package.json +3 -1
package/dist/types/hooks.d.ts
CHANGED
package/dist/types/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/types/hooks.ts"],"names":[],"mappings":"","sourcesContent":["// Hooks and Middleware Types\nimport { HttpRequest, HttpResponse } from '../core/http/index.js';\n\nexport type HookFunction = (...args: any[]) => Promise<any> | any;\n\nexport interface StandardMiddleware {\n (req: HttpRequest, res: HttpResponse, next: () => Promise<void>): Promise<void> | void;\n}\n\nexport interface HookContext {\n request?: HttpRequest;\n response?: HttpResponse;\n data?: any;\n metadata?: Record<string, any>;\n}\n\nexport interface MoroMiddleware {\n name: string;\n version?: string;\n install: (hooks: any, options?: any) => Promise<void> | void;\n uninstall?: (hooks: any) => Promise<void> | void;\n}\n\n// Advanced middleware types\nexport interface MiddlewareMetadata {\n name: string;\n version?: string;\n description?: string;\n author?: string;\n dependencies?: string[];\n tags?: string[];\n}\n\nexport interface MiddlewareContext {\n app: any;\n hooks: any; // HookManager\n config: any;\n logger?: any;\n}\n\nexport interface MiddlewareInterface extends MoroMiddleware {\n metadata?: MiddlewareMetadata;\n dependencies?: string[];\n configure?: (config: any) => void;\n beforeInstall?: (context: MiddlewareContext) => Promise<void> | void;\n afterInstall?: (context: MiddlewareContext) => Promise<void> | void;\n beforeUninstall?: (context: MiddlewareContext) => Promise<void> | void;\n afterUninstall?: (context: MiddlewareContext) => Promise<void> | void;\n}\n\nexport type SimpleMiddlewareFunction = (app: any) => Promise<void> | void;\n"]}
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/types/hooks.ts"],"names":[],"mappings":"","sourcesContent":["// Hooks and Middleware Types\nimport { HttpRequest, HttpResponse } from '../core/http/index.js';\n\nexport type HookFunction = (...args: any[]) => Promise<any> | any;\n\nexport interface StandardMiddleware {\n (req: HttpRequest, res: HttpResponse, next: () => Promise<void>): Promise<void> | void;\n}\n\nexport interface HookContext {\n request?: HttpRequest;\n response?: HttpResponse;\n /** The thrown value, present in 'error' hook contexts */\n error?: any;\n data?: any;\n metadata?: Record<string, any>;\n}\n\nexport interface MoroMiddleware {\n name: string;\n version?: string;\n install: (hooks: any, options?: any) => Promise<void> | void;\n uninstall?: (hooks: any) => Promise<void> | void;\n}\n\n// Advanced middleware types\nexport interface MiddlewareMetadata {\n name: string;\n version?: string;\n description?: string;\n author?: string;\n dependencies?: string[];\n tags?: string[];\n}\n\nexport interface MiddlewareContext {\n app: any;\n hooks: any; // HookManager\n config: any;\n logger?: any;\n}\n\nexport interface MiddlewareInterface extends MoroMiddleware {\n metadata?: MiddlewareMetadata;\n dependencies?: string[];\n configure?: (config: any) => void;\n beforeInstall?: (context: MiddlewareContext) => Promise<void> | void;\n afterInstall?: (context: MiddlewareContext) => Promise<void> | void;\n beforeUninstall?: (context: MiddlewareContext) => Promise<void> | void;\n afterUninstall?: (context: MiddlewareContext) => Promise<void> | void;\n}\n\nexport type SimpleMiddlewareFunction = (app: any) => Promise<void> | void;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morojs/moro",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.6",
|
|
4
4
|
"description": "High-performance Node.js framework with intelligent routing, automatic middleware ordering, enterprise authentication (Better Auth), type-safe validation, and functional architecture",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
"test:force": "jest --forceExit",
|
|
35
35
|
"test:all": "npm run test:unit && npm run test:integration && npm run test:e2e",
|
|
36
36
|
"test:dist": "npm run build && node scripts/validate-dist.mjs",
|
|
37
|
+
"test:fuzz": "jest --testPathPatterns=fuzz --detectOpenHandles",
|
|
38
|
+
"test:fuzz:deep": "MORO_FUZZ_RUNS=200000 jest --testPathPatterns=fuzz --testTimeout=600000",
|
|
37
39
|
"test:package": "npm run build && node scripts/validate-package.mjs",
|
|
38
40
|
"lint": "eslint src --ext .ts --max-warnings 0",
|
|
39
41
|
"lint:fix": "eslint src --ext .ts --fix",
|