@aeriajs/core 0.0.84 → 0.0.85
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/context.js +2 -2
- package/dist/context.mjs +3 -3
- package/package.json +8 -8
package/dist/context.js
CHANGED
|
@@ -76,8 +76,8 @@ const createContext = async (options = {}) => {
|
|
|
76
76
|
created_at: new Date(),
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
|
-
context.error = (
|
|
80
|
-
return (0, common_1.
|
|
79
|
+
context.error = (endpointError) => {
|
|
80
|
+
return (0, common_1.error)(endpointError, context);
|
|
81
81
|
};
|
|
82
82
|
context.limitRate = (params) => {
|
|
83
83
|
return (0, security_1.limitRate)(params, context);
|
package/dist/context.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
import { unsafe,
|
|
2
|
+
import { unsafe, error } from "@aeriajs/common";
|
|
3
3
|
import { getCollections } from "@aeriajs/entrypoint";
|
|
4
4
|
import { limitRate } from "@aeriajs/security";
|
|
5
5
|
import { getDatabaseCollection } from "./database.mjs";
|
|
@@ -51,8 +51,8 @@ export const createContext = async (options = {}) => {
|
|
|
51
51
|
created_at: /* @__PURE__ */ new Date()
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
|
-
context.error = (
|
|
55
|
-
return endpointError
|
|
54
|
+
context.error = (endpointError) => {
|
|
55
|
+
return error(endpointError, context);
|
|
56
56
|
};
|
|
57
57
|
context.limitRate = (params) => {
|
|
58
58
|
return limitRate(params, context);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.85",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"mongodb-memory-server": "^9.2.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@aeriajs/builtins": "^0.0.
|
|
45
|
-
"@aeriajs/common": "^0.0.
|
|
46
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
47
|
-
"@aeriajs/http": "^0.0.
|
|
48
|
-
"@aeriajs/security": "^0.0.
|
|
49
|
-
"@aeriajs/types": "^0.0.
|
|
50
|
-
"@aeriajs/validation": "^0.0.
|
|
44
|
+
"@aeriajs/builtins": "^0.0.85",
|
|
45
|
+
"@aeriajs/common": "^0.0.51",
|
|
46
|
+
"@aeriajs/entrypoint": "^0.0.51",
|
|
47
|
+
"@aeriajs/http": "^0.0.59",
|
|
48
|
+
"@aeriajs/security": "^0.0.85",
|
|
49
|
+
"@aeriajs/types": "^0.0.48",
|
|
50
|
+
"@aeriajs/validation": "^0.0.54"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"mongodb": "^6.5.0",
|