Skip to content

Commit 5e52229

Browse files
Add sourcemaps command for uploading frontend sourcemaps
Co-Authored-By: [email protected] <[email protected]>
1 parent 06f0533 commit 5e52229

File tree

4 files changed

+391
-0
lines changed

4 files changed

+391
-0
lines changed

cmd/root.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
logincmd "github.com/launchdarkly/ldcli/cmd/login"
2323
memberscmd "github.com/launchdarkly/ldcli/cmd/members"
2424
resourcecmd "github.com/launchdarkly/ldcli/cmd/resources"
25+
sourcemapscmd "github.com/launchdarkly/ldcli/cmd/sourcemaps"
2526
"github.com/launchdarkly/ldcli/internal/analytics"
2627
"github.com/launchdarkly/ldcli/internal/config"
2728
"github.com/launchdarkly/ldcli/internal/dev_server"
@@ -194,6 +195,7 @@ func NewRootCommand(
194195
cmd.AddCommand(logincmd.NewLoginCmd(resources.NewClient(version)))
195196
cmd.AddCommand(resourcecmd.NewResourcesCmd())
196197
cmd.AddCommand(devcmd.NewDevServerCmd(resources.NewClient(version), analyticsTrackerFn, dev_server.NewClient(version)))
198+
cmd.AddCommand(sourcemapscmd.NewSourcemapsCmd())
197199
resourcecmd.AddAllResourceCmds(cmd, clients.ResourcesClient, analyticsTrackerFn)
198200

199201
// add non-generated commands

cmd/sourcemaps/sourcemaps.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package sourcemaps
2+
3+
import (
4+
"github.com/spf13/cobra"
5+
6+
"github.com/launchdarkly/ldcli/internal/resources"
7+
)
8+
9+
func NewSourcemapsCmd() *cobra.Command {
10+
cmd := &cobra.Command{
11+
Use: "sourcemaps",
12+
Short: "Manage sourcemaps",
13+
Long: "Manage sourcemaps for LaunchDarkly error monitoring",
14+
Run: func(cmd *cobra.Command, args []string) {
15+
cmd.Help()
16+
},
17+
}
18+
19+
cmd.AddCommand(NewUploadCmd(resources.NewClient("")))
20+
21+
return cmd
22+
}

0 commit comments

Comments
 (0)