Skip to content

fix: respect cli flags - #1805

Merged
janniks merged 8 commits into
mainfrom
fix/cli-l-flag-deploy-contract
Aug 7, 2025
Merged

fix: respect cli flags#1805
janniks merged 8 commits into
mainfrom
fix/cli-l-flag-deploy-contract

Conversation

@janniks

@janniks janniks commented Aug 6, 2025 •

Copy link
Copy Markdown
Contributor

This PR was published to npm with the version 7.1.3-pr.7+a54d74ce
e.g. npm install @stacks/common@7.1.3-pr.7+a54d74ce --save-exact

  • Respect network flags in CLI commands

Background: Some commands were not using the detected network param, which can be configured by various flags.

@vercel

vercel Bot commented Aug 6, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stacksjs-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2025 2:49pm

This comment was marked as outdated.

@codecov

codecov Bot commented Aug 6, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/cli/src/cli.ts 87.50% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes CLI commands to properly respect network flag configurations by ensuring network parameters are passed to the underlying API calls and transaction operations. The main issue was that some commands were not using the detected network parameter, which can be configured by various flags.

  • Updated faucetCall function to use the configured network instead of hardcoded testnet URL
  • Added network parameter to fetchFeeEstimateTransaction and broadcastTransaction calls in contract deployment and function call commands
  • Added special handling for the faucet command to default to testnet for backwards compatibility when no network flags are provided

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/cli/src/cli.ts Updates CLI commands to use network configuration from flags instead of hardcoded URLs
packages/cli/tests/cli.test.ts Adds comprehensive test coverage for network flag handling across different commands

@janniks
janniks merged commit 9fc4990 into main Aug 7, 2025
8 checks passed
@janniks
janniks deleted the fix/cli-l-flag-deploy-contract branch August 7, 2025 17:06
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