agent-yes 1.59.0 → 1.60.0

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.
@@ -1,4 +1,4 @@
1
- import { a as __esmMin, c as __toESM, i as __commonJSMin, n as require_winston, o as __exportAll, s as __require, t as logger } from "./logger-Cff_cjTg.js";
1
+ import { a as __esmMin, c as __toESM, i as __commonJSMin, n as require_winston, o as __exportAll, s as __require, t as logger } from "./logger-DH1Rx9HI.js";
2
2
  import { arch, platform } from "process";
3
3
  import { execSync } from "child_process";
4
4
  import { closeSync, existsSync, fsyncSync, mkdirSync, openSync } from "fs";
@@ -623,9 +623,8 @@ const format = (open, close) => {
623
623
  if (index === -1) return openCode + string + closeCode;
624
624
  let result = openCode;
625
625
  let lastIndex = 0;
626
- const replaceCode = (close === 22 ? closeCode : "") + openCode;
627
626
  while (index !== -1) {
628
- result += string.slice(lastIndex, index) + replaceCode;
627
+ result += string.slice(lastIndex, index) + openCode;
629
628
  lastIndex = index + closeCode.length;
630
629
  index = string.indexOf(closeCode, lastIndex);
631
630
  }
@@ -3158,7 +3157,7 @@ function prettyMilliseconds(milliseconds, options) {
3158
3157
  add(Number(parsed.hours), "hour", "h");
3159
3158
  }
3160
3159
  add(Number(parsed.minutes), "minute", "m");
3161
- if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
3160
+ if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
3162
3161
  const seconds = Number(parsed.seconds);
3163
3162
  const milliseconds = Number(parsed.milliseconds);
3164
3163
  const microseconds = Number(parsed.microseconds);
@@ -9382,7 +9381,7 @@ function tryCatch(catchFn, fn) {
9382
9381
  //#endregion
9383
9382
  //#region package.json
9384
9383
  var name = "agent-yes";
9385
- var version = "1.59.0";
9384
+ var version = "1.60.0";
9386
9385
 
9387
9386
  //#endregion
9388
9387
  //#region ts/pty-fix.ts
@@ -9808,7 +9807,7 @@ async function notifyWebhook(status, details, cwd = process.cwd()) {
9808
9807
 
9809
9808
  //#endregion
9810
9809
  //#region ts/index.ts
9811
- const config = await import("./agent-yes.config-72EQj3_2.js").then((mod) => mod.default || mod);
9810
+ const config = await import("./agent-yes.config-BZYHa6lN.js").then((mod) => mod.default || mod);
9812
9811
  const CLIS_CONFIG = config.clis;
9813
9812
  /**
9814
9813
  * Main function to run agent-cli with automatic yes/no responses
@@ -10429,4 +10428,4 @@ const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
10429
10428
 
10430
10429
  //#endregion
10431
10430
  export { AgentContext as a, PidStore as c, config as i, removeControlCharacters as l, CLIS_CONFIG as n, name as o, agentYes as r, version as s, SUPPORTED_CLIS as t };
10432
- //# sourceMappingURL=SUPPORTED_CLIS-CJViBrBx.js.map
10431
+ //# sourceMappingURL=SUPPORTED_CLIS-B5LK6-HJ.js.map
@@ -0,0 +1,4 @@
1
+ import "./logger-DH1Rx9HI.js";
2
+ import { t as agent_yes_config_default } from "./agent-yes.config-CrgoI5sj.js";
3
+
4
+ export { agent_yes_config_default as default };
@@ -1,4 +1,4 @@
1
- import { t as logger } from "./logger-Cff_cjTg.js";
1
+ import { t as logger } from "./logger-DH1Rx9HI.js";
2
2
  import { access, mkdir, readFile, writeFile } from "node:fs/promises";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
@@ -106,7 +106,7 @@ async function loadCascadingConfig(options = {}) {
106
106
  logger.debug("[config] No config files found in any location");
107
107
  return {};
108
108
  }
109
- const merged = deepMixin({}, ...nonEmptyConfigs);
109
+ const merged = nonEmptyConfigs.reduce((acc, c) => deepMixin(acc, c), {});
110
110
  logger.debug("[config] Merged config from", nonEmptyConfigs.length, "sources");
111
111
  return merged;
112
112
  }
@@ -140,7 +140,7 @@ function addSchemaReference(content, ext) {
140
140
  const lines = content.split("\n");
141
141
  let insertIndex = 0;
142
142
  for (let i = 0; i < lines.length; i++) {
143
- const line = lines[i].trim();
143
+ const line = lines[i]?.trim();
144
144
  if (line && !line.startsWith("#")) {
145
145
  insertIndex = i;
146
146
  break;
@@ -332,4 +332,4 @@ function getDefaultConfig() {
332
332
 
333
333
  //#endregion
334
334
  export { agent_yes_config_default as t };
335
- //# sourceMappingURL=agent-yes.config-CQlMMPB9.js.map
335
+ //# sourceMappingURL=agent-yes.config-CrgoI5sj.js.map