Skip to content

Fix improve handling of Launch deployment file upload size errors , avoid duplicate env-var prompt & duplicate choice list and upgrade packages - #139

Merged
Harshi-Shah-CS merged 10 commits into
stagingfrom
development
Apr 21, 2026
Merged

Fix improve handling of Launch deployment file upload size errors , avoid duplicate env-var prompt & duplicate choice list and upgrade packages#139
Harshi-Shah-CS merged 10 commits into
stagingfrom
development

Conversation

@Harshi-Shah-CS

Copy link
Copy Markdown
Contributor

fix: improve handling of Launch deployment file upload size errors
fix: bump lodash to 4.18.1
chore: bump @contentstack/cli-command and cli-utilities
fix: avoid duplicate env-var prompt & duplicate choice list
chore: upgrade @contentstack/cli-command and cli-utilities version

@Harshi-Shah-CS
Harshi-Shah-CS requested review from a team as code ownersApril 21, 2026 09:07
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0025✅ Passed
🟡 Medium Severity00500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

✅ BUILD PASSED - All security checks passed

@Harshi-Shah-CS
Harshi-Shah-CS merged commit 3365ab3 into stagingApr 21, 2026
8 checks passed

CopilotAI 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 improves the CLI Launch experience by detecting Launch deployment file-upload size related GraphQL errors and surfacing a clearer user-facing message, while also addressing prompt/choice duplication behavior and upgrading dependencies.

Changes:

  • Add a utility to extract Launch deployment error codes from GraphQL errors and detect file-size related failures.
  • Update deployment/project-creation error handling to show a targeted file-size guidance message (and log raw errors at debug).
  • Bump CLI dependencies (including lodash) and add a stdin max-listeners adjustment to reduce listener warning noise during interactive flows.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
src/util/deployment-errors.tsNew helper to collect GraphQL error codes and detect file-size related deployment failures; defines user-facing guidance message.
src/util/deployment-errors.test.tsUnit tests for error-code collection and file-size error detection.
src/base-command.tsAdjusts process.stdin max listeners for TTY sessions during command initialization.
src/adapters/base-class.tsUses the new detection to print a file-size specific message in deployment + project-creation error flows; removes an incorrect checkbox default.
src/adapters/base-class.test.tsAdds tests covering new deployment error-handling behavior.
package.jsonVersion bump and dependency upgrades (cli-command, cli-utilities, lodash) plus overrides update.
package-lock.jsonLockfile updates reflecting dependency upgrades.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,54 @@
export const FILE_UPLOAD_SIZE_LIMIT_USER_MESSAGE =
'Please use a file over the size of 1KB and under the size of 100MB.';

CopilotAIApr 21, 2026

Copy link

Choose a reason for hiding this comment

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

The user-facing guidance string is a bit awkward/ambiguous (“use a file over the size of 1KB…”). Consider rephrasing to something clearer like “Please upload a file between 1KB and 100MB.” so it’s easier to understand and doesn’t imply strict exclusivity. (Update the unit test assertion accordingly.)

Suggested change
'Please use a file over the size of 1KB and under the size of 100MB.';
'Please upload a file between 1KB and 100MB.';

Copilot uses AI. Check for mistakes.
Sign up for freeto 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.

6 participants

@Harshi-Shah-CS@naeem-shakh-cs@Reetika-Chavan@SakshiKoli-CS@chhavi-mandowara-cstk