diff options
| author | Clawd <ai@clawd.bot> | 2026-02-15 18:52:55 -0800 |
|---|---|---|
| committer | Clawd <ai@clawd.bot> | 2026-02-15 18:52:55 -0800 |
| commit | a7436dfcc01a599bbb99a810bd59e92b21252c78 (patch) | |
| tree | a6b25806acf15bd334629c72788d035c140b030e /internal/output/output.go | |
| parent | 146393527c20df3717711eced83fb9f58f96c884 (diff) | |
feat(v2): implement ship host init with JSON output
- host_v2.go: full host initialization with JSON responses
- Installs Caddy, Docker on Ubuntu/Debian
- Creates /etc/ship/{env,ports,ttl} directories
- Installs TTL cleanup timer (hourly systemd timer)
- Cleanup script removes expired deploys completely
- Preserves git deploy setup functionality (optional)
- Added ErrInvalidArgs error code
Critical 'host init' functionality preserved for v2
Diffstat (limited to 'internal/output/output.go')
| -rw-r--r-- | internal/output/output.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/output/output.go b/internal/output/output.go index 13e34a3..1e1e34e 100644 --- a/internal/output/output.go +++ b/internal/output/output.go | |||
| @@ -107,6 +107,7 @@ func (r ErrorResponse) IsError() bool { return true } | |||
| 107 | // Error codes | 107 | // Error codes |
| 108 | const ( | 108 | const ( |
| 109 | ErrInvalidPath = "INVALID_PATH" | 109 | ErrInvalidPath = "INVALID_PATH" |
| 110 | ErrInvalidArgs = "INVALID_ARGS" | ||
| 110 | ErrUnknownProjectType = "UNKNOWN_PROJECT_TYPE" | 111 | ErrUnknownProjectType = "UNKNOWN_PROJECT_TYPE" |
| 111 | ErrSSHConnectFailed = "SSH_CONNECT_FAILED" | 112 | ErrSSHConnectFailed = "SSH_CONNECT_FAILED" |
| 112 | ErrSSHAuthFailed = "SSH_AUTH_FAILED" | 113 | ErrSSHAuthFailed = "SSH_AUTH_FAILED" |
| @@ -180,7 +181,7 @@ func exitCodeForError(code string) int { | |||
| 180 | return ExitSSHFailed | 181 | return ExitSSHFailed |
| 181 | case ErrHealthCheckFailed, ErrHealthCheckTimeout: | 182 | case ErrHealthCheckFailed, ErrHealthCheckTimeout: |
| 182 | return ExitHealthFailed | 183 | return ExitHealthFailed |
| 183 | case ErrInvalidPath, ErrInvalidTTL, ErrInvalidName, ErrHostNotConfigured: | 184 | case ErrInvalidPath, ErrInvalidTTL, ErrInvalidName, ErrHostNotConfigured, ErrInvalidArgs: |
| 184 | return ExitInvalidArgs | 185 | return ExitInvalidArgs |
| 185 | default: | 186 | default: |
| 186 | return ExitDeployFailed | 187 | return ExitDeployFailed |
