Skip to content

feat(apps:builds): add --path option to upload local source files#131

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

feat(apps:builds): add --path option to upload local source files#131
robingenz wants to merge 2 commits intomainfrom
feat/builds-create-path-option

Conversation

@robingenz
Copy link
Member

@robingenz robingenz commented Mar 23, 2026

Summary

  • Add --path option to apps:builds:create for uploading local source files instead of using a git reference
  • New app-build-sources service with multipart upload support (same pattern as bundle files)
  • New zipFolderWithGitignore utility that zips a directory while respecting .gitignore and excluding .git/
  • --path and --git-ref are mutually exclusive; --path validates the directory exists and contains a package.json

Test plan

  • npm run build compiles without errors
  • npx capawesome apps:builds:create --help shows --path option
  • --path . zips, uploads, and triggers a build using the uploaded source
  • --path + --git-ref together errors out
  • --path pointing to non-directory or missing package.json errors out
  • Without --path, existing git ref flow works unchanged

Copilot AI review requested due to automatic review settings March 23, 2026 16:23
@robingenz robingenz self-assigned this Mar 23, 2026
@robingenz robingenz added the feature Feature label Mar 23, 2026
Copy link
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

Adds support for creating app builds from a local source directory by introducing a --path option that zips and uploads sources (multipart), then creates a build referencing the uploaded source.

Changes:

  • Add --path to apps:builds:create, validate inputs, and pass appBuildSourceId when building from uploaded sources.
  • Introduce app-build-sources service for multipart uploads (similar to bundle file uploads).
  • Add zipFolderWithGitignore utility to zip directories while respecting .gitignore and excluding .git/.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/utils/zip.ts Adds a gitignore-aware directory zip helper used by --path.
src/types/index.ts Re-exports new build source types.
src/types/app-build.ts Extends build DTOs to support appBuildSourceId and optional gitRef.
src/types/app-build-source.ts Defines DTOs for build source creation and status.
src/services/app-build-sources.ts Implements multipart upload flow for build source archives.
src/commands/apps/builds/create.ts Adds --path option, validation, zipping, uploading, and build creation wiring.
package.json Adds globby dependency for gitignore-aware file discovery.
package-lock.json Locks dependency graph updates for globby and transitive deps.

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

@robingenz
Copy link
Member Author

npm i @capawesome/cli@4.6.0-dev.0108a83.1774286472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants