@aeriajs/core 0.0.157 → 0.0.158
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.
|
@@ -160,7 +160,7 @@ const autoCast = (value, ctx) => {
|
|
|
160
160
|
};
|
|
161
161
|
const getters = (value, ctx) => {
|
|
162
162
|
if ('getter' in ctx.property) {
|
|
163
|
-
return ctx.property.getter(ctx.target);
|
|
163
|
+
return ctx.property.getter(ctx.target, ctx.options.context);
|
|
164
164
|
}
|
|
165
165
|
return value;
|
|
166
166
|
};
|
|
@@ -314,6 +314,9 @@ const recurse = async (target, ctx) => {
|
|
|
314
314
|
]);
|
|
315
315
|
}
|
|
316
316
|
if (property) {
|
|
317
|
+
if (property.hidden) {
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
317
320
|
if (ctx.options.getters && 'getter' in property) {
|
|
318
321
|
if (property.requires) {
|
|
319
322
|
const missing = property.requires.some((requiredPropName) => !(requiredPropName in target));
|
|
@@ -126,7 +126,7 @@ const autoCast = (value, ctx) => {
|
|
|
126
126
|
};
|
|
127
127
|
const getters = (value, ctx) => {
|
|
128
128
|
if ("getter" in ctx.property) {
|
|
129
|
-
return ctx.property.getter(ctx.target);
|
|
129
|
+
return ctx.property.getter(ctx.target, ctx.options.context);
|
|
130
130
|
}
|
|
131
131
|
return value;
|
|
132
132
|
};
|
|
@@ -276,6 +276,9 @@ const recurse = async (target, ctx) => {
|
|
|
276
276
|
]);
|
|
277
277
|
}
|
|
278
278
|
if (property) {
|
|
279
|
+
if (property.hidden) {
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
279
282
|
if (ctx.options.getters && "getter" in property) {
|
|
280
283
|
if (property.requires) {
|
|
281
284
|
const missing = property.requires.some((requiredPropName) => !(requiredPropName in target));
|
package/dist/functions/get.js
CHANGED
package/dist/functions/get.mjs
CHANGED
package/dist/functions/getAll.js
CHANGED
|
@@ -78,6 +78,7 @@ const internalGetAll = async (payload, context) => {
|
|
|
78
78
|
const documents = [];
|
|
79
79
|
for (const doc of result) {
|
|
80
80
|
documents.push((0, common_1.throwIfError)(await (0, index_js_1.traverseDocument)(doc, context.description, {
|
|
81
|
+
context,
|
|
81
82
|
getters: true,
|
|
82
83
|
fromProperties: true,
|
|
83
84
|
recurseReferences: true,
|
|
@@ -76,6 +76,7 @@ const internalGetAll = async (payload, context) => {
|
|
|
76
76
|
const documents = [];
|
|
77
77
|
for (const doc of result) {
|
|
78
78
|
documents.push(throwIfError(await traverseDocument(doc, context.description, {
|
|
79
|
+
context,
|
|
79
80
|
getters: true,
|
|
80
81
|
fromProperties: true,
|
|
81
82
|
recurseReferences: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.158",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"aeriaMain": "tests/fixtures/aeriaMain.js",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"mongodb-memory-server": "^9.2.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@aeriajs/builtins": "^0.0.
|
|
46
|
-
"@aeriajs/common": "^0.0.
|
|
47
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
48
|
-
"@aeriajs/http": "^0.0.
|
|
49
|
-
"@aeriajs/security": "^0.0.
|
|
50
|
-
"@aeriajs/types": "^0.0.
|
|
51
|
-
"@aeriajs/validation": "^0.0.
|
|
45
|
+
"@aeriajs/builtins": "^0.0.158",
|
|
46
|
+
"@aeriajs/common": "^0.0.95",
|
|
47
|
+
"@aeriajs/entrypoint": "^0.0.97",
|
|
48
|
+
"@aeriajs/http": "^0.0.108",
|
|
49
|
+
"@aeriajs/security": "^0.0.158",
|
|
50
|
+
"@aeriajs/types": "^0.0.81",
|
|
51
|
+
"@aeriajs/validation": "^0.0.98"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"mongodb": "^6.5.0",
|