feat: add mod upload command
This commit is contained in:
parent
5ac338f2b5
commit
d0a807b6a4
78 changed files with 1068 additions and 401 deletions
|
@ -13,19 +13,39 @@ linters-settings:
|
|||
ignorePackageGlobs:
|
||||
- github.com/satisfactorymodding/ficsit-cli/*
|
||||
|
||||
govet:
|
||||
check-shadowing: true
|
||||
enable-all: true
|
||||
disable:
|
||||
- shadow
|
||||
|
||||
gocritic:
|
||||
disabled-checks:
|
||||
- ifElseChain
|
||||
|
||||
gci:
|
||||
custom-order: true
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/satisfactorymodding/ficsit-cli)
|
||||
- blank
|
||||
- dot
|
||||
|
||||
run:
|
||||
skip-files:
|
||||
- ./ficsit/types.go
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- deadcode
|
||||
- errcheck
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- staticcheck
|
||||
- structcheck
|
||||
- typecheck
|
||||
- unused
|
||||
- varcheck
|
||||
- bidichk
|
||||
- contextcheck
|
||||
- durationcheck
|
||||
|
@ -33,8 +53,11 @@ linters:
|
|||
- goconst
|
||||
- goimports
|
||||
- revive
|
||||
- ifshort
|
||||
- misspell
|
||||
- prealloc
|
||||
- whitespace
|
||||
- wrapcheck
|
||||
- gci
|
||||
- gocritic
|
||||
- gofumpt
|
||||
- nonamedreturns
|
||||
|
|
|
@ -3,6 +3,7 @@ package cli
|
|||
import (
|
||||
"github.com/Khan/genqlient/graphql"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
)
|
||||
|
||||
|
@ -14,30 +15,34 @@ type GlobalContext struct {
|
|||
|
||||
var globalContext *GlobalContext
|
||||
|
||||
func InitCLI() (*GlobalContext, error) {
|
||||
func InitCLI(apiOnly bool) (*GlobalContext, error) {
|
||||
if globalContext != nil {
|
||||
return globalContext, nil
|
||||
}
|
||||
|
||||
profiles, err := InitProfiles()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to initialize profiles")
|
||||
if !apiOnly {
|
||||
profiles, err := InitProfiles()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to initialize profiles")
|
||||
}
|
||||
|
||||
installations, err := InitInstallations()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to initialize installations")
|
||||
}
|
||||
|
||||
globalContext = &GlobalContext{
|
||||
Installations: installations,
|
||||
Profiles: profiles,
|
||||
APIClient: ficsit.InitAPI(),
|
||||
}
|
||||
} else {
|
||||
globalContext = &GlobalContext{
|
||||
APIClient: ficsit.InitAPI(),
|
||||
}
|
||||
}
|
||||
|
||||
installations, err := InitInstallations()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to initialize installations")
|
||||
}
|
||||
|
||||
ctx := &GlobalContext{
|
||||
Installations: installations,
|
||||
Profiles: profiles,
|
||||
APIClient: ficsit.InitAPI(),
|
||||
}
|
||||
|
||||
globalContext = ctx
|
||||
|
||||
return ctx, nil
|
||||
return globalContext, nil
|
||||
}
|
||||
|
||||
func (g *GlobalContext) Save() error {
|
||||
|
|
|
@ -8,8 +8,9 @@ import (
|
|||
"github.com/Khan/genqlient/graphql"
|
||||
"github.com/Masterminds/semver/v3"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
)
|
||||
|
||||
const smlDownloadTemplate = `https://github.com/satisfactorymodding/SatisfactoryModLoader/releases/download/%s/SML.zip`
|
||||
|
|
|
@ -16,8 +16,8 @@ import (
|
|||
var _ Disk = (*ftpDisk)(nil)
|
||||
|
||||
type ftpDisk struct {
|
||||
path string
|
||||
client *ftp.ServerConn
|
||||
path string
|
||||
stepLock sync.Mutex
|
||||
}
|
||||
|
||||
|
|
|
@ -15,46 +15,37 @@ func newSFTP(path string) (Disk, error) {
|
|||
}
|
||||
|
||||
func (l sftpDisk) Exists(path string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (l sftpDisk) Read(path string) ([]byte, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (l sftpDisk) Write(path string, data []byte) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (l sftpDisk) Remove(path string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (l sftpDisk) MkDir(path string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (l sftpDisk) ReadDir(path string) ([]Entry, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (l sftpDisk) IsNotExist(err error) bool {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (l sftpDisk) IsExist(err error) bool {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (l sftpDisk) Open(path string, flag int) (io.WriteCloser, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
|
|
@ -10,12 +10,12 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli/disk"
|
||||
"github.com/satisfactorymodding/ficsit-cli/utils"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli/disk"
|
||||
"github.com/satisfactorymodding/ficsit-cli/utils"
|
||||
)
|
||||
|
||||
type InstallationsVersion int
|
||||
|
@ -28,15 +28,15 @@ const (
|
|||
)
|
||||
|
||||
type Installations struct {
|
||||
Version InstallationsVersion `json:"version"`
|
||||
Installations []*Installation `json:"installations"`
|
||||
SelectedInstallation string `json:"selected_installation"`
|
||||
Installations []*Installation `json:"installations"`
|
||||
Version InstallationsVersion `json:"version"`
|
||||
}
|
||||
|
||||
type Installation struct {
|
||||
DiskInstance disk.Disk `json:"-"`
|
||||
Path string `json:"path"`
|
||||
Profile string `json:"profile"`
|
||||
DiskInstance disk.Disk `json:"-"`
|
||||
}
|
||||
|
||||
func InitInstallations() (*Installations, error) {
|
||||
|
@ -55,7 +55,7 @@ func InitInstallations() (*Installations, error) {
|
|||
return nil, errors.Wrap(err, "failed to read cache directory")
|
||||
}
|
||||
|
||||
err = os.MkdirAll(localDir, 0755)
|
||||
err = os.MkdirAll(localDir, 0o755)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to create cache directory")
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ func (i *Installations) Save() error {
|
|||
return errors.Wrap(err, "failed to marshal installations")
|
||||
}
|
||||
|
||||
if err := os.WriteFile(installationsFile, installationsJSON, 0755); err != nil {
|
||||
if err := os.WriteFile(installationsFile, installationsJSON, 0o755); err != nil {
|
||||
return errors.Wrap(err, "failed to write installations")
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ func (i *Installations) AddInstallation(ctx *GlobalContext, installPath string,
|
|||
return nil, errors.Wrap(err, "failed to parse path")
|
||||
}
|
||||
|
||||
var absolutePath = installPath
|
||||
absolutePath := installPath
|
||||
if parsed.Scheme != "ftp" && parsed.Scheme != "sftp" {
|
||||
absolutePath, err = filepath.Abs(installPath)
|
||||
|
||||
|
@ -286,7 +286,6 @@ func (i *Installation) WriteLockFile(ctx *GlobalContext, lockfile LockFile) erro
|
|||
}
|
||||
|
||||
marshaledLockfile, err := json.MarshalIndent(lockfile, "", " ")
|
||||
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to serialize lockfile json")
|
||||
}
|
||||
|
@ -328,7 +327,6 @@ func (i *Installation) Install(ctx *GlobalContext, updates chan InstallUpdate) e
|
|||
}
|
||||
|
||||
lockfile, err := ctx.Profiles.Profiles[i.Profile].Resolve(resolver, lockFile, gameVersion)
|
||||
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not resolve mods")
|
||||
}
|
||||
|
@ -463,6 +461,8 @@ func (i *Installation) SetProfile(ctx *GlobalContext, profile string) error {
|
|||
}
|
||||
|
||||
type gameVersionFile struct {
|
||||
BranchName string `json:"BranchName"`
|
||||
BuildID string `json:"BuildId"`
|
||||
MajorVersion int `json:"MajorVersion"`
|
||||
MinorVersion int `json:"MinorVersion"`
|
||||
PatchVersion int `json:"PatchVersion"`
|
||||
|
@ -470,8 +470,6 @@ type gameVersionFile struct {
|
|||
CompatibleChangelist int `json:"CompatibleChangelist"`
|
||||
IsLicenseeVersion int `json:"IsLicenseeVersion"`
|
||||
IsPromotedBuild int `json:"IsPromotedBuild"`
|
||||
BranchName string `json:"BranchName"`
|
||||
BuildID string `json:"BuildId"`
|
||||
}
|
||||
|
||||
func (i *Installation) GetGameVersion(ctx *GlobalContext) (int, error) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/MarvinJWendt/testza"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cfg"
|
||||
)
|
||||
|
||||
|
@ -19,7 +20,7 @@ func TestInstallationsInit(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestAddInstallation(t *testing.T) {
|
||||
ctx, err := InitCLI()
|
||||
ctx, err := InitCLI(false)
|
||||
testza.AssertNoError(t, err)
|
||||
|
||||
profileName := "InstallationTest"
|
||||
|
|
|
@ -3,10 +3,10 @@ package cli
|
|||
type LockFile map[string]LockedMod
|
||||
|
||||
type LockedMod struct {
|
||||
Dependencies map[string]string `json:"dependencies"`
|
||||
Version string `json:"version"`
|
||||
Hash string `json:"hash"`
|
||||
Link string `json:"link"`
|
||||
Dependencies map[string]string `json:"dependencies"`
|
||||
}
|
||||
|
||||
func (l LockFile) Clone() LockFile {
|
||||
|
|
|
@ -9,8 +9,9 @@ import (
|
|||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/satisfactorymodding/ficsit-cli/utils"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/utils"
|
||||
)
|
||||
|
||||
const DefaultProfileName = "Default"
|
||||
|
@ -36,14 +37,14 @@ type smmProfileFile struct {
|
|||
}
|
||||
|
||||
type Profiles struct {
|
||||
Version ProfilesVersion `json:"version"`
|
||||
Profiles map[string]*Profile `json:"profiles"`
|
||||
SelectedProfile string `json:"selected_profile"`
|
||||
Version ProfilesVersion `json:"version"`
|
||||
}
|
||||
|
||||
type Profile struct {
|
||||
Name string `json:"name"`
|
||||
Mods map[string]ProfileMod `json:"mods"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ProfileMod struct {
|
||||
|
@ -67,7 +68,7 @@ func InitProfiles() (*Profiles, error) {
|
|||
return nil, errors.Wrap(err, "failed to read cache directory")
|
||||
}
|
||||
|
||||
err = os.MkdirAll(localDir, 0755)
|
||||
err = os.MkdirAll(localDir, 0o755)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to create cache directory")
|
||||
}
|
||||
|
@ -178,7 +179,7 @@ func (p *Profiles) Save() error {
|
|||
return errors.Wrap(err, "failed to marshal profiles")
|
||||
}
|
||||
|
||||
if err := os.WriteFile(profilesFile, profilesJSON, 0755); err != nil {
|
||||
if err := os.WriteFile(profilesFile, profilesJSON, 0o755); err != nil {
|
||||
return errors.Wrap(err, "failed to write profiles")
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/MarvinJWendt/testza"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cfg"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
)
|
||||
|
||||
func TestProfileResolution(t *testing.T) {
|
||||
ctx, err := InitCLI()
|
||||
ctx, err := InitCLI(false)
|
||||
testza.AssertNoError(t, err)
|
||||
|
||||
resolver := NewDependencyResolver(ctx.APIClient)
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
var applyCmd = &cobra.Command{
|
||||
Use: "apply [installation] ...",
|
||||
Short: "Apply profiles to all installations",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -2,10 +2,11 @@ package cmd
|
|||
|
||||
import (
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea"
|
||||
)
|
||||
|
||||
var cliCmd = &cobra.Command{
|
||||
|
@ -17,7 +18,7 @@ var cliCmd = &cobra.Command{
|
|||
Str("commit", viper.GetString("commit")).
|
||||
Msg("initialized")
|
||||
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package installation
|
||||
|
||||
import (
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -14,7 +15,7 @@ var addCmd = &cobra.Command{
|
|||
Short: "Add an installation",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package installation
|
||||
|
||||
import (
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -14,7 +15,7 @@ var lsCmd = &cobra.Command{
|
|||
Short: "List all installations",
|
||||
Args: cobra.NoArgs,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package installation
|
||||
|
||||
import (
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -14,7 +15,7 @@ var removeCmd = &cobra.Command{
|
|||
Short: "Remove an installation",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -2,8 +2,9 @@ package installation
|
|||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -15,7 +16,7 @@ var setProfileCmd = &cobra.Command{
|
|||
Short: "Change the profile of an installation",
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package profile
|
||||
|
||||
import (
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -14,7 +15,7 @@ var deleteCmd = &cobra.Command{
|
|||
Short: "Delete a profile",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package profile
|
||||
|
||||
import (
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -14,7 +15,7 @@ var lsCmd = &cobra.Command{
|
|||
Short: "List all profiles",
|
||||
Args: cobra.NoArgs,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -3,8 +3,9 @@ package mod
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -16,7 +17,7 @@ var addCmd = &cobra.Command{
|
|||
Short: "Add mod to a profile",
|
||||
Args: cobra.MinimumNArgs(2),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -3,8 +3,9 @@ package mod
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -16,7 +17,7 @@ var removeCmd = &cobra.Command{
|
|||
Short: "Remove a mod from a profile",
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -2,8 +2,9 @@ package profile
|
|||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -15,7 +16,7 @@ var modsCmd = &cobra.Command{
|
|||
Short: "List all mods in a profile",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package profile
|
||||
|
||||
import (
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -14,7 +15,7 @@ var newCmd = &cobra.Command{
|
|||
Short: "Create a new profile",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package profile
|
||||
|
||||
import (
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -14,7 +15,7 @@ var renameCmd = &cobra.Command{
|
|||
Short: "Rename a profile",
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
global, err := cli.InitCLI()
|
||||
global, err := cli.InitCLI(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ import (
|
|||
"github.com/satisfactorymodding/ficsit-cli/cmd/installation"
|
||||
"github.com/satisfactorymodding/ficsit-cli/cmd/mod"
|
||||
"github.com/satisfactorymodding/ficsit-cli/cmd/profile"
|
||||
"github.com/satisfactorymodding/ficsit-cli/cmd/smr"
|
||||
)
|
||||
|
||||
var RootCmd = &cobra.Command{
|
||||
|
@ -52,8 +53,7 @@ var RootCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
if viper.GetString("log-file") != "" {
|
||||
logFile, err := os.OpenFile(viper.GetString("log-file"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0777)
|
||||
|
||||
logFile, err := os.OpenFile(viper.GetString("log-file"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o777)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to open log file")
|
||||
}
|
||||
|
@ -102,6 +102,7 @@ func init() {
|
|||
RootCmd.AddCommand(profile.Cmd)
|
||||
RootCmd.AddCommand(installation.Cmd)
|
||||
RootCmd.AddCommand(mod.Cmd)
|
||||
RootCmd.AddCommand(smr.Cmd)
|
||||
|
||||
var baseLocalDir string
|
||||
|
||||
|
@ -135,6 +136,7 @@ func init() {
|
|||
|
||||
RootCmd.PersistentFlags().String("api-base", "https://api.ficsit.app", "URL for API")
|
||||
RootCmd.PersistentFlags().String("graphql-api", "/v2/query", "Path for GraphQL API")
|
||||
RootCmd.PersistentFlags().String("api-key", "", "API key to use when sending requests")
|
||||
|
||||
_ = viper.BindPFlag("log", RootCmd.PersistentFlags().Lookup("log"))
|
||||
_ = viper.BindPFlag("log-file", RootCmd.PersistentFlags().Lookup("log-file"))
|
||||
|
@ -150,4 +152,5 @@ func init() {
|
|||
|
||||
_ = viper.BindPFlag("api-base", RootCmd.PersistentFlags().Lookup("api-base"))
|
||||
_ = viper.BindPFlag("graphql-api", RootCmd.PersistentFlags().Lookup("graphql-api"))
|
||||
_ = viper.BindPFlag("api-key", RootCmd.PersistentFlags().Lookup("api-key"))
|
||||
}
|
||||
|
|
|
@ -5,9 +5,10 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -43,7 +44,6 @@ var searchCmd = &cobra.Command{
|
|||
Order_by: ficsit.ModFields(viper.GetString("order-by")),
|
||||
Search: search,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
10
cmd/smr/root.go
Normal file
10
cmd/smr/root.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package smr
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var Cmd = &cobra.Command{
|
||||
Use: "smr",
|
||||
Short: "Manage mods on SMR",
|
||||
}
|
224
cmd/smr/upload.go
Normal file
224
cmd/smr/upload.go
Normal file
|
@ -0,0 +1,224 @@
|
|||
package smr
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"math"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
)
|
||||
|
||||
const uploadVersionPartGQL = `mutation UploadVersionPart($modId: ModID!, $versionId: VersionID!, $part: Int!, $file: Upload!) {
|
||||
uploadVersionPart(modId: $modId, versionId: $versionId, part: $part, file: $file)
|
||||
}`
|
||||
|
||||
func init() {
|
||||
Cmd.AddCommand(uploadCmd)
|
||||
}
|
||||
|
||||
var uploadCmd = &cobra.Command{
|
||||
Use: "upload [flags] <mod-id> <file> <changelog...>",
|
||||
Short: "Upload a new mod version",
|
||||
Args: cobra.MinimumNArgs(3),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
chunkSize := viper.GetInt64("chunk-size")
|
||||
if chunkSize < 1000000 {
|
||||
return errors.New("chunk size cannot be smaller than 1MB")
|
||||
}
|
||||
|
||||
var versionStability ficsit.VersionStabilities
|
||||
switch viper.GetString("stability") {
|
||||
case "alpha":
|
||||
versionStability = ficsit.VersionStabilitiesAlpha
|
||||
case "beta":
|
||||
versionStability = ficsit.VersionStabilitiesBeta
|
||||
case "release":
|
||||
versionStability = ficsit.VersionStabilitiesRelease
|
||||
default:
|
||||
return errors.New("invalid version stability: " + viper.GetString("stability"))
|
||||
}
|
||||
|
||||
modID := args[0]
|
||||
filePath := args[1]
|
||||
changelog := strings.Join(args[2:], " ")
|
||||
|
||||
stat, err := os.Stat(filePath)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to stat file")
|
||||
}
|
||||
|
||||
global, err := cli.InitCLI(true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if stat.IsDir() {
|
||||
return errors.New("file cannot be a directory")
|
||||
}
|
||||
|
||||
// TODO Validate .smod file before upload
|
||||
|
||||
logBase := log.With().Str("mod-id", modID).Str("path", filePath).Logger()
|
||||
logBase.Info().Msg("creating a new mod version")
|
||||
|
||||
createdVersion, err := ficsit.CreateVersion(cmd.Context(), global.APIClient, modID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
logBase = logBase.With().Str("version-id", createdVersion.GetVersionID()).Logger()
|
||||
logBase.Info().Msg("received version id")
|
||||
|
||||
// TODO Parallelize chunk uploading
|
||||
chunkCount := int(math.Ceil(float64(stat.Size()) / float64(chunkSize)))
|
||||
for i := 0; i < chunkCount; i++ {
|
||||
chunkLog := logBase.With().Int("chunk", i).Logger()
|
||||
chunkLog.Info().Msg("uploading chunk")
|
||||
|
||||
f, err := os.Open(filePath)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to open file")
|
||||
}
|
||||
|
||||
offset := int64(i) * chunkSize
|
||||
if _, err := f.Seek(offset, 0); err != nil {
|
||||
return errors.Wrap(err, "failed to seek to chunk offset")
|
||||
}
|
||||
|
||||
bufferSize := chunkSize
|
||||
if offset+chunkSize > stat.Size() {
|
||||
bufferSize = stat.Size() - offset
|
||||
}
|
||||
|
||||
chunk := make([]byte, bufferSize)
|
||||
if _, err := f.Read(chunk); err != nil {
|
||||
return errors.Wrap(err, "failed to read from chunk offset")
|
||||
}
|
||||
|
||||
operationBody, err := json.Marshal(map[string]interface{}{
|
||||
"query": uploadVersionPartGQL,
|
||||
"variables": map[string]interface{}{
|
||||
"modId": modID,
|
||||
"versionId": createdVersion.GetVersionID(),
|
||||
"part": i + 1,
|
||||
"file": nil,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to serialize operation body")
|
||||
}
|
||||
|
||||
mapBody, err := json.Marshal(map[string]interface{}{
|
||||
"0": []string{"variables.file"},
|
||||
})
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to serialize map body")
|
||||
}
|
||||
|
||||
body := &bytes.Buffer{}
|
||||
writer := multipart.NewWriter(body)
|
||||
|
||||
operations, err := writer.CreateFormField("operations")
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to create operations field")
|
||||
}
|
||||
|
||||
if _, err := operations.Write(operationBody); err != nil {
|
||||
return errors.Wrap(err, "failed to write to operation field")
|
||||
}
|
||||
|
||||
mapField, err := writer.CreateFormField("map")
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to create map field")
|
||||
}
|
||||
|
||||
if _, err := mapField.Write(mapBody); err != nil {
|
||||
return errors.Wrap(err, "failed to write to map field")
|
||||
}
|
||||
|
||||
part, err := writer.CreateFormFile("0", filepath.Base(filePath))
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to create file field")
|
||||
}
|
||||
|
||||
if _, err := io.Copy(part, bytes.NewReader(chunk)); err != nil {
|
||||
return errors.Wrap(err, "failed to write to file field")
|
||||
}
|
||||
|
||||
if err := writer.Close(); err != nil {
|
||||
return errors.Wrap(err, "failed to close body writer")
|
||||
}
|
||||
|
||||
r, _ := http.NewRequest("POST", viper.GetString("api-base")+viper.GetString("graphql-api"), body)
|
||||
r.Header.Add("Content-Type", writer.FormDataContentType())
|
||||
r.Header.Add("Authorization", viper.GetString("api-key"))
|
||||
|
||||
client := &http.Client{}
|
||||
if _, err := client.Do(r); err != nil {
|
||||
return errors.Wrap(err, "failed to execute request")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
logBase.Info().Msg("finalizing uploaded version")
|
||||
|
||||
finalizeSuccess, err := ficsit.FinalizeCreateVersion(cmd.Context(), global.APIClient, modID, createdVersion.GetVersionID(), ficsit.NewVersion{
|
||||
Changelog: changelog,
|
||||
Stability: versionStability,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !finalizeSuccess.GetSuccess() {
|
||||
logBase.Error().Msg("failed to finalize version upload")
|
||||
}
|
||||
|
||||
time.Sleep(time.Second * 1)
|
||||
|
||||
for {
|
||||
logBase.Info().Msg("checking version upload state")
|
||||
state, err := ficsit.CheckVersionUploadState(cmd.Context(), global.APIClient, modID, createdVersion.GetVersionID())
|
||||
if err != nil {
|
||||
logBase.Err(err).Msg("failed to upload mod")
|
||||
return nil
|
||||
}
|
||||
|
||||
if state == nil || state.GetState().Version.Id == "" {
|
||||
time.Sleep(time.Second * 10)
|
||||
continue
|
||||
}
|
||||
|
||||
if state.GetState().Auto_approved {
|
||||
logBase.Info().Msg("version successfully uploaded and auto-approved")
|
||||
break
|
||||
}
|
||||
|
||||
logBase.Info().Msg("version successfully uploaded, but has to be scanned for viruses, which may take up to 15 minutes")
|
||||
break
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
uploadCmd.PersistentFlags().Int64("chunk-size", 10000000, "Size of chunks to split uploaded mod in bytes")
|
||||
uploadCmd.PersistentFlags().String("stability", "release", "Stability of the uploaded mod (alpha, beta, release)")
|
||||
|
||||
_ = viper.BindPFlag("chunk-size", uploadCmd.PersistentFlags().Lookup("chunk-size"))
|
||||
_ = viper.BindPFlag("stability", uploadCmd.PersistentFlags().Lookup("stability"))
|
||||
}
|
|
@ -6,6 +6,7 @@ cli mod manager for satisfactory
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -26,6 +27,7 @@ cli mod manager for satisfactory
|
|||
* [ficsit installation](ficsit_installation.md) - Manage installations
|
||||
* [ficsit profile](ficsit_profile.md) - Manage profiles
|
||||
* [ficsit search](ficsit_search.md) - Search mods
|
||||
* [ficsit smr](ficsit_smr.md) - Manage mods on SMR
|
||||
* [ficsit version](ficsit_version.md) - Print current version information
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Apply profiles to all installations
|
||||
|
||||
```
|
||||
ficsit apply [flags]
|
||||
ficsit apply [installation] ... [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
@ -16,6 +16,7 @@ ficsit apply [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit apply [flags]
|
|||
|
||||
* [ficsit](ficsit.md) - cli mod manager for satisfactory
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -16,6 +16,7 @@ ficsit cli [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit cli [flags]
|
|||
|
||||
* [ficsit](ficsit.md) - cli mod manager for satisfactory
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -12,6 +12,7 @@ Manage installations
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ Manage installations
|
|||
* [ficsit installation remove](ficsit_installation_remove.md) - Remove an installation
|
||||
* [ficsit installation set-profile](ficsit_installation_set-profile.md) - Change the profile of an installation
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -16,6 +16,7 @@ ficsit installation add <path> [profile] [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit installation add <path> [profile] [flags]
|
|||
|
||||
* [ficsit installation](ficsit_installation.md) - Manage installations
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -16,6 +16,7 @@ ficsit installation ls [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit installation ls [flags]
|
|||
|
||||
* [ficsit installation](ficsit_installation.md) - Manage installations
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -16,6 +16,7 @@ ficsit installation remove <path> [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit installation remove <path> [flags]
|
|||
|
||||
* [ficsit installation](ficsit_installation.md) - Manage installations
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -16,6 +16,7 @@ ficsit installation set-profile <path> <profile> [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit installation set-profile <path> <profile> [flags]
|
|||
|
||||
* [ficsit installation](ficsit_installation.md) - Manage installations
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -12,6 +12,7 @@ Manage profiles
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -33,4 +34,4 @@ Manage profiles
|
|||
* [ficsit profile new](ficsit_profile_new.md) - Create a new profile
|
||||
* [ficsit profile rename](ficsit_profile_rename.md) - Rename a profile
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -16,6 +16,7 @@ ficsit profile delete <name> [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit profile delete <name> [flags]
|
|||
|
||||
* [ficsit profile](ficsit_profile.md) - Manage profiles
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -16,6 +16,7 @@ ficsit profile ls [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit profile ls [flags]
|
|||
|
||||
* [ficsit profile](ficsit_profile.md) - Manage profiles
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -16,6 +16,7 @@ ficsit profile mods <profile> [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit profile mods <profile> [flags]
|
|||
|
||||
* [ficsit profile](ficsit_profile.md) - Manage profiles
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -16,6 +16,7 @@ ficsit profile new <name> [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit profile new <name> [flags]
|
|||
|
||||
* [ficsit profile](ficsit_profile.md) - Manage profiles
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -16,6 +16,7 @@ ficsit profile rename <old> <name> [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit profile rename <old> <name> [flags]
|
|||
|
||||
* [ficsit profile](ficsit_profile.md) - Manage profiles
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -21,6 +21,7 @@ ficsit search [query] [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -37,4 +38,4 @@ ficsit search [query] [flags]
|
|||
|
||||
* [ficsit](ficsit.md) - cli mod manager for satisfactory
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
33
docs/ficsit_smr.md
Normal file
33
docs/ficsit_smr.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
## ficsit smr
|
||||
|
||||
Manage mods on SMR
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for smr
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
--installations-file string The installations file (default "installations.json")
|
||||
--local-dir string The local directory (default "/home/vilsol/.local/share/ficsit")
|
||||
--log string The log level to output (default "info")
|
||||
--log-file string File to output logs to
|
||||
--pretty Whether to render pretty terminal output (default true)
|
||||
--profiles-file string The profiles file (default "profiles.json")
|
||||
--quiet Do not log anything to console
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ficsit](ficsit.md) - cli mod manager for satisfactory
|
||||
* [ficsit smr upload](ficsit_smr_upload.md) - Upload a new mod version
|
||||
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
38
docs/ficsit_smr_upload.md
Normal file
38
docs/ficsit_smr_upload.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
## ficsit smr upload
|
||||
|
||||
Upload a new mod version
|
||||
|
||||
```
|
||||
ficsit smr upload [flags] <mod-id> <file> <changelog...>
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--chunk-size int Size of chunks to split uploaded mod in bytes (default 10000000)
|
||||
-h, --help help for upload
|
||||
--stability string Stability of the uploaded mod (alpha, beta, release) (default "release")
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
--installations-file string The installations file (default "installations.json")
|
||||
--local-dir string The local directory (default "/home/vilsol/.local/share/ficsit")
|
||||
--log string The log level to output (default "info")
|
||||
--log-file string File to output logs to
|
||||
--pretty Whether to render pretty terminal output (default true)
|
||||
--profiles-file string The profiles file (default "profiles.json")
|
||||
--quiet Do not log anything to console
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ficsit smr](ficsit_smr.md) - Manage mods on SMR
|
||||
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
|
@ -16,6 +16,7 @@ ficsit version [flags]
|
|||
|
||||
```
|
||||
--api-base string URL for API (default "https://api.ficsit.app")
|
||||
--api-key string API key to use when sending requests
|
||||
--cache-dir string The cache directory (default "/home/vilsol/.cache/ficsit")
|
||||
--dry-run Dry-run. Do not save any changes
|
||||
--graphql-api string Path for GraphQL API (default "/v2/query")
|
||||
|
@ -32,4 +33,4 @@ ficsit version [flags]
|
|||
|
||||
* [ficsit](ficsit.md) - cli mod manager for satisfactory
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Jun-2022
|
||||
###### Auto generated by spf13/cobra on 14-Oct-2022
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"github.com/Khan/genqlient/graphql"
|
||||
"github.com/MarvinJWendt/testza"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cfg"
|
||||
)
|
||||
|
||||
|
|
8
ficsit/queries/check_version_upload_state.graphql
Normal file
8
ficsit/queries/check_version_upload_state.graphql
Normal file
|
@ -0,0 +1,8 @@
|
|||
query CheckVersionUploadState ($modId: ModID!, $versionId: VersionID!) {
|
||||
state: checkVersionUploadState(modId: $modId, versionId: $versionId) {
|
||||
auto_approved
|
||||
version {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
3
ficsit/queries/create_version.graphql
Normal file
3
ficsit/queries/create_version.graphql
Normal file
|
@ -0,0 +1,3 @@
|
|||
mutation CreateVersion ($modId: ModID!) {
|
||||
versionID: createVersion(modId: $modId)
|
||||
}
|
3
ficsit/queries/finalize_create_version.graphql
Normal file
3
ficsit/queries/finalize_create_version.graphql
Normal file
|
@ -0,0 +1,3 @@
|
|||
mutation FinalizeCreateVersion ($modId: ModID!, $versionId: VersionID!, $version: NewVersion!) {
|
||||
success: finalizeCreateVersion(modId: $modId, versionId: $versionId, version: $version)
|
||||
}
|
|
@ -4,9 +4,30 @@ import (
|
|||
"net/http"
|
||||
|
||||
"github.com/Khan/genqlient/graphql"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func InitAPI() graphql.Client {
|
||||
return graphql.NewClient(viper.GetString("api-base")+viper.GetString("graphql-api"), http.DefaultClient)
|
||||
type AuthedTransport struct {
|
||||
Wrapped http.RoundTripper
|
||||
}
|
||||
|
||||
func (t *AuthedTransport) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
key := viper.GetString("api-key")
|
||||
if key != "" {
|
||||
req.Header.Set("Authorization", key)
|
||||
}
|
||||
|
||||
rt, err := t.Wrapped.RoundTrip(req)
|
||||
return rt, errors.Wrap(err, "failed roundtrip")
|
||||
}
|
||||
|
||||
func InitAPI() graphql.Client {
|
||||
httpClient := http.Client{
|
||||
Transport: &AuthedTransport{
|
||||
Wrapped: http.DefaultTransport,
|
||||
},
|
||||
}
|
||||
|
||||
return graphql.NewClient(viper.GetString("api-base")+viper.GetString("graphql-api"), &httpClient)
|
||||
}
|
||||
|
|
361
ficsit/types.go
361
ficsit/types.go
|
@ -12,6 +12,56 @@ import (
|
|||
"github.com/satisfactorymodding/ficsit-cli/ficsit/utils"
|
||||
)
|
||||
|
||||
// CheckVersionUploadStateResponse is returned by CheckVersionUploadState on success.
|
||||
type CheckVersionUploadStateResponse struct {
|
||||
State CheckVersionUploadStateStateCreateVersionResponse `json:"state"`
|
||||
}
|
||||
|
||||
// GetState returns CheckVersionUploadStateResponse.State, and is useful for accessing the field via an interface.
|
||||
func (v *CheckVersionUploadStateResponse) GetState() CheckVersionUploadStateStateCreateVersionResponse {
|
||||
return v.State
|
||||
}
|
||||
|
||||
// CheckVersionUploadStateStateCreateVersionResponse includes the requested fields of the GraphQL type CreateVersionResponse.
|
||||
type CheckVersionUploadStateStateCreateVersionResponse struct {
|
||||
Auto_approved bool `json:"auto_approved"`
|
||||
Version CheckVersionUploadStateStateCreateVersionResponseVersion `json:"version"`
|
||||
}
|
||||
|
||||
// GetAuto_approved returns CheckVersionUploadStateStateCreateVersionResponse.Auto_approved, and is useful for accessing the field via an interface.
|
||||
func (v *CheckVersionUploadStateStateCreateVersionResponse) GetAuto_approved() bool {
|
||||
return v.Auto_approved
|
||||
}
|
||||
|
||||
// GetVersion returns CheckVersionUploadStateStateCreateVersionResponse.Version, and is useful for accessing the field via an interface.
|
||||
func (v *CheckVersionUploadStateStateCreateVersionResponse) GetVersion() CheckVersionUploadStateStateCreateVersionResponseVersion {
|
||||
return v.Version
|
||||
}
|
||||
|
||||
// CheckVersionUploadStateStateCreateVersionResponseVersion includes the requested fields of the GraphQL type Version.
|
||||
type CheckVersionUploadStateStateCreateVersionResponseVersion struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// GetId returns CheckVersionUploadStateStateCreateVersionResponseVersion.Id, and is useful for accessing the field via an interface.
|
||||
func (v *CheckVersionUploadStateStateCreateVersionResponseVersion) GetId() string { return v.Id }
|
||||
|
||||
// CreateVersionResponse is returned by CreateVersion on success.
|
||||
type CreateVersionResponse struct {
|
||||
VersionID string `json:"versionID"`
|
||||
}
|
||||
|
||||
// GetVersionID returns CreateVersionResponse.VersionID, and is useful for accessing the field via an interface.
|
||||
func (v *CreateVersionResponse) GetVersionID() string { return v.VersionID }
|
||||
|
||||
// FinalizeCreateVersionResponse is returned by FinalizeCreateVersion on success.
|
||||
type FinalizeCreateVersionResponse struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
// GetSuccess returns FinalizeCreateVersionResponse.Success, and is useful for accessing the field via an interface.
|
||||
func (v *FinalizeCreateVersionResponse) GetSuccess() bool { return v.Success }
|
||||
|
||||
// GetModMod includes the requested fields of the GraphQL type Mod.
|
||||
type GetModMod struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -190,6 +240,7 @@ type ModFilter struct {
|
|||
Order_by ModFields `json:"order_by,omitempty"`
|
||||
References []string `json:"references,omitempty"`
|
||||
Search string `json:"search,omitempty"`
|
||||
TagIDs []string `json:"tagIDs,omitempty"`
|
||||
}
|
||||
|
||||
// GetHidden returns ModFilter.Hidden, and is useful for accessing the field via an interface.
|
||||
|
@ -216,6 +267,9 @@ func (v *ModFilter) GetReferences() []string { return v.References }
|
|||
// GetSearch returns ModFilter.Search, and is useful for accessing the field via an interface.
|
||||
func (v *ModFilter) GetSearch() string { return v.Search }
|
||||
|
||||
// GetTagIDs returns ModFilter.TagIDs, and is useful for accessing the field via an interface.
|
||||
func (v *ModFilter) GetTagIDs() []string { return v.TagIDs }
|
||||
|
||||
type ModVersionConstraint struct {
|
||||
ModIdOrReference string `json:"modIdOrReference"`
|
||||
Version string `json:"version"`
|
||||
|
@ -431,6 +485,17 @@ type ModsResponse struct {
|
|||
// GetMods returns ModsResponse.Mods, and is useful for accessing the field via an interface.
|
||||
func (v *ModsResponse) GetMods() ModsModsGetMods { return v.Mods }
|
||||
|
||||
type NewVersion struct {
|
||||
Changelog string `json:"changelog"`
|
||||
Stability VersionStabilities `json:"stability"`
|
||||
}
|
||||
|
||||
// GetChangelog returns NewVersion.Changelog, and is useful for accessing the field via an interface.
|
||||
func (v *NewVersion) GetChangelog() string { return v.Changelog }
|
||||
|
||||
// GetStability returns NewVersion.Stability, and is useful for accessing the field via an interface.
|
||||
func (v *NewVersion) GetStability() VersionStabilities { return v.Stability }
|
||||
|
||||
type Order string
|
||||
|
||||
const (
|
||||
|
@ -593,6 +658,50 @@ func (v *VersionFilter) GetOrder_by() VersionFields { return v.Order_by }
|
|||
// GetSearch returns VersionFilter.Search, and is useful for accessing the field via an interface.
|
||||
func (v *VersionFilter) GetSearch() string { return v.Search }
|
||||
|
||||
type VersionStabilities string
|
||||
|
||||
const (
|
||||
VersionStabilitiesAlpha VersionStabilities = "alpha"
|
||||
VersionStabilitiesBeta VersionStabilities = "beta"
|
||||
VersionStabilitiesRelease VersionStabilities = "release"
|
||||
)
|
||||
|
||||
// __CheckVersionUploadStateInput is used internally by genqlient
|
||||
type __CheckVersionUploadStateInput struct {
|
||||
ModId string `json:"modId"`
|
||||
VersionId string `json:"versionId"`
|
||||
}
|
||||
|
||||
// GetModId returns __CheckVersionUploadStateInput.ModId, and is useful for accessing the field via an interface.
|
||||
func (v *__CheckVersionUploadStateInput) GetModId() string { return v.ModId }
|
||||
|
||||
// GetVersionId returns __CheckVersionUploadStateInput.VersionId, and is useful for accessing the field via an interface.
|
||||
func (v *__CheckVersionUploadStateInput) GetVersionId() string { return v.VersionId }
|
||||
|
||||
// __CreateVersionInput is used internally by genqlient
|
||||
type __CreateVersionInput struct {
|
||||
ModId string `json:"modId"`
|
||||
}
|
||||
|
||||
// GetModId returns __CreateVersionInput.ModId, and is useful for accessing the field via an interface.
|
||||
func (v *__CreateVersionInput) GetModId() string { return v.ModId }
|
||||
|
||||
// __FinalizeCreateVersionInput is used internally by genqlient
|
||||
type __FinalizeCreateVersionInput struct {
|
||||
ModId string `json:"modId"`
|
||||
VersionId string `json:"versionId"`
|
||||
Version NewVersion `json:"version"`
|
||||
}
|
||||
|
||||
// GetModId returns __FinalizeCreateVersionInput.ModId, and is useful for accessing the field via an interface.
|
||||
func (v *__FinalizeCreateVersionInput) GetModId() string { return v.ModId }
|
||||
|
||||
// GetVersionId returns __FinalizeCreateVersionInput.VersionId, and is useful for accessing the field via an interface.
|
||||
func (v *__FinalizeCreateVersionInput) GetVersionId() string { return v.VersionId }
|
||||
|
||||
// GetVersion returns __FinalizeCreateVersionInput.Version, and is useful for accessing the field via an interface.
|
||||
func (v *__FinalizeCreateVersionInput) GetVersion() NewVersion { return v.Version }
|
||||
|
||||
// __GetModInput is used internally by genqlient
|
||||
type __GetModInput struct {
|
||||
ModId string `json:"modId"`
|
||||
|
@ -629,21 +738,115 @@ type __ResolveModDependenciesInput struct {
|
|||
// GetFilter returns __ResolveModDependenciesInput.Filter, and is useful for accessing the field via an interface.
|
||||
func (v *__ResolveModDependenciesInput) GetFilter() []ModVersionConstraint { return v.Filter }
|
||||
|
||||
func CheckVersionUploadState(
|
||||
ctx context.Context,
|
||||
client graphql.Client,
|
||||
modId string,
|
||||
versionId string,
|
||||
) (*CheckVersionUploadStateResponse, error) {
|
||||
req := &graphql.Request{
|
||||
OpName: "CheckVersionUploadState",
|
||||
Query: `
|
||||
query CheckVersionUploadState ($modId: ModID!, $versionId: VersionID!) {
|
||||
state: checkVersionUploadState(modId: $modId, versionId: $versionId) {
|
||||
auto_approved
|
||||
version {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
Variables: &__CheckVersionUploadStateInput{
|
||||
ModId: modId,
|
||||
VersionId: versionId,
|
||||
},
|
||||
}
|
||||
var err error
|
||||
|
||||
var data CheckVersionUploadStateResponse
|
||||
resp := &graphql.Response{Data: &data}
|
||||
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
req,
|
||||
resp,
|
||||
)
|
||||
|
||||
return &data, err
|
||||
}
|
||||
|
||||
func CreateVersion(
|
||||
ctx context.Context,
|
||||
client graphql.Client,
|
||||
modId string,
|
||||
) (*CreateVersionResponse, error) {
|
||||
req := &graphql.Request{
|
||||
OpName: "CreateVersion",
|
||||
Query: `
|
||||
mutation CreateVersion ($modId: ModID!) {
|
||||
versionID: createVersion(modId: $modId)
|
||||
}
|
||||
`,
|
||||
Variables: &__CreateVersionInput{
|
||||
ModId: modId,
|
||||
},
|
||||
}
|
||||
var err error
|
||||
|
||||
var data CreateVersionResponse
|
||||
resp := &graphql.Response{Data: &data}
|
||||
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
req,
|
||||
resp,
|
||||
)
|
||||
|
||||
return &data, err
|
||||
}
|
||||
|
||||
func FinalizeCreateVersion(
|
||||
ctx context.Context,
|
||||
client graphql.Client,
|
||||
modId string,
|
||||
versionId string,
|
||||
version NewVersion,
|
||||
) (*FinalizeCreateVersionResponse, error) {
|
||||
req := &graphql.Request{
|
||||
OpName: "FinalizeCreateVersion",
|
||||
Query: `
|
||||
mutation FinalizeCreateVersion ($modId: ModID!, $versionId: VersionID!, $version: NewVersion!) {
|
||||
success: finalizeCreateVersion(modId: $modId, versionId: $versionId, version: $version)
|
||||
}
|
||||
`,
|
||||
Variables: &__FinalizeCreateVersionInput{
|
||||
ModId: modId,
|
||||
VersionId: versionId,
|
||||
Version: version,
|
||||
},
|
||||
}
|
||||
var err error
|
||||
|
||||
var data FinalizeCreateVersionResponse
|
||||
resp := &graphql.Response{Data: &data}
|
||||
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
req,
|
||||
resp,
|
||||
)
|
||||
|
||||
return &data, err
|
||||
}
|
||||
|
||||
func GetMod(
|
||||
ctx context.Context,
|
||||
client graphql.Client,
|
||||
modId string,
|
||||
) (*GetModResponse, error) {
|
||||
__input := __GetModInput{
|
||||
ModId: modId,
|
||||
}
|
||||
var err error
|
||||
|
||||
var retval GetModResponse
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
"GetMod",
|
||||
`
|
||||
req := &graphql.Request{
|
||||
OpName: "GetMod",
|
||||
Query: `
|
||||
query GetMod ($modId: String!) {
|
||||
mod: getModByIdOrReference(modIdOrReference: $modId) {
|
||||
id
|
||||
|
@ -663,10 +866,22 @@ query GetMod ($modId: String!) {
|
|||
}
|
||||
}
|
||||
`,
|
||||
&retval,
|
||||
&__input,
|
||||
Variables: &__GetModInput{
|
||||
ModId: modId,
|
||||
},
|
||||
}
|
||||
var err error
|
||||
|
||||
var data GetModResponse
|
||||
resp := &graphql.Response{Data: &data}
|
||||
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
req,
|
||||
resp,
|
||||
)
|
||||
return &retval, err
|
||||
|
||||
return &data, err
|
||||
}
|
||||
|
||||
func ModVersions(
|
||||
|
@ -675,17 +890,9 @@ func ModVersions(
|
|||
modId string,
|
||||
filter VersionFilter,
|
||||
) (*ModVersionsResponse, error) {
|
||||
__input := __ModVersionsInput{
|
||||
ModId: modId,
|
||||
Filter: filter,
|
||||
}
|
||||
var err error
|
||||
|
||||
var retval ModVersionsResponse
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
"ModVersions",
|
||||
`
|
||||
req := &graphql.Request{
|
||||
OpName: "ModVersions",
|
||||
Query: `
|
||||
query ModVersions ($modId: String!, $filter: VersionFilter) {
|
||||
mod: getModByIdOrReference(modIdOrReference: $modId) {
|
||||
id
|
||||
|
@ -696,10 +903,23 @@ query ModVersions ($modId: String!, $filter: VersionFilter) {
|
|||
}
|
||||
}
|
||||
`,
|
||||
&retval,
|
||||
&__input,
|
||||
Variables: &__ModVersionsInput{
|
||||
ModId: modId,
|
||||
Filter: filter,
|
||||
},
|
||||
}
|
||||
var err error
|
||||
|
||||
var data ModVersionsResponse
|
||||
resp := &graphql.Response{Data: &data}
|
||||
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
req,
|
||||
resp,
|
||||
)
|
||||
return &retval, err
|
||||
|
||||
return &data, err
|
||||
}
|
||||
|
||||
func Mods(
|
||||
|
@ -707,16 +927,9 @@ func Mods(
|
|||
client graphql.Client,
|
||||
filter ModFilter,
|
||||
) (*ModsResponse, error) {
|
||||
__input := __ModsInput{
|
||||
Filter: filter,
|
||||
}
|
||||
var err error
|
||||
|
||||
var retval ModsResponse
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
"Mods",
|
||||
`
|
||||
req := &graphql.Request{
|
||||
OpName: "Mods",
|
||||
Query: `
|
||||
query Mods ($filter: ModFilter) {
|
||||
mods: getMods(filter: $filter) {
|
||||
count
|
||||
|
@ -734,10 +947,22 @@ query Mods ($filter: ModFilter) {
|
|||
}
|
||||
}
|
||||
`,
|
||||
&retval,
|
||||
&__input,
|
||||
Variables: &__ModsInput{
|
||||
Filter: filter,
|
||||
},
|
||||
}
|
||||
var err error
|
||||
|
||||
var data ModsResponse
|
||||
resp := &graphql.Response{Data: &data}
|
||||
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
req,
|
||||
resp,
|
||||
)
|
||||
return &retval, err
|
||||
|
||||
return &data, err
|
||||
}
|
||||
|
||||
func ResolveModDependencies(
|
||||
|
@ -745,16 +970,9 @@ func ResolveModDependencies(
|
|||
client graphql.Client,
|
||||
filter []ModVersionConstraint,
|
||||
) (*ResolveModDependenciesResponse, error) {
|
||||
__input := __ResolveModDependenciesInput{
|
||||
Filter: filter,
|
||||
}
|
||||
var err error
|
||||
|
||||
var retval ResolveModDependenciesResponse
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
"ResolveModDependencies",
|
||||
`
|
||||
req := &graphql.Request{
|
||||
OpName: "ResolveModDependencies",
|
||||
Query: `
|
||||
query ResolveModDependencies ($filter: [ModVersionConstraint!]!) {
|
||||
mods: resolveModVersions(filter: $filter) {
|
||||
id
|
||||
|
@ -773,23 +991,31 @@ query ResolveModDependencies ($filter: [ModVersionConstraint!]!) {
|
|||
}
|
||||
}
|
||||
`,
|
||||
&retval,
|
||||
&__input,
|
||||
Variables: &__ResolveModDependenciesInput{
|
||||
Filter: filter,
|
||||
},
|
||||
}
|
||||
var err error
|
||||
|
||||
var data ResolveModDependenciesResponse
|
||||
resp := &graphql.Response{Data: &data}
|
||||
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
req,
|
||||
resp,
|
||||
)
|
||||
return &retval, err
|
||||
|
||||
return &data, err
|
||||
}
|
||||
|
||||
func SMLVersions(
|
||||
ctx context.Context,
|
||||
client graphql.Client,
|
||||
) (*SMLVersionsResponse, error) {
|
||||
var err error
|
||||
|
||||
var retval SMLVersionsResponse
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
"SMLVersions",
|
||||
`
|
||||
req := &graphql.Request{
|
||||
OpName: "SMLVersions",
|
||||
Query: `
|
||||
query SMLVersions {
|
||||
smlVersions: getSMLVersions(filter: {limit:100}) {
|
||||
count
|
||||
|
@ -801,8 +1027,17 @@ query SMLVersions {
|
|||
}
|
||||
}
|
||||
`,
|
||||
&retval,
|
||||
nil,
|
||||
}
|
||||
var err error
|
||||
|
||||
var data SMLVersionsResponse
|
||||
resp := &graphql.Response{Data: &data}
|
||||
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
req,
|
||||
resp,
|
||||
)
|
||||
return &retval, err
|
||||
|
||||
return &data, err
|
||||
}
|
||||
|
|
|
@ -22,3 +22,5 @@ bindings:
|
|||
Date:
|
||||
type: time.Time
|
||||
unmarshaler: github.com/satisfactorymodding/ficsit-cli/ficsit/utils.UnmarshalDateTime
|
||||
TagID:
|
||||
type: string
|
90
go.mod
90
go.mod
|
@ -3,81 +3,85 @@ module github.com/satisfactorymodding/ficsit-cli
|
|||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/JohannesKaufmann/html-to-markdown v1.3.4
|
||||
github.com/Khan/genqlient v0.4.0
|
||||
github.com/MarvinJWendt/testza v0.4.2
|
||||
github.com/JohannesKaufmann/html-to-markdown v1.3.6
|
||||
github.com/Khan/genqlient v0.5.0
|
||||
github.com/MarvinJWendt/testza v0.4.3
|
||||
github.com/Masterminds/semver/v3 v3.1.1
|
||||
github.com/PuerkitoBio/goquery v1.8.0
|
||||
github.com/charmbracelet/bubbles v0.11.0
|
||||
github.com/charmbracelet/bubbletea v0.21.0
|
||||
github.com/charmbracelet/bubbles v0.14.0
|
||||
github.com/charmbracelet/bubbletea v0.22.1
|
||||
github.com/charmbracelet/glamour v0.5.0
|
||||
github.com/charmbracelet/lipgloss v0.5.0
|
||||
github.com/jlaffaye/ftp v0.0.0-20220612151834-60a941566ce4
|
||||
github.com/charmbracelet/lipgloss v0.6.0
|
||||
github.com/jlaffaye/ftp v0.1.0
|
||||
github.com/muesli/reflow v0.3.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pterm/pterm v0.12.41
|
||||
github.com/rs/zerolog v1.26.1
|
||||
github.com/pterm/pterm v0.12.49
|
||||
github.com/rs/zerolog v1.28.0
|
||||
github.com/sahilm/fuzzy v0.1.0
|
||||
github.com/spf13/cobra v1.4.0
|
||||
github.com/spf13/viper v1.12.0
|
||||
github.com/spf13/cobra v1.6.0
|
||||
github.com/spf13/viper v1.13.0
|
||||
)
|
||||
|
||||
replace github.com/Masterminds/semver/v3 v3.1.1 => github.com/Vilsol/semver/v3 v3.1.2-0.20220414201711-64ef71d40f9a
|
||||
|
||||
require (
|
||||
github.com/agnivade/levenshtein v1.1.0 // indirect
|
||||
atomicgo.dev/cursor v0.1.1 // indirect
|
||||
atomicgo.dev/keyboard v0.2.8 // indirect
|
||||
github.com/agnivade/levenshtein v1.1.1 // indirect
|
||||
github.com/alecthomas/chroma v0.10.0 // indirect
|
||||
github.com/alexflint/go-arg v1.4.2 // indirect
|
||||
github.com/alexflint/go-scalar v1.0.0 // indirect
|
||||
github.com/alexflint/go-arg v1.4.3 // indirect
|
||||
github.com/alexflint/go-scalar v1.2.0 // indirect
|
||||
github.com/andybalholm/cascadia v1.3.1 // indirect
|
||||
github.com/atomicgo/cursor v0.0.1 // indirect
|
||||
github.com/atotto/clipboard v0.1.4 // indirect
|
||||
github.com/aymanbagabas/go-osc52 v1.2.1 // indirect
|
||||
github.com/aymerick/douceur v0.2.0 // indirect
|
||||
github.com/charmbracelet/harmonica v0.2.0 // indirect
|
||||
github.com/containerd/console v1.0.3 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/gookit/color v1.5.0 // indirect
|
||||
github.com/dlclark/regexp2 v1.7.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/gookit/color v1.5.2 // indirect
|
||||
github.com/gorilla/css v1.0.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.0.12 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.1 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.1.0 // indirect
|
||||
github.com/lithammer/fuzzysearch v1.1.5 // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.13 // indirect
|
||||
github.com/microcosm-cc/bluemonday v1.0.17 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.16 // indirect
|
||||
github.com/mattn/go-localereader v0.0.1 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.14 // indirect
|
||||
github.com/microcosm-cc/bluemonday v1.0.21 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect
|
||||
github.com/muesli/cancelreader v0.2.0 // indirect
|
||||
github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 // indirect
|
||||
github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 // indirect
|
||||
github.com/muesli/cancelreader v0.2.2 // indirect
|
||||
github.com/muesli/termenv v0.13.0 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
|
||||
github.com/rivo/uniseg v0.4.2 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sergi/go-diff v1.2.0 // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/spf13/afero v1.9.2 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/subosito/gotenv v1.3.0 // indirect
|
||||
github.com/vektah/gqlparser/v2 v2.3.1 // indirect
|
||||
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
|
||||
github.com/yuin/goldmark v1.4.4 // indirect
|
||||
github.com/subosito/gotenv v1.4.1 // indirect
|
||||
github.com/vektah/gqlparser/v2 v2.5.1 // indirect
|
||||
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
||||
github.com/yuin/goldmark v1.5.2 // indirect
|
||||
github.com/yuin/goldmark-emoji v1.0.1 // indirect
|
||||
golang.org/x/mod v0.4.2 // indirect
|
||||
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/tools v0.1.7 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect
|
||||
gopkg.in/ini.v1 v1.66.4 // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect
|
||||
golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect
|
||||
golang.org/x/term v0.0.0-20220919170432-7a66f970e087 // indirect
|
||||
golang.org/x/text v0.3.8 // indirect
|
||||
golang.org/x/tools v0.1.12 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
|
232
go.sum
232
go.sum
|
@ -1,3 +1,7 @@
|
|||
atomicgo.dev/cursor v0.1.1 h1:0t9sxQomCTRh5ug+hAMCs59x/UmC9QL6Ci5uosINKD4=
|
||||
atomicgo.dev/cursor v0.1.1/go.mod h1:Lr4ZJB3U7DfPPOkbH7/6TOtJ4vFGHlgj1nc+n900IpU=
|
||||
atomicgo.dev/keyboard v0.2.8 h1:Di09BitwZgdTV1hPyX/b9Cqxi8HVuJQwWivnZUEqlj4=
|
||||
atomicgo.dev/keyboard v0.2.8/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
|
@ -36,62 +40,68 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
|
|||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/99designs/gqlgen v0.14.0/go.mod h1:S7z4boV+Nx4VvzMUpVrY/YuHjFX4n7rDyuTqvAkuoRE=
|
||||
github.com/99designs/gqlgen v0.17.2/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/JohannesKaufmann/html-to-markdown v1.3.4 h1:0ooS4xfe4SY/fPPswAySee1cvqXZXfHKZ/4Pv+mF3ko=
|
||||
github.com/JohannesKaufmann/html-to-markdown v1.3.4/go.mod h1:JNSClIRYICFDiFhw6RBhBeWGnMSSKVZ6sPQA+TK4tyM=
|
||||
github.com/Khan/genqlient v0.4.0 h1:4XImbzhBtaIFmwGPwEKdnx3TuGOX0GZ0hcW/idTzwts=
|
||||
github.com/Khan/genqlient v0.4.0/go.mod h1:te6aw+Ronw1j+PRVKmVPEFA36IsLG2wK0Uy6jPZ55To=
|
||||
github.com/JohannesKaufmann/html-to-markdown v1.3.6 h1:i3Ma4RmIU97gqArbxZXbFqbWKm7XtImlMwVNUouQ7Is=
|
||||
github.com/JohannesKaufmann/html-to-markdown v1.3.6/go.mod h1:Ol3Jv/xw8jt8qsaLeSh/6DBBw4ZBJrTqrOu3wbbUUg8=
|
||||
github.com/Khan/genqlient v0.5.0 h1:TMZJ+tl/BpbmGyIBiXzKzUftDhw4ZWxQZ+1ydn0gyII=
|
||||
github.com/Khan/genqlient v0.5.0/go.mod h1:EpIvDVXYm01GP6AXzjA7dKriPTH6GmtpmvTAwUUqIX8=
|
||||
github.com/MarvinJWendt/testza v0.1.0/go.mod h1:7AxNvlfeHP7Z/hDQ5JtE3OKYT3XFUeLCDE2DQninSqs=
|
||||
github.com/MarvinJWendt/testza v0.2.1/go.mod h1:God7bhG8n6uQxwdScay+gjm9/LnO4D3kkcZX4hv9Rp8=
|
||||
github.com/MarvinJWendt/testza v0.2.8/go.mod h1:nwIcjmr0Zz+Rcwfh3/4UhBp7ePKVhuBExvZqnKYWlII=
|
||||
github.com/MarvinJWendt/testza v0.2.10/go.mod h1:pd+VWsoGUiFtq+hRKSU1Bktnn+DMCSrDrXDpX2bG66k=
|
||||
github.com/MarvinJWendt/testza v0.2.12/go.mod h1:JOIegYyV7rX+7VZ9r77L/eH6CfJHHzXjB69adAhzZkI=
|
||||
github.com/MarvinJWendt/testza v0.3.0/go.mod h1:eFcL4I0idjtIx8P9C6KkAuLgATNKpX4/2oUqKc6bF2c=
|
||||
github.com/MarvinJWendt/testza v0.3.5/go.mod h1:ExbTpWmA1z2E9HSskvrNcwApoX4F9bID692s10nuHRY=
|
||||
github.com/MarvinJWendt/testza v0.4.2 h1:Vbw9GkSB5erJI2BPnBL9SVGV9myE+XmUSFahBGUhW2Q=
|
||||
github.com/MarvinJWendt/testza v0.4.2/go.mod h1:mSdhXiKH8sg/gQehJ63bINcCKp7RtYewEjXsvsVUPbE=
|
||||
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
|
||||
github.com/MarvinJWendt/testza v0.4.3 h1:u2XaM4IqGp9dsdUmML8/Z791fu4yjQYzOiufOtJwTII=
|
||||
github.com/MarvinJWendt/testza v0.4.3/go.mod h1:CpXaOfceNEYnLDtNIyTrPPcCpDJYqzZnu2aiA2Wp33U=
|
||||
github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U=
|
||||
github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI=
|
||||
github.com/Vilsol/semver/v3 v3.1.2-0.20220414201711-64ef71d40f9a h1:Z443bc6RS9J5qRi7KGqWpStbNYxhDWtSqK/mPQNsIO4=
|
||||
github.com/Vilsol/semver/v3 v3.1.2-0.20220414201711-64ef71d40f9a/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
||||
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
|
||||
github.com/agnivade/levenshtein v1.1.0 h1:n6qGwyHG61v3ABce1rPVZklEYRT8NFpCMrpZdBUbYGM=
|
||||
github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
|
||||
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
|
||||
github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
|
||||
github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek=
|
||||
github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s=
|
||||
github.com/alexflint/go-arg v1.4.2 h1:lDWZAXxpAnZUq4qwb86p/3rIJJ2Li81EoMbTMujhVa0=
|
||||
github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM=
|
||||
github.com/alexflint/go-scalar v1.0.0 h1:NGupf1XV/Xb04wXskDFzS0KWOLH632W/EO4fAFi+A70=
|
||||
github.com/alexflint/go-arg v1.4.3 h1:9rwwEBpMXfKQKceuZfYcwuc/7YY7tWJbFsgG5cAU/uo=
|
||||
github.com/alexflint/go-arg v1.4.3/go.mod h1:3PZ/wp/8HuqRZMUUgu7I+e1qcpUbvmS258mRXkFH4IA=
|
||||
github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw=
|
||||
github.com/alexflint/go-scalar v1.1.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o=
|
||||
github.com/alexflint/go-scalar v1.2.0 h1:WR7JPKkeNpnYIOfHRa7ivM21aWAdHD0gEWHCx+WQBRw=
|
||||
github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o=
|
||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
|
||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
|
||||
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
|
||||
github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
|
||||
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
|
||||
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
|
||||
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
|
||||
github.com/atomicgo/cursor v0.0.1 h1:xdogsqa6YYlLfM+GyClC/Lchf7aiMerFiZQn7soTOoU=
|
||||
github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk=
|
||||
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
|
||||
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
|
||||
github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4=
|
||||
github.com/aymanbagabas/go-osc52 v1.2.1 h1:q2sWUyDcozPLcLabEMd+a+7Ea2DitxZVN9hTxab9L4E=
|
||||
github.com/aymanbagabas/go-osc52 v1.2.1/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4=
|
||||
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
|
||||
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
|
||||
github.com/bradleyjkemp/cupaloy/v2 v2.6.0 h1:knToPYa2xtfg42U3I6punFEjaGFKWQRXJwj0JTv4mTs=
|
||||
github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/charmbracelet/bubbles v0.11.0 h1:fBLyY0PvJnd56Vlu5L84JJH6f4axhgIJ9P3NET78f0Q=
|
||||
github.com/charmbracelet/bubbles v0.11.0/go.mod h1:bbeTiXwPww4M031aGi8UK2HT9RDWoiNibae+1yCMtcc=
|
||||
github.com/charmbracelet/bubbletea v0.21.0 h1:f3y+kanzgev5PA916qxmDybSHU3N804uOnKnhRPXTcI=
|
||||
github.com/charmbracelet/bubbles v0.14.0 h1:DJfCwnARfWjZLvMglhSQzo76UZ2gucuHPy9jLWX45Og=
|
||||
github.com/charmbracelet/bubbles v0.14.0/go.mod h1:bbeTiXwPww4M031aGi8UK2HT9RDWoiNibae+1yCMtcc=
|
||||
github.com/charmbracelet/bubbletea v0.21.0/go.mod h1:GgmJMec61d08zXsOhqRC/AiOx4K4pmz+VIcRIm1FKr4=
|
||||
github.com/charmbracelet/bubbletea v0.22.1 h1:z66q0LWdJNOWEH9zadiAIXp2GN1AWrwNXU8obVY9X24=
|
||||
github.com/charmbracelet/bubbletea v0.22.1/go.mod h1:8/7hVvbPN6ZZPkczLiB8YpLkLJ0n7DMho5Wvfd2X1C0=
|
||||
github.com/charmbracelet/glamour v0.5.0 h1:wu15ykPdB7X6chxugG/NNfDUbyyrCLV9XBalj5wdu3g=
|
||||
github.com/charmbracelet/glamour v0.5.0/go.mod h1:9ZRtG19AUIzcTm7FGLGbq3D5WKQ5UyZBbQsMQN0XIqc=
|
||||
github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ=
|
||||
github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao=
|
||||
github.com/charmbracelet/lipgloss v0.5.0 h1:lulQHuVeodSgDez+3rGiuxlPVXSnhth442DATR2/8t8=
|
||||
github.com/charmbracelet/lipgloss v0.5.0/go.mod h1:EZLha/HbzEt7cYqdFPovlqy5FZPj0xFhg5SaqxScmgs=
|
||||
github.com/charmbracelet/lipgloss v0.6.0 h1:1StyZB9vBSOyuZxQUcUwGr17JmojPNm87inij9N3wJY=
|
||||
github.com/charmbracelet/lipgloss v0.6.0/go.mod h1:tHh2wr34xcHjC2HCXIlGSG1jaDF0S0atAUvBMP6Ppuk=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
|
@ -101,17 +111,19 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht
|
|||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
|
||||
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
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/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
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/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=
|
||||
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
|
||||
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
|
||||
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo=
|
||||
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
|
@ -119,13 +131,12 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
|
|||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
|
@ -182,15 +193,15 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
|
|||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
||||
github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ=
|
||||
github.com/gookit/color v1.5.0 h1:1Opow3+BWDwqor78DcJkJCIwnkviFi+rrOANki9BUFw=
|
||||
github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo=
|
||||
github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI=
|
||||
github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg=
|
||||
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
|
||||
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
|
||||
github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
|
@ -199,18 +210,19 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
|||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jlaffaye/ftp v0.0.0-20220612151834-60a941566ce4 h1:gO/ufFrST8nt0py0FvlYHsSW81RCYeqflr8czF+UBys=
|
||||
github.com/jlaffaye/ftp v0.0.0-20220612151834-60a941566ce4/go.mod h1:YFstjM4Y5zZdsON18Az8MNRgObXGJgor/UBMEQtZJes=
|
||||
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
|
||||
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/jlaffaye/ftp v0.1.0 h1:DLGExl5nBoSFoNshAUHwXAezXwXBvFdx7/qwhucWNSE=
|
||||
github.com/jlaffaye/ftp v0.1.0/go.mod h1:hhq4G4crv+nW2qXtNYcuzLeOudG92Ps37HEKeg2e3lE=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
|
||||
github.com/klauspost/cpuid/v2 v2.0.12 h1:p9dKCg8i4gmOxtv35DvrYoWqYzQrvEVdjQ762Y0OqZE=
|
||||
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
|
||||
github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0=
|
||||
github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
|
||||
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
|
@ -219,47 +231,58 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
|||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
||||
github.com/lithammer/fuzzysearch v1.1.5 h1:Ag7aKU08wp0R9QCfF4GoGST9HbmAIeLP7xwMrOBEp1c=
|
||||
github.com/lithammer/fuzzysearch v1.1.5/go.mod h1:1R1LRNk7yKid1BaQkmuLQaHruxcC4HmAH30Dh61Ih1Q=
|
||||
github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc=
|
||||
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.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ=
|
||||
github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.13/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-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4=
|
||||
github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||
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/microcosm-cc/bluemonday v1.0.17 h1:Z1a//hgsQ4yjC+8zEkV8IWySkXnsxmdSY642CTFQb5Y=
|
||||
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
|
||||
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/microcosm-cc/bluemonday v1.0.17/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/microcosm-cc/bluemonday v1.0.21 h1:dNH3e4PSyE4vNX+KlRGHT5KrSvjeUkoNPwEORjffHJg=
|
||||
github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM=
|
||||
github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b h1:1XF24mVaiu7u+CFywTdcDo2ie1pzzhwjt6RHqzpMU34=
|
||||
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho=
|
||||
github.com/muesli/cancelreader v0.2.0 h1:SOpr+CfyVNce341kKqvbhhzQhBPyJRXQaCtn03Pae1Q=
|
||||
github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 h1:kMlmsLSbjkikxQJ1IPwaM+7LJ9ltFu/fi8CRzvSnQmA=
|
||||
github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho=
|
||||
github.com/muesli/cancelreader v0.2.0/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
|
||||
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
|
||||
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
|
||||
github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68/go.mod h1:Xk+z4oIWdQqJzsxyjgl3P22oYZnHdZ8FFTHAQQt5BMQ=
|
||||
github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
|
||||
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
|
||||
github.com/muesli/termenv v0.9.0/go.mod h1:R/LzAKf+suGs4IsO95y7+7DpFHO0KABgnZqtlyx2mBw=
|
||||
github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs=
|
||||
github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 h1:QANkGiGr39l1EESqrE0gZw0/AJNYzIvoGLhIoVYtluI=
|
||||
github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs=
|
||||
github.com/muesli/termenv v0.13.0 h1:wK20DRpJdDX8b7Ek2QfhvqhRQFZ237RGRO0RQ/Iqdy0=
|
||||
github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4YJK5e2bc=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
|
||||
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
||||
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU=
|
||||
github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg=
|
||||
github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
|
@ -274,46 +297,44 @@ github.com/pterm/pterm v0.12.31/go.mod h1:32ZAWZVXD7ZfG0s8qqHXePte42kdz8ECtRyEej
|
|||
github.com/pterm/pterm v0.12.33/go.mod h1:x+h2uL+n7CP/rel9+bImHD5lF3nM9vJj80k9ybiiTTE=
|
||||
github.com/pterm/pterm v0.12.36/go.mod h1:NjiL09hFhT/vWjQHSj1athJpx6H8cjpHXNAK5bUw8T8=
|
||||
github.com/pterm/pterm v0.12.40/go.mod h1:ffwPLwlbXxP+rxT0GsgDTzS3y3rmpAO1NMjUkGTYf8s=
|
||||
github.com/pterm/pterm v0.12.41 h1:e2BRfFo1H9nL8GY0S3ImbZqfZ/YimOk9XtkhoobKJVs=
|
||||
github.com/pterm/pterm v0.12.41/go.mod h1:LW/G4J2A42XlTaPTAGRPvbBfF4UXvHWhC6SN7ueU4jU=
|
||||
github.com/pterm/pterm v0.12.49 h1:qeNm0wTWawy6WhKoY8ZKq6qTXFr0s2UtUyRW0yVztEg=
|
||||
github.com/pterm/pterm v0.12.49/go.mod h1:D4OBoWNqAfXkm5QLTjIgjNiMXPHemLJHnIreGUsWzWg=
|
||||
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/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8=
|
||||
github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
|
||||
github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc=
|
||||
github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc=
|
||||
github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY=
|
||||
github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI=
|
||||
github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
|
||||
github.com/sebdah/goldie/v2 v2.5.1 h1:hh70HvG4n3T3MNRJN2z/baxPR8xutxo7JVxyi2svl+s=
|
||||
github.com/sebdah/goldie/v2 v2.5.1/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI=
|
||||
github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y=
|
||||
github.com/sebdah/goldie/v2 v2.5.3/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
|
||||
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
|
||||
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
|
||||
github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
|
||||
github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
|
||||
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
|
||||
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
|
||||
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
|
||||
github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
|
||||
github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
|
||||
github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI=
|
||||
github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
|
||||
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ=
|
||||
github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI=
|
||||
github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU=
|
||||
github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
|
@ -321,24 +342,27 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
|
|||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
|
||||
github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI=
|
||||
github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs=
|
||||
github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
|
||||
github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U=
|
||||
github.com/vektah/gqlparser/v2 v2.2.0/go.mod h1:i3mQIGIrbK2PD1RrCeMTlVbkF2FJ6WkU1KJlJlC+3F4=
|
||||
github.com/vektah/gqlparser/v2 v2.3.1 h1:blIC0fCxGIr9pVjsc+BVI8XjYUtc2nCFRfnmP7FuFMk=
|
||||
github.com/vektah/gqlparser/v2 v2.3.1/go.mod h1:i3mQIGIrbK2PD1RrCeMTlVbkF2FJ6WkU1KJlJlC+3F4=
|
||||
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
|
||||
github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
|
||||
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
||||
github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
||||
github.com/vektah/gqlparser/v2 v2.4.5/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
||||
github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4=
|
||||
github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs=
|
||||
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
|
||||
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
|
||||
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.0/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.4 h1:zNWRjYUW32G9KirMXYHQHVNFkXvMI7LpgNW2AgYAoIs=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.4/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
|
||||
github.com/yuin/goldmark v1.4.14/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark v1.5.2 h1:ALmeCk/px5FSm1MAcFBAsVKZjDuMVj8Tm7FFIlMJnqU=
|
||||
github.com/yuin/goldmark v1.5.2/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark-emoji v1.0.1 h1:ctuWEyzGBwiucEqxzwe0SOYDXPAucOrE9NQC18Wa1os=
|
||||
github.com/yuin/goldmark-emoji v1.0.1/go.mod h1:2w1E6FEWLcDQkoTE+7HU6QF1F6SLlNGjRIBbIZQFqkQ=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
|
@ -353,8 +377,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
|
|||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
|
@ -365,6 +389,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
|
|||
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
||||
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
||||
golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
|
@ -388,9 +413,10 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
@ -409,7 +435,6 @@ golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLL
|
|||
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
|
@ -424,10 +449,11 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v
|
|||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y=
|
||||
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b h1:tvrvnPFcdzp294diPnrdZZZ8XUt2Tyj7svb7X52iDuU=
|
||||
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
|
@ -488,19 +514,24 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 h1:OK7RB6t2WQX54srQQYSXMW8dF5C6/8+oA/s5QBmmto4=
|
||||
golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20220919170432-7a66f970e087 h1:tPwmk4vmvVCMdr98VgL4JH+qZxPL8fqlUOHnyOM8N3w=
|
||||
golang.org/x/term v0.0.0-20220919170432-7a66f970e087/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -508,21 +539,20 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
|||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
|
@ -552,26 +582,25 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY
|
|||
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
|
||||
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
|
||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618=
|
||||
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
|
@ -665,9 +694,10 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
|
|||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4=
|
||||
gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
|
@ -686,5 +716,3 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
|
|||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
|
||||
sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k=
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package components
|
|||
import (
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package components
|
|||
import (
|
||||
"github.com/Khan/genqlient/graphql"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,16 +5,17 @@ import (
|
|||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/scenes"
|
||||
)
|
||||
|
||||
type rootModel struct {
|
||||
global *cli.GlobalContext
|
||||
currentSize tea.WindowSizeMsg
|
||||
headerComponent tea.Model
|
||||
dependencyResolver cli.DependencyResolver
|
||||
global *cli.GlobalContext
|
||||
currentSize tea.WindowSizeMsg
|
||||
}
|
||||
|
||||
func newModel(global *cli.GlobalContext) *rootModel {
|
||||
|
|
|
@ -13,31 +13,27 @@ import (
|
|||
var _ tea.Model = (*apply)(nil)
|
||||
|
||||
type update struct {
|
||||
completed []string
|
||||
|
||||
installName string
|
||||
modName string
|
||||
completed []string
|
||||
installTotal int
|
||||
installCurrent int
|
||||
|
||||
modName string
|
||||
modTotal int
|
||||
modCurrent int
|
||||
|
||||
done bool
|
||||
modTotal int
|
||||
modCurrent int
|
||||
done bool
|
||||
}
|
||||
|
||||
type apply struct {
|
||||
root components.RootModel
|
||||
parent tea.Model
|
||||
title string
|
||||
error *components.ErrorComponent
|
||||
overall progress.Model
|
||||
sub progress.Model
|
||||
|
||||
status update
|
||||
root components.RootModel
|
||||
parent tea.Model
|
||||
error *components.ErrorComponent
|
||||
updateChannel chan update
|
||||
errorChannel chan error
|
||||
cancelChannel chan bool
|
||||
title string
|
||||
status update
|
||||
overall progress.Model
|
||||
sub progress.Model
|
||||
cancelled bool
|
||||
}
|
||||
|
||||
|
@ -222,7 +218,7 @@ func (m apply) View() string {
|
|||
result := lipgloss.NewStyle().MarginLeft(1).Render(lipgloss.JoinVertical(lipgloss.Left, strs...))
|
||||
|
||||
if m.error != nil {
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.title, (*m.error).View(), result)
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.title, m.error.View(), result)
|
||||
}
|
||||
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.title, result)
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/charmbracelet/bubbles/list"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
|
@ -16,12 +17,12 @@ import (
|
|||
var _ tea.Model = (*installation)(nil)
|
||||
|
||||
type installation struct {
|
||||
root components.RootModel
|
||||
list list.Model
|
||||
root components.RootModel
|
||||
parent tea.Model
|
||||
installation *cli.Installation
|
||||
hadRenamed bool
|
||||
error *components.ErrorComponent
|
||||
hadRenamed bool
|
||||
}
|
||||
|
||||
func NewInstallation(root components.RootModel, parent tea.Model, installationData *cli.Installation) tea.Model {
|
||||
|
@ -139,7 +140,7 @@ func (m installation) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
|
||||
func (m installation) View() string {
|
||||
if m.error != nil {
|
||||
err := (*m.error).View()
|
||||
err := m.error.View()
|
||||
m.list.SetSize(m.list.Width(), m.root.Size().Height-m.root.Height()-lipgloss.Height(err))
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), err, m.list.View())
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"github.com/charmbracelet/bubbles/spinner"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
)
|
||||
|
|
|
@ -6,12 +6,12 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/charmbracelet/bubbles/key"
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
|
||||
"github.com/charmbracelet/bubbles/list"
|
||||
"github.com/charmbracelet/bubbles/spinner"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
)
|
||||
|
@ -112,7 +112,6 @@ func (m installedModsList) LoadModData() {
|
|||
mods, err := ficsit.Mods(context.TODO(), m.root.GetAPIClient(), ficsit.ModFilter{
|
||||
References: references,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
m.err <- err.Error()
|
||||
return
|
||||
|
|
|
@ -8,9 +8,10 @@ import (
|
|||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
var _ tea.Model = (*mainMenu)(nil)
|
||||
|
@ -196,7 +197,7 @@ func (m mainMenu) View() string {
|
|||
}
|
||||
|
||||
if m.error != nil {
|
||||
err := (*m.error).View()
|
||||
err := m.error.View()
|
||||
m.list.SetSize(m.list.Width(), m.root.Size().Height-lipgloss.Height(header)-lipgloss.Height(err))
|
||||
return lipgloss.JoinVertical(lipgloss.Left, header, err, m.list.View())
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
)
|
||||
|
|
|
@ -6,11 +6,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/PuerkitoBio/goquery"
|
||||
|
||||
md "github.com/JohannesKaufmann/html-to-markdown"
|
||||
"github.com/PuerkitoBio/goquery"
|
||||
"github.com/charmbracelet/bubbles/help"
|
||||
"github.com/charmbracelet/bubbles/key"
|
||||
"github.com/charmbracelet/bubbles/spinner"
|
||||
|
@ -18,6 +15,8 @@ import (
|
|||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/glamour"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
|
@ -27,15 +26,15 @@ var _ tea.Model = (*modVersionMenu)(nil)
|
|||
|
||||
type modInfo struct {
|
||||
root components.RootModel
|
||||
viewport viewport.Model
|
||||
spinner spinner.Model
|
||||
parent tea.Model
|
||||
modData chan ficsit.GetModMod
|
||||
modError chan string
|
||||
ready bool
|
||||
error *components.ErrorComponent
|
||||
help help.Model
|
||||
keys modInfoKeyMap
|
||||
error *components.ErrorComponent
|
||||
viewport viewport.Model
|
||||
spinner spinner.Model
|
||||
ready bool
|
||||
}
|
||||
|
||||
type modInfoKeyMap struct {
|
||||
|
@ -88,7 +87,6 @@ func NewModInfo(root components.RootModel, parent tea.Model, mod utils.Mod) tea.
|
|||
|
||||
go func() {
|
||||
fullMod, err := ficsit.GetMod(context.TODO(), root.GetAPIClient(), mod.Reference)
|
||||
|
||||
if err != nil {
|
||||
model.modError <- err.Error()
|
||||
return
|
||||
|
@ -225,7 +223,7 @@ func (m modInfo) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
func (m modInfo) View() string {
|
||||
if m.error != nil {
|
||||
helpBar := lipgloss.NewStyle().Padding(1, 2).Render(m.help.View(m.keys))
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), (*m.error).View(), m.viewport.View(), helpBar)
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), m.error.View(), m.viewport.View(), helpBar)
|
||||
}
|
||||
|
||||
if m.viewport.Height == 0 {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"github.com/charmbracelet/bubbles/textinput"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
)
|
||||
|
@ -13,12 +14,12 @@ import (
|
|||
var _ tea.Model = (*modSemver)(nil)
|
||||
|
||||
type modSemver struct {
|
||||
input textinput.Model
|
||||
root components.RootModel
|
||||
parent tea.Model
|
||||
input textinput.Model
|
||||
title string
|
||||
mod utils.Mod
|
||||
error *components.ErrorComponent
|
||||
mod utils.Mod
|
||||
title string
|
||||
}
|
||||
|
||||
func NewModSemver(root components.RootModel, parent tea.Model, mod utils.Mod) tea.Model {
|
||||
|
@ -79,7 +80,7 @@ func (m modSemver) View() string {
|
|||
inputView := lipgloss.NewStyle().Padding(1, 2).Render(m.input.View())
|
||||
|
||||
if m.error != nil {
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), m.title, (*m.error).View(), inputView)
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), m.title, m.error.View(), inputView)
|
||||
}
|
||||
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), m.title, inputView)
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
)
|
||||
|
|
|
@ -13,6 +13,7 @@ import (
|
|||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/muesli/reflow/truncate"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
|
@ -36,22 +37,18 @@ type listUpdate struct {
|
|||
}
|
||||
|
||||
type modsList struct {
|
||||
root components.RootModel
|
||||
list list.Model
|
||||
parent tea.Model
|
||||
items chan listUpdate
|
||||
|
||||
sortingField string
|
||||
sortingOrder sortOrder
|
||||
|
||||
showSortFieldList bool
|
||||
list list.Model
|
||||
sortFieldList list.Model
|
||||
|
||||
showSortOrderList bool
|
||||
sortOrderList list.Model
|
||||
|
||||
err chan string
|
||||
error *components.ErrorComponent
|
||||
root components.RootModel
|
||||
parent tea.Model
|
||||
items chan listUpdate
|
||||
err chan string
|
||||
error *components.ErrorComponent
|
||||
sortingField string
|
||||
sortingOrder sortOrder
|
||||
showSortFieldList bool
|
||||
showSortOrderList bool
|
||||
}
|
||||
|
||||
func NewMods(root components.RootModel, parent tea.Model) tea.Model {
|
||||
|
@ -186,8 +183,8 @@ func NewMods(root components.RootModel, parent tea.Model) tea.Model {
|
|||
},
|
||||
},
|
||||
utils.SimpleItemExtra[modsList, ficsit.ModsModsGetModsModsMod]{
|
||||
|
||||
SimpleItem: utils.SimpleItem[modsList]{ItemTitle: "Descending",
|
||||
SimpleItem: utils.SimpleItem[modsList]{
|
||||
ItemTitle: "Descending",
|
||||
Activate: func(msg tea.Msg, m modsList) (tea.Model, tea.Cmd) {
|
||||
m.sortingOrder = sortOrderDesc
|
||||
cmd := m.list.SetItems(sortItems(m.list.Items(), m.sortingField, m.sortingOrder))
|
||||
|
@ -229,7 +226,6 @@ func NewMods(root components.RootModel, parent tea.Model) tea.Model {
|
|||
Order_by: ficsit.ModFieldsLastVersionDate,
|
||||
Order: ficsit.OrderDesc,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
m.err <- err.Error()
|
||||
return
|
||||
|
@ -395,7 +391,7 @@ func (m modsList) View() string {
|
|||
}
|
||||
|
||||
if m.error != nil {
|
||||
err := (*m.error).View()
|
||||
err := m.error.View()
|
||||
bottomList.SetSize(bottomList.Width(), m.root.Size().Height-m.root.Height()-lipgloss.Height(err))
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), err, bottomList.View())
|
||||
}
|
||||
|
|
|
@ -24,12 +24,12 @@ import (
|
|||
var _ tea.Model = (*newInstallation)(nil)
|
||||
|
||||
type newInstallation struct {
|
||||
dirList list.Model
|
||||
input textinput.Model
|
||||
root components.RootModel
|
||||
parent tea.Model
|
||||
input textinput.Model
|
||||
title string
|
||||
error *components.ErrorComponent
|
||||
dirList list.Model
|
||||
title string
|
||||
}
|
||||
|
||||
func NewNewInstallation(root components.RootModel, parent tea.Model) tea.Model {
|
||||
|
@ -154,7 +154,7 @@ func (m newInstallation) View() string {
|
|||
mandatory := lipgloss.JoinVertical(lipgloss.Left, m.root.View(), m.title, inputView)
|
||||
|
||||
if m.error != nil {
|
||||
return lipgloss.JoinVertical(lipgloss.Left, mandatory, (*m.error).View())
|
||||
return lipgloss.JoinVertical(lipgloss.Left, mandatory, m.error.View())
|
||||
}
|
||||
|
||||
if len(m.dirList.Items()) > 0 {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"github.com/charmbracelet/bubbles/textinput"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
)
|
||||
|
@ -13,11 +14,11 @@ import (
|
|||
var _ tea.Model = (*newProfile)(nil)
|
||||
|
||||
type newProfile struct {
|
||||
input textinput.Model
|
||||
root components.RootModel
|
||||
parent tea.Model
|
||||
input textinput.Model
|
||||
title string
|
||||
error *components.ErrorComponent
|
||||
title string
|
||||
}
|
||||
|
||||
func NewNewProfile(root components.RootModel, parent tea.Model) tea.Model {
|
||||
|
@ -76,7 +77,7 @@ func (m newProfile) View() string {
|
|||
inputView := lipgloss.NewStyle().Padding(1, 2).Render(m.input.View())
|
||||
|
||||
if m.error != nil {
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), m.title, (*m.error).View(), inputView)
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), m.title, m.error.View(), inputView)
|
||||
}
|
||||
|
||||
infoBox := lipgloss.NewStyle().
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/charmbracelet/bubbles/list"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
|
@ -16,12 +17,12 @@ import (
|
|||
var _ tea.Model = (*profile)(nil)
|
||||
|
||||
type profile struct {
|
||||
root components.RootModel
|
||||
list list.Model
|
||||
root components.RootModel
|
||||
parent tea.Model
|
||||
profile *cli.Profile
|
||||
hadRenamed bool
|
||||
error *components.ErrorComponent
|
||||
hadRenamed bool
|
||||
}
|
||||
|
||||
func NewProfile(root components.RootModel, parent tea.Model, profileData *cli.Profile) tea.Model {
|
||||
|
@ -151,7 +152,7 @@ func (m profile) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
|
||||
func (m profile) View() string {
|
||||
if m.error != nil {
|
||||
err := (*m.error).View()
|
||||
err := m.error.View()
|
||||
m.list.SetSize(m.list.Width(), m.root.Size().Height-m.root.Height()-lipgloss.Height(err))
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), err, m.list.View())
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"github.com/charmbracelet/bubbles/spinner"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
)
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"github.com/charmbracelet/bubbles/textinput"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cli"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
|
@ -15,12 +16,12 @@ import (
|
|||
var _ tea.Model = (*renameProfile)(nil)
|
||||
|
||||
type renameProfile struct {
|
||||
input textinput.Model
|
||||
root components.RootModel
|
||||
parent tea.Model
|
||||
input textinput.Model
|
||||
error *components.ErrorComponent
|
||||
title string
|
||||
oldName string
|
||||
error *components.ErrorComponent
|
||||
}
|
||||
|
||||
func NewRenameProfile(root components.RootModel, parent tea.Model, profileData *cli.Profile) tea.Model {
|
||||
|
@ -81,7 +82,7 @@ func (m renameProfile) View() string {
|
|||
inputView := lipgloss.NewStyle().Padding(1, 2).Render(m.input.View())
|
||||
|
||||
if m.error != nil {
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), m.title, (*m.error).View(), inputView)
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), m.title, m.error.View(), inputView)
|
||||
}
|
||||
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), m.title, inputView)
|
||||
|
|
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/charmbracelet/bubbles/spinner"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/ficsit"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/components"
|
||||
"github.com/satisfactorymodding/ficsit-cli/tea/utils"
|
||||
|
@ -68,7 +69,6 @@ func NewModVersionList(root components.RootModel, parent tea.Model, mod utils.Mo
|
|||
Order: ficsit.OrderDesc,
|
||||
Order_by: ficsit.VersionFieldsCreatedAt,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
m.err <- err.Error()
|
||||
return
|
||||
|
@ -172,7 +172,7 @@ func (m selectModVersionList) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
|
||||
func (m selectModVersionList) View() string {
|
||||
if m.error != nil {
|
||||
err := (*m.error).View()
|
||||
err := m.error.View()
|
||||
m.list.SetSize(m.list.Width(), m.root.Size().Height-m.root.Height()-lipgloss.Height(err))
|
||||
return lipgloss.JoinVertical(lipgloss.Left, m.root.View(), err, m.list.View())
|
||||
}
|
||||
|
|
|
@ -9,13 +9,13 @@ import (
|
|||
var _ list.DefaultItem = (*SimpleItem[tea.Model])(nil)
|
||||
|
||||
type SimpleItem[T tea.Model] struct {
|
||||
ItemTitle string
|
||||
Activate func(msg tea.Msg, currentModel T) (tea.Model, tea.Cmd)
|
||||
ItemTitle string
|
||||
}
|
||||
|
||||
type SimpleItemExtra[T tea.Model, E any] struct {
|
||||
SimpleItem[T]
|
||||
Extra E
|
||||
SimpleItem[T]
|
||||
}
|
||||
|
||||
func (n SimpleItem[any]) Title() string {
|
||||
|
|
10
tools.go
10
tools.go
|
@ -4,14 +4,16 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
_ "github.com/Khan/genqlient/generate"
|
||||
"github.com/satisfactorymodding/ficsit-cli/cmd"
|
||||
"github.com/spf13/cobra/doc"
|
||||
"os"
|
||||
|
||||
_ "github.com/Khan/genqlient/generate"
|
||||
"github.com/spf13/cobra/doc"
|
||||
|
||||
"github.com/satisfactorymodding/ficsit-cli/cmd"
|
||||
)
|
||||
|
||||
//go:generate go run -tags tools tools.go
|
||||
//go:generate go run github.com/Khan/genqlient
|
||||
//go:generate go run -tags tools tools.go
|
||||
|
||||
func main() {
|
||||
_ = os.RemoveAll("./docs/")
|
||||
|
|
14
utils/io.go
14
utils/io.go
|
@ -18,9 +18,9 @@ import (
|
|||
|
||||
type Progresser struct {
|
||||
io.Reader
|
||||
updates chan GenericUpdate
|
||||
total int64
|
||||
running int64
|
||||
updates chan GenericUpdate
|
||||
}
|
||||
|
||||
func (pt *Progresser) Read(p []byte) (int, error) {
|
||||
|
@ -44,13 +44,13 @@ func (pt *Progresser) Read(p []byte) (int, error) {
|
|||
}
|
||||
|
||||
type GenericUpdate struct {
|
||||
Progress float64
|
||||
ModReference *string
|
||||
Progress float64
|
||||
}
|
||||
|
||||
func DownloadOrCache(cacheKey string, hash string, url string, updates chan GenericUpdate) (r io.ReaderAt, size int64, err error) {
|
||||
func DownloadOrCache(cacheKey string, hash string, url string, updates chan GenericUpdate) (io.ReaderAt, int64, error) {
|
||||
downloadCache := filepath.Join(viper.GetString("cache-dir"), "downloadCache")
|
||||
if err := os.MkdirAll(downloadCache, 0777); err != nil {
|
||||
if err := os.MkdirAll(downloadCache, 0o777); err != nil {
|
||||
if !os.IsExist(err) {
|
||||
return nil, 0, errors.Wrap(err, "failed creating download cache")
|
||||
}
|
||||
|
@ -86,10 +86,8 @@ func DownloadOrCache(cacheKey string, hash string, url string, updates chan Gene
|
|||
if err := os.Remove(location); err != nil {
|
||||
return nil, 0, errors.Wrap(err, "failed to delete file: "+location)
|
||||
}
|
||||
} else {
|
||||
if !os.IsNotExist(err) {
|
||||
return nil, 0, errors.Wrap(err, "failed to stat file: "+location)
|
||||
}
|
||||
} else if !os.IsNotExist(err) {
|
||||
return nil, 0, errors.Wrap(err, "failed to stat file: "+location)
|
||||
}
|
||||
|
||||
out, err := os.Create(location)
|
||||
|
|
Loading…
Reference in a new issue