Skip to content

Fix audit follow-ups for install, setup, and docs#28

Merged
paulius-krutkis-dcd merged 3 commits into
mainfrom
fix/audit-followups
Jun 11, 2026
Merged

Fix audit follow-ups for install, setup, and docs#28
paulius-krutkis-dcd merged 3 commits into
mainfrom
fix/audit-followups

Conversation

@paulius-krutkis-dcd

@paulius-krutkis-dcd paulius-krutkis-dcd commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the unused dcd alias from install scripts and fix README examples that used --parse on tier-1 search (use google-search instead).
  • Mask the auth token prompt in decodo setup and surface a clear error when config.json is malformed.
  • Replace deprecated npm bin -g in install.sh with npm config get prefix.

Test plan

  • pnpm test
  • pnpm lint
  • Run decodo setup interactively and confirm the token is not echoed
  • Corrupt config.json and confirm the CLI prints a helpful reconfigure message

- Updated README.md to replace 'decodo search' with 'decodo google-search' for consistency.
- Removed 'dcd' alias from install scripts and README, ensuring 'decodo' is the sole command.
- Introduced ConfigParseError for improved error handling when configuration files are invalid.
- Enhanced prompt for hidden input in setup command to improve user experience.
- Added tests for new error handling and hidden prompt functionality.
@paulius-krutkis-dcd paulius-krutkis-dcd changed the title Refactor CLI commands and enhance error handling Fix audit follow-ups for install, setup, and docs Jun 10, 2026
* Enhance install.sh for improved package installation and error handling

- Added `can_write_global` and `install_package` functions to manage global and user-level installations of the Decodo CLI.
- Updated main installation logic to utilize the new functions, providing clearer feedback on installation success and path configuration.
- Modified error messages to guide users on setting up their auth token more effectively.
- Adjusted tests to reflect changes in error handling and onboarding steps for users.

* Update auth-validation test to reflect changes in expected URL and integration header comment

- Changed the expected URL in the test from "https://ip.decodo.com" to "https://does-not-exist.decodo.com".
- Updated the comment for the integration header to remove the specific task reference, improving clarity.

* Add no-sudo install fallback to Windows install.ps1

Mirror the install.sh behaviour: attempt a global npm install, fall back
to a user-level install in %AppData%\npm-global when it fails, and show a
friendly npx hint if even that fails. Suppress the global-bin PATH warning
when the fallback ran and print user-prefix PATH guidance instead.

* Bump vitest from 3.2.4 to 3.2.6

Folds in dependabot/npm_and_yarn/vitest-3.2.6 (lockfile-only; satisfies
the existing ^3.2.0 range) so it ships with this branch.

* Improve CLI error messaging for authentication issues

- Consolidated error messages for AuthRequiredError to provide clearer guidance on obtaining and setting the auth token.
- Removed redundant console.error calls to streamline output.
@paulius-krutkis-dcd paulius-krutkis-dcd merged commit 1d89f48 into main Jun 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants