Skip to content

feat: public go package blueprint#38

Merged
kulti merged 2 commits intov3from
bp-ignore
Apr 20, 2026
Merged

feat: public go package blueprint#38
kulti merged 2 commits intov3from
bp-ignore

Conversation

@kulti
Copy link
Copy Markdown
Collaborator

@kulti kulti commented Apr 20, 2026

No description provided.

Copy link
Copy Markdown

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 extracts blueprint directory zipping (with .blueprintignore support) into a new public Go package (blueprint) and standardizes CLI string-flag whitespace trimming via a shared cliflags.TrimSpaceAction helper.

Changes:

  • Move blueprint zip/ignore logic into blueprint.Zip(fs.FS) and wire CLI usage through it.
  • Add cliflags.TrimSpaceAction and apply it to various string flags (device/rule/connection).
  • Remove the bp/ example blueprint files.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/app/enaptercli/execute.go Switches zipDir implementation to call the new blueprint.Zip helper.
internal/app/enaptercli/cmd_rule_engine_rule_update.go Trims whitespace for the --slug flag via cliflags.
internal/app/enaptercli/cmd_rule_engine_rule_create.go Trims whitespace for the required --slug flag via cliflags.
internal/app/enaptercli/cmd_device_update.go Trims whitespace for --name and --slug flags via cliflags.
internal/app/enaptercli/cmd_device_create_standalone.go Trims whitespace for device name/slug flags via cliflags.
internal/app/enaptercli/cmd_device_create_lua_device.go Trims whitespace for device name/slug flags via cliflags.
internal/app/enaptercli/cmd_connection_add.go Trims whitespace for required --name via cliflags.
internal/app/cliflags/trim.go Introduces reusable flag Action for strings.TrimSpace.
blueprint/zip.go New public package implementing zip + .blueprintignore support.
bp/manifest.yml Removes old example blueprint manifest.
bp/firmware.lua Removes old example blueprint firmware.

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

Comment thread blueprint/zip.go Outdated
Comment thread internal/app/enaptercli/cmd_device_update.go
Comment thread internal/app/enaptercli/execute.go Outdated
Copy link
Copy Markdown

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 extracts blueprint directory zipping (with .blueprintignore support) into a new public Go package (blueprint) and standardizes whitespace-trimming for various CLI string flags via a reusable cliflags helper.

Changes:

  • Move blueprint directory zipping logic from internal/app/enaptercli into new public package blueprint and update upload command to use it.
  • Add cliflags.TrimSpaceAction and apply it to multiple CLI string flags (device/rule/connection slugs and names).
  • Remove the top-level bp/ sample blueprint files.

Reviewed changes

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

Show a summary per file
File Description
internal/app/enaptercli/execute.go Removes inlined blueprint zip/ignore implementation now moved to public package.
internal/app/enaptercli/cmd_blueprint_upload.go Switches directory zipping to blueprint.Zip(os.DirFS(...)).
blueprint/zip.go New public package implementing blueprint zipping with .blueprintignore.
internal/app/cliflags/trim.go Adds reusable trimming Action for urfave/cli string flags.
internal/app/enaptercli/cmd_connection_add.go Trims whitespace for connection name flag input.
internal/app/enaptercli/cmd_device_update.go Moves trimming to flag Action for name/slug; payload now uses already-trimmed values.
internal/app/enaptercli/cmd_device_create_standalone.go Trims device name/slug inputs via flag Action.
internal/app/enaptercli/cmd_device_create_lua_device.go Trims device name/slug inputs via flag Action.
internal/app/enaptercli/cmd_rule_engine_rule_create.go Trims rule slug input via flag Action.
internal/app/enaptercli/cmd_rule_engine_rule_update.go Trims rule slug input via flag Action.
bp/manifest.yml Removes sample blueprint manifest.
bp/firmware.lua Removes sample blueprint firmware.

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

Comment thread blueprint/zip.go
@kulti kulti merged commit a950a1a into v3 Apr 20, 2026
6 checks passed
@kulti kulti deleted the bp-ignore branch April 20, 2026 16:19
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