agent-contracts 0.22.8 → 0.22.9

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/index.js CHANGED
@@ -50040,7 +50040,9 @@ function deepMergeEntities(base, project, path, hasExtends) {
50040
50040
  }
50041
50041
  return result;
50042
50042
  }
50043
+ var OPERATOR_KEYS = /* @__PURE__ */ new Set(["$append", "$prepend", "$insert_after", "$replace", "$remove"]);
50043
50044
  function mergeEntityMaps(baseMap, projectMap, path, hasExtends) {
50045
+ let result;
50044
50046
  if (isRecord2(projectMap) && !Array.isArray(projectMap)) {
50045
50047
  const op = hasOperator(projectMap);
50046
50048
  if (op) {
@@ -50049,11 +50051,15 @@ function mergeEntityMaps(baseMap, projectMap, path, hasExtends) {
50049
50051
  `Merge operator used without extends at ${path}`
50050
50052
  );
50051
50053
  }
50052
- return applyMapMergeOperator(baseMap, projectMap, path);
50054
+ result = applyMapMergeOperator(baseMap, projectMap, path);
50055
+ } else {
50056
+ result = { ...baseMap };
50053
50057
  }
50058
+ } else {
50059
+ result = { ...baseMap };
50054
50060
  }
50055
- const result = { ...baseMap };
50056
50061
  for (const [key, projVal] of Object.entries(projectMap)) {
50062
+ if (OPERATOR_KEYS.has(key)) continue;
50057
50063
  const baseVal = result[key];
50058
50064
  if (baseVal !== void 0 && isRecord2(baseVal) && isRecord2(projVal)) {
50059
50065
  result[key] = deepMergeEntities(