ECC/scripts/lib
Affaan Mustafa 9e791ed305 fix: harden utils.js edge cases and add input validation
- Guard findFiles() against null/undefined dir and pattern parameters
  (previously crashed with TypeError on .replace() or fs.existsSync())
- Wrap countInFile() and grepFile() regex construction in try-catch to
  handle invalid regex strings like '(unclosed' (previously crashed with
  SyntaxError: Invalid regular expression)
- Add try-catch to replaceInFile() with descriptive error logging
- Add 1MB size limit to readStdinJson() matching the PostToolUse hooks
  (previously had unbounded stdin accumulation)
- Improve ensureDir() error message to include the directory path
- Add 128-char length limit to setAlias() to prevent oversized alias
  names from inflating the JSON store
- Update utils.d.ts with new maxSize option on ReadStdinJsonOptions
2026-02-12 14:49:11 -08:00
..
package-manager.d.ts feat: add TypeScript declaration files for all core libraries 2026-02-12 13:56:48 -08:00
package-manager.js fix: improve error handling, fix bugs, and optimize core libraries 2026-02-12 07:06:53 -08:00
session-aliases.d.ts feat: add TypeScript declaration files for all core libraries 2026-02-12 13:56:48 -08:00
session-aliases.js fix: harden utils.js edge cases and add input validation 2026-02-12 14:49:11 -08:00
session-manager.d.ts feat: add TypeScript declaration files for all core libraries 2026-02-12 13:56:48 -08:00
session-manager.js fix: renameAlias data corruption, empty sessionId match, NaN threshold 2026-02-12 14:30:10 -08:00
utils.d.ts fix: harden utils.js edge cases and add input validation 2026-02-12 14:49:11 -08:00
utils.js fix: harden utils.js edge cases and add input validation 2026-02-12 14:49:11 -08:00