Skip to content

Conversation

@0xClandestine
Copy link
Member

@0xClandestine 0xClandestine commented Dec 1, 2025

Description

This PR introduces several performance optimizations and quality-of-life improvements to the Zeus CLI tool.

Changes

Performance Improvements

  • Lazy loading of subcommands: Only load the command modules that are actually needed
  • Fast paths for --version and --help: These common flags now bypass full CLI initialization
  • Non-blocking update checks: Update checks now run in the background without blocking CLI execution
  • Optimized webpack bundling: Enabled transpileOnly for faster builds and bundled more dependencies

New Features

  • Sorted environment variables: zeus env show now displays environment variables in alphabetical order for improved readability
  • Pretty print support: Added --pretty flag to format JSON output in a more human-readable way
  • Verification retry mechanism: Added exponential backoff and delay between verification attempts to handle Etherscan's indexing time

…dates

- Refactor CLI entrypoint to use lazy loading for subcommands
  - Add fast paths for --version and --help flags
  - Implement dynamic imports for subcommands (only load what's needed)
  - Replace subcommands pattern with manual routing for faster startup

- Move update check to non-blocking background task
  - Extract checkForUpdates() function to utils.ts
  - Use exec() instead of execSync() to avoid blocking
  - Schedule update check with setImmediate() after command loads
  - Add silent failure handling for network issues

- Optimize webpack bundling configuration
  - Enable transpileOnly for ts-loader (faster builds)
  - Remove webpack-node-externals dependency
  - Explicitly list only native modules as externals
  - Bundle more dependencies for improved startup performance
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 11.30435% with 102 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.64%. Comparing base (8c9569d) to head (0698c6c).

Files with missing lines Patch % Lines
src/index.ts 0.00% 37 Missing ⚠️
src/commands/env/cmd/show.ts 18.42% 30 Missing and 1 partial ⚠️
src/commands/utils.ts 13.33% 13 Missing ⚠️
src/commands/deploy/cmd/utils.ts 11.11% 8 Missing ⚠️
src/deploy/handlers/gnosis.ts 0.00% 6 Missing ⚠️
src/deploy/handlers/eoa.ts 33.33% 4 Missing ⚠️
src/commands/deploy/cmd/verify.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
- Coverage   34.13%   33.64%   -0.49%     
==========================================
  Files          67       67              
  Lines        2985     3073      +88     
  Branches      507      520      +13     
==========================================
+ Hits         1019     1034      +15     
- Misses       1886     1959      +73     
  Partials       80       80              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants