@lmzhen/dsh-evolution-merge 0.30.7 → 0.30.8

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/lib/index.js CHANGED
@@ -1561,10 +1561,13 @@ function mergeCommandHelp() {
1561
1561
  }
1562
1562
  //#endregion
1563
1563
  //#region lib/types/domain/errors.js
1564
+ function redact(text) {
1565
+ return text.replace(/sk-[A-Za-z0-9_-]{16,}/g, "[redacted]").replace(/Bearer\s+\S+/gi, "Bearer [redacted]").replace(/(api[_-]?key\s*[:=]\s*)\S+/gi, "$1[redacted]");
1566
+ }
1564
1567
  function formatMergeError(error) {
1565
1568
  if (error.kind === "parameter") return "merge: " + error.message + " (" + error.code + ")";
1566
1569
  const where = error.stage === void 0 && error.runId === void 0 ? error.detail ?? "no additional detail" : [error.stage === void 0 ? void 0 : "stage=" + error.stage, error.runId === void 0 ? void 0 : "run=" + error.runId].filter(Boolean).join(" ");
1567
- return "merge failed: " + error.message + " (" + error.code + ")\n" + where + "\nnext: fix the target or rerun after the cause is gone";
1570
+ return redact("merge failed: " + error.message + " (" + error.code + ")\n" + where + "\nnext: fix the target or rerun after the cause is gone");
1568
1571
  }
1569
1572
  //#endregion
1570
1573
  //#region lib/types/merge-command.js
@@ -1,9 +1,15 @@
1
+ function redact(text) {
2
+ return text
3
+ .replace(/sk-[A-Za-z0-9_-]{16,}/g, '[redacted]')
4
+ .replace(/Bearer\s+\S+/gi, 'Bearer [redacted]')
5
+ .replace(/(api[_-]?key\s*[:=]\s*)\S+/gi, '$1[redacted]');
6
+ }
1
7
  export function formatMergeError(error) {
2
8
  if (error.kind === 'parameter')
3
9
  return 'merge: ' + error.message + ' (' + error.code + ')';
4
10
  const where = error.stage === undefined && error.runId === undefined
5
11
  ? (error.detail ?? 'no additional detail')
6
12
  : [error.stage === undefined ? undefined : 'stage=' + error.stage, error.runId === undefined ? undefined : 'run=' + error.runId].filter(Boolean).join(' ');
7
- return 'merge failed: ' + error.message + ' (' + error.code + ')\n' + where + '\nnext: fix the target or rerun after the cause is gone';
13
+ return redact('merge failed: ' + error.message + ' (' + error.code + ')\n' + where + '\nnext: fix the target or rerun after the cause is gone');
8
14
  }
9
15
  //# sourceMappingURL=errors.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-merge",
3
3
  "description": "Skill auto-merge domain: screening, two-round authoring, queues and commit orchestration (community build)",
4
- "version": "0.30.7",
4
+ "version": "0.30.8",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,8 +27,8 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@deepseek-ai/schemastery": "^3.18.5",
30
- "@lmzhen/dsh-evolution-core": "^0.30.7",
31
- "@lmzhen/dsh-evolution-merge-engine": "^0.30.7"
30
+ "@lmzhen/dsh-evolution-core": "^0.30.8",
31
+ "@lmzhen/dsh-evolution-merge-engine": "^0.30.8"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@deepseek-ai/cordis": "^4.0.5"