@fro.bot/systematic 3.21.1 → 3.21.3

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.
Files changed (2) hide show
  1. package/dist/pi.js +12 -4
  2. package/package.json +2 -2
package/dist/pi.js CHANGED
@@ -6,7 +6,7 @@ import { Type as Type3 } from "typebox";
6
6
  // src/lib/agent-resolver.ts
7
7
  import fs2 from "node:fs";
8
8
 
9
- // node_modules/.bun/js-yaml@4.3.1/node_modules/js-yaml/dist/js-yaml.mjs
9
+ // node_modules/.bun/js-yaml@4.3.2/node_modules/js-yaml/dist/js-yaml.mjs
10
10
  function getDefaultExportFromCjs(x) {
11
11
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
12
12
  }
@@ -1340,16 +1340,21 @@ function requireLoader() {
1340
1340
  state.result += _result;
1341
1341
  }
1342
1342
  }
1343
+ function chargeMergeWork(state) {
1344
+ state.totalMergeKeys++;
1345
+ if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {
1346
+ throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
1347
+ }
1348
+ }
1343
1349
  function mergeMappings(state, destination, source, overridableKeys) {
1344
1350
  if (!common2.isObject(source)) {
1345
1351
  throwError(state, "cannot merge mappings; the provided source object is unacceptable");
1346
1352
  }
1353
+ chargeMergeWork(state);
1347
1354
  const sourceKeys = Object.keys(source);
1348
1355
  for (let index = 0, quantity = sourceKeys.length;index < quantity; index += 1) {
1349
1356
  const key = sourceKeys[index];
1350
- if (state.maxTotalMergeKeys !== -1 && ++state.totalMergeKeys > state.maxTotalMergeKeys) {
1351
- throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
1352
- }
1357
+ chargeMergeWork(state);
1353
1358
  if (!_hasOwnProperty.call(destination, key)) {
1354
1359
  setProperty(destination, key, source[key]);
1355
1360
  overridableKeys[key] = true;
@@ -1377,6 +1382,9 @@ function requireLoader() {
1377
1382
  }
1378
1383
  if (keyTag === "tag:yaml.org,2002:merge") {
1379
1384
  if (Array.isArray(valueNode)) {
1385
+ if (valueNode.length > 100) {
1386
+ throwError(state, "abnormal merge sequence size");
1387
+ }
1380
1388
  for (let index = 0, quantity = valueNode.length;index < quantity; index += 1) {
1381
1389
  mergeMappings(state, _result, valueNode[index], overridableKeys);
1382
1390
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fro.bot/systematic",
3
- "version": "3.21.1",
3
+ "version": "3.21.3",
4
4
  "description": "Compound-engineering loops for OpenCode, Pi, and Claude Code",
5
5
  "type": "module",
6
6
  "homepage": "https://fro.bot/systematic",
@@ -118,7 +118,7 @@
118
118
  "typescript": "7.0.2"
119
119
  },
120
120
  "dependencies": {
121
- "js-yaml": "^4.3.1",
121
+ "js-yaml": "^4.3.2",
122
122
  "jsonc-parser": "^3.3.0",
123
123
  "tree-sitter-bash": "0.25.1",
124
124
  "web-tree-sitter": "0.27.0",