@aeriajs/http 0.0.190 → 0.0.192

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/dist/cors.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import type { GenericRequest, GenericResponse, CorsConfig } from '@aeriajs/types';
2
- export declare const cors: (req: GenericRequest, res: GenericResponse, config: CorsConfig) => null | undefined;
1
+ import type { CorsFunction } from '@aeriajs/types';
2
+ export declare const cors: CorsFunction;
package/dist/cors.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cors = void 0;
4
- const cors = (req, res, config) => {
4
+ const cors = async (req, res, config) => {
5
5
  const { allowOrigin = [], allowMethods = [], allowHeaders = [], maxAge, } = config;
6
6
  const headers = {
7
7
  'Access-Control-Allow-Origin': allowOrigin.join(','),
package/dist/cors.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- export const cors = (req, res, config) => {
2
+ export const cors = async (req, res, config) => {
3
3
  const {
4
4
  allowOrigin = [],
5
5
  allowMethods = [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/http",
3
- "version": "0.0.190",
3
+ "version": "0.0.192",
4
4
  "description": "## Installation",
5
5
  "main": "dist/index.js",
6
6
  "aeriaMain": "tests/fixtures/aeriaMain.js",
@@ -30,10 +30,10 @@
30
30
  "mongodb": "^6.17.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@aeriajs/common": "^0.0.155",
34
- "@aeriajs/entrypoint": "^0.0.161",
35
- "@aeriajs/types": "^0.0.133",
36
- "@aeriajs/validation": "^0.0.175",
33
+ "@aeriajs/common": "^0.0.157",
34
+ "@aeriajs/entrypoint": "^0.0.163",
35
+ "@aeriajs/types": "^0.0.135",
36
+ "@aeriajs/validation": "^0.0.177",
37
37
  "mongodb": "^6.17.0"
38
38
  },
39
39
  "scripts": {