From d955f41073b96b824ab8bacb41461fdd435b09c8 Mon Sep 17 00:00:00 2001 From: Puskar Basu Date: Thu, 30 Jan 2025 13:46:58 +0530 Subject: [PATCH] Add DefaultTailpipeWorkspaceContent; Update VersionCheckerHostTailpipe --- constants/default_workspaces.go | 17 +++++++++++++++++ parse/workspace_profile_loader.go | 2 ++ plugin/version_checker.go | 5 ++--- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/constants/default_workspaces.go b/constants/default_workspaces.go index dc2ab199..b7c915ea 100644 --- a/constants/default_workspaces.go +++ b/constants/default_workspaces.go @@ -105,3 +105,20 @@ const DefaultFlowpipeWorkspaceContent = ` # } # } ` + +const DefaultTailpipeWorkspaceContent = ` +# +# For detailed descriptions, see the reference documentation +# at https://tailpipe.io/docs/reference/config-files/workspace +# +# workspace "all_options" { +# +# # General Options +# log_level = "info" # trace, debug, info, warn, error +# memory_max_mb = "1024" # the maximum memory to allow the CLI process in MB +# update_check = true # check for updates on startup +# +# # Terminal Options +# timing = true # show timing information +# } +` diff --git a/parse/workspace_profile_loader.go b/parse/workspace_profile_loader.go index 01fb7130..7b4c2d39 100644 --- a/parse/workspace_profile_loader.go +++ b/parse/workspace_profile_loader.go @@ -67,6 +67,8 @@ func (l *WorkspaceProfileLoader[T]) ensureDefaultWorkspaceFile(workspaceProfileP sampleContent = constants.DefaultFlowpipeWorkspaceContent case *workspace_profile.PowerpipeWorkspaceProfile: sampleContent = constants.DefaultPowerpipeWorkspaceContent + case *workspace_profile.TailpipeWorkspaceProfile: + sampleContent = constants.DefaultTailpipeWorkspaceContent } // always write the workspaces sample file; i.e. workspaces.spc.sample err := os.MkdirAll(globalConfigPath, 0755) diff --git a/plugin/version_checker.go b/plugin/version_checker.go index 5825ac1d..a29b5d08 100644 --- a/plugin/version_checker.go +++ b/plugin/version_checker.go @@ -19,9 +19,8 @@ import ( const ( VersionCheckerSchema = "https" VersionCheckerHostSteampipe = "hub.steampipe.io" - // TODO Pskr Update the endpoint when hub.tailpipe.io is ready - VersionCheckerHostTailpipe = "hub-tailpipe-io.vercel.app" - VersionCheckerEndpoint = "api/plugin/version" + VersionCheckerHostTailpipe = "hub.tailpipe.io" + VersionCheckerEndpoint = "api/plugin/version" ) // PluginVersionCheckReport