ECC/scripts/lib
Fredrik Hallerös 17a6ef4edb
Add PowerShell installer wrapper and update documentation (#532)
* Add install.ps1 PowerShell wrapper and tests

Add a Windows-native PowerShell wrapper (install.ps1) that resolves symlinks and delegates to the Node-based installer runtime. Update README with PowerShell usage examples and cross-platform npx entrypoint guidance. Point the ecc-install bin to the Node installer (scripts/install-apply.js) in package.json (and refresh package-lock), include install.ps1 in package files, and add tests: a new install-ps1.test.js and a tweak to install-sh.test.js to skip on Windows. These changes provide native Windows installer support while keeping npm-compatible cross-platform invocation.

* Improve tests for Windows HOME/USERPROFILE

Make tests more cross-platform by ensuring HOME and USERPROFILE are kept in sync and by normalizing test file paths for display.

- tests/lib/session-adapters.test.js: set USERPROFILE when temporarily setting HOME and restore previous USERPROFILE on teardown.
- tests/run-all.js: use a normalized displayPath (forward-slash separated) for logging and error messages so output is consistent across platforms.
- tests/scripts/ecc.test.js & tests/scripts/session-inspect.test.js: build envOverrides from options.env and add HOME <-> USERPROFILE fallbacks so spawned child processes receive both variables when only one is provided.

These changes prevent test failures and inconsistent logs on Windows where USERPROFILE is used instead of HOME.

* Fix Windows paths and test flakiness

Improve cross-platform behavior and test stability.

- Remove unused createLegacyInstallPlan import from install-lifecycle.js.
- Change resolveInstallConfigPath to use path.normalize(path.join(cwd, configPath)) to produce normalized relative paths.
- Tests: add toBashPath and normalizedRelativePath helpers to normalize Windows paths for bash and comparisons.
- Make cleanupTestDir retry rmSync on transient Windows errors (EPERM/EBUSY/ENOTEMPTY) with short backoff using sleepMs.
- Ensure spawned test processes receive USERPROFILE and convert repo/detect paths to bash format when invoking bash.

These changes reduce Windows-specific failures and flakiness in the test suite and tidy up a small unused import.
2026-03-16 13:35:17 -07:00
..
install Add PowerShell installer wrapper and update documentation (#532) 2026-03-16 13:35:17 -07:00
install-targets feat: strengthen install lifecycle and target adapters (#512) 2026-03-15 21:47:31 -07:00
session-adapters fix: resolve all CI test failures (19 fixes across 6 files) (#519) 2026-03-16 01:59:53 -07:00
skill-evolution feat: add skill evolution foundation (#514) 2026-03-15 21:47:39 -07:00
skill-improvement feat: self-improving skills loop — observe, inspect, amend, evaluate 2026-03-14 23:21:18 -07:00
state-store feat: add SQLite state store and query CLI (#510) 2026-03-16 01:32:21 -07:00
hook-flags.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
install-executor.js fix: resolve all CI test failures (19 fixes across 6 files) (#519) 2026-03-16 01:59:53 -07:00
install-lifecycle.js Add PowerShell installer wrapper and update documentation (#532) 2026-03-16 13:35:17 -07:00
install-manifests.js feat: wire manifest resolution into install execution (#509) 2026-03-15 21:47:22 -07:00
install-state.js feat: strengthen install lifecycle and target adapters (#512) 2026-03-15 21:47:31 -07:00
orchestration-session.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
package-manager.d.ts fix: Windows path support, error handling, and dedup in validators 2026-02-12 15:57:20 -08:00
package-manager.js Fix failing workflows: trim action in getCommandPattern and remove broken AgentShield scan 2026-02-18 08:06:25 +00:00
project-detect.js fix(lint): remove unnecessary escape characters in regex patterns 2026-03-03 22:11:51 +09:00
resolve-formatter.js refactor: deduplicate config lists and unify resolveFormatterBin branches 2026-03-11 10:45:28 +09:00
session-aliases.d.ts fix: 6 bugs fixed, 67 tests added for session-manager and session-aliases 2026-02-12 15:50:04 -08:00
session-aliases.js fix: make saveAliases atomic on Unix by skipping unnecessary unlink before rename 2026-02-13 04:23:22 -08:00
session-manager.d.ts fix: Windows path support, error handling, and dedup in validators 2026-02-12 15:57:20 -08:00
session-manager.js fix: accept shorter mixed-case session IDs (#408) 2026-03-12 23:29:50 -07:00
shell-split.js fix(hooks): allow tmux-wrapped dev server commands (#321) 2026-03-07 14:47:49 -08:00
tmux-worktree-orchestrator.js fix: preserve orchestration launcher compatibility 2026-03-12 15:40:25 -07:00
utils.d.ts fix: add missing ReplaceInFileOptions to utils.d.ts type declaration 2026-02-13 01:24:34 -08:00
utils.js fix(hooks): scrub secrets and harden hook security (#348) 2026-03-07 14:47:31 -08:00