-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feature/appdev (#1204) * apps: add base scaffolding for app dev command subtree * charm templates: change up method signatures for easier use * only use 1.18.x in ci * add internal package to unit test * disable interactive mode * only use logging pager in interactive mode Co-authored-by: Kamal Nasser <kamal@digitalocean.com> * extract pager component and improve build log output * Add support for an app dev config and management (#1208) * Add support for build environment variables (#1209) * confirmation prompt component * text input component * Add support for build command overrides (#1211) * Add copy on write support for CNB builds (#1213) * confirm: display result options * split off list subpackage * split off pager subpackage * split off template and textbox packages * StyledText for icons * split off text component * improve indent util * confirm: clarify prompt persistance behavior * Add snap support for docker interface for app dev builds (#1214) * Add snap support for docker interface for app dev builds * add snap warning message * support cnb versioning, clean up build envs (#1215) * add support for local cnb caching (#1216) * add support for local cnb caching * address pr feedback * charm: improved output handling, add warning textbox variant * add config interfaces and types * use new config interfaces, add support for per-component config * address pr feedback, app dev workspace * structured config * unexport Config.AppID and config.AppSpecPath * unexport internal method * fix unclosed file handler in tests * test setting and unsetting component-level settings * appdev: handle user cancellation, log pager styling updates (#1229) * correctly handle user cancellation * log pager: update header/footer styling, scroll indicator * log pager: add title spinner * add support to build static site server image * add docker support for static builds * docker static site build cleanup * docker static site build tests * cnb static site build cleanup * cnb static site build tests * docker static site build input validation updates remove /var/run/docker.sock dependency from tests * fix path handling on windows * intercept ctrl-c to exit cleanly * Ntate/appdev/macossupport (#1235) * mount docker.sock.raw for mac docker-for-desktop * update local builder to v0.50.2 * support for windows docker-for-desktop (#1238) * appdev: pull required container images (#1240) * pull required container images * pull cnb stack run image * update no app spec error message * vendor latest godo * bump godo to v1.85.0 * support new godo interface types * address pr feedback * add better help messaging for app dev config Co-authored-by: Kamal Nasser <kamal@digitalocean.com>
- Loading branch information
Showing
1,102 changed files
with
139,105 additions
and
3,958 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package commands | ||
|
||
import ( | ||
"strings" | ||
|
||
"github.com/digitalocean/doctl/commands/charm" | ||
"github.com/digitalocean/doctl/commands/charm/template" | ||
"github.com/digitalocean/godo" | ||
) | ||
|
||
type componentListItem struct { | ||
spec godo.AppComponentSpec | ||
} | ||
|
||
func (i componentListItem) Title() string { | ||
return i.spec.GetName() | ||
} | ||
|
||
func (i componentListItem) Description() string { | ||
desc := []string{ | ||
strings.ToLower(charm.SnakeToTitle(i.spec.GetType())) + " component", | ||
} | ||
|
||
if buildable, ok := i.spec.(godo.AppBuildableComponentSpec); ok { | ||
if sourceDir := buildable.GetSourceDir(); sourceDir != "" { | ||
desc = append(desc, template.String(`located in ./{{highlight .}}`, sourceDir)) | ||
} | ||
} | ||
|
||
return strings.Join(desc, "\n") | ||
} | ||
|
||
func (i componentListItem) FilterValue() string { | ||
return i.spec.GetName() | ||
} |
Oops, something went wrong.