From 2e490a2242e1e810297bf73bfa4216782ea5538e Mon Sep 17 00:00:00 2001 From: Rob Galanakis Date: Sun, 7 Jan 2024 16:23:21 -0800 Subject: [PATCH 1/4] Update package to webhookdb owner --- .goreleaser.yaml | 8 ++++---- Makefile | 6 +++--- README.md | 12 ++++++------ appcontext/appcontext.go | 8 ++++---- client/auth.go | 2 +- client/backfill.go | 2 +- client/common.go | 2 +- client/db.go | 2 +- client/entities.go | 2 +- client/integrations.go | 4 ++-- client/me.go | 4 ++-- client/organizations.go | 2 +- client/replay.go | 2 +- client/services.go | 2 +- client/statemachine.go | 2 +- client/subscriptions.go | 2 +- client/synctarget.go | 2 +- client/webhook.go | 2 +- cmd/cmd_auth.go | 8 ++++---- cmd/cmd_backfill.go | 4 ++-- cmd/cmd_db.go | 4 ++-- cmd/cmd_debug.go | 8 ++++---- cmd/cmd_docs.go | 6 +++--- cmd/cmd_fixtures.go | 4 ++-- cmd/cmd_flags.go | 6 +++--- cmd/cmd_helpers.go | 6 +++--- cmd/cmd_integrations.go | 6 +++--- cmd/cmd_notification.go | 4 ++-- cmd/cmd_organizations.go | 6 +++--- cmd/cmd_replay.go | 4 ++-- cmd/cmd_services.go | 4 ++-- cmd/cmd_subscriptions.go | 6 +++--- cmd/cmd_sync.go | 4 ++-- cmd/cmd_unix.go | 6 +++--- cmd/cmd_update.go | 6 +++--- cmd/cmd_version.go | 2 +- cmd/cmd_wasm.go | 6 +++--- config/config.go | 2 +- formatting/formatting.go | 2 +- go.mod | 2 +- main.go | 2 +- prefs/prefs.go | 4 ++-- 42 files changed, 89 insertions(+), 89 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 7d99a5b..7a43d1f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -2,7 +2,7 @@ project_name: webhookdb builds: - id: distrib ldflags: - - -s -w -X github.com/lithictech/webhookdb-cli/config.Version={{.Version}} -X github.com/lithictech/webhookdb-cli/config.BuildSha={{.Commit}} -X github.com/lithictech/webhookdb-cli/config.BuildTime={{.Date}} + - -s -w -X github.com/webhookdb/webhookdb-cli/config.Version={{.Version}} -X github.com/webhookdb/webhookdb-cli/config.BuildSha={{.Commit}} -X github.com/webhookdb/webhookdb-cli/config.BuildTime={{.Date}} binary: webhookdb goos: - linux @@ -16,7 +16,7 @@ builds: goarch: arm64 - id: wasm ldflags: - - -s -w -X github.com/lithictech/webhookdb-cli/config.Version={{.Version}} -X github.com/lithictech/webhookdb-cli/config.BuildSha={{.Commit}} -X github.com/lithictech/webhookdb-cli/config.BuildTime={{.Date}} + - -s -w -X github.com/webhookdb/webhookdb-cli/config.Version={{.Version}} -X github.com/webhookdb/webhookdb-cli/config.BuildSha={{.Commit}} -X github.com/webhookdb/webhookdb-cli/config.BuildTime={{.Date}} binary: webhookdb targets: - js_wasm @@ -67,7 +67,7 @@ blobs: folder: "webhookdb-cli/{{.Version}}" brews: - repository: - owner: lithictech + owner: webhookdb name: homebrew-webhookdb token: "{{ .Env.TAP_GITHUB_TOKEN }}" branch: next @@ -75,7 +75,7 @@ brews: - distrib commit_author: name: webhookdbreleaser - email: webhookdb@lithic.tech + email: hello@webhookdb.com description: "Query and store any API in real-time with SQL. More at https://webhookdb.com" homepage: "https://webhookdb.com" caveats: "❤ Thanks for installing the WebhookDB CLI! Run `webhookdb auth login` to get register or sign in." diff --git a/Makefile b/Makefile index 92aff91..0359b14 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ BIN := ./webhookdb ARGS := WEBHOOKDB_API_HOST=http://localhost:18001 -BUILDFLAGS = "-X github.com/lithictech/webhookdb-cli/config.BuildTime=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -X github.com/lithictech/webhookdb-cli/config.BuildSha=`git rev-list -1 HEAD`" +BUILDFLAGS = "-X github.com/webhookdb/webhookdb-cli/config.BuildTime=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -X github.com/webhookdb/webhookdb-cli/config.BuildSha=`git rev-list -1 HEAD`" WEBSITE = ../webhookdb-api/webhookdb-website ifdef GOROOT @@ -77,10 +77,10 @@ help: @$(GO) run ./main.go help itest-auth-login: build - $(ARGS) $(BIN) auth login --username=alpha@lithic.tech + $(ARGS) $(BIN) auth login --username=alpha@webhookdb.com itest-auth-otp-%: build - $(ARGS) $(BIN) auth login --username=alpha@lithic.tech --token=$(*) + $(ARGS) $(BIN) auth login --username=alpha@webhookdb.com --token=$(*) itest-auth-logout: build $(ARGS) $(BIN) auth logout diff --git a/README.md b/README.md index 80e9f24..7525777 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ You also have quick access to the WebhookDB documentation: Use `webhookdb docs html` or visit [https://webhookdb.com/docs/cli](https://webhookdb.com/docs/cli) for usage instructions. -Or check out [MANUAL.md](https://github.com/lithictech/webhookdb-cli/blob/main/MANUAL.md) +Or check out [MANUAL.md](https://github.com/webhookdb/webhookdb-cli/blob/main/MANUAL.md) to see every command and option. ## Privacy and Telemetry @@ -38,7 +38,7 @@ There is some additional work for releasing via Homebrew and the web terminal. The process for releasing is: -- Go to [lithictech/homebrew-webhookdb](https://github.com/lithictech/homebrew-webhookdb) +- Go to [webhookdb/homebrew-webhookdb](https://github.com/webhookdb/homebrew-webhookdb) and make sure there is an empty `next` branch. You can use `make create-fresh-next-branch` from the `homebrew-webhookdb` repo for this. - Tag a commit, ie `git tag 0.9.2` @@ -56,11 +56,11 @@ The process for releasing is: ## Feedback -Please send us an email, [webhookdb@lithic.tech](mailto:webhookdb@lithic.tech) -Got feedback for us? Please don't hesitate to tell us on feedback. +Please send us an email to [hello@webhookdb.com](mailto:hello@webhookdb.com) +or open an issue in one of the [webhookdb repositories](https://github.com/webhookdb). ## License -Copyright (c) Lithic Technology LLC. All rights reserved. +Licensed under the [Apache License 2.0 license](https://github.com/webhookdb/webhookdb-cli/blob/main/LICENSE). -Licensed under the [Apache License 2.0 license](https://github.com/lithictech/webhookdb-cli/blob/main/LICENSE). +Copyright (c) Lithic Technology LLC. All rights reserved. diff --git a/appcontext/appcontext.go b/appcontext/appcontext.go index 8abd204..768b2ab 100644 --- a/appcontext/appcontext.go +++ b/appcontext/appcontext.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/go-resty/resty/v2" "github.com/lithictech/go-aperitif/logctx" - "github.com/lithictech/webhookdb-cli/client" - "github.com/lithictech/webhookdb-cli/config" - "github.com/lithictech/webhookdb-cli/prefs" - "github.com/lithictech/webhookdb-cli/whfs" "github.com/sirupsen/logrus" + "github.com/webhookdb/webhookdb-cli/client" + "github.com/webhookdb/webhookdb-cli/config" + "github.com/webhookdb/webhookdb-cli/prefs" + "github.com/webhookdb/webhookdb-cli/whfs" "os" "runtime" ) diff --git a/client/auth.go b/client/auth.go index 72a1888..0b5ef4e 100644 --- a/client/auth.go +++ b/client/auth.go @@ -2,7 +2,7 @@ package client import ( "context" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/types" ) func AuthGetMe(c context.Context, auth Auth) (out types.SingleResponse, err error) { diff --git a/client/backfill.go b/client/backfill.go index 8338078..c4094e5 100644 --- a/client/backfill.go +++ b/client/backfill.go @@ -2,7 +2,7 @@ package client import ( "context" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/types" ) type BackfillInput struct { diff --git a/client/common.go b/client/common.go index ab1ae71..18c7887 100644 --- a/client/common.go +++ b/client/common.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" "github.com/go-resty/resty/v2" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/types" "net/http" "net/url" ) diff --git a/client/db.go b/client/db.go index 9ffa1ea..3bf5306 100644 --- a/client/db.go +++ b/client/db.go @@ -3,7 +3,7 @@ package client import ( "context" "encoding/json" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/types" ) type DbOrgIdentifierInput struct { diff --git a/client/entities.go b/client/entities.go index 9d16ae8..e91e561 100644 --- a/client/entities.go +++ b/client/entities.go @@ -1,6 +1,6 @@ package client -import "github.com/lithictech/webhookdb-cli/types" +import "github.com/webhookdb/webhookdb-cli/types" type OrganizationMembershipEntity struct { CustomerEmail string `json:"email"` diff --git a/client/integrations.go b/client/integrations.go index 0d3d6a6..7832cb6 100644 --- a/client/integrations.go +++ b/client/integrations.go @@ -2,8 +2,8 @@ package client import ( "context" - "github.com/lithictech/webhookdb-cli/formatting" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/formatting" + "github.com/webhookdb/webhookdb-cli/types" ) type IntegrationsCreateInput struct { diff --git a/client/me.go b/client/me.go index 8f1f784..723db4a 100644 --- a/client/me.go +++ b/client/me.go @@ -2,8 +2,8 @@ package client import ( "context" - "github.com/lithictech/webhookdb-cli/formatting" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/formatting" + "github.com/webhookdb/webhookdb-cli/types" ) type MeOrgMembershipsInput struct { diff --git a/client/organizations.go b/client/organizations.go index aacfa12..78a4318 100644 --- a/client/organizations.go +++ b/client/organizations.go @@ -2,7 +2,7 @@ package client import ( "context" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/types" "net/url" ) diff --git a/client/replay.go b/client/replay.go index 4207e5d..428dbad 100644 --- a/client/replay.go +++ b/client/replay.go @@ -2,7 +2,7 @@ package client import ( "context" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/types" ) type ReplayInput struct { diff --git a/client/services.go b/client/services.go index cc810f5..97b72de 100644 --- a/client/services.go +++ b/client/services.go @@ -2,7 +2,7 @@ package client import ( "context" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/types" ) type ServicesListInput struct { diff --git a/client/statemachine.go b/client/statemachine.go index 3624037..24e3540 100644 --- a/client/statemachine.go +++ b/client/statemachine.go @@ -3,7 +3,7 @@ package client import ( "context" "github.com/go-resty/resty/v2" - "github.com/lithictech/webhookdb-cli/ask" + "github.com/webhookdb/webhookdb-cli/ask" ) type Step struct { diff --git a/client/subscriptions.go b/client/subscriptions.go index 0e597c2..cc48ecb 100644 --- a/client/subscriptions.go +++ b/client/subscriptions.go @@ -2,7 +2,7 @@ package client import ( "context" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/types" ) type SubscriptionInfoInput struct { diff --git a/client/synctarget.go b/client/synctarget.go index 45fe37e..885a971 100644 --- a/client/synctarget.go +++ b/client/synctarget.go @@ -2,7 +2,7 @@ package client import ( "context" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/types" ) type SyncTargetCreateInput struct { diff --git a/client/webhook.go b/client/webhook.go index 435433e..c320762 100644 --- a/client/webhook.go +++ b/client/webhook.go @@ -2,7 +2,7 @@ package client import ( "context" - "github.com/lithictech/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/types" ) type WebhookCreateInput struct { diff --git a/cmd/cmd_auth.go b/cmd/cmd_auth.go index 25c324d..e68639d 100644 --- a/cmd/cmd_auth.go +++ b/cmd/cmd_auth.go @@ -2,12 +2,12 @@ package cmd import ( "context" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" - "github.com/lithictech/webhookdb-cli/prefs" - "github.com/lithictech/webhookdb-cli/types" "github.com/mitchellh/mapstructure" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" + "github.com/webhookdb/webhookdb-cli/prefs" + "github.com/webhookdb/webhookdb-cli/types" "strings" ) diff --git a/cmd/cmd_backfill.go b/cmd/cmd_backfill.go index baff4c0..e132328 100644 --- a/cmd/cmd_backfill.go +++ b/cmd/cmd_backfill.go @@ -2,9 +2,9 @@ package cmd import ( "context" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" ) var backfillCmd = &cli.Command{ diff --git a/cmd/cmd_db.go b/cmd/cmd_db.go index 45b61a8..5be8f83 100644 --- a/cmd/cmd_db.go +++ b/cmd/cmd_db.go @@ -4,9 +4,9 @@ import ( "context" "fmt" "github.com/lithictech/go-aperitif/convext" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" "strings" ) diff --git a/cmd/cmd_debug.go b/cmd/cmd_debug.go index bdb1a0c..515603e 100644 --- a/cmd/cmd_debug.go +++ b/cmd/cmd_debug.go @@ -5,11 +5,11 @@ import ( "encoding/json" "fmt" "github.com/lithictech/go-aperitif/convext" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/ask" - "github.com/lithictech/webhookdb-cli/client" - "github.com/lithictech/webhookdb-cli/types" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/ask" + "github.com/webhookdb/webhookdb-cli/client" + "github.com/webhookdb/webhookdb-cli/types" "time" ) diff --git a/cmd/cmd_docs.go b/cmd/cmd_docs.go index e8e4456..18abe5b 100644 --- a/cmd/cmd_docs.go +++ b/cmd/cmd_docs.go @@ -4,10 +4,10 @@ import ( "context" "fmt" markdown "github.com/MichaelMure/go-term-markdown" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/config" - "github.com/lithictech/webhookdb-cli/whbrowser" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/config" + "github.com/webhookdb/webhookdb-cli/whbrowser" "io" "os" "os/exec" diff --git a/cmd/cmd_fixtures.go b/cmd/cmd_fixtures.go index 311c764..c3e9b1f 100644 --- a/cmd/cmd_fixtures.go +++ b/cmd/cmd_fixtures.go @@ -2,9 +2,9 @@ package cmd import ( "context" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" ) var fixturesCmd = &cli.Command{ diff --git a/cmd/cmd_flags.go b/cmd/cmd_flags.go index ac78a82..287af96 100644 --- a/cmd/cmd_flags.go +++ b/cmd/cmd_flags.go @@ -2,10 +2,10 @@ package cmd import ( "fmt" - "github.com/lithictech/webhookdb-cli/formatting" - "github.com/lithictech/webhookdb-cli/prefs" - "github.com/lithictech/webhookdb-cli/types" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/formatting" + "github.com/webhookdb/webhookdb-cli/prefs" + "github.com/webhookdb/webhookdb-cli/types" "strings" ) diff --git a/cmd/cmd_helpers.go b/cmd/cmd_helpers.go index fb15d8e..a913053 100644 --- a/cmd/cmd_helpers.go +++ b/cmd/cmd_helpers.go @@ -7,11 +7,11 @@ import ( "github.com/go-resty/resty/v2" "github.com/lithictech/go-aperitif/convext" "github.com/lithictech/go-aperitif/logctx" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" - "github.com/lithictech/webhookdb-cli/config" "github.com/olekukonko/tablewriter" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" + "github.com/webhookdb/webhookdb-cli/config" "os" "reflect" "regexp" diff --git a/cmd/cmd_integrations.go b/cmd/cmd_integrations.go index e67e40f..a80cea0 100644 --- a/cmd/cmd_integrations.go +++ b/cmd/cmd_integrations.go @@ -2,10 +2,10 @@ package cmd import ( "context" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" - "github.com/lithictech/webhookdb-cli/types" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" + "github.com/webhookdb/webhookdb-cli/types" ) var integrationsCmd = &cli.Command{ diff --git a/cmd/cmd_notification.go b/cmd/cmd_notification.go index 71fab7b..2c6175b 100644 --- a/cmd/cmd_notification.go +++ b/cmd/cmd_notification.go @@ -2,9 +2,9 @@ package cmd import ( "context" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" ) var webhooksCmd = &cli.Command{ diff --git a/cmd/cmd_organizations.go b/cmd/cmd_organizations.go index 1b7da3f..e893c09 100644 --- a/cmd/cmd_organizations.go +++ b/cmd/cmd_organizations.go @@ -3,10 +3,10 @@ package cmd import ( "context" "fmt" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" - "github.com/lithictech/webhookdb-cli/types" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" + "github.com/webhookdb/webhookdb-cli/types" ) var organizationsCmd = &cli.Command{ diff --git a/cmd/cmd_replay.go b/cmd/cmd_replay.go index 0e4ef1c..2894e31 100644 --- a/cmd/cmd_replay.go +++ b/cmd/cmd_replay.go @@ -2,9 +2,9 @@ package cmd import ( "context" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" ) var replayCmd = &cli.Command{ diff --git a/cmd/cmd_services.go b/cmd/cmd_services.go index babcbab..53a4806 100644 --- a/cmd/cmd_services.go +++ b/cmd/cmd_services.go @@ -2,9 +2,9 @@ package cmd import ( "context" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" ) var servicesCmd = &cli.Command{ diff --git a/cmd/cmd_subscriptions.go b/cmd/cmd_subscriptions.go index 1281fc7..7b8e08a 100644 --- a/cmd/cmd_subscriptions.go +++ b/cmd/cmd_subscriptions.go @@ -3,10 +3,10 @@ package cmd import ( "context" "fmt" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" - "github.com/lithictech/webhookdb-cli/whbrowser" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" + "github.com/webhookdb/webhookdb-cli/whbrowser" ) var subscriptionsCmd = &cli.Command{ diff --git a/cmd/cmd_sync.go b/cmd/cmd_sync.go index 776014b..a376722 100644 --- a/cmd/cmd_sync.go +++ b/cmd/cmd_sync.go @@ -3,9 +3,9 @@ package cmd import ( "context" "fmt" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/client" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/client" ) type syncType struct { diff --git a/cmd/cmd_unix.go b/cmd/cmd_unix.go index 3cd0071..845b1ab 100644 --- a/cmd/cmd_unix.go +++ b/cmd/cmd_unix.go @@ -8,10 +8,10 @@ import ( "github.com/getsentry/sentry-go" "github.com/go-resty/resty/v2" "github.com/lithictech/go-aperitif/logctx" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/config" - "github.com/lithictech/webhookdb-cli/prefs" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/config" + "github.com/webhookdb/webhookdb-cli/prefs" "log" "os" "strings" diff --git a/cmd/cmd_update.go b/cmd/cmd_update.go index fe24b85..f56d861 100644 --- a/cmd/cmd_update.go +++ b/cmd/cmd_update.go @@ -4,10 +4,10 @@ import ( "context" "fmt" "github.com/blang/semver" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/config" - "github.com/lithictech/webhookdb-cli/whselfupdate" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/config" + "github.com/webhookdb/webhookdb-cli/whselfupdate" "os" ) diff --git a/cmd/cmd_version.go b/cmd/cmd_version.go index 1bd3308..f7b01a6 100644 --- a/cmd/cmd_version.go +++ b/cmd/cmd_version.go @@ -2,8 +2,8 @@ package cmd import ( "fmt" - "github.com/lithictech/webhookdb-cli/config" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/config" ) var versionCmd = &cli.Command{ diff --git a/cmd/cmd_wasm.go b/cmd/cmd_wasm.go index 4a43ecd..d261632 100644 --- a/cmd/cmd_wasm.go +++ b/cmd/cmd_wasm.go @@ -8,10 +8,10 @@ import ( "encoding/json" "fmt" "github.com/go-resty/resty/v2" - "github.com/lithictech/webhookdb-cli/appcontext" - "github.com/lithictech/webhookdb-cli/ask" - "github.com/lithictech/webhookdb-cli/prefs" "github.com/urfave/cli/v2" + "github.com/webhookdb/webhookdb-cli/appcontext" + "github.com/webhookdb/webhookdb-cli/ask" + "github.com/webhookdb/webhookdb-cli/prefs" "os" "runtime/debug" "strings" diff --git a/config/config.go b/config/config.go index d312fbc..9aa3533 100644 --- a/config/config.go +++ b/config/config.go @@ -12,7 +12,7 @@ const UnknownVersion = "?.?.?" var BuildTime = "1970-01-01T00:00:00Z" var BuildSha = "0000000000000000000000000000000000000000" var Version = UnknownVersion -var Repo = "lithictech/webhookdb-cli" +var Repo = "webhookdb/webhookdb-cli" type Config struct { // ApiHost is the URL of the service, like diff --git a/formatting/formatting.go b/formatting/formatting.go index 8f36ee4..360525b 100644 --- a/formatting/formatting.go +++ b/formatting/formatting.go @@ -4,8 +4,8 @@ import ( "encoding/csv" "encoding/json" "fmt" - "github.com/lithictech/webhookdb-cli/types" "github.com/olekukonko/tablewriter" + "github.com/webhookdb/webhookdb-cli/types" "io" ) diff --git a/go.mod b/go.mod index dafc0ae..01dd84b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/lithictech/webhookdb-cli +module github.com/webhookdb/webhookdb-cli go 1.17 diff --git a/main.go b/main.go index dc0f927..e8152a5 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/lithictech/webhookdb-cli/cmd" + "github.com/webhookdb/webhookdb-cli/cmd" ) func main() { diff --git a/prefs/prefs.go b/prefs/prefs.go index 94869bd..efd374a 100644 --- a/prefs/prefs.go +++ b/prefs/prefs.go @@ -4,9 +4,9 @@ import ( "encoding/json" "fmt" "github.com/lithictech/go-aperitif/convext" - "github.com/lithictech/webhookdb-cli/types" - "github.com/lithictech/webhookdb-cli/whfs" "github.com/pkg/errors" + "github.com/webhookdb/webhookdb-cli/types" + "github.com/webhookdb/webhookdb-cli/whfs" "io/fs" "io/ioutil" "path/filepath" From 6d10a08d217a3c223117c4e98192fd46a7db4499 Mon Sep 17 00:00:00 2001 From: Rob Galanakis Date: Sun, 7 Jan 2024 16:52:05 -0800 Subject: [PATCH 2/4] Doc command: fix missing commands, remove 'tui' --- MANUAL.md | 104 +++++++++++++++++++++++++++--------------------- cmd/cmd_docs.go | 58 +++++---------------------- go.mod | 15 +------ go.sum | 50 ----------------------- 4 files changed, 70 insertions(+), 157 deletions(-) diff --git a/MANUAL.md b/MANUAL.md index 052ad40..54e6ae7 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -20,6 +20,14 @@ Source code: Documentation: +# SYNOPSIS + +webhookdb + +``` +[--debug] +[--quiet|-q] +``` **Usage**: @@ -31,8 +39,6 @@ webhookdb [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] `--debug`: -`--help, -h`: show help - `--quiet, -q`: Do not print messages. Mostly used for collection endpoints, where you just want the returned data, not the help message. @@ -46,7 +52,7 @@ These commands control the auth process. Print information about the current user. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) ## `login`, `signup`, `signin`, `register` @@ -116,19 +122,19 @@ Write out commands that can be used to generate a FDW against your WebhookDB dat `--fdw`: Write the FDW SQL to stdout -`--fetch=""`: fetch_size option used during server creation (default: "50000") +`--fetch=""`: fetch_size option used during server creation (default: 50000) -`--into-schema=""`: Name of the schema to import the remote tables into (in `IMPORT FOREIGN SCHEMA public INTO ` call). (default: "webhookdb_remote") +`--into-schema=""`: Name of the schema to import the remote tables into (in `IMPORT FOREIGN SCHEMA public INTO ` call). (default: webhookdb_remote) `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. `--raw`: If given, print the raw SQL returned from the server. Useful if you want to pipe through jq or something similar. -`--remote=""`: The remote server name, used in the `CREATE SERVER ` call (default: "webhookdb_remote") +`--remote=""`: The remote server name, used in the `CREATE SERVER ` call (default: webhookdb_remote) `--views`: Write the SQL to create the materialized views to stdout -`--views-schema=""`: Create materialized views in this schema. You can use 'public' if you do not want to qualify webhookdb tables. (default: "webhookdb") +`--views-schema=""`: Create materialized views in this schema. You can use 'public' if you do not want to qualify webhookdb tables. (default: webhookdb) ## `rename-table` @@ -158,7 +164,7 @@ Enqueue a migration of all your organization's data to a new database. List all database migrations. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. @@ -166,36 +172,24 @@ List all database migrations. Work with the WebhookDB docs and guide. -`--help, -h`: show help - -## `html` +## `guide` -Open a browser to the WebhookDB HTML guide. +Open a browser to the WebhookDB Getting Started guide. -## `tui` +## `manual`, `html` -Render the WebhookDB guide into a local Markdown viewer. - -`--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. +Open a browser to the WebhookDB CLI reference. ## `build` Build the docs for the app. -`--format=""`: One of: markdown, man +`--docsite`: If given, format this for use on docs.webhookdb.com -`--frontmatter`: If given, include frontmatter needed for docs.webhookdb.com source +`--format=""`: One of: markdown, man `--help, -h`: show help -### `help`, `h` - -Shows a list of commands or help for one command - -## `help`, `h` - -Shows a list of commands or help for one command - # `fixtures`, `fixture` Output the SQL DDL (CREATE TABLE command) to create a DB table that matches what is in WebhookDB. This can be used to generate .sql files that can be run as part of test database fixturing. @@ -240,7 +234,15 @@ Display information about given integration. List all integrations for the given organization. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) + +`--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. + +## `setup` + +Ensure all the necessary fields are set to receive webhooks. + +`--integration, -i=""`: Integration identifier. This can either be the service name, the table name, or the opaque id, which is a unique code that starts with 'svi_'. Run webhookdb integrations list to see a list of all your integrations. `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. @@ -256,7 +258,7 @@ Reset the webhook secret for this integration. Get statistics about webhooks for this integration. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) `--integration, -i=""`: Integration identifier. This can either be the service name, the table name, or the opaque id, which is a unique code that starts with 'svi_'. Run webhookdb integrations list to see a list of all your integrations. @@ -320,7 +322,7 @@ Display the name and slug of the currently active organization. List all members of the given organization. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. @@ -342,6 +344,22 @@ Change the name or billing email of the organization. (Note: the org key is immu `--value, -v=""`: The new value for the chosen field +# `replay`, `replays` + +Replay webhooks received by WebhookDB. Useful if webhooks were rejected due to invalid secrets/verification and need to be re-processed. + +Note that the maximum window that can be replayed is managed by the server, and is normally 4 hours. To replay a larger window, issue multiple `webhookdb replay` calls. + +`--after, -a=""`: Replay webhooks received after this time. Takes precedence over --hours. If neither are given, use 1 hour. + +`--before, -b=""`: Replay webhooks received before this time. Timestamp can be anything time-like, preferably ISO8601 (ie, 2012-11-22T06:00:00Z). Defaults to now. + +`--hours, -r=""`: Number of hours before now (or the --before value) to replay webhooks. (default: 0) + +`--integration, -i=""`: Integration identifier. This can either be the service name, the table name, or the opaque id, which is a unique code that starts with 'svi_'. If not given, replay webhooks for all integrations in the current organization. + +`--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. + # `services`, `service` Work with available services that can be hooked up to reflect data to WebhookDB. @@ -350,7 +368,7 @@ Work with available services that can be hooked up to reflect data to WebhookDB. List all available services. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. @@ -362,7 +380,7 @@ Work with your WebhookDB subscription. Get information about an organization's software subscription. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. @@ -378,7 +396,7 @@ Open stripe portal to edit subscription. Print information about the WebhookDB pricing plans. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. @@ -396,7 +414,7 @@ Create a database sync target for the specified integration. Data will be automa `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. -`--period=""`: Number of seconds between syncs. (default: unset) +`--period=""`: Number of seconds between syncs. (default: 0) `--schema=""`: Schema (or namespace) to write the table into. Default to no schema/namespace. @@ -414,7 +432,7 @@ Delete the database sync target and stop any further syncing. The database being List all database sync targets for the given organization. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. @@ -424,7 +442,7 @@ Update the database sync target. Use `webhookdb dbsync list` to see all database `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. -`--period=""`: Number of seconds between syncs. (default: unset) +`--period=""`: Number of seconds between syncs. (default: 0) `--schema=""`: Schema (or namespace) to write the table into. Default to no schema/namespace. @@ -466,9 +484,9 @@ Create a http sync target for the specified integration. Data will be automatica `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. -`--pagesize=""`: Max number of rows WebhookDB sends the sync target in each call. (default: unset) +`--pagesize=""`: Max number of rows WebhookDB sends the sync target in each call. (default: 0) -`--period=""`: Number of seconds between syncs. (default: unset) +`--period=""`: Number of seconds between syncs. (default: 0) ## `delete` @@ -482,7 +500,7 @@ Delete the http sync target and stop any further syncing. The http endpoint bein List all http sync targets for the given organization. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. @@ -492,9 +510,9 @@ Update the http sync target. Use `webhookdb httpsync list` to see all http sync `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. -`--pagesize=""`: Max number of rows WebhookDB sends the sync target in each call. (default: unset) +`--pagesize=""`: Max number of rows WebhookDB sends the sync target in each call. (default: 0) -`--period=""`: Number of seconds between syncs. (default: unset) +`--period=""`: Number of seconds between syncs. (default: 0) `--target, -t=""`: Sync target opaque id. Use `webhookdb httpsync list` to see a list of all your http sync targets. @@ -546,7 +564,7 @@ Create a new notification that WebhookDB will call on every data update. List all created notifications. -`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: "table") +`--format, -f=""`: Format of the output. One of: json, csv, table, raw (default: table) `--org, -o=""`: Takes an org key. Run `webhook org list` to see a list of all your org keys. @@ -566,7 +584,3 @@ Delete this notification subscription, so no future events will be sent. Print version and exit. -# `help`, `h` - -Shows a list of commands or help for one command - diff --git a/cmd/cmd_docs.go b/cmd/cmd_docs.go index 18abe5b..c061849 100644 --- a/cmd/cmd_docs.go +++ b/cmd/cmd_docs.go @@ -3,14 +3,10 @@ package cmd import ( "context" "fmt" - markdown "github.com/MichaelMure/go-term-markdown" "github.com/urfave/cli/v2" "github.com/webhookdb/webhookdb-cli/appcontext" - "github.com/webhookdb/webhookdb-cli/config" "github.com/webhookdb/webhookdb-cli/whbrowser" "io" - "os" - "os/exec" "regexp" "strings" ) @@ -20,43 +16,18 @@ var docsCmd = &cli.Command{ Usage: "Work with the WebhookDB docs and guide.", Subcommands: []*cli.Command{ { - Name: "html", - Usage: "Open a browser to the WebhookDB HTML guide.", + Name: "guide", + Usage: "Open a browser to the WebhookDB Getting Started guide.", Action: cliAction(func(c *cli.Context, ac appcontext.AppContext, ctx context.Context) error { - return whbrowser.OpenURL("https://webhookdb.com/docs/cli") + return whbrowser.OpenURL("https://docs.webhookdb.com/docs/getting-started/") }), }, { - Name: "tui", - Usage: "Render the WebhookDB guide into a local Markdown viewer.", - Flags: []cli.Flag{orgFlag()}, + Name: "manual", + Aliases: []string{"html"}, + Usage: "Open a browser to the WebhookDB CLI reference.", Action: cliAction(func(c *cli.Context, ac appcontext.AppContext, ctx context.Context) error { - version := config.Version - if version == config.UnknownVersion { - version = "main" - } - manualUrl := fmt.Sprintf("https://raw.githubusercontent.com/lithictech/webhookdb-cli/%s/MANUAL.md", version) - fmt.Println(manualUrl) - resp, err := ac.Resty.R().Get(manualUrl) - if err != nil { - return err - } - if resp.StatusCode() >= 400 { - return CliError{Message: "Sorry, could not fetch the guide Markdown: " + resp.String(), Code: 2} - } - md := resp.String() - md = regexp.MustCompile("\\A---(.|\n)*?---").ReplaceAllString(md, "") - md = regexp.MustCompile("").ReplaceAllString(md, "") - result := markdown.Render(md, 80, 0) - if pager := getPager(); pager != "" { - pa := strings.Split(pager, " ") - cm := exec.Command(pa[0], pa[1:]...) - cm.Stdin = strings.NewReader(string(result)) - cm.Stdout = c.App.Writer - return cm.Run() - } - fmt.Fprint(c.App.Writer, string(result)) - return nil + return whbrowser.OpenURL("https://docs.webhookdb.com/docs/cli-reference.html") }), }, { @@ -93,17 +64,6 @@ func init() { } } -func getPager() string { - pager := os.Getenv("PAGER") - if pager != "" { - return pager - } - if _, err := exec.LookPath("less"); err == nil { - return "less -r" - } - return "" -} - func toMarkdown(w io.Writer, c *cli.Context) error { writestr := func(s string, i ...interface{}) { w.Write([]byte(fmt.Sprintf(s, i...))) @@ -121,7 +81,9 @@ func toMarkdown(w io.Writer, c *cli.Context) error { writeln("---") writeln("") } - md, err := c.App.ToMarkdown() + // c.App only has the 'docs' commands and I cannot find a way to get the root + app := BuildApp() + md, err := app.ToMarkdown() if err != nil { return err } diff --git a/go.mod b/go.mod index 01dd84b..e57f1f3 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/webhookdb/webhookdb-cli go 1.17 require ( - github.com/MichaelMure/go-term-markdown v0.1.4 github.com/blang/semver v3.5.1+incompatible github.com/getsentry/sentry-go v0.12.0 github.com/go-resty/resty/v2 v2.6.0 @@ -21,31 +20,19 @@ require ( replace github.com/rhysd/go-github-selfupdate => github.com/lithictech/go-github-selfupdate v0.0.0-20230518052140-7c524dc488c0 require ( - github.com/MichaelMure/go-term-text v0.3.1 // indirect - github.com/alecthomas/chroma v0.8.2 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect - github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect - github.com/disintegration/imaging v1.6.2 // indirect - github.com/dlclark/regexp2 v1.2.0 // indirect - github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 // indirect - github.com/fatih/color v1.9.0 // indirect github.com/golang/protobuf v1.4.2 // indirect - github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 // indirect github.com/google/go-github/v30 v30.1.0 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/uuid v1.1.2 // indirect github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf // indirect - github.com/kyokomi/emoji/v2 v2.2.8 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-colorable v0.1.11 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/stretchr/testify v1.7.0 // indirect github.com/tcnksm/go-gitconfig v0.1.2 // indirect github.com/ulikunitz/xz v0.5.9 // indirect golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect - golang.org/x/image v0.0.0-20191206065243-da761ea9ff43 // indirect golang.org/x/net v0.0.0-20211008194852-3b03d305991f // indirect golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac // indirect diff --git a/go.sum b/go.sum index 70763aa..576b75a 100644 --- a/go.sum +++ b/go.sum @@ -4,23 +4,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/MichaelMure/go-term-markdown v0.1.4 h1:Ir3kBXDUtOX7dEv0EaQV8CNPpH+T7AfTh0eniMOtNcs= -github.com/MichaelMure/go-term-markdown v0.1.4/go.mod h1:EhcA3+pKYnlUsxYKBJ5Sn1cTQmmBMjeNlpV8nRb+JxA= -github.com/MichaelMure/go-term-text v0.3.1 h1:Kw9kZanyZWiCHOYu9v/8pWEgDQ6UVN9/ix2Vd2zzWf0= -github.com/MichaelMure/go-term-text v0.3.1/go.mod h1:QgVjAEDUnRMlzpS6ky5CGblux7ebeiLnuy9dAaFZu8o= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= -github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= -github.com/alecthomas/chroma v0.7.1/go.mod h1:gHw09mkX1Qp80JlYbmN9L3+4R5o6DJJ3GRShh+AICNc= -github.com/alecthomas/chroma v0.8.2 h1:x3zkuE2lUk/RIekyAJ3XRqSCP4zwWDfcw/YJCuCAACg= -github.com/alecthomas/chroma v0.8.2/go.mod h1:sko8vR34/90zvl5QdcUdvzL3J8NKjAUx9va9jPuFNoM= -github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= -github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= -github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= -github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= -github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/auth0/go-jwt-middleware v0.0.0-20200507191422-d30d7b9ece63/go.mod h1:mF0ip7kTEFtnhBJbd/gJe62US3jykNN+dcZoZakJCCA= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= @@ -34,27 +19,16 @@ github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= -github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= -github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= -github.com/dlclark/regexp2 v1.1.6/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= -github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 h1:vbix8DDQ/rfatfFr/8cf/sJfIL69i4BcZfjrVOxsMqk= -github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75/go.mod h1:0gZuvTO1ikSA5LtTI6E13LEOdWQNjIo5MTQOvrV0eFg= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= @@ -85,8 +59,6 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 h1:Qxs3bNRWe8GTcKMxYOSXm0jx6j0de8XUtb/fsP3GZ0I= -github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -138,8 +110,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kyokomi/emoji/v2 v2.2.8 h1:jcofPxjHWEkJtkIbcLHvZhxKgCPl6C7MyjTrD4KDqUE= -github.com/kyokomi/emoji/v2 v2.2.8/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE= github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= @@ -148,27 +118,16 @@ github.com/lithictech/go-aperitif v0.0.0-20201008180713-efd6b162b762 h1:s7OCOmbr github.com/lithictech/go-aperitif v0.0.0-20201008180713-efd6b162b762/go.mod h1:JyoOuP6CbJXF6XzzDEVTJ+d5ZX6q9eAuM7R3bztenfk= github.com/lithictech/go-github-selfupdate v0.0.0-20230518052140-7c524dc488c0 h1:SXeXqZoG4X4vNDZzSIsn9KhtmPyWPeo5gIZ2axTTTU8= github.com/lithictech/go-github-selfupdate v0.0.0-20230518052140-7c524dc488c0/go.mod h1:mp/N8zj6jFfBQy/XMYoWsmfzxazpPAODuqarmPDe2Rg= -github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= -github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= @@ -215,7 +174,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rgalanakis/golangal v0.0.0-20200710064529-eb44ace1b187/go.mod h1:/7+rdrUijPGl0ZorwYZjZg8jwNXSGfQWTHS+sPE+Plc= github.com/rgalanakis/validator v0.0.0-20180731224108-4a34a8927f7c/go.mod h1:qIw2dAd/4wMHHnINySB5+y9HPKQXUKmga0oZHSluPKE= -github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= @@ -224,7 +182,6 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -270,7 +227,6 @@ github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmv github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -golang.org/dl v0.0.0-20190829154251-82a15e2f2ead/go.mod h1:IUMfjQLJQd4UTqG1Z90tenwKoCX93Gn3MAQJMOSBsDQ= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -279,9 +235,6 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20191206065243-da761ea9ff43 h1:gQ6GUSD102fPgli+Yb4cR/cGaHF7tNBt+GYoRCpGC7s= -golang.org/x/image v0.0.0-20191206065243-da761ea9ff43/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -292,7 +245,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -308,7 +260,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -323,7 +274,6 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= From 6a799bcf6b8f3dfc89c7f7e1e12879398af03538 Mon Sep 17 00:00:00 2001 From: Rob Galanakis Date: Sun, 7 Jan 2024 16:56:35 -0800 Subject: [PATCH 3/4] README gets badges, actions get new names --- .github/workflows/pr-checks.yml | 7 +++++-- .github/workflows/release.yml | 2 +- README.md | 21 +++++++++++++-------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 9ac4fee..da74011 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -1,5 +1,8 @@ -name: PR Checks -on: pull_request +name: Tests +on: + pull_request: + push: + branches: [ main ] jobs: run-tests: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c7f36e9..f2e5e16 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: goreleaser +name: Release on: push: diff --git a/README.md b/README.md index 7525777..cf82e56 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,17 @@ +[![Latest Release](https://img.shields.io/github/v/release/webhookdb/webhookdb-cli?color=blue&sort=semver)](https://github.com/webhookdb/webhookdb-cli/releases/latest) +[![Docker](https://github.com/webhookdb/webhookdb-cli/actions/workflows/deploy-dockerhub.yml/badge.svg)](https://hub.docker.com/r/webhookdb/webhookdb-cli/tags) +[![Tests](https://github.com/webhookdb/webhookdb-cli/actions/workflows/pr-checks.yml/badge.svg)](https://github.com/webhookdb/webhookdb-cli/actions/workflows/pr-checks.yml) +[![Release](https://github.com/webhookdb/webhookdb-cli/actions/workflows/release.yml/badge.svg)](https://github.com/webhookdb/webhookdb-cli/actions/workflows/release.yml) +[![Docs](https://img.shields.io/badge/docs-purple)](https://docs.webhookdb.com/docs/cli-reference.html) + # webhookdb-cli _Don't want to install this yourself?_ _Run [the WebhookDB CLI from the browser](https://webhookdb.com/terminal/) or at the `/terminal` route of your self-hosted WebhookDB instance._ +_Self-hosting? Visit `https:///terminal` to run against your own WebhookDB server._ + Command Line Interface for WebhookDB ([https://github.com/webhookdb/webhookdb](https://github.com/webhookdb/webhookdb)). WebhookDB replicates any API into a database, so you have immediate, reliable access to all your data. @@ -16,14 +24,11 @@ The CLI will guide you from there. You also have quick access to the WebhookDB documentation: - webhookdb docs html - webhookdb docs tui - -Use `webhookdb docs html` or -visit [https://webhookdb.com/docs/cli](https://webhookdb.com/docs/cli) for usage instructions. - -Or check out [MANUAL.md](https://github.com/webhookdb/webhookdb-cli/blob/main/MANUAL.md) -to see every command and option. +- `webhookdb docs guide` to go to . +- `webhookdb docs manual` or `webhookdb docs html` to go + to [the CLI Reference](https://docs.webhookdb.com/docs/cli-reference.html). +- `webhookdb docs tui` to render [MANUAL.md](https://github.com/webhookdb/webhookdb-cli/blob/main/MANUAL.md) + in your terminal. ## Privacy and Telemetry From df5ae08247d19183f4ef129e30869df7ba119296 Mon Sep 17 00:00:00 2001 From: Rob Galanakis Date: Tue, 9 Jan 2024 09:30:58 -0800 Subject: [PATCH 4/4] Dockerhub build and deploy support --- .dockerignore | 28 +++++++++++++++++++ .github/workflows/deploy-dockerhub.yml | 38 ++++++++++++++++++++++++++ Dockerfile | 17 ++++++++++++ Makefile | 15 +++++++++- appcontext/appcontext.go | 2 +- cmd/cmd_version.go | 9 +++--- config/config.go | 5 ++++ 7 files changed, 108 insertions(+), 6 deletions(-) create mode 100644 .dockerignore create mode 100644 .github/workflows/deploy-dockerhub.yml create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..be86c57 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,28 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +webhookdb-cli +webhookdb +webhookdb.wasm + +dist/ +.env +temp/ + +.idea/ +*.yaml +.gitignore +.github diff --git a/.github/workflows/deploy-dockerhub.yml b/.github/workflows/deploy-dockerhub.yml new file mode 100644 index 0000000..35eabce --- /dev/null +++ b/.github/workflows/deploy-dockerhub.yml @@ -0,0 +1,38 @@ +name: Build + +on: + release: + types: [ published ] + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: webhookdb/webhookdb-cli + + - name: Build and push Docker image + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + build-args: | + GIT_REF=${{ github.ref }} + GIT_SHA=${{ github.sha }} + RELEASED_AT=$(date -u +"%Y-%m-%dT%H:%M:%SZ" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ab21314 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM golang:1.17 + +WORKDIR /app + +COPY go.mod go.sum ./ + +RUN go mod download + +COPY . ./ + +ARG RELEASED_AT="-" +ARG GIT_SHA="-" +ARG GIT_REF="-" + +RUN go build -ldflags "-X github.com/webhookdb/webhookdb-cli/config.BuildTime=${RELEASED_AT} -X github.com/webhookdb/webhookdb-cli/config.BuildSha=${GIT_SHA} -X github.com/webhookdb/webhookdb-cli/config.Version=${GIT_REF}" -o webhookdb + +ENTRYPOINT ["./webhookdb"] diff --git a/Makefile b/Makefile index 0359b14..463a1cb 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ BIN := ./webhookdb ARGS := WEBHOOKDB_API_HOST=http://localhost:18001 -BUILDFLAGS = "-X github.com/webhookdb/webhookdb-cli/config.BuildTime=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -X github.com/webhookdb/webhookdb-cli/config.BuildSha=`git rev-list -1 HEAD`" +BUILDFLAGS = "-X github.com/webhookdb/webhookdb-cli/config.BuildTime=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -X github.com/webhookdb/webhookdb-cli/config.BuildSha=`git rev-list -1 HEAD` -X github.com/webhookdb/webhookdb-cli/config.Version=`git rev-parse --abbrev-ref HEAD`" WEBSITE = ../webhookdb-api/webhookdb-website ifdef GOROOT @@ -62,6 +62,19 @@ wasm-server: build-all: build-arm64 build build-wasm +docker-build: + docker build -f Dockerfile -t webhookdb-cli \ + --build-arg GIT_SHA=`git rev-list --abbrev-commit -1 HEAD` \ + --build-arg GIT_REF=`git rev-parse --abbrev-ref HEAD` \ + --build-arg RELEASED_AT=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + . + +docker-run-version: + @docker run -it webhookdb-cli version --time + +docker-run-%: + @docker run -it webhookdb-cli $(*) + docs: build @DOCBUILD=true $(BIN) docs build docs-write: build ## Write a new copy of MANUAL.md. diff --git a/appcontext/appcontext.go b/appcontext/appcontext.go index 768b2ab..70784e7 100644 --- a/appcontext/appcontext.go +++ b/appcontext/appcontext.go @@ -106,5 +106,5 @@ var userAgent string func init() { userAgent = fmt.Sprintf("WebhookDB/v1 webhookdb-cli/%s (%s; %s) Built/%s https://webhookdb.com", - config.BuildSha[:8], runtime.GOOS, runtime.GOARCH, config.BuildTime) + config.BuildShaShort, runtime.GOOS, runtime.GOARCH, config.BuildTime) } diff --git a/cmd/cmd_version.go b/cmd/cmd_version.go index f7b01a6..1b6c157 100644 --- a/cmd/cmd_version.go +++ b/cmd/cmd_version.go @@ -9,12 +9,13 @@ import ( var versionCmd = &cli.Command{ Name: "version", Usage: "Print version and exit.", + Flags: []cli.Flag{&cli.BoolFlag{Name: "time"}}, Action: func(c *cli.Context) error { - shaPart := config.BuildSha - if len(shaPart) >= 8 { - shaPart = fmt.Sprintf(" (%s)", config.BuildSha[0:8]) - } + shaPart := fmt.Sprintf(" (%s)", config.BuildShaShort) fmt.Fprintf(c.App.Writer, "%s%s\n", config.Version, shaPart) + if c.Bool("time") { + fmt.Fprintf(c.App.Writer, "%s\n", config.BuildTime) + } return nil }, } diff --git a/config/config.go b/config/config.go index 9aa3533..7fa1167 100644 --- a/config/config.go +++ b/config/config.go @@ -11,6 +11,7 @@ const UnknownVersion = "?.?.?" var BuildTime = "1970-01-01T00:00:00Z" var BuildSha = "0000000000000000000000000000000000000000" +var BuildShaShort = "" var Version = UnknownVersion var Repo = "webhookdb/webhookdb-cli" @@ -84,6 +85,10 @@ func lookupEnv(k, d string) string { const SentryDsnProd = "https://3e125fd192c34979b2f1a4a5ceb9abd6@o292308.ingest.sentry.io/6224206" func init() { + BuildShaShort = BuildSha + if len(BuildShaShort) > 8 { + BuildShaShort = BuildShaShort[0:8] + } MustSetEnv("WEBHOOKDB_API_HOST", "https://api.production.webhookdb.com") MustSetEnv("WEBHOOKDB_LOG_LEVEL", "error") }