Skip to content

feat(apps): support zip files in apps:builds:create --path option#148

Open
robingenz wants to merge 2 commits intomainfrom
feat/builds-create-zip-path
Open

feat(apps): support zip files in apps:builds:create --path option#148
robingenz wants to merge 2 commits intomainfrom
feat/builds-create-zip-path

Conversation

@robingenz
Copy link
Copy Markdown
Member

Summary

The --path option of apps:builds:create now accepts a local zip file in addition to a folder. When a zip file is provided, it is uploaded directly without re-zipping, matching the behavior of apps:liveupdates:upload.

  • Validation accepts either a directory (still requires package.json) or a .zip file.
  • For zip inputs, the file is read via createBufferFromPath and uploaded with its original filename preserved.
  • For folder inputs, the existing zipFolderWithGitignore flow is unchanged.

Copilot AI review requested due to automatic review settings April 8, 2026 10:59
@robingenz
Copy link
Copy Markdown
Member Author

npm i @capawesome/cli@4.8.0-dev.efa0850.1775645973

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the apps:builds:create command to allow --path to accept either a source directory (zipped before upload) or a pre-built .zip file (uploaded directly), aligning the CLI’s build-source upload behavior more closely with the live updates flow.

Changes:

  • Expand --path validation to accept either a directory (still requiring package.json) or a .zip file.
  • When --path is a zip file, read and upload it directly (instead of re-zipping).
  • Switch path validation to use shared filesystem helpers (fileExistsAtPath, isDirectory) and add createBufferFromPath usage.

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

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