-
Notifications
You must be signed in to change notification settings - Fork 5
[kernel-869] exclude files from extensions #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[kernel-869] exclude files from extensions #98
Conversation
a9498e8 to
cf9bfed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
rgarcia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the pr! left some comments on naming, code duplication, and making the util more generic. main concerns are around duplicating the existing ZipDirectory function and making the exclusion options more intuitive.
88b7410 to
27ef5de
Compare
rgarcia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good — prior feedback well addressed. nice cleanup consolidating into the existing ZipDirectory. couple minor nits.
|
|
||
| // Pre-flight size check | ||
| if in.Output != "json" { | ||
| pterm.Info.Println("Analyzing extension directory...") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "Analyzing..." is misleading since we go straight to zipping. consider changing to "Compressing extension directory..." and dropping the "Zipping extension directory..." message on line 328 since they'd be redundant.
| } | ||
|
|
||
| if fileInfo.Size() > MaxExtensionSizeBytes { | ||
| pterm.Error.Printf("Extension bundle is too large: %s (max: 50MB)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the hardcoded "50MB" here could drift from MaxExtensionSizeBytes — consider using FormatBytes(MaxExtensionSizeBytes) instead.
Note
Medium Risk
Moderate risk because it changes the core
ZipDirectoryAPI and behavior (new filtering + walker error handling), which affects deployment and extension uploads and could unintentionally omit required files or alter zip contents.Overview
Extension uploads now produce smaller, safer bundles.
extensions uploadzips directories with default exclusions (e.g.,node_modules,.git, test/spec files, logs) and enforces a 50MB max bundle size, printing the resulting archive size and actionable guidance when exceeded.Zipping API updated across the CLI.
util.ZipDirectorynow accepts optionalZipOptionsfor directory and filename-pattern exclusions and propagates directory-walk errors; all call sites (deploy,browsers extensions upload, etc.) are updated to passnilor the new default options. Addsutil.FormatBytesand new tests for zip exclusions and unzip behavior.Written by Cursor Bugbot for commit 27ef5de. This will update automatically on new commits. Configure here.