@aeriajs/core 0.0.190 → 0.0.191

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.
@@ -87,7 +87,7 @@ const cleanupReferences = async (value, ctx) => {
87
87
  }
88
88
  }
89
89
  const refMap = await (0, reference_js_1.getReferences)(ctx.options.description.properties);
90
- const reference = (0, common_1.getValueFromPath)(refMap, ctx.propPath);
90
+ const reference = (0, common_1.getValueFromPath)(refMap, ctx.propPath.split('.').join('.deepReferences.'));
91
91
  await (0, cascadingRemove_js_1.preferredRemove)(referenceIds, reference, await (0, context_js_1.createContext)({
92
92
  parentContext: context,
93
93
  collectionName: refProperty.$ref,
@@ -312,7 +312,10 @@ const recurse = async (target, ctx) => {
312
312
  if (!ctx.options.allowOperators) {
313
313
  return types_1.Result.error(types_1.ACError.InsecureOperator);
314
314
  }
315
- if (!ctx.options.context?.config.security.allowInsecureOperators && security_1.INSECURE_OPERATORS.includes(key)) {
315
+ const allowInsecureOperators = ctx.options.allowInsecureOperators === undefined
316
+ ? ctx.options.context?.config.security.allowInsecureOperators
317
+ : ctx.options.allowInsecureOperators;
318
+ if (!allowInsecureOperators && security_1.INSECURE_OPERATORS.includes(key)) {
316
319
  return types_1.Result.error(types_1.ACError.InsecureOperator);
317
320
  }
318
321
  }
@@ -61,7 +61,7 @@ const cleanupReferences = async (value, ctx) => {
61
61
  }
62
62
  }
63
63
  const refMap = await getReferences(ctx.options.description.properties);
64
- const reference = getValueFromPath(refMap, ctx.propPath);
64
+ const reference = getValueFromPath(refMap, ctx.propPath.split(".").join(".deepReferences."));
65
65
  await preferredRemove(referenceIds, reference, await createContext({
66
66
  parentContext: context,
67
67
  collectionName: refProperty.$ref
@@ -276,7 +276,8 @@ const recurse = async (target, ctx) => {
276
276
  if (!ctx.options.allowOperators) {
277
277
  return Result.error(ACError.InsecureOperator);
278
278
  }
279
- if (!ctx.options.context?.config.security.allowInsecureOperators && INSECURE_OPERATORS.includes(key)) {
279
+ const allowInsecureOperators = ctx.options.allowInsecureOperators === void 0 ? ctx.options.context?.config.security.allowInsecureOperators : ctx.options.allowInsecureOperators;
280
+ if (!allowInsecureOperators && INSECURE_OPERATORS.includes(key)) {
280
281
  return Result.error(ACError.InsecureOperator);
281
282
  }
282
283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/core",
3
- "version": "0.0.190",
3
+ "version": "0.0.191",
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.190",
46
- "@aeriajs/common": "^0.0.116",
47
- "@aeriajs/entrypoint": "^0.0.119",
48
- "@aeriajs/http": "^0.0.130",
49
- "@aeriajs/security": "^0.0.190",
50
- "@aeriajs/types": "^0.0.99",
51
- "@aeriajs/validation": "^0.0.119"
45
+ "@aeriajs/builtins": "^0.0.191",
46
+ "@aeriajs/common": "^0.0.117",
47
+ "@aeriajs/entrypoint": "^0.0.120",
48
+ "@aeriajs/http": "^0.0.131",
49
+ "@aeriajs/security": "^0.0.191",
50
+ "@aeriajs/types": "^0.0.100",
51
+ "@aeriajs/validation": "^0.0.120"
52
52
  },
53
53
  "dependencies": {
54
54
  "mongodb": "^6.5.0",