feat(cli): add --ignore-pattern flag to exclude files from deploy bundle.#221
Open
codxbrexx wants to merge 1 commit into
Open
feat(cli): add --ignore-pattern flag to exclude files from deploy bundle.#221codxbrexx wants to merge 1 commit into
--ignore-pattern flag to exclude files from deploy bundle.#221codxbrexx wants to merge 1 commit into
Conversation
- Replace '--ignore' flag with '--ignore-pattern' (-i) to exclude files from the deployment bundle. - Remove '-i' alias from '--inspect' to prevent command collisions. - Automatically ignore default language folders (e.g., node_modules, __pycache__) during the zipping phase. - Update '--help' output to reflect new flags and usages. - Add unit and integration tests for pattern matching and ZIP file generation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves Issue
fix: #220
What changed?
src/cli/args.ts: Replaced the legacy--ignoreflag mapping with--ignore-pattern. Re-assigned the-ialias to this new flag and concurrently removed-ifrom the--inspectcommand to prevent any parsing collisions.src/deploy.ts: Implemented language detection during ZIP bundling usingdescriptor.runners. It now seamlessly combines user-supplied patterns with sensible, language-specific defaults (e.g.,node_modulesfor Node.js,__pycache__for Python,vendorfor Ruby/PHP,bin/objfor C#/F#/COBOL,targetfor Rust).src/utils.ts: EnsuredfilterFilesproperly matches user and system exclusions reliably during the filesystem traversal via REGEX.src/help.ts: Updated the hard-codedmetacall-deploy --helpdocumentation so that users can correctly see the new configuration aliases.src/test/package.integration.spec.tsguaranteeing payload ZIP distributions don't contain ignored subsets.Why this matters
Before this change, the CLI zipped the entire directory payload. This forces developers to arbitrarily upload incredibly large project assets (
node_modules, compiled.pyccaches) decreasing upload speed or cluttering remote bundle sizes.Providing a configurable and automatically scalable
--ignore-patternflag keeps the resulting payloads clean, lean, and specifically scoped.Resolves
Resolves the TODO tracking the implementation of an exclude/ignore file functionality.
Testing
npm run lintexecuting locally produces no unexpected exceptions relating to these modifications.npm run unittesting specifically asserting thefilterFilesutility verifies correct array exclusion behaviors.npm run testexecutes integration end-to-endziparchiving and assertions against local node repository file trees explicitly tracking--ignore-patternpayload reductions.